From 7896888c25c423e62f473452ade14e2b17a50930 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Wed, 20 Sep 2023 21:40:18 -0400 Subject: [PATCH] Update gettext to version 0.22.3 --- .../0001-gettext-tools-src-its-c.patch | 14 + ...2-gettext-tools-src-locating-rules-c.patch | 23 + .../patches/gettext/gettext-runtime-c99.patch | 103 - .../patches/gettext/gettext-tools-c99.patch | 1072 ------ .../gettext/gettext-tools-gnulib-memset.patch | 15 - .../patches/gettext/libtextstyle-c99.patch | 259 -- .../{vs14/Win32 => }/gettext-runtime/config.h | 1529 ++++++--- .../msvc/gettext-runtime/gnulib-lib/assert.h | 314 ++ .../msvc/gettext-runtime/gnulib-lib/errno.h | 22 +- .../msvc/gettext-runtime/gnulib-lib/error.h | 563 +++ .../msvc/gettext-runtime/gnulib-lib/fcntl.h | 173 +- .../gettext-runtime/gnulib-lib/getopt-cdefs.h | 31 +- .../msvc/gettext-runtime/gnulib-lib/getopt.h | 34 +- .../msvc/gettext-runtime/gnulib-lib/iconv.h | 120 +- .../gettext-runtime/gnulib-lib/inttypes.h | 156 +- .../gettext-runtime/gnulib-lib/langinfo.h | 110 +- .../msvc/gettext-runtime/gnulib-lib/limits.h | 54 +- .../msvc/gettext-runtime/gnulib-lib/locale.h | 162 +- .../gnulib-lib/malloc/scratch_buffer.gl.h | 133 + .../msvc/gettext-runtime/gnulib-lib/signal.h | 144 +- .../gettext-runtime/gnulib-lib/stdckdint.h | 36 + .../msvc/gettext-runtime/gnulib-lib/stddef.h | 132 +- .../gettext-runtime/gnulib-lib/stdint.h | 34 +- .../gettext-runtime/gnulib-lib/stdio.h | 649 +++- .../msvc/gettext-runtime/gnulib-lib/stdlib.h | 959 +++++- .../msvc/gettext-runtime/gnulib-lib/string.h | 611 +++- .../gettext-runtime/gnulib-lib/sys/stat.h | 390 ++- .../gettext-runtime/gnulib-lib/sys/types.h | 33 +- .../msvc/gettext-runtime/gnulib-lib/time.h | 375 +- .../msvc/gettext-runtime/gnulib-lib/uchar.h | 1423 ++++++++ .../msvc/gettext-runtime/gnulib-lib/unicase.h | 472 +++ .../gettext-runtime/gnulib-lib/unictype.h | 1097 ++++++ .../msvc/gettext-runtime/gnulib-lib/uninorm.h | 256 ++ .../msvc/gettext-runtime/gnulib-lib/unistd.h | 891 ++++- .../msvc/gettext-runtime/gnulib-lib/unistr.h | 65 +- .../gettext-runtime/gnulib-lib/unitypes.h | 26 +- .../gettext-runtime/gnulib-lib/uniwidth.h | 18 +- .../msvc/gettext-runtime/gnulib-lib/wchar.h | 659 +++- .../msvc/gettext-runtime/gnulib-lib/wctype.h | 239 +- .../msvc/gettext-runtime/intl/config.h | 2006 +++++++++++ .../{libasprintf => intl/gnulib-lib}/alloca.h | 8 +- .../gettext-runtime/intl/gnulib-lib/assert.h | 314 ++ .../{libasprintf => intl/gnulib-lib}/errno.h | 20 +- .../intl/gnulib-lib/inttypes.h | 1546 +++++++++ .../intl/gnulib-lib/langinfo.h} | 321 +- .../gettext-runtime/intl/gnulib-lib/limits.h | 152 + .../gettext-runtime/intl/gnulib-lib/locale.h | 823 +++++ .../intl}/gnulib-lib/math.h | 560 ++- .../gettext-runtime/intl/gnulib-lib/search.h | 797 +++++ .../gettext-runtime/intl/gnulib-lib/stddef.h | 214 ++ .../intl}/gnulib-lib/stdint.h | 28 +- .../intl/gnulib-lib}/stdio.h | 662 +++- .../gettext-runtime/intl/gnulib-lib/stdlib.h | 2399 +++++++++++++ .../gettext-runtime/intl/gnulib-lib/string.h | 1953 +++++++++++ .../intl/gnulib-lib/sys/types.h | 114 + .../gettext-runtime/intl/gnulib-lib/unistd.h | 2936 ++++++++++++++++ .../gettext-runtime/intl/gnulib-lib/wchar.h | 2220 ++++++++++++ .../msvc/gettext-runtime/intl/libgnuintl.h | 350 +- .../msvc/gettext-runtime/intl/libintl.h | 452 +-- .../gettext-runtime/libasprintf/autosprintf.h | 14 +- .../msvc/gettext-runtime/libasprintf/config.h | 1291 +++++++ .../libasprintf/gnulib-lib/alloca.h | 84 + .../libasprintf/gnulib-lib/assert.h | 313 ++ .../libasprintf/gnulib-lib/errno.h | 280 ++ .../libasprintf/gnulib-lib/inttypes.h | 1546 +++++++++ .../libasprintf/gnulib-lib/limits.h | 152 + .../libasprintf/gnulib-lib/stddef.h | 214 ++ .../libasprintf}/gnulib-lib/stdint.h | 28 +- .../libasprintf/gnulib-lib}/stdio.h | 662 +++- .../libasprintf/gnulib-lib/stdlib.h | 2399 +++++++++++++ .../libasprintf/gnulib-lib/string.h | 1953 +++++++++++ .../libasprintf/gnulib-lib/sys/types.h | 114 + .../libasprintf/gnulib-lib/unistd.h | 2936 ++++++++++++++++ .../libasprintf/gnulib-lib/wchar.h | 2220 ++++++++++++ .../{vs14/arm64 => }/gettext-tools/config.h | 1856 +++++++--- .../{gnulib-tests => gnulib-lib}/arpa/inet.h | 126 +- .../msvc/gettext-tools/gnulib-lib/assert.h | 314 ++ .../msvc/gettext-tools/gnulib-lib/byteswap.h | 16 +- .../gettext-tools/gnulib-lib/configmake.h | 40 + .../msvc/gettext-tools/gnulib-lib/ctype.h | 116 +- .../msvc/gettext-tools/gnulib-lib/dirent.h | 296 +- .../msvc/gettext-tools/gnulib-lib/errno.h | 22 +- .../msvc/gettext-tools/gnulib-lib/error.h | 563 +++ .../msvc/gettext-tools/gnulib-lib/fcntl.h | 177 +- .../msvc/gettext-tools/gnulib-lib/fnmatch.h | 122 +- .../gettext-tools/gnulib-lib/getopt-cdefs.h | 31 +- .../msvc/gettext-tools/gnulib-lib/getopt.h | 34 +- .../msvc/gettext-tools/gnulib-lib/iconv.h | 120 +- .../msvc/gettext-tools/gnulib-lib/inttypes.h | 186 +- .../msvc/gettext-tools/gnulib-lib/langinfo.h | 112 +- .../gettext-tools/gnulib-lib/libxml/parser.h | 7 +- .../msvc/gettext-tools/gnulib-lib/limits.h | 54 +- .../msvc/gettext-tools/gnulib-lib/locale.h | 164 +- .../gnulib-lib/malloc/scratch_buffer.gl.h | 133 + .../gettext-tools/gnulib-lib/math.h | 530 ++- .../msvc/gettext-tools/gnulib-lib/netdb.h | 813 +++++ .../{gnulib-tests => gnulib-lib}/netinet/in.h | 18 +- .../msvc/gettext-tools/gnulib-lib/omp.h | 20 +- .../msvc/gettext-tools/gnulib-lib/sched.h | 119 +- .../msvc/gettext-tools/gnulib-lib/signal.h | 144 +- .../msvc/gettext-tools/gnulib-lib/spawn.h | 224 +- .../msvc/gettext-tools/gnulib-lib/stdckdint.h | 36 + .../msvc/gettext-tools/gnulib-lib/stddef.h | 132 +- .../gettext-tools/gnulib-lib/stdint.h | 34 +- .../x64 => }/gettext-tools/gnulib-lib/stdio.h | 674 +++- .../msvc/gettext-tools/gnulib-lib/stdlib.h | 955 +++++- .../msvc/gettext-tools/gnulib-lib/string.h | 621 +++- .../gettext-tools/gnulib-lib/sys/random.h | 128 +- .../gettext-tools/gnulib-lib/sys/select.h | 156 +- .../{gnulib-tests => gnulib-lib}/sys/socket.h | 131 +- .../msvc/gettext-tools/gnulib-lib/sys/stat.h | 392 ++- .../msvc/gettext-tools/gnulib-lib/sys/time.h | 129 +- .../msvc/gettext-tools/gnulib-lib/sys/types.h | 33 +- .../{gnulib-tests => gnulib-lib}/sys/uio.h | 18 +- .../msvc/gettext-tools/gnulib-lib/sys/wait.h | 108 +- .../msvc/gettext-tools/gnulib-lib/time.h | 375 +- .../msvc/gettext-tools/gnulib-lib/uchar.h | 1423 ++++++++ .../msvc/gettext-tools/gnulib-lib/unicase.h | 472 +++ .../msvc/gettext-tools/gnulib-lib/uniconv.h | 18 +- .../msvc/gettext-tools/gnulib-lib/unictype.h | 487 +-- .../msvc/gettext-tools/gnulib-lib/unilbrk.h | 79 +- .../msvc/gettext-tools/gnulib-lib/uniname.h | 28 +- .../msvc/gettext-tools/gnulib-lib/uninorm.h | 256 ++ .../msvc/gettext-tools/gnulib-lib/unistd.h | 901 ++++- .../msvc/gettext-tools/gnulib-lib/unistr.h | 65 +- .../msvc/gettext-tools/gnulib-lib/unitypes.h | 26 +- .../msvc/gettext-tools/gnulib-lib/uniwidth.h | 18 +- .../msvc/gettext-tools/gnulib-lib/utime.h | 151 +- .../msvc/gettext-tools/gnulib-lib/wchar.h | 669 +++- .../msvc/gettext-tools/gnulib-lib/wctype.h | 245 +- .../msvc/gettext-tools/gnulib-tests/pthread.h | 2396 ------------- .../gettext-tools/gnulib-tests/stdalign.h | 122 - .../msvc/gettext-tools/libgettextpo/assert.h | 313 ++ .../gettext-tools/libgettextpo/config.h | 69 +- .../msvc/gettext-tools/libgettextpo/errno.h | 22 +- .../msvc/gettext-tools/libgettextpo/error.h | 563 +++ .../msvc/gettext-tools/libgettextpo/fcntl.h | 181 +- .../gettext-tools/libgettextpo/gettext-po.h | 122 +- .../msvc/gettext-tools/libgettextpo/iconv.h | 120 +- .../gettext-tools/libgettextpo/inttypes.h | 186 +- .../msvc/gettext-tools/libgettextpo/limits.h | 54 +- .../msvc/gettext-tools/libgettextpo/locale.h | 166 +- .../msvc/gettext-tools/libgettextpo/signal.h | 150 +- .../gettext-tools/libgettextpo/stdckdint.h | 36 + .../msvc/gettext-tools/libgettextpo/stddef.h | 138 +- .../gettext-tools/libgettextpo/stdint.h | 34 +- .../gettext-tools/libgettextpo/stdio.h | 674 +++- .../msvc/gettext-tools/libgettextpo/stdlib.h | 973 +++++- .../msvc/gettext-tools/libgettextpo/string.h | 633 +++- .../gettext-tools/libgettextpo/sys/stat.h | 392 ++- .../gettext-tools/libgettextpo/sys/types.h | 33 +- .../gettext-tools/libgettextpo/textstyle.h | 410 ++- .../msvc/gettext-tools/libgettextpo/time.h | 379 ++- .../msvc/gettext-tools/libgettextpo/uchar.h | 1423 ++++++++ .../msvc/gettext-tools/libgettextpo/uniconv.h | 18 +- .../gettext-tools/libgettextpo/unictype.h | 487 +-- .../msvc/gettext-tools/libgettextpo/unilbrk.h | 79 +- .../msvc/gettext-tools/libgettextpo/unistd.h | 927 ++++- .../msvc/gettext-tools/libgettextpo/unistr.h | 65 +- .../gettext-tools/libgettextpo/unitypes.h | 26 +- .../gettext-tools/libgettextpo/uniwidth.h | 18 +- .../msvc/gettext-tools/libgettextpo/wchar.h | 679 +++- .../msvc/gettext-tools/libgettextpo/wctype.h | 251 +- .../msvc/gettext-tools/libgrep/inttypes.h | 1552 +++++++++ .../msvc/gettext-tools/libgrep/langinfo.h | 110 +- .../msvc/gettext-tools/libgrep/limits.h | 152 + .../msvc/gettext-tools/libgrep/locale.h | 823 +++++ .../libgrep/malloc/dynarray-skeleton.gl.h | 529 +++ .../libgrep/malloc/dynarray.gl.h | 173 + .../msvc/gettext-tools/libgrep/stdckdint.h | 36 + .../msvc/gettext-tools/libgrep/stddef.h | 214 ++ .../libgrep}/stdint.h | 46 +- .../msvc/gettext-tools/libgrep/stdlib.h | 2399 +++++++++++++ .../msvc/gettext-tools/libgrep/sys/types.h | 114 + .../msvc/gettext-tools/libgrep/unistd.h | 2936 ++++++++++++++++ .../msvc/gettext-tools/libgrep/wchar.h | 2220 ++++++++++++ .../msvc/gettext-tools/libgrep/wctype.h | 1310 +++++++ .../msvc/gettext-tools/src/textstyle.h | 629 ---- .../gettext-tools/src/textstyle/stdbool.h | 117 - .../gettext-tools/src/textstyle/version.h | 44 - .../gettext-tools/src/textstyle/woe32dll.h | 30 - .../msvc/{vs14/x64 => }/libtextstyle/config.h | 1260 +++++-- .../gettext/msvc/libtextstyle/lib/assert.h | 313 ++ .../Win32 => }/libtextstyle/lib/config.h | 76 +- .../gettext/msvc/libtextstyle/lib/errno.h | 22 +- .../gettext/msvc/libtextstyle/lib/error.h | 563 +++ .../gettext/msvc/libtextstyle/lib/fcntl.h | 173 +- .../gettext/msvc/libtextstyle/lib/glib.h | 8 +- .../msvc/libtextstyle/lib/glib/ghash.h | 8 +- .../msvc/libtextstyle/lib/glib/glist.h | 8 +- .../msvc/libtextstyle/lib/glib/gmacros.h | 8 +- .../msvc/libtextstyle/lib/glib/gprimes.h | 8 +- .../msvc/libtextstyle/lib/glib/gprintfint.h | 8 +- .../msvc/libtextstyle/lib/glib/gstrfuncs.h | 8 +- .../msvc/libtextstyle/lib/glib/gstring.h | 8 +- .../msvc/libtextstyle/lib/glib/gtypes.h | 8 +- .../msvc/libtextstyle/lib/glibconfig.h | 8 +- .../gettext/msvc/libtextstyle/lib/inttypes.h | 158 +- .../msvc/libtextstyle/lib/libxml/parser.h | 7 +- .../gettext/msvc/libtextstyle/lib/limits.h | 56 +- .../{vs14/x64 => }/libtextstyle/lib/math.h | 534 ++- .../gettext/msvc/libtextstyle/lib/signal.h | 144 +- .../gettext/msvc/libtextstyle/lib/stdalign.h | 122 - .../gettext/msvc/libtextstyle/lib/stdckdint.h | 36 + .../gettext/msvc/libtextstyle/lib/stddef.h | 138 +- .../gettext/msvc/libtextstyle/lib/stdint.h | 28 +- .../{vs14/x64 => }/libtextstyle/lib/stdio.h | 638 +++- .../gettext/msvc/libtextstyle/lib/stdlib.h | 957 +++++- .../gettext/msvc/libtextstyle/lib/string.h | 605 +++- .../msvc/libtextstyle/lib/sys/socket.h | 131 +- .../gettext/msvc/libtextstyle/lib/sys/stat.h | 388 ++- .../gettext/msvc/libtextstyle/lib/sys/time.h | 129 +- .../gettext/msvc/libtextstyle/lib/sys/types.h | 34 +- .../gettext/msvc/libtextstyle/lib/sys/uio.h | 18 +- .../msvc/libtextstyle/lib/textstyle/version.h | 2 +- .../gettext/msvc/libtextstyle/lib/time.h | 375 +- .../gettext/msvc/libtextstyle/lib/unistd.h | 893 ++++- .../gettext/msvc/libtextstyle/lib/unistr.h | 65 +- .../gettext/msvc/libtextstyle/lib/unitypes.h | 26 +- .../gettext/msvc/libtextstyle/lib/wchar.h | 661 +++- .../msvc/vs12/Win32/gettext-runtime/config.h | 1542 --------- .../Win32/gettext-runtime/gnulib-lib/stdint.h | 747 ---- .../Win32/gettext-runtime/gnulib-lib/stdio.h | 1986 ----------- .../msvc/vs12/Win32/gettext-tools/config.h | 2872 ---------------- .../gettext-tools/gnulib-lib/configmake.h | 31 - .../Win32/gettext-tools/gnulib-lib/math.h | 3008 ----------------- .../Win32/gettext-tools/gnulib-lib/stdint.h | 747 ---- .../Win32/gettext-tools/gnulib-lib/stdio.h | 1986 ----------- .../Win32/gettext-tools/libgettextpo/config.h | 387 --- .../Win32/gettext-tools/libgettextpo/stdint.h | 747 ---- .../Win32/gettext-tools/libgettextpo/stdio.h | 1986 ----------- .../msvc/vs12/Win32/libtextstyle/config.h | 1456 -------- .../msvc/vs12/Win32/libtextstyle/lib/config.h | 1250 ------- .../msvc/vs12/Win32/libtextstyle/lib/math.h | 3008 ----------------- .../msvc/vs12/Win32/libtextstyle/lib/stdio.h | 1986 ----------- .../msvc/vs12/x64/gettext-runtime/config.h | 1542 --------- .../x64/gettext-runtime/gnulib-lib/stdint.h | 747 ---- .../x64/gettext-runtime/gnulib-lib/stdio.h | 1986 ----------- .../msvc/vs12/x64/gettext-tools/config.h | 2872 ---------------- .../x64/gettext-tools/gnulib-lib/configmake.h | 31 - .../vs12/x64/gettext-tools/gnulib-lib/math.h | 3008 ----------------- .../x64/gettext-tools/gnulib-lib/stdint.h | 747 ---- .../vs12/x64/gettext-tools/gnulib-lib/stdio.h | 1986 ----------- .../x64/gettext-tools/libgettextpo/stdint.h | 747 ---- .../x64/gettext-tools/libgettextpo/stdio.h | 1986 ----------- .../msvc/vs12/x64/libtextstyle/config.h | 1456 -------- .../msvc/vs12/x64/libtextstyle/lib/config.h | 1250 ------- .../msvc/vs12/x64/libtextstyle/lib/math.h | 3008 ----------------- .../msvc/vs12/x64/libtextstyle/lib/stdio.h | 1986 ----------- .../Win32/gettext-runtime/gnulib-lib/stdio.h | 1986 ----------- .../msvc/vs14/Win32/gettext-tools/config.h | 2872 ---------------- .../gettext-tools/gnulib-lib/configmake.h | 31 - .../Win32/gettext-tools/gnulib-lib/stdio.h | 1986 ----------- .../Win32/gettext-tools/libgettextpo/config.h | 387 --- .../msvc/vs14/Win32/libtextstyle/config.h | 1456 -------- .../msvc/vs14/Win32/libtextstyle/lib/math.h | 3008 ----------------- .../msvc/vs14/arm64/gettext-runtime/config.h | 1542 --------- .../arm64/gettext-runtime/gnulib-lib/stdio.h | 1986 ----------- .../gettext-tools/gnulib-lib/configmake.h | 31 - .../arm64/gettext-tools/gnulib-lib/math.h | 3008 ----------------- .../arm64/gettext-tools/gnulib-lib/stdio.h | 1986 ----------- .../arm64/gettext-tools/libgettextpo/config.h | 383 --- .../arm64/gettext-tools/libgettextpo/stdio.h | 1986 ----------- .../msvc/vs14/arm64/libtextstyle/config.h | 1456 -------- .../msvc/vs14/arm64/libtextstyle/lib/config.h | 1250 ------- .../msvc/vs14/arm64/libtextstyle/lib/math.h | 3008 ----------------- .../msvc/vs14/x64/gettext-runtime/config.h | 1542 --------- .../x64/gettext-runtime/gnulib-lib/stdint.h | 747 ---- .../msvc/vs14/x64/gettext-tools/config.h | 2872 ---------------- .../x64/gettext-tools/gnulib-lib/configmake.h | 31 - .../x64/gettext-tools/gnulib-lib/stdint.h | 747 ---- .../x64/gettext-tools/libgettextpo/config.h | 387 --- .../x64/gettext-tools/libgettextpo/stdint.h | 747 ---- .../x64/gettext-tools/libgettextpo/stdio.h | 1986 ----------- .../msvc/vs14/x64/libtextstyle/lib/config.h | 1250 ------- .../gettext/nmake/build-rules-msvc.mak | 117 +- .../patches/gettext/nmake/config-msvc.mak | 106 +- .../gettext/nmake/create-lists-msvc.mak | 287 +- .../patches/gettext/nmake/detectenv-msvc.mak | 17 +- .../gettext/nmake/gettext-runtime-sources.mk | 100 +- .../gettext/nmake/gettext-tools-sources.mk | 278 +- .../patches/gettext/nmake/libgettextlib.def | 20 +- .../patches/gettext/nmake/libgettextsrc.def | 5 + .../gettext/nmake/libtextstyle-sources.mk | 24 +- gvsbuild/projects/gettext.py | 10 +- 285 files changed, 82264 insertions(+), 99261 deletions(-) create mode 100644 gvsbuild/patches/gettext/0001-gettext-tools-src-its-c.patch create mode 100644 gvsbuild/patches/gettext/0002-gettext-tools-src-locating-rules-c.patch delete mode 100644 gvsbuild/patches/gettext/gettext-runtime-c99.patch delete mode 100644 gvsbuild/patches/gettext/gettext-tools-c99.patch delete mode 100644 gvsbuild/patches/gettext/gettext-tools-gnulib-memset.patch delete mode 100644 gvsbuild/patches/gettext/libtextstyle-c99.patch rename gvsbuild/patches/gettext/msvc/{vs14/Win32 => }/gettext-runtime/config.h (52%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/assert.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/error.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/malloc/scratch_buffer.gl.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdckdint.h rename gvsbuild/patches/gettext/msvc/{vs14/arm64 => }/gettext-runtime/gnulib-lib/stdint.h (95%) rename gvsbuild/patches/gettext/msvc/{vs14/x64 => }/gettext-runtime/gnulib-lib/stdio.h (77%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uchar.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unicase.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unictype.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uninorm.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/config.h rename gvsbuild/patches/gettext/msvc/gettext-runtime/{libasprintf => intl/gnulib-lib}/alloca.h (90%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/assert.h rename gvsbuild/patches/gettext/msvc/gettext-runtime/{libasprintf => intl/gnulib-lib}/errno.h (93%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/inttypes.h rename gvsbuild/patches/gettext/msvc/{gettext-tools/gnulib-tests/sys/ioctl.h => gettext-runtime/intl/gnulib-lib/langinfo.h} (67%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/limits.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/locale.h rename gvsbuild/patches/gettext/msvc/{vs14/x64/gettext-tools => gettext-runtime/intl}/gnulib-lib/math.h (84%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/search.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stddef.h rename gvsbuild/patches/gettext/msvc/{vs14/Win32/gettext-runtime => gettext-runtime/intl}/gnulib-lib/stdint.h (95%) rename gvsbuild/patches/gettext/msvc/{vs14/arm64/libtextstyle/lib => gettext-runtime/intl/gnulib-lib}/stdio.h (77%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stdlib.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/string.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/sys/types.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/unistd.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/wchar.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/config.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/alloca.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/assert.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/errno.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/inttypes.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/limits.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stddef.h rename gvsbuild/patches/gettext/msvc/{vs14/Win32/gettext-tools => gettext-runtime/libasprintf}/gnulib-lib/stdint.h (95%) rename gvsbuild/patches/gettext/msvc/{vs14/Win32/libtextstyle/lib => gettext-runtime/libasprintf/gnulib-lib}/stdio.h (77%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stdlib.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/string.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/sys/types.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/unistd.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/wchar.h rename gvsbuild/patches/gettext/msvc/{vs14/arm64 => }/gettext-tools/config.h (64%) rename gvsbuild/patches/gettext/msvc/gettext-tools/{gnulib-tests => gnulib-lib}/arpa/inet.h (83%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/assert.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/configmake.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/error.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/malloc/scratch_buffer.gl.h rename gvsbuild/patches/gettext/msvc/{vs14/Win32 => }/gettext-tools/gnulib-lib/math.h (84%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/netdb.h rename gvsbuild/patches/gettext/msvc/gettext-tools/{gnulib-tests => gnulib-lib}/netinet/in.h (53%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdckdint.h rename gvsbuild/patches/gettext/msvc/{vs14/arm64 => }/gettext-tools/gnulib-lib/stdint.h (95%) rename gvsbuild/patches/gettext/msvc/{vs14/x64 => }/gettext-tools/gnulib-lib/stdio.h (77%) rename gvsbuild/patches/gettext/msvc/gettext-tools/{gnulib-tests => gnulib-lib}/sys/socket.h (89%) rename gvsbuild/patches/gettext/msvc/gettext-tools/{gnulib-tests => gnulib-lib}/sys/uio.h (63%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uchar.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unicase.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uninorm.h delete mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/pthread.h delete mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/stdalign.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/assert.h rename gvsbuild/patches/gettext/msvc/{vs12/x64 => }/gettext-tools/libgettextpo/config.h (86%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/error.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdckdint.h rename gvsbuild/patches/gettext/msvc/{vs14/Win32 => }/gettext-tools/libgettextpo/stdint.h (95%) rename gvsbuild/patches/gettext/msvc/{vs14/Win32 => }/gettext-tools/libgettextpo/stdio.h (77%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uchar.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/inttypes.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/limits.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/locale.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/malloc/dynarray-skeleton.gl.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/malloc/dynarray.gl.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stdckdint.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stddef.h rename gvsbuild/patches/gettext/msvc/{vs14/arm64/gettext-tools/libgettextpo => gettext-tools/libgrep}/stdint.h (94%) create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stdlib.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/sys/types.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/unistd.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/wchar.h create mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/wctype.h delete mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle.h delete mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/stdbool.h delete mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/version.h delete mode 100644 gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/woe32dll.h rename gvsbuild/patches/gettext/msvc/{vs14/x64 => }/libtextstyle/config.h (56%) create mode 100644 gvsbuild/patches/gettext/msvc/libtextstyle/lib/assert.h rename gvsbuild/patches/gettext/msvc/{vs14/Win32 => }/libtextstyle/lib/config.h (95%) create mode 100644 gvsbuild/patches/gettext/msvc/libtextstyle/lib/error.h rename gvsbuild/patches/gettext/msvc/{vs14/x64 => }/libtextstyle/lib/math.h (84%) delete mode 100644 gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdalign.h create mode 100644 gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdckdint.h rename gvsbuild/patches/gettext/msvc/{vs14/x64 => }/libtextstyle/lib/stdio.h (78%) delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/gnulib-lib/stdint.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/gnulib-lib/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/configmake.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/math.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/stdint.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/stdint.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/math.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/gnulib-lib/stdint.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/gnulib-lib/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/configmake.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/math.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/stdint.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/libgettextpo/stdint.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/libgettextpo/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/math.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-runtime/gnulib-lib/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/configmake.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/libgettextpo/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/lib/math.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-runtime/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-runtime/gnulib-lib/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/configmake.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/math.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/libgettextpo/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/libgettextpo/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/lib/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/lib/math.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/x64/gettext-runtime/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/x64/gettext-runtime/gnulib-lib/stdint.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/configmake.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/stdint.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/config.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/stdint.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/stdio.h delete mode 100644 gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/lib/config.h diff --git a/gvsbuild/patches/gettext/0001-gettext-tools-src-its-c.patch b/gvsbuild/patches/gettext/0001-gettext-tools-src-its-c.patch new file mode 100644 index 000000000..87b7747a0 --- /dev/null +++ b/gvsbuild/patches/gettext/0001-gettext-tools-src-its-c.patch @@ -0,0 +1,14 @@ +--- a/gettext-tools/src/its.c 2022-06-03 15:01:03.758890100 +0800 ++++ b/gettext-tools/src/its.c 2022-06-03 14:52:09.356533100 +0800 +@@ -23,6 +23,11 @@ + /* Specification. */ + #include "its.h" + ++/* we need to do this to import xmlFree properly from the libgettextlib DLL */ ++#ifdef _MSC_VER ++# undef LIBXML_STATIC ++#endif ++ + #include + #include + #include "error.h" \ No newline at end of file diff --git a/gvsbuild/patches/gettext/0002-gettext-tools-src-locating-rules-c.patch b/gvsbuild/patches/gettext/0002-gettext-tools-src-locating-rules-c.patch new file mode 100644 index 000000000..6b3fe8598 --- /dev/null +++ b/gvsbuild/patches/gettext/0002-gettext-tools-src-locating-rules-c.patch @@ -0,0 +1,23 @@ +--- a/gettext-tools/src/locating-rule.c 2022-06-13 16:16:59.962064900 +0800 ++++ b/gettext-tools/src/locating-rule.c 2022-06-13 16:17:04.033420200 +0800 +@@ -27,15 +27,13 @@ + #include "concat-filename.h" + #include "c-strcase.h" + +-#if HAVE_DIRENT_H +-# include ++/* we need to do this to import xmlFree properly from the libgettextlib DLL */ ++#ifdef _MSC_VER ++# undef LIBXML_STATIC + #endif + +-#if HAVE_DIRENT_H +-# define HAVE_DIR 1 +-#else +-# define HAVE_DIR 0 +-#endif ++#include ++#define HAVE_DIR 1 + + #include "dir-list.h" + #include \ No newline at end of file diff --git a/gvsbuild/patches/gettext/gettext-runtime-c99.patch b/gvsbuild/patches/gettext/gettext-runtime-c99.patch deleted file mode 100644 index 509216281..000000000 --- a/gvsbuild/patches/gettext/gettext-runtime-c99.patch +++ /dev/null @@ -1,103 +0,0 @@ ---- a/gettext-runtime/gnulib-lib/stat-w32.c 2020-06-27 03:31:10.000000000 +0800 -+++ b/gettext-runtime/gnulib-lib/stat-w32.c 2020-07-28 15:25:58.404593800 +0800 -@@ -149,6 +149,7 @@ - DWORD type = GetFileType (h); - if (type == FILE_TYPE_DISK) - { -+ unsigned int mode; - #if !(_WIN32_WINNT >= _WIN32_WINNT_VISTA) - if (!initialized) - initialize (); -@@ -245,7 +246,7 @@ - #endif - - /* st_mode. */ -- unsigned int mode = -+ mode = - /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ - ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) - | S_IREAD_UGO ---- a/gettext-runtime/gnulib-lib/stat.c 2020-06-27 03:31:11.000000000 +0800 -+++ b/gettext-runtime/gnulib-lib/stat.c 2020-07-28 15:24:12.289160300 +0800 -@@ -89,9 +89,10 @@ - q++; - if (q > p && *q != '\0') - { -+ const char *r; - /* Found the next slash at q. */ - q++; -- const char *r = q; -+ r = q; - while (*r != '\0' && !ISSLASH (*r)) - r++; - if (r > q && *r == '\0') -@@ -112,6 +113,13 @@ - rpl_stat (char const *name, struct stat *buf) - { - #ifdef WINDOWS_NATIVE -+ size_t len; -+ size_t drive_prefix_len; -+ size_t rlen; -+ bool check_dir = false; -+ const char *rname; -+ char *malloca_rname; -+ - /* Fill the fields ourselves, because the original stat function returns - values for st_atime, st_mtime, st_ctime that depend on the current time - zone. See -@@ -130,13 +138,12 @@ - name++; - } - -- size_t len = strlen (name); -- size_t drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); -+ len = strlen (name); -+ drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); - - /* Remove trailing slashes (except the very first one, at position - drive_prefix_len), but remember their presence. */ -- size_t rlen; -- bool check_dir = false; -+ check_dir = false; - - rlen = len; - while (rlen > drive_prefix_len && ISSLASH (name[rlen-1])) -@@ -161,8 +168,6 @@ - return -1; - } - -- const char *rname; -- char *malloca_rname; - if (rlen == len) - { - rname = name; -@@ -229,6 +234,10 @@ - - /* Fallback. */ - { -+ WIN32_FIND_DATA info; -+ HANDLE h; -+ unsigned int mode; -+ - /* Approach based on the directory entry. */ - - if (strchr (rname, '?') != NULL || strchr (rname, '*') != NULL) -@@ -250,8 +259,7 @@ - - - */ -- WIN32_FIND_DATA info; -- HANDLE h = FindFirstFile (rname, &info); -+ h = FindFirstFile (rname, &info); - if (h == INVALID_HANDLE_VALUE) - goto failed; - -@@ -280,7 +288,7 @@ - # endif - - /* st_mode. */ -- unsigned int mode = -+ mode = - /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ - ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) - | S_IREAD_UGO diff --git a/gvsbuild/patches/gettext/gettext-tools-c99.patch b/gvsbuild/patches/gettext/gettext-tools-c99.patch deleted file mode 100644 index cb553c25d..000000000 --- a/gvsbuild/patches/gettext/gettext-tools-c99.patch +++ /dev/null @@ -1,1072 +0,0 @@ ---- a/gettext-tools/gnulib-lib/clean-temp.c 2020-07-06 04:10:30.000000000 +0800 -+++ b/gettext-tools/gnulib-lib/clean-temp.c 2020-07-28 16:24:01.491114200 +0800 -@@ -272,16 +272,16 @@ - asyncsafe_fclose_variant (struct closeable_fd *element, FILE *fp, - int (*fclose_variant) (FILE *)) - { -+ sigset_t saved_mask; -+ int ret; -+ int saved_errno; -+ - if (fileno (fp) != element->fd) - abort (); - - /* Flush buffered data first, to minimize the duration of the spin lock. */ - fflush (fp); - -- sigset_t saved_mask; -- int ret; -- int saved_errno; -- - asyncsafe_spin_lock (&element->lock, fatal_signal_set, &saved_mask); - if (!element->closed) - { -@@ -430,9 +430,10 @@ - void - unregister_temporary_file (const char *absolute_file_name) - { -+ gl_list_t list; - gl_lock_lock (file_cleanup_list_lock); - -- gl_list_t list = file_cleanup_list; -+ list = file_cleanup_list; - if (list != NULL) - { - gl_list_node_t node = gl_list_search (list, absolute_file_name); -@@ -493,13 +494,14 @@ - create_temp_dir (const char *prefix, const char *parentdir, - bool cleanup_verbose) - { -- gl_lock_lock (dir_cleanup_list_lock); -- - struct tempdir * volatile *tmpdirp = NULL; - struct tempdir *tmpdir; - size_t i; - char *xtemplate; - char *tmpdirname; -+ int saved_errno; -+ -+ gl_lock_lock (dir_cleanup_list_lock); - - /* See whether it can take the slot of an earlier temporary directory - already cleaned up. */ -@@ -581,7 +583,7 @@ - } - block_fatal_signals (); - tmpdirname = mkdtemp (xtemplate); -- int saved_errno = errno; -+ saved_errno = errno; - if (tmpdirname != NULL) - { - tmpdir->dirname = tmpdirname; -@@ -636,11 +638,12 @@ - const char *absolute_file_name) - { - struct tempdir *tmpdir = (struct tempdir *)dir; -+ gl_list_t list; -+ gl_list_node_t node; - - gl_lock_lock (dir_cleanup_list_lock); - -- gl_list_t list = tmpdir->files; -- gl_list_node_t node; -+ list = tmpdir->files; - - node = gl_list_search (list, absolute_file_name); - if (node != NULL) -@@ -681,11 +684,12 @@ - const char *absolute_dir_name) - { - struct tempdir *tmpdir = (struct tempdir *)dir; -+ gl_list_t list; -+ gl_list_node_t node; - - gl_lock_lock (dir_cleanup_list_lock); - -- gl_list_t list = tmpdir->subdirs; -- gl_list_node_t node; -+ list = tmpdir->subdirs; - - node = gl_list_search (list, absolute_dir_name); - if (node != NULL) -@@ -792,12 +796,14 @@ - int - cleanup_temp_dir (struct temp_dir *dir) - { -- gl_lock_lock (dir_cleanup_list_lock); -- -- struct tempdir *tmpdir = (struct tempdir *)dir; -+ struct tempdir *tmpdir; - int err = 0; - size_t i; - -+ gl_lock_lock (dir_cleanup_list_lock); -+ -+ tmpdir = (struct tempdir *)dir; -+ - err |= cleanup_temp_dir_contents (dir); - err |= do_rmdir (tmpdir->dirname, dir->cleanup_verbose); - -@@ -866,13 +872,15 @@ - static void - register_fd (int fd) - { -+ struct closeable_fd *element; -+ - gl_lock_lock (descriptors_lock); - - if (descriptors == NULL) - descriptors = gl_list_create_empty (GL_LINKED_LIST, NULL, NULL, NULL, - false); - -- struct closeable_fd *element = XMALLOC (struct closeable_fd); -+ element = XMALLOC (struct closeable_fd); - element->fd = fd; - element->closed = false; - asyncsafe_spin_init (&element->lock); -@@ -990,15 +998,18 @@ - gen_register_open_temp (char *file_name_tmpl, int suffixlen, - int flags, mode_t mode) - { -+ struct try_create_file_params params; -+ int fd; -+ int saved_errno; -+ - block_fatal_signals (); - -- struct try_create_file_params params; - params.flags = flags; - params.mode = mode; - -- int fd = try_tempname (file_name_tmpl, suffixlen, ¶ms, try_create_file); -+ fd = try_tempname (file_name_tmpl, suffixlen, ¶ms, try_create_file); - -- int saved_errno = errno; -+ saved_errno = errno; - if (fd >= 0) - { - init_clean_temp (); -@@ -1018,31 +1029,38 @@ - int - close_temp (int fd) - { -+ int result = 0; -+ int saved_errno = 0; -+ bool found = false; -+ gl_list_iterator_t iter; -+ const void *elt; -+ gl_list_node_t node; -+ gl_list_t list; -+ - if (fd < 0) - return close (fd); - - init_fatal_signal_set (); - -- int result = 0; -- int saved_errno = 0; -- - gl_lock_lock (descriptors_lock); - -- gl_list_t list = descriptors; -+ list = descriptors; - if (list == NULL) - /* descriptors should already contain fd. */ - abort (); - - /* Search through the list, and clean it up on the fly. */ -- bool found = false; -- gl_list_iterator_t iter = gl_list_iterator (list); -- const void *elt; -- gl_list_node_t node; -+ iter = gl_list_iterator (list); - if (gl_list_iterator_next (&iter, &elt, &node)) - for (;;) - { - struct closeable_fd *element = (struct closeable_fd *) elt; - -+ bool free_this_node; -+ struct closeable_fd *element_to_free; -+ gl_list_node_t node_to_free; -+ bool have_next; -+ - /* Close the file descriptor, avoiding races with the signal - handler. */ - if (element->fd == fd) -@@ -1052,11 +1070,11 @@ - saved_errno = errno; - } - -- bool free_this_node = element->done; -- struct closeable_fd *element_to_free = element; -- gl_list_node_t node_to_free = node; -+ free_this_node = element->done; -+ element_to_free = element; -+ node_to_free = node; - -- bool have_next = gl_list_iterator_next (&iter, &elt, &node); -+ have_next = gl_list_iterator_next (&iter, &elt, &node); - - if (free_this_node) - { -@@ -1082,29 +1100,38 @@ - fclose_variant_temp (FILE *fp, int (*fclose_variant) (FILE *)) - { - int fd = fileno (fp); -- -- init_fatal_signal_set (); -- - int result = 0; - int saved_errno = 0; -+ bool found; -+ gl_list_iterator_t iter; -+ const void *elt; -+ gl_list_node_t node; -+ gl_list_t list; -+ -+ init_fatal_signal_set (); - - gl_lock_lock (descriptors_lock); - -- gl_list_t list = descriptors; -+ list = descriptors; - if (list == NULL) - /* descriptors should already contain fd. */ - abort (); - - /* Search through the list, and clean it up on the fly. */ -- bool found = false; -- gl_list_iterator_t iter = gl_list_iterator (list); -- const void *elt; -- gl_list_node_t node; -+ found = false; -+ iter = gl_list_iterator (list); -+ - if (gl_list_iterator_next (&iter, &elt, &node)) - for (;;) - { - struct closeable_fd *element = (struct closeable_fd *) elt; - -+ bool free_this_node; -+ struct closeable_fd *element_to_free; -+ gl_list_node_t node_to_free; -+ -+ bool have_next; -+ - /* Close the file descriptor and the stream, avoiding races with the - signal handler. */ - if (element->fd == fd) -@@ -1114,11 +1141,11 @@ - saved_errno = errno; - } - -- bool free_this_node = element->done; -- struct closeable_fd *element_to_free = element; -- gl_list_node_t node_to_free = node; -+ free_this_node = element->done; -+ element_to_free = element; -+ node_to_free = node; - -- bool have_next = gl_list_iterator_next (&iter, &elt, &node); -+ have_next = gl_list_iterator_next (&iter, &elt, &node); - - if (free_this_node) - { ---- a/gettext-tools/gnulib-lib/copy-file.c 2020-06-27 03:39:36.000000000 +0800 -+++ b/gettext-tools/gnulib-lib/copy-file.c 2020-07-28 15:59:04.130569400 +0800 -@@ -51,6 +51,8 @@ - struct stat statbuf; - int mode; - int dest_fd; -+ off_t inbytes; -+ bool empty_regular_file; - - src_fd = open (src_filename, O_RDONLY | O_BINARY | O_CLOEXEC); - if (src_fd < 0) -@@ -62,8 +64,8 @@ - } - - mode = statbuf.st_mode & 07777; -- off_t inbytes = S_ISREG (statbuf.st_mode) ? statbuf.st_size : -1; -- bool empty_regular_file = inbytes == 0; -+ inbytes = S_ISREG (statbuf.st_mode) ? statbuf.st_size : -1; -+ empty_regular_file = inbytes == 0; - - dest_fd = open (dest_filename, - O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC, -@@ -78,9 +80,12 @@ - while (0 < inbytes) - { - size_t copy_max = -1; -+ size_t len; -+ ssize_t copied; -+ - copy_max -= copy_max % IO_SIZE; -- size_t len = inbytes < copy_max ? inbytes : copy_max; -- ssize_t copied = copy_file_range (src_fd, NULL, dest_fd, NULL, len, 0); -+ len = inbytes < copy_max ? inbytes : copy_max; -+ copied = copy_file_range (src_fd, NULL, dest_fd, NULL, len, 0); - if (copied <= 0) - break; - inbytes -= copied; ---- a/gettext-tools/gnulib-lib/diffseq.h 2020-04-11 17:59:36.000000000 +0800 -+++ b/gettext-tools/gnulib-lib/diffseq.h 2020-07-28 15:51:54.180349600 +0800 -@@ -208,6 +208,7 @@ - { - OFFSET d; /* Active diagonal. */ - bool big_snake _GL_UNUSED = false; -+ bool heuristic; - - /* Extend the top-down search by an edit step in each diagonal. */ - if (fmin > dmin) -@@ -279,9 +280,9 @@ - continue; - - #ifdef USE_HEURISTIC -- bool heuristic = ctxt->heuristic; -+ heuristic = ctxt->heuristic; - #else -- bool heuristic = false; -+ heuristic = false; - #endif - - /* Heuristic: check occasionally for a diagonal that has made lots ---- a/gettext-tools/gnulib-lib/fatal-signal.c 2020-07-06 04:10:31.000000000 +0800 -+++ b/gettext-tools/gnulib-lib/fatal-signal.c 2020-07-28 15:50:20.470317900 +0800 -@@ -213,9 +213,10 @@ - void - at_fatal_signal (action_t action) - { -+ static bool cleanup_initialized = false; -+ - gl_lock_lock (at_fatal_signal_lock); - -- static bool cleanup_initialized = false; - if (!cleanup_initialized) - { - init_fatal_signals (); ---- a/gettext-tools/gnulib-lib/fnmatch.c 2020-06-27 03:52:53.000000000 +0800 -+++ b/gettext-tools/gnulib-lib/fnmatch.c 2020-07-28 16:52:48.779023600 +0800 -@@ -63,6 +63,14 @@ - extern int fnmatch (const char *pattern, const char *string, int flags); - #endif - -+#if defined (_MSC_VER) -+#ifdef _DEBUG -+#pragma comment(lib, "msvcprtd") -+#else -+#pragma comment(lib, "msvcprt") -+#endif -+#endif -+ - #ifdef _LIBC - # if __GNUC__ < 7 - # define FALLTHROUGH ((void) 0) -@@ -239,6 +247,7 @@ - wchar_t *wstring_malloc = NULL; - wchar_t *wstring; - size_t alloca_used = 0; -+ int res; - - /* Convert the strings into wide characters. */ - memset (&ps, '\0', sizeof (ps)); -@@ -332,9 +341,9 @@ - (void) mbsrtowcs (wstring, &string, n + 1, &ps); - } - -- int res = internal_fnwmatch (wpattern, wstring, wstring + n, -- flags & FNM_PERIOD, flags, NULL, -- alloca_used); -+ res = internal_fnwmatch (wpattern, wstring, wstring + n, -+ flags & FNM_PERIOD, flags, NULL, -+ alloca_used); - - free (wstring_malloc); - free (wpattern_malloc); ---- a/gettext-tools/gnulib-lib/fnmatch_loop.c 2020-06-27 03:57:10.000000000 +0800 -+++ b/gettext-tools/gnulib-lib/fnmatch_loop.c 2020-07-28 16:34:50.084208300 +0800 -@@ -1032,13 +1032,14 @@ - if (level-- == 0) - { - /* This means we found the end of the pattern. */ --#define NEW_PATTERN \ -+ #define NEW_PATTERN \ - struct patternlist *newp; \ - size_t plen = (opt == L_('?') || opt == L_('@') \ - ? pattern_len : (p - startp + 1UL)); \ - ptrdiff_t slen = FLEXSIZEOF (struct patternlist, str, 0); \ - ptrdiff_t new_used = alloca_used + slen; \ - ptrdiff_t plensize; \ -+ bool malloced; \ - if (INT_MULTIPLY_WRAPV (plen, sizeof (CHAR), &plensize) \ - || INT_ADD_WRAPV (new_used, plensize, &new_used)) \ - { \ -@@ -1046,7 +1047,7 @@ - goto out; \ - } \ - slen += plensize; \ -- bool malloced = ! __libc_use_alloca (new_used); \ -+ malloced = ! __libc_use_alloca (new_used); \ - if (__glibc_unlikely (malloced)) \ - { \ - newp = malloc (slen); \ -@@ -1064,6 +1065,7 @@ - *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0'); \ - *lastp = newp; \ - lastp = &newp->next -+ - NEW_PATTERN; - break; - } ---- a/gettext-tools/gnulib-lib/gettimeofday.c 2020-07-26 23:29:00.000000000 +0800 -+++ b/gettext-tools/gnulib-lib/gettimeofday.c 2020-07-28 16:29:13.975653400 +0800 -@@ -35,7 +35,7 @@ - # undef LoadLibrary - # define LoadLibrary LoadLibraryA - --# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8) -+# if !(_WIN32_WINNT >= 0x0602) - - /* Avoid warnings from gcc -Wcast-function-type. */ - # define GetProcAddress \ -@@ -79,6 +79,9 @@ - { - #undef gettimeofday - #ifdef WINDOWS_NATIVE -+ ULONGLONG since_1601; -+ ULONGLONG since_1970; -+ ULONGLONG microseconds_since_1970; - - /* On native Windows, there are two ways to get the current time: - GetSystemTimeAsFileTime -@@ -94,7 +97,7 @@ - . */ - FILETIME current_time; - --# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8) -+# if !(_WIN32_WINNT >= 0x0602) - if (!initialized) - initialize (); - # endif -@@ -105,14 +108,14 @@ - - /* Convert from FILETIME to 'struct timeval'. */ - /* FILETIME: */ -- ULONGLONG since_1601 = -+ since_1601 = - ((ULONGLONG) current_time.dwHighDateTime << 32) - | (ULONGLONG) current_time.dwLowDateTime; - /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 leap - years, in total 134774 days. */ -- ULONGLONG since_1970 = -+ since_1970 = - since_1601 - (ULONGLONG) 134774 * (ULONGLONG) 86400 * (ULONGLONG) 10000000; -- ULONGLONG microseconds_since_1970 = since_1970 / (ULONGLONG) 10; -+ microseconds_since_1970 = since_1970 / (ULONGLONG) 10; - tv->tv_sec = microseconds_since_1970 / (ULONGLONG) 1000000; - tv->tv_usec = microseconds_since_1970 % (ULONGLONG) 1000000; - ---- a/gettext-tools/gnulib-lib/stat-w32.c 2020-07-28 16:31:31.238581300 +0800 -+++ b/gettext-tools/gnulib-lib/stat-w32.c 2020-07-28 16:32:48.826455300 +0800 -@@ -149,6 +149,7 @@ - DWORD type = GetFileType (h); - if (type == FILE_TYPE_DISK) - { -+ unsigned int mode; - #if !(_WIN32_WINNT >= _WIN32_WINNT_VISTA) - if (!initialized) - initialize (); -@@ -245,7 +246,7 @@ - #endif - - /* st_mode. */ -- unsigned int mode = -+ mode = - /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ - ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) - | S_IREAD_UGO ---- a/gettext-tools/gnulib-lib/stat.c 2020-07-28 16:31:40.321365500 +0800 -+++ b/gettext-tools/gnulib-lib/stat.c 2020-07-28 16:29:35.320072400 +0800 -@@ -89,9 +89,10 @@ - q++; - if (q > p && *q != '\0') - { -+ const char *r; - /* Found the next slash at q. */ - q++; -- const char *r = q; -+ r = q; - while (*r != '\0' && !ISSLASH (*r)) - r++; - if (r > q && *r == '\0') -@@ -112,6 +113,13 @@ - rpl_stat (char const *name, struct stat *buf) - { - #ifdef WINDOWS_NATIVE -+ size_t len; -+ size_t drive_prefix_len; -+ size_t rlen; -+ bool check_dir = false; -+ const char *rname; -+ char *malloca_rname; -+ - /* Fill the fields ourselves, because the original stat function returns - values for st_atime, st_mtime, st_ctime that depend on the current time - zone. See -@@ -130,13 +138,12 @@ - name++; - } - -- size_t len = strlen (name); -- size_t drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); -+ len = strlen (name); -+ drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); - - /* Remove trailing slashes (except the very first one, at position - drive_prefix_len), but remember their presence. */ -- size_t rlen; -- bool check_dir = false; -+ check_dir = false; - - rlen = len; - while (rlen > drive_prefix_len && ISSLASH (name[rlen-1])) -@@ -161,8 +168,6 @@ - return -1; - } - -- const char *rname; -- char *malloca_rname; - if (rlen == len) - { - rname = name; -@@ -229,6 +234,10 @@ - - /* Fallback. */ - { -+ WIN32_FIND_DATA info; -+ HANDLE h; -+ unsigned int mode; -+ - /* Approach based on the directory entry. */ - - if (strchr (rname, '?') != NULL || strchr (rname, '*') != NULL) -@@ -250,8 +259,7 @@ - - - */ -- WIN32_FIND_DATA info; -- HANDLE h = FindFirstFile (rname, &info); -+ h = FindFirstFile (rname, &info); - if (h == INVALID_HANDLE_VALUE) - goto failed; - -@@ -280,7 +288,7 @@ - # endif - - /* st_mode. */ -- unsigned int mode = -+ mode = - /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ - ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) - | S_IREAD_UGO ---- a/gettext-tools/gnulib-lib/supersede.c 2020-07-06 05:46:47.000000000 +0800 -+++ b/gettext-tools/gnulib-lib/supersede.c 2020-07-28 16:21:47.103923600 +0800 -@@ -60,10 +60,12 @@ - /* The temporary file needs to be in the same directory, otherwise the - final rename may fail. */ - char *temp_filename = (char *) malloc (canon_filename_length + 7 + 1); -+ int fd; -+ - memcpy (temp_filename, canon_filename, canon_filename_length); - memcpy (temp_filename + canon_filename_length, ".XXXXXX", 7 + 1); - -- int fd = gen_register_open_temp (temp_filename, 0, flags, mode); -+ fd = gen_register_open_temp (temp_filename, 0, flags, mode); - if (fd < 0) - return -1; - -@@ -358,6 +360,8 @@ - int - close_supersede (int fd, const struct supersede_final_action *action) - { -+ int ret; -+ - if (fd < 0) - { - int saved_errno = errno; -@@ -367,7 +371,6 @@ - return fd; - } - -- int ret; - if (action->final_rename_temp != NULL) - ret = close_temp (fd); - else -@@ -383,6 +386,10 @@ - /* Parse the mode. */ - int open_direction = 0; - int open_flags = 0; -+ mode_t open_mode; -+ int fd; -+ FILE *stream; -+ - { - const char *p = mode; - -@@ -422,14 +429,14 @@ - } - } - -- mode_t open_mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; -- int fd = open_supersede (filename, open_direction | open_flags, open_mode, -+ open_mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; -+ fd = open_supersede (filename, open_direction | open_flags, open_mode, - supersede_if_exists, supersede_if_does_not_exist, - action); - if (fd < 0) - return NULL; - -- FILE *stream = fdopen (fd, mode); -+ stream = fdopen (fd, mode); - if (stream == NULL) - { - int saved_errno = errno; -@@ -443,9 +450,10 @@ - int - fclose_supersede (FILE *stream, const struct supersede_final_action *action) - { -+ int ret; -+ - if (stream == NULL) - return -1; -- int ret; - if (action->final_rename_temp != NULL) - ret = fclose_temp (stream); - else -@@ -457,9 +465,10 @@ - int - fwriteerror_supersede (FILE *stream, const struct supersede_final_action *action) - { -+ int ret; -+ - if (stream == NULL) - return -1; -- int ret; - if (action->final_rename_temp != NULL) - ret = fclose_temp (stream); - else ---- a/gettext-tools/gnulib-lib/tempname.c 2020-06-27 03:57:21.000000000 +0800 -+++ b/gettext-tools/gnulib-lib/tempname.c 2020-07-28 16:19:56.001954600 +0800 -@@ -212,9 +212,9 @@ - { - static int (*const tryfunc[]) (char *, void *) = - { -- [__GT_FILE] = try_file, -- [__GT_DIR] = try_dir, -- [__GT_NOCREATE] = try_nocreate -+ try_file, -+ try_dir, -+ try_nocreate - }; - return try_tempname_len (tmpl, suffixlen, &flags, tryfunc[kind], - x_suffix_len); -@@ -274,7 +274,9 @@ - - for (count = 0; count < attempts; ++count) - { -- for (size_t i = 0; i < x_suffix_len; i++) -+ size_t i = 0; -+ -+ for (i = 0; i < x_suffix_len; i++) - { - if (vdigits == 0) - { ---- a/gettext-tools/gnulib-lib/utime.c 2020-06-27 03:57:22.000000000 +0800 -+++ b/gettext-tools/gnulib-lib/utime.c 2020-07-28 16:42:03.978666700 +0800 -@@ -38,6 +38,16 @@ - int - _gl_utimens_windows (const char *name, struct timespec ts[2]) - { -+ size_t len; -+ size_t drive_prefix_len; -+ -+ size_t rlen; -+ bool check_dir = false; -+ -+ const char *rname; -+ char *malloca_rname; -+ DWORD error; -+ HANDLE handle; - /* POSIX - specifies: "More than two leading characters shall be treated as - a single character." */ -@@ -48,13 +58,11 @@ - name++; - } - -- size_t len = strlen (name); -- size_t drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); -+ len = strlen (name); -+ drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); - - /* Remove trailing slashes (except the very first one, at position - drive_prefix_len), but remember their presence. */ -- size_t rlen; -- bool check_dir = false; - - rlen = len; - while (rlen > drive_prefix_len && ISSLASH (name[rlen-1])) -@@ -65,8 +73,6 @@ - rlen--; - } - -- const char *rname; -- char *malloca_rname; - if (rlen == len) - { - rname = name; -@@ -85,13 +91,11 @@ - rname = malloca_rname; - } - -- DWORD error; -- - /* Open a handle to the file. - CreateFile - - */ -- HANDLE handle = -+ handle = - CreateFile (rname, - FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, ---- a/gettext-tools/gnulib-tests/filenamecat-lgpl.c 2020-07-28 17:30:14.763246800 +0800 -+++ b/gettext-tools/gnulib-tests/filenamecat-lgpl.c 2020-07-28 17:30:28.944774900 +0800 -@@ -52,6 +52,7 @@ - size_t dirlen = dirbase - dir + dirbaselen; - size_t baselen = strlen (base); - char sep = '\0'; -+ char *p_concat; - if (dirbaselen) - { - /* DIR is not a file system root, so separate with / if needed. */ -@@ -68,7 +69,7 @@ - sep = '.'; - } - -- char *p_concat = malloc (dirlen + (sep != '\0') + baselen + 1); -+ p_concat = malloc (dirlen + (sep != '\0') + baselen + 1); - if (p_concat == NULL) - return NULL; - ---- a/gettext-tools/gnulib-tests/timespec-add.c 2020-04-11 17:59:47.000000000 +0800 -+++ b/gettext-tools/gnulib-tests/timespec-add.c 2020-07-28 17:31:39.722571300 +0800 -@@ -36,8 +36,8 @@ - - if (0 <= nsd) - { -- rns = nsd; - time_t bs1; -+ rns = nsd; - if (!INT_ADD_WRAPV (bs, 1, &bs1)) - bs = bs1; - else if (rs < 0) ---- a/gettext-tools/gnulib-tests/timespec-sub.c 2020-04-11 17:59:47.000000000 +0800 -+++ b/gettext-tools/gnulib-tests/timespec-sub.c 2020-07-28 17:31:33.551596900 +0800 -@@ -36,8 +36,8 @@ - - if (ns < 0) - { -- rns = ns + TIMESPEC_HZ; - time_t bs1; -+ rns = ns + TIMESPEC_HZ; - if (!INT_ADD_WRAPV (bs, 1, &bs1)) - bs = bs1; - else if (- TYPE_SIGNED (time_t) < rs) ---- a/gettext-tools/libgettextpo/diffseq.h 2020-04-11 18:00:55.000000000 +0800 -+++ b/gettext-tools/libgettextpo/diffseq.h 2020-07-28 17:23:31.577487900 +0800 -@@ -208,6 +208,7 @@ - { - OFFSET d; /* Active diagonal. */ - bool big_snake _GL_UNUSED = false; -+ bool heuristic; - - /* Extend the top-down search by an edit step in each diagonal. */ - if (fmin > dmin) -@@ -279,9 +280,9 @@ - continue; - - #ifdef USE_HEURISTIC -- bool heuristic = ctxt->heuristic; -+ heuristic = ctxt->heuristic; - #else -- bool heuristic = false; -+ heuristic = false; - #endif - - /* Heuristic: check occasionally for a diagonal that has made lots ---- a/gettext-tools/libgettextpo/stat-w32.c 2020-06-27 03:59:40.000000000 +0800 -+++ b/gettext-tools/libgettextpo/stat-w32.c 2020-07-28 17:26:27.307336000 +0800 -@@ -149,6 +149,7 @@ - DWORD type = GetFileType (h); - if (type == FILE_TYPE_DISK) - { -+ unsigned int mode; - #if !(_WIN32_WINNT >= _WIN32_WINNT_VISTA) - if (!initialized) - initialize (); -@@ -245,7 +246,7 @@ - #endif - - /* st_mode. */ -- unsigned int mode = -+ mode = - /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ - ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) - | S_IREAD_UGO ---- a/gettext-tools/libgettextpo/stat.c 2020-06-27 03:59:40.000000000 +0800 -+++ b/gettext-tools/libgettextpo/stat.c 2020-07-28 17:26:21.452955000 +0800 -@@ -89,9 +89,10 @@ - q++; - if (q > p && *q != '\0') - { -+ const char *r; - /* Found the next slash at q. */ - q++; -- const char *r = q; -+ r = q; - while (*r != '\0' && !ISSLASH (*r)) - r++; - if (r > q && *r == '\0') -@@ -112,6 +113,13 @@ - rpl_stat (char const *name, struct stat *buf) - { - #ifdef WINDOWS_NATIVE -+ size_t len; -+ size_t drive_prefix_len; -+ size_t rlen; -+ bool check_dir = false; -+ const char *rname; -+ char *malloca_rname; -+ - /* Fill the fields ourselves, because the original stat function returns - values for st_atime, st_mtime, st_ctime that depend on the current time - zone. See -@@ -130,13 +138,12 @@ - name++; - } - -- size_t len = strlen (name); -- size_t drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); -+ len = strlen (name); -+ drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); - - /* Remove trailing slashes (except the very first one, at position - drive_prefix_len), but remember their presence. */ -- size_t rlen; -- bool check_dir = false; -+ check_dir = false; - - rlen = len; - while (rlen > drive_prefix_len && ISSLASH (name[rlen-1])) -@@ -161,8 +168,6 @@ - return -1; - } - -- const char *rname; -- char *malloca_rname; - if (rlen == len) - { - rname = name; -@@ -229,6 +234,10 @@ - - /* Fallback. */ - { -+ WIN32_FIND_DATA info; -+ HANDLE h; -+ unsigned int mode; -+ - /* Approach based on the directory entry. */ - - if (strchr (rname, '?') != NULL || strchr (rname, '*') != NULL) -@@ -250,8 +259,7 @@ - - - */ -- WIN32_FIND_DATA info; -- HANDLE h = FindFirstFile (rname, &info); -+ h = FindFirstFile (rname, &info); - if (h == INVALID_HANDLE_VALUE) - goto failed; - -@@ -280,7 +288,7 @@ - # endif - - /* st_mode. */ -- unsigned int mode = -+ mode = - /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ - ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) - | S_IREAD_UGO ---- a/gettext-tools/libgrep/regcomp.c 2020-04-11 18:00:37.000000000 +0800 -+++ b/gettext-tools/libgrep/regcomp.c 2020-07-28 16:57:46.900225500 +0800 -@@ -3657,6 +3657,7 @@ - #endif /* not RE_ENABLE_I18N */ - reg_errcode_t ret; - bin_tree_t *tree; -+ re_token_t br_token; - - sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); - if (__glibc_unlikely (sbcset == NULL)) -@@ -3706,7 +3707,9 @@ - #endif - - /* Build a tree for simple bracket. */ -- re_token_t br_token = { .type = SIMPLE_BRACKET, .opr.sbcset = sbcset }; -+ br_token.type = SIMPLE_BRACKET; -+ br_token.opr.sbcset = sbcset; -+ - tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (__glibc_unlikely (tree == NULL)) - goto build_word_op_espace; -@@ -3797,7 +3800,9 @@ - create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, - re_token_type_t type) - { -- re_token_t t = { .type = type }; -+ re_token_t t; -+ t.type = type; -+ - return create_token_tree (dfa, left, right, &t); - } - ---- a/gettext-tools/libgrep/regexec.c 2020-04-11 18:00:37.000000000 +0800 -+++ b/gettext-tools/libgrep/regexec.c 2020-07-28 17:00:50.849641700 +0800 -@@ -597,7 +597,7 @@ - Idx extra_nmatch; - bool sb; - int ch; -- re_match_context_t mctx = { .dfa = dfa }; -+ re_match_context_t mctx = {0, dfa, }; - char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate - && start != last_start && !preg->can_be_null) - ? preg->fastmap : NULL); -@@ -3274,6 +3274,8 @@ - bitset_t dests_ch[SBC_MAX]; - } *dests_alloc; - -+ size_t ndests_max; -+ - /* We build DFA states which corresponds to the destination nodes - from 'state'. 'dests_node[i]' represents the nodes which i-th - destination state contains, and 'dests_ch[i]' represents the -@@ -3317,7 +3319,7 @@ - goto out_free; - - /* Avoid arithmetic overflow in size calculation. */ -- size_t ndests_max -+ ndests_max - = ((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) - / (3 * sizeof (re_dfastate_t *))); - if (__glibc_unlikely (ndests_max < ndests)) ---- a/gettext-tools/src/format.c 2020-07-28 17:06:31.027352400 +0800 -+++ b/gettext-tools/src/format.c 2020-07-28 17:07:19.875252100 +0800 -@@ -22,7 +22,10 @@ - /* Specification. */ - #include "format.h" - -+#if !defined (_MSC_VER) || !defined (__cplusplus) || (_MSC_VER >= 1800) - #include -+#endif -+ - #include - #include - ---- a/gettext-tools/src/format.h 2020-06-06 22:03:32.000000000 +0800 -+++ b/gettext-tools/src/format.h 2020-07-28 17:08:17.862525600 +0800 -@@ -18,7 +18,9 @@ - #ifndef _FORMAT_H - #define _FORMAT_H - -+#if !defined (_MSC_VER) || !defined (__cplusplus) || (_MSC_VER >= 1800) - #include -+#endif - - #include "pos.h" /* Get lex_pos_ty. */ - #include "message.h" /* Get NFORMATS. */ ---- a/gettext-tools/src/x-lua.c 2020-04-11 17:57:01.000000000 +0800 -+++ b/gettext-tools/src/x-lua.c 2020-07-28 17:18:05.654678500 +0800 -@@ -282,9 +282,9 @@ - - if (c == '[') - { -- c = phase1_getc (); -- - int esigns = 0; -+ -+ c = phase1_getc (); - while (c == '=') - { - esigns++; -@@ -713,10 +713,11 @@ - break; - - case '[': -- c = phase1_getc (); -+ { -+ int esigns = 0; - -+ c = phase1_getc (); - /* Count the number of equal signs. */ -- int esigns = 0; - while (c == '=') - { - esigns++; -@@ -762,10 +763,10 @@ - } - if (c == ']') - { -- c = phase1_getc (); -+ int esigns2 = 0; - -+ c = phase1_getc (); - /* Count the number of equal signs. */ -- int esigns2 = 0; - while (c == '=') - { - esigns2++; -@@ -803,6 +804,7 @@ - else - string_add (c); - } -+ } - break; - - case ']': ---- a/gettext-tools/src/xgettext.c 2020-07-06 04:47:41.000000000 +0800 -+++ b/gettext-tools/src/xgettext.c 2020-07-28 17:16:07.806479800 +0800 -@@ -29,7 +29,11 @@ - #include - #include - #include -+ -+#if !defined (_MSC_VER) || !defined (__cplusplus) || (_MSC_VER >= 1800) - #include -+#endif -+ - #include - #include - #include ---- a/gettext-tools/src/xgettext.h 2020-06-06 22:03:32.000000000 +0800 -+++ b/gettext-tools/src/xgettext.h 2020-07-28 17:15:59.821248700 +0800 -@@ -19,7 +19,10 @@ - #ifndef _XGETTEXT_H - #define _XGETTEXT_H - -+#if !defined (_MSC_VER) || !defined (__cplusplus) || (_MSC_VER >= 1800) - #include -+#endif -+ - #include - - #include "message.h" diff --git a/gvsbuild/patches/gettext/gettext-tools-gnulib-memset.patch b/gvsbuild/patches/gettext/gettext-tools-gnulib-memset.patch deleted file mode 100644 index 6a8ebc9df..000000000 --- a/gvsbuild/patches/gettext/gettext-tools-gnulib-memset.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/gettext-tools/gnulib-lib/memset.c 2020-04-11 17:59:41.000000000 +0800 -+++ b/gettext-tools/gnulib-lib/memset.c 2020-07-28 16:38:42.592929800 +0800 -@@ -18,6 +18,7 @@ - - #include - -+#if !defined (_MSC_VER) || (_MSC_VER >= 1900) - void * - memset (void *str, int c, size_t len) - { -@@ -27,3 +28,4 @@ - *st++ = c; - return str; - } -+#endif diff --git a/gvsbuild/patches/gettext/libtextstyle-c99.patch b/gvsbuild/patches/gettext/libtextstyle-c99.patch deleted file mode 100644 index 79e374d3e..000000000 --- a/gvsbuild/patches/gettext/libtextstyle-c99.patch +++ /dev/null @@ -1,259 +0,0 @@ ---- a/libtextstyle/adhoc-tests/hello.c 2019-08-18 00:32:02.000000000 +0800 -+++ b/libtextstyle/adhoc-tests/hello.c 2020-07-28 15:46:01.005947000 +0800 -@@ -29,6 +29,7 @@ - { - const char *program_name = argv[0]; - int i; -+ styled_ostream_t stream; - - /* Parse the command-line arguments. */ - for (i = 1; i < argc; i++) -@@ -71,7 +72,7 @@ - style_file_name = NULL; - - /* Create a terminal output stream that uses this style file. */ -- styled_ostream_t stream = -+ stream = - (color_mode == color_html - ? html_styled_ostream_create (file_ostream_create (stdout), - style_file_name) ---- a/libtextstyle/lib/fatal-signal.c 2020-07-06 04:12:31.000000000 +0800 -+++ b/libtextstyle/lib/fatal-signal.c 2020-07-28 15:28:18.933361400 +0800 -@@ -213,9 +213,10 @@ - void - at_fatal_signal (action_t action) - { -+ static bool cleanup_initialized = false; -+ - gl_lock_lock (at_fatal_signal_lock); - -- static bool cleanup_initialized = false; - if (!cleanup_initialized) - { - init_fatal_signals (); ---- a/libtextstyle/lib/gettimeofday.c 2020-07-26 23:31:02.000000000 +0800 -+++ b/libtextstyle/lib/gettimeofday.c 2020-07-28 15:43:50.814286100 +0800 -@@ -35,7 +35,7 @@ - # undef LoadLibrary - # define LoadLibrary LoadLibraryA - --# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8) -+# if !(_WIN32_WINNT >= 0x0602) - - /* Avoid warnings from gcc -Wcast-function-type. */ - # define GetProcAddress \ -@@ -79,6 +79,9 @@ - { - #undef gettimeofday - #ifdef WINDOWS_NATIVE -+ ULONGLONG since_1601; -+ ULONGLONG since_1970; -+ ULONGLONG microseconds_since_1970; - - /* On native Windows, there are two ways to get the current time: - GetSystemTimeAsFileTime -@@ -94,7 +97,7 @@ - . */ - FILETIME current_time; - --# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8) -+# if !(_WIN32_WINNT >= 0x0602) - if (!initialized) - initialize (); - # endif -@@ -105,14 +108,14 @@ - - /* Convert from FILETIME to 'struct timeval'. */ - /* FILETIME: */ -- ULONGLONG since_1601 = -+ since_1601 = - ((ULONGLONG) current_time.dwHighDateTime << 32) - | (ULONGLONG) current_time.dwLowDateTime; - /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 leap - years, in total 134774 days. */ -- ULONGLONG since_1970 = -+ since_1970 = - since_1601 - (ULONGLONG) 134774 * (ULONGLONG) 86400 * (ULONGLONG) 10000000; -- ULONGLONG microseconds_since_1970 = since_1970 / (ULONGLONG) 10; -+ microseconds_since_1970 = since_1970 / (ULONGLONG) 10; - tv->tv_sec = microseconds_since_1970 / (ULONGLONG) 1000000; - tv->tv_usec = microseconds_since_1970 % (ULONGLONG) 1000000; - ---- a/libtextstyle/lib/html-ostream.oo.c 2020-04-11 18:01:49.000000000 +0800 -+++ b/libtextstyle/lib/html-ostream.oo.c 2020-07-28 15:29:51.471455000 +0800 -@@ -203,12 +203,13 @@ - - if (uc == '\n') - { -+ size_t prev_class_stack_size; - verify_invariants (stream); - /* Emit tags to follow the decrease of the class stack - from last_class_stack_size to 0. Then emit the newline. - Then prepare for emitting tags to go back from 0 - to curr_class_stack_size. */ -- size_t prev_class_stack_size = stream->curr_class_stack_size; -+ prev_class_stack_size = stream->curr_class_stack_size; - stream->curr_class_stack_size = 0; - emit_pending_spans (stream, false); - stream->curr_class_stack_size = prev_class_stack_size; -@@ -285,12 +286,14 @@ - static void - html_ostream::flush (html_ostream_t stream, ostream_flush_scope_t scope) - { -+ size_t prev_class_stack_size; -+ - verify_invariants (stream); - /* stream->buf[] contains only a few bytes that don't correspond to a - character. Can't flush it. */ - /* Close the open tags, and prepare for reopening the same - tags. */ -- size_t prev_class_stack_size = stream->curr_class_stack_size; -+ prev_class_stack_size = stream->curr_class_stack_size; - stream->curr_class_stack_size = 0; - emit_pending_spans (stream, false); - stream->curr_class_stack_size = prev_class_stack_size; ---- a/libtextstyle/lib/stat-w32.c 2020-06-27 04:00:42.000000000 +0800 -+++ b/libtextstyle/lib/stat-w32.c 2020-07-28 15:25:58.404593800 +0800 -@@ -149,6 +149,7 @@ - DWORD type = GetFileType (h); - if (type == FILE_TYPE_DISK) - { -+ unsigned int mode; - #if !(_WIN32_WINNT >= _WIN32_WINNT_VISTA) - if (!initialized) - initialize (); -@@ -245,7 +246,7 @@ - #endif - - /* st_mode. */ -- unsigned int mode = -+ mode = - /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ - ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) - | S_IREAD_UGO ---- a/libtextstyle/lib/stat.c 2020-06-27 04:00:42.000000000 +0800 -+++ b/libtextstyle/lib/stat.c 2020-07-28 15:24:12.289160300 +0800 -@@ -89,9 +89,10 @@ - q++; - if (q > p && *q != '\0') - { -+ const char *r; - /* Found the next slash at q. */ - q++; -- const char *r = q; -+ r = q; - while (*r != '\0' && !ISSLASH (*r)) - r++; - if (r > q && *r == '\0') -@@ -112,6 +113,13 @@ - rpl_stat (char const *name, struct stat *buf) - { - #ifdef WINDOWS_NATIVE -+ size_t len; -+ size_t drive_prefix_len; -+ size_t rlen; -+ bool check_dir = false; -+ const char *rname; -+ char *malloca_rname; -+ - /* Fill the fields ourselves, because the original stat function returns - values for st_atime, st_mtime, st_ctime that depend on the current time - zone. See -@@ -130,13 +138,12 @@ - name++; - } - -- size_t len = strlen (name); -- size_t drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); -+ len = strlen (name); -+ drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); - - /* Remove trailing slashes (except the very first one, at position - drive_prefix_len), but remember their presence. */ -- size_t rlen; -- bool check_dir = false; -+ check_dir = false; - - rlen = len; - while (rlen > drive_prefix_len && ISSLASH (name[rlen-1])) -@@ -161,8 +168,6 @@ - return -1; - } - -- const char *rname; -- char *malloca_rname; - if (rlen == len) - { - rname = name; -@@ -229,6 +234,10 @@ - - /* Fallback. */ - { -+ WIN32_FIND_DATA info; -+ HANDLE h; -+ unsigned int mode; -+ - /* Approach based on the directory entry. */ - - if (strchr (rname, '?') != NULL || strchr (rname, '*') != NULL) -@@ -250,8 +259,7 @@ - - - */ -- WIN32_FIND_DATA info; -- HANDLE h = FindFirstFile (rname, &info); -+ h = FindFirstFile (rname, &info); - if (h == INVALID_HANDLE_VALUE) - goto failed; - -@@ -280,7 +288,7 @@ - # endif - - /* st_mode. */ -- unsigned int mode = -+ mode = - /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ - ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) - | S_IREAD_UGO ---- a/libtextstyle/lib/html-ostream.c 2020-04-12 04:29:49.000000000 +0800 -+++ b/libtextstyle/lib/html-ostream.c 2020-07-28 15:30:12.790408600 +0800 -@@ -202,12 +202,13 @@ - - if (uc == '\n') - { -+ size_t prev_class_stack_size; - verify_invariants (stream); - /* Emit tags to follow the decrease of the class stack - from last_class_stack_size to 0. Then emit the newline. - Then prepare for emitting tags to go back from 0 - to curr_class_stack_size. */ -- size_t prev_class_stack_size = stream->curr_class_stack_size; -+ prev_class_stack_size = stream->curr_class_stack_size; - stream->curr_class_stack_size = 0; - emit_pending_spans (stream, false); - stream->curr_class_stack_size = prev_class_stack_size; -@@ -284,12 +285,14 @@ - static void - html_ostream__flush (html_ostream_t stream, ostream_flush_scope_t scope) - { -+ size_t prev_class_stack_size; -+ - verify_invariants (stream); - /* stream->buf[] contains only a few bytes that don't correspond to a - character. Can't flush it. */ - /* Close the open tags, and prepare for reopening the same - tags. */ -- size_t prev_class_stack_size = stream->curr_class_stack_size; -+ prev_class_stack_size = stream->curr_class_stack_size; - stream->curr_class_stack_size = 0; - emit_pending_spans (stream, false); - stream->curr_class_stack_size = prev_class_stack_size; -@@ -436,7 +439,7 @@ - return stream; - } - --#line 440 "html-ostream.c" -+#line 443 "html-ostream.c" - - const struct html_ostream_implementation html_ostream_vtable = - { diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-runtime/config.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/config.h similarity index 52% rename from gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-runtime/config.h rename to gvsbuild/patches/gettext/msvc/gettext-runtime/config.h index 769622baa..dcada2cff 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-runtime/config.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/config.h @@ -1,6 +1,10 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Witness that has been included. */ +#define _GL_CONFIG_H_INCLUDED 1 + + /* Define to the number of bits in type 'ptrdiff_t'. */ /* #undef BITSIZEOF_PTRDIFF_T */ @@ -11,7 +15,7 @@ /* #undef BITSIZEOF_SIZE_T */ /* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ +#define BITSIZEOF_WCHAR_T 16 /* Define to the number of bits in type 'wint_t'. */ /* #undef BITSIZEOF_WINT_T */ @@ -43,7 +47,11 @@ #define FLEXIBLE_ARRAY_MEMBER /**/ /* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ + and handles a trailing slash correctly. */ +/* #undef FUNC_REALPATH_NEARLY_WORKS */ + +/* Define to 1 if realpath() can malloc memory, always gives an absolute path, + and handles leading slashes and a trailing slash correctly. */ /* #undef FUNC_REALPATH_WORKS */ /* Define to a C preprocessor expression that evaluates to 1 or 0, depending @@ -70,6 +78,10 @@ "__gnu_printf__" instead of "__printf__" */ /* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module reallocarray shall be considered present. */ +#define GNULIB_REALLOCARRAY 1 + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module scanf shall be considered present. */ #define GNULIB_SCANF 1 @@ -78,10 +90,66 @@ whether the gnulib module sigpipe shall be considered present. */ #define GNULIB_SIGPIPE 1 +/* Define to 1 if you want the FILE stream functions getc, putc, etc. to use + unlocked I/O if available, throughout the package. Unlocked I/O can improve + performance, sometimes dramatically. But unlocked I/O is safe only in + single-threaded programs, as well as in multithreaded programs for which + you can guarantee that every FILE stream, including stdin, stdout, stderr, + is used only in a single thread. */ +#define GNULIB_STDIO_SINGLE_THREAD 1 + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module strerror shall be considered present. */ #define GNULIB_STRERROR 1 +/* Define to 1 when the gnulib module c32isalnum should be tested. */ +#define GNULIB_TEST_C32ISALNUM 1 + +/* Define to 1 when the gnulib module c32isalpha should be tested. */ +#define GNULIB_TEST_C32ISALPHA 1 + +/* Define to 1 when the gnulib module c32isblank should be tested. */ +#define GNULIB_TEST_C32ISBLANK 1 + +/* Define to 1 when the gnulib module c32iscntrl should be tested. */ +#define GNULIB_TEST_C32ISCNTRL 1 + +/* Define to 1 when the gnulib module c32isdigit should be tested. */ +#define GNULIB_TEST_C32ISDIGIT 1 + +/* Define to 1 when the gnulib module c32isgraph should be tested. */ +#define GNULIB_TEST_C32ISGRAPH 1 + +/* Define to 1 when the gnulib module c32islower should be tested. */ +#define GNULIB_TEST_C32ISLOWER 1 + +/* Define to 1 when the gnulib module c32isprint should be tested. */ +#define GNULIB_TEST_C32ISPRINT 1 + +/* Define to 1 when the gnulib module c32ispunct should be tested. */ +#define GNULIB_TEST_C32ISPUNCT 1 + +/* Define to 1 when the gnulib module c32isspace should be tested. */ +#define GNULIB_TEST_C32ISSPACE 1 + +/* Define to 1 when the gnulib module c32isupper should be tested. */ +#define GNULIB_TEST_C32ISUPPER 1 + +/* Define to 1 when the gnulib module c32isxdigit should be tested. */ +#define GNULIB_TEST_C32ISXDIGIT 1 + +/* Define to 1 when the gnulib module c32tolower should be tested. */ +#define GNULIB_TEST_C32TOLOWER 1 + +/* Define to 1 when the gnulib module c32width should be tested. */ +#define GNULIB_TEST_C32WIDTH 1 + +/* Define to 1 when the gnulib module calloc-gnu should be tested. */ +#define GNULIB_TEST_CALLOC_GNU 1 + +/* Define to 1 when the gnulib module calloc-posix should be tested. */ +#define GNULIB_TEST_CALLOC_POSIX 1 + /* Define to 1 when the gnulib module canonicalize_file_name should be tested. */ #define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 @@ -101,29 +169,74 @@ /* Define to 1 when the gnulib module fcntl should be tested. */ #define GNULIB_TEST_FCNTL 1 +/* Define to 1 when the gnulib module fgetc should be tested. */ +#define GNULIB_TEST_FGETC 1 + +/* Define to 1 when the gnulib module fgets should be tested. */ +#define GNULIB_TEST_FGETS 1 + +/* Define to 1 when the gnulib module fprintf should be tested. */ +#define GNULIB_TEST_FPRINTF 1 + +/* Define to 1 when the gnulib module fputc should be tested. */ +#define GNULIB_TEST_FPUTC 1 + +/* Define to 1 when the gnulib module fputs should be tested. */ +#define GNULIB_TEST_FPUTS 1 + +/* Define to 1 when the gnulib module fread should be tested. */ +#define GNULIB_TEST_FREAD 1 + +/* Define to 1 when the gnulib module free-posix should be tested. */ +#define GNULIB_TEST_FREE_POSIX 1 + +/* Define to 1 when the gnulib module fscanf should be tested. */ +#define GNULIB_TEST_FSCANF 1 + /* Define to 1 when the gnulib module fstat should be tested. */ #define GNULIB_TEST_FSTAT 1 +/* Define to 1 when the gnulib module fwrite should be tested. */ +#define GNULIB_TEST_FWRITE 1 + +/* Define to 1 when the gnulib module getc should be tested. */ +#define GNULIB_TEST_GETC 1 + +/* Define to 1 when the gnulib module getchar should be tested. */ +#define GNULIB_TEST_GETCHAR 1 + /* Define to 1 when the gnulib module getdtablesize should be tested. */ #define GNULIB_TEST_GETDTABLESIZE 1 /* Define to 1 when the gnulib module getopt-posix should be tested. */ #define GNULIB_TEST_GETOPT_POSIX 1 +/* Define to 1 when the gnulib module getprogname should be tested. */ +#define GNULIB_TEST_GETPROGNAME 1 + /* Define to 1 when the gnulib module iswblank should be tested. */ #define GNULIB_TEST_ISWBLANK 1 /* Define to 1 when the gnulib module iswdigit should be tested. */ #define GNULIB_TEST_ISWDIGIT 1 +/* Define to 1 when the gnulib module iswpunct should be tested. */ +#define GNULIB_TEST_ISWPUNCT 1 + /* Define to 1 when the gnulib module iswxdigit should be tested. */ #define GNULIB_TEST_ISWXDIGIT 1 /* Define to 1 when the gnulib module localename should be tested. */ #define GNULIB_TEST_LOCALENAME 1 -/* Define to 1 when the gnulib module lstat should be tested. */ -#define GNULIB_TEST_LSTAT 1 +/* Define to 1 when the gnulib module malloc-gnu should be tested. */ +#define GNULIB_TEST_MALLOC_GNU 1 + +/* Define to 1 when the gnulib module malloc-posix should be tested. */ +#define GNULIB_TEST_MALLOC_POSIX 1 + +/* Define to 1 when the gnulib module mbrtoc32 should be tested. */ +#define GNULIB_TEST_MBRTOC32 1 /* Define to 1 when the gnulib module mbrtowc should be tested. */ #define GNULIB_TEST_MBRTOWC 1 @@ -137,21 +250,54 @@ /* Define to 1 when the gnulib module mbsstr should be tested. */ #define GNULIB_TEST_MBSSTR 1 +/* Define to 1 when the gnulib module mbszero should be tested. */ +#define GNULIB_TEST_MBSZERO 1 + /* Define to 1 when the gnulib module memchr should be tested. */ #define GNULIB_TEST_MEMCHR 1 +/* Define to 1 when the gnulib module mempcpy should be tested. */ +#define GNULIB_TEST_MEMPCPY 1 + /* Define to 1 when the gnulib module open should be tested. */ #define GNULIB_TEST_OPEN 1 +/* Define to 1 when the gnulib module printf should be tested. */ +#define GNULIB_TEST_PRINTF 1 + +/* Define to 1 when the gnulib module putc should be tested. */ +#define GNULIB_TEST_PUTC 1 + +/* Define to 1 when the gnulib module putchar should be tested. */ +#define GNULIB_TEST_PUTCHAR 1 + +/* Define to 1 when the gnulib module puts should be tested. */ +#define GNULIB_TEST_PUTS 1 + /* Define to 1 when the gnulib module raise should be tested. */ #define GNULIB_TEST_RAISE 1 +/* Define to 1 when the gnulib module rawmemchr should be tested. */ +#define GNULIB_TEST_RAWMEMCHR 1 + /* Define to 1 when the gnulib module readlink should be tested. */ #define GNULIB_TEST_READLINK 1 +/* Define to 1 when the gnulib module reallocarray should be tested. */ +#define GNULIB_TEST_REALLOCARRAY 1 + +/* Define to 1 when the gnulib module realloc-gnu should be tested. */ +#define GNULIB_TEST_REALLOC_GNU 1 + +/* Define to 1 when the gnulib module realloc-posix should be tested. */ +#define GNULIB_TEST_REALLOC_POSIX 1 + /* Define to 1 when the gnulib module realpath should be tested. */ #define GNULIB_TEST_REALPATH 1 +/* Define to 1 when the gnulib module scanf should be tested. */ +#define GNULIB_TEST_SCANF 1 + /* Define to 1 when the gnulib module setlocale should be tested. */ #define GNULIB_TEST_SETLOCALE 1 @@ -170,6 +316,15 @@ /* Define to 1 when the gnulib module strnlen should be tested. */ #define GNULIB_TEST_STRNLEN 1 +/* Define to 1 when the gnulib module strtoul should be tested. */ +#define GNULIB_TEST_STRTOUL 1 + +/* Define to 1 when the gnulib module vfprintf should be tested. */ +#define GNULIB_TEST_VFPRINTF 1 + +/* Define to 1 when the gnulib module vprintf should be tested. */ +#define GNULIB_TEST_VPRINTF 1 + /* Define to 1 when the gnulib module wcwidth should be tested. */ #define GNULIB_TEST_WCWIDTH 1 @@ -181,26 +336,27 @@ whether the gnulib module unistr/u8-uctomb shall be considered present. */ #define GNULIB_UNISTR_U8_UCTOMB 1 +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module xalloc shall be considered present. */ +#define GNULIB_XALLOC 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module xalloc-die shall be considered present. */ +#define GNULIB_XALLOC_DIE 1 + /* Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution. */ #define HAVE_ALLOCA 1 -/* Define to 1 if you have and it should be used (not on Ultrix). - */ +/* Define to 1 if works. */ /* #undef HAVE_ALLOCA_H */ -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - /* Define to 1 if you have the `atexit' function. */ #define HAVE_ATEXIT 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_BP_SYM_H */ -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - /* Define to 1 if you have the `canonicalize_file_name' function. */ /* #undef HAVE_CANONICALIZE_FILE_NAME */ @@ -218,6 +374,20 @@ /* Define to 1 if you have the header file. */ #define HAVE_CRTDEFS_H 1 +/* Define to 1 if the alignas and alignof keywords work. */ +/* #undef HAVE_C_ALIGNASOF */ + +/* Define to 1 if bool, true and false work as per C2023. */ +/* #undef HAVE_C_BOOL */ + +/* Define to 1 if the static_assert keyword works. */ +#if (_MSC_VER >= 1931) +# define HAVE_C_STATIC_ASSERT 1 +#endif + +/* Define to 1 if C supports variable-length arrays. */ +/* #undef HAVE_C_VARARRAYS */ + /* Define if the GNU dcgettext() function is already present or preinstalled. */ /* #undef HAVE_DCGETTEXT */ @@ -226,6 +396,22 @@ you don't. */ #define HAVE_DECL_CLEARERR_UNLOCKED 0 +/* Define to 1 if you have the declaration of `ecvt', and to 0 if you don't. + */ +#define HAVE_DECL_ECVT 1 + +/* Define to 1 if you have the declaration of `execvpe', and to 0 if you + don't. */ +#define HAVE_DECL_EXECVPE 0 + +/* Define to 1 if you have the declaration of `fcloseall', and to 0 if you + don't. */ +#define HAVE_DECL_FCLOSEALL 1 + +/* Define to 1 if you have the declaration of `fcvt', and to 0 if you don't. + */ +#define HAVE_DECL_FCVT 1 + /* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you don't. */ #define HAVE_DECL_FEOF_UNLOCKED 0 @@ -258,6 +444,10 @@ you don't. */ #define HAVE_DECL_FWRITE_UNLOCKED 0 +/* Define to 1 if you have the declaration of `gcvt', and to 0 if you don't. + */ +#define HAVE_DECL_GCVT 1 + /* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if you don't. */ #define HAVE_DECL_GETCHAR_UNLOCKED 0 @@ -270,6 +460,10 @@ don't. */ #define HAVE_DECL_GETDTABLESIZE 0 +/* Define to 1 if you have the declaration of `getw', and to 0 if you don't. + */ +#define HAVE_DECL_GETW 1 + /* Define to 1 if you have the declaration of `iswblank', and to 0 if you don't. */ #define HAVE_DECL_ISWBLANK 1 @@ -298,6 +492,10 @@ don't. */ #define HAVE_DECL_PUTC_UNLOCKED 0 +/* Define to 1 if you have the declaration of `putw', and to 0 if you don't. + */ +#define HAVE_DECL_PUTW 1 + /* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. */ #define HAVE_DECL_SETENV 0 @@ -314,18 +512,14 @@ don't. */ /* #undef HAVE_DECL_TOWLOWER */ +/* Define to 1 if you have the declaration of `wcsdup', and to 0 if you don't. + */ +#define HAVE_DECL_WCSDUP 1 + /* Define to 1 if you have the declaration of `wcwidth', and to 0 if you don't. */ #define HAVE_DECL_WCWIDTH 0 -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - /* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. */ #define HAVE_DECL___ARGV 1 @@ -339,6 +533,15 @@ /* Define if you have the declaration of environ. */ #define HAVE_ENVIRON_DECL 1 +/* Define to 1 if you have the `error' function. */ +/* #undef HAVE_ERROR */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ERROR_H */ + +/* Define to 1 if you have the `faccessat' function. */ +/* #undef HAVE_FACCESSAT */ + /* Define if the locale_t type contains insufficient information, as on OpenBSD. */ /* #undef HAVE_FAKE_LOCALES */ @@ -352,24 +555,18 @@ /* Define to 1 if you have the `freelocale' function. */ /* #undef HAVE_FREELOCALE */ +/* Define if the 'free' function is guaranteed to preserve errno. */ +/* #undef HAVE_FREE_POSIX */ + /* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 +/* #undef HAVE_GETCWD */ /* Define to 1 if you have the `getdtablesize' function. */ /* #undef HAVE_GETDTABLESIZE */ -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - /* Define to 1 if you have the `getexecname' function. */ /* #undef HAVE_GETEXECNAME */ -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - /* Define to 1 if you have the `getlocalename_l' function. */ /* #undef HAVE_GETLOCALENAME_L */ @@ -379,17 +576,15 @@ /* Define to 1 if you have the `getopt_long_only' function. */ /* #undef HAVE_GETOPT_LONG_ONLY */ -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - /* Define to 1 if you have the `getprogname' function. */ /* #undef HAVE_GETPROGNAME */ /* Define if the GNU gettext() function is already present or preinstalled. */ /* #undef HAVE_GETTEXT */ -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ +/* Define if the uselocale exists, may be safely called, and returns + sufficient information. */ +/* #undef HAVE_GOOD_USELOCALE */ /* Define if you have the iconv() function and it works. */ #define HAVE_ICONV 1 @@ -402,16 +597,9 @@ */ #define HAVE_INLINE 1 -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - /* Define to 1 if you have the `iswblank' function. */ #define HAVE_ISWBLANK 1 @@ -439,6 +627,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_MACH_O_DYLD_H */ +/* Define if malloc, realloc, and calloc set errno on allocation failure. */ +/* #undef HAVE_MALLOC_POSIX */ + /* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including config.h and . */ /* #undef HAVE_MAP_ANONYMOUS */ @@ -458,14 +649,17 @@ /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - /* Define to 1 if you have the `mempcpy' function. */ /* #undef HAVE_MEMPCPY */ -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if defines the MIN and MAX macros. */ +/* #undef HAVE_MINMAX_IN_LIMITS_H */ + +/* Define to 1 if defines the MIN and MAX macros. */ +/* #undef HAVE_MINMAX_IN_SYS_PARAM_H */ /* Define to 1 if you have the `mprotect' function. */ /* #undef HAVE_MPROTECT */ @@ -474,9 +668,6 @@ concept. */ #define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - /* Define if the locale_t type does not contain the name of each locale category. */ /* #undef HAVE_NAMELESS_LOCALES */ @@ -484,9 +675,6 @@ /* Define to 1 if you have the `newlocale' function. */ /* #undef HAVE_NEWLOCALE */ -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - /* Define if you have the header and the POSIX threads API. */ /* #undef HAVE_PTHREAD_API */ @@ -500,21 +688,27 @@ reader. */ /* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - /* Define to 1 if you have the `raise' function. */ #define HAVE_RAISE 1 +/* Define to 1 if you have the `rawmemchr' function. */ +/* #undef HAVE_RAWMEMCHR */ + /* Define to 1 if you have the `readlink' function. */ /* #undef HAVE_READLINK */ /* Define to 1 if you have the `readlinkat' function. */ /* #undef HAVE_READLINKAT */ +/* Define to 1 if you have the `reallocarray' function. */ +/* #undef HAVE_REALLOCARRAY */ + /* Define to 1 if you have the `realpath' function. */ /* #undef HAVE_REALPATH */ +/* Define to 1 if you have the header file. */ +#define HAVE_SDKDDKVER_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SEARCH_H 1 @@ -539,35 +733,25 @@ /* Define to 1 if the system has the type `sigset_t'. */ /* #undef HAVE_SIGSET_T */ -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - /* Define if the locale_t type is as on Solaris 11.4. */ /* #undef HAVE_SOLARIS114_LOCALES */ -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDCKDINT_H */ /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ +/* Define if you have `strerror_r'. */ /* #undef HAVE_STRERROR_R */ /* Define to 1 if you have the header file. */ @@ -576,9 +760,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 @@ -621,6 +802,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PARAM_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SINGLE_THREADED_H */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SOCKET_H */ @@ -645,12 +829,15 @@ /* Define to 1 if you have the `tsearch' function. */ /* #undef HAVE_TSEARCH */ -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 +/* Define to 1 if you have the header file. */ +#define HAVE_UCHAR_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_UNISTD_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTRING_WOE32DLL_H */ + /* Define to 1 if the system has the type 'unsigned long long int'. */ #define HAVE_UNSIGNED_LONG_LONG_INT 1 @@ -662,7 +849,7 @@ /* Define to 1 or 0, depending whether the compiler supports simple visibility declarations. */ -#define HAVE_VISIBILITY 0 +/* #undef HAVE_VISIBILITY */ /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 @@ -670,15 +857,6 @@ /* Define if you have the 'wchar_t' type. */ #define HAVE_WCHAR_T 1 -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - /* Define to 1 if you have the header file. */ #define HAVE_WCTYPE_H 1 @@ -695,32 +873,149 @@ /* Define if you have the 'wint_t' type. */ #define HAVE_WINT_T 1 +/* Define if the mbrtoc32 function basically works. */ +/* #undef HAVE_WORKING_MBRTOC32 */ + /* Define to 1 if O_NOATIME works. */ #define HAVE_WORKING_O_NOATIME 0 /* Define to 1 if O_NOFOLLOW works. */ #define HAVE_WORKING_O_NOFOLLOW 0 -/* Define if the uselocale function exists any may safely be called. */ +/* Define if the uselocale function exists and may safely be called. */ /* #undef HAVE_WORKING_USELOCALE */ -/* Define to 1 if you have the `wprintf' function. */ -/* #undef HAVE_WPRINTF */ - /* Define to 1 if you have the header file. */ /* #undef HAVE_XLOCALE_H */ -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - /* Define to 1 if you have the `_NSGetExecutablePath' function. */ /* #undef HAVE__NSGETEXECUTABLEPATH */ /* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ #define HAVE__SET_INVALID_PARAMETER_HANDLER 1 -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ +/* Define to 1 if the compiler supports __builtin_expect, + and to 2 if does. */ +/* #undef HAVE___BUILTIN_EXPECT */ +#ifndef HAVE___BUILTIN_EXPECT +# define __builtin_expect(e, c) (e) +#elif HAVE___BUILTIN_EXPECT == 2 +# include +#endif + + +/* Define to 1 if ctype.h defines __header_inline. */ +/* #undef HAVE___HEADER_INLINE */ + +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Oracle Developer Studio 12.6 + (Sun C 5.15 SunOS_sparc 2017/05/30). + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: + + OS X 10.8 and earlier; see: + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log + + FreeBSD; see: + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. + + GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. It defines a macro + __GNUC_STDC_INLINE__ to indicate this situation or a macro + __GNUC_GNU_INLINE__ to indicate the opposite situation. + GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline + semantics but warns, unless -fgnu89-inline is used: + warning: C99 inline functions are not supported; using GNU89 + warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute + It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. + */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined HAVE___HEADER_INLINE \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? (defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + && !defined __PCC__) \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined __PCC__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE _GL_UNUSED static +# define _GL_EXTERN_INLINE _GL_UNUSED static +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + +/* Define to 1 if the compiler supports the keyword '__inline'. */ +#define HAVE___INLINE 1 /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST @@ -730,10 +1025,10 @@ /* #undef ICONV_FLAVOR */ /* Define to the value of ${prefix}, as a string. */ -#define INSTALLPREFIX "/cygdrive/c/software.b/gettext-0.21.0" +#define INSTALLPREFIX "c:/vs14.0" -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 +/* Define if localename.c overrides newlocale(), duplocale(), freelocale(). */ +/* #undef LOCALENAME_ENHANCE_LOCALE_FUNCS */ /* Define to 1 if 'lstat' dereferences a symlink specified with a trailing slash. */ @@ -748,6 +1043,14 @@ /* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ /* #undef MAP_ANONYMOUS */ +/* Define if the mbrtoc32 function does not return (size_t) -2 for empty + input. */ +/* #undef MBRTOC32_EMPTY_INPUT_BUG */ + +/* Define if the mbrtoc32 function may signal encoding errors in the C locale. + */ +#define MBRTOC32_IN_C_LOCALE_MAYBE_EILSEQ 1 + /* Define if the mbrtowc function does not return (size_t) -2 for empty input. */ #define MBRTOWC_EMPTY_INPUT_BUG 1 @@ -778,6 +1081,9 @@ #endif +/* Define to 1 on musl libc. */ +/* #undef MUSL_LIBC */ + /* Define to 1 to enable general improvements of setlocale. */ #define NEED_SETLOCALE_IMPROVED 1 @@ -797,7 +1103,7 @@ #define PACKAGE_NAME "gettext-runtime" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-runtime 0.21" +#define PACKAGE_STRING "gettext-runtime 0.22.3" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gettext-runtime" @@ -806,7 +1112,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.21" +#define PACKAGE_VERSION "0.22.3" /* Define to the type that is the result of default argument promotions of type mode_t. */ @@ -822,6 +1128,10 @@ /* Define to 1 if readlink fails to recognize a trailing slash. */ /* #undef READLINK_TRAILING_SLASH_BUG */ +/* Define to 1 if readlink sets errno instead of truncating a too-long link. + */ +/* #undef READLINK_TRUNCATE_BUG */ + /* Define to 1 if stat needs help when passed a file name with a trailing slash */ /* #undef REPLACE_FUNC_STAT_FILE */ @@ -839,12 +1149,6 @@ 'sig_atomic_t'. */ /* #undef SIG_ATOMIC_T_SUFFIX */ -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'size_t'. */ /* #undef SIZE_T_SUFFIX */ @@ -852,15 +1156,17 @@ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define to 1 if the `S_IS*' macros in do not work properly. */ /* #undef STAT_MACROS_BROKEN */ -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 /* Define to 1 if strerror_r returns char *. */ @@ -872,7 +1178,11 @@ /* Define to the prefix of C symbols at the assembler and linker level, either an underscore or empty. */ -#define USER_LABEL_PREFIX _ +#ifdef _WIN64 +# define USER_LABEL_PREFIX +#else +# define USER_LABEL_PREFIX _ +#endif /* Define if the combination of the ISO C and POSIX multithreading APIs can be used. */ @@ -884,6 +1194,10 @@ /* Define if the POSIX multithreading library can be used. */ /* #undef USE_POSIX_THREADS */ +/* Define if references to the POSIX multithreading library are satisfied by + libc. */ +/* #undef USE_POSIX_THREADS_FROM_LIBC */ + /* Define if references to the POSIX multithreading library should be made weak. */ /* #undef USE_POSIX_THREADS_WEAK */ @@ -896,19 +1210,44 @@ #ifndef _DARWIN_C_SOURCE # define _DARWIN_C_SOURCE 1 #endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif -/* Enable NetBSD extensions on NetBSD. */ +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ #ifndef _NETBSD_SOURCE # define _NETBSD_SOURCE 1 #endif -/* Enable OpenBSD extensions on NetBSD. */ +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ #ifndef _OPENBSD_SOURCE # define _OPENBSD_SOURCE 1 #endif -/* Enable threading extensions on Solaris. */ +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif @@ -924,11 +1263,15 @@ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # define __STDC_WANT_IEC_60559_DFP_EXT__ 1 #endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# define __STDC_WANT_IEC_60559_EXT__ 1 +#endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 #endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 #endif @@ -944,33 +1287,21 @@ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ #ifndef _XOPEN_SOURCE /* # undef _XOPEN_SOURCE */ #endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 +/* An alias of GNULIB_STDIO_SINGLE_THREAD. */ +#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD /* Define if the native Windows multithreading API can be used. */ #define USE_WINDOWS_THREADS 1 /* Version number of package */ -#define VERSION "0.21" +#define VERSION "0.22.3" /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wchar_t'. */ @@ -995,18 +1326,15 @@ #endif -/* Define for large files, on AIX-style hosts. */ +/* Define to enable the declarations of ISO C 11 types and functions. */ +/* #undef _ISOC11_SOURCE */ + +/* Define to 1 on platforms where this makes off_t a 64-bit type. */ /* #undef _LARGE_FILES */ /* Define to 1 on Solaris. */ /* #undef _LCONV_C99 */ -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - /* The _Noreturn keyword of C11. */ #ifndef _Noreturn # if (defined __cplusplus \ @@ -1020,14 +1348,20 @@ AIX system header files and several gnulib header files use precisely this syntax with 'extern'. */ # define _Noreturn [[noreturn]] +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn # elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (_GL_GNUC_PREREQ (4, 7) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C +# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) @@ -1037,12 +1371,8 @@ #endif -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ +/* Number of bits in time_t, on hosts where this is settable. */ +/* #undef _TIME_BITS */ /* For standard stat data types on VMS. */ #define _USE_STD_STAT 1 @@ -1051,12 +1381,19 @@ used. */ #define __GETOPT_PREFIX rpl_ +/* Define to 1 on platforms where this makes time_t a 64-bit type. */ +/* #undef __MINGW_USE_VC2005_COMPAT */ + /* Define to 1 if the system predates C++11. */ /* #undef __STDC_CONSTANT_MACROS */ /* Define to 1 if the system predates C++11. */ /* #undef __STDC_LIMIT_MACROS */ +/* Define to 1 if C does not support variable-length arrays, and if the + compiler does not already define this. */ +#define __STDC_NO_VLA__ 1 + /* The _GL_ASYNC_SAFE marker should be attached to functions that are signal handlers (for signals other than SIGABRT, SIGPIPE) or can be invoked from such signal handlers. Such functions have some restrictions: @@ -1085,7 +1422,11 @@ /* Attributes. */ -#ifdef __has_attribute +#if (defined __has_attribute \ + && (!defined __clang_minor__ \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 5 <= __clang_major__))) # define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) #else # define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr @@ -1095,17 +1436,18 @@ # define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) # define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) # define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) +# define _GL_ATTR_diagnose_if 0 # define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) # define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) # define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) # define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) # define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) +# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) # ifdef _ICC # define _GL_ATTR_may_alias 0 # else # define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) # endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) # define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) # define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) # define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) @@ -1118,300 +1460,476 @@ # define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) #endif - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) +/* Use __has_c_attribute if available. However, do not use with + pre-C23 GCC, which can issue false positives if -Wpedantic. */ +#if (defined __has_c_attribute \ + && ! (_GL_GNUC_PREREQ (4, 6) \ + && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710)) +# define _GL_HAVE___HAS_C_ATTRIBUTE 1 #else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) +# define _GL_HAVE___HAS_C_ATTRIBUTE 0 #endif -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) +/* Define if, in a function declaration, the attributes in bracket syntax + [[...]] must come before the attributes in __attribute__((...)) syntax. + If this is defined, it is best to avoid the bracket syntax, so that the + various _GL_ATTRIBUTE_* can be cumulated on the same declaration in any + order. */ +#ifdef __cplusplus +# if defined __clang__ +# define _GL_BRACKET_BEFORE_ATTRIBUTE 1 +# endif #else -# define _GL_ATTRIBUTE_ALWAYS_INLINE +# if defined __GNUC__ && !defined __clang__ +# define _GL_BRACKET_BEFORE_ATTRIBUTE 1 +# endif #endif -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL +/* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function + is the size of the returned memory block. + _GL_ATTRIBUTE_ALLOC_SIZE ((M, N)) declares that the Mth argument multiplied + by the Nth argument of the function is the size of the returned memory block. + */ +/* Applies to: function, pointer to function, function types. */ +#ifndef _GL_ATTRIBUTE_ALLOC_SIZE +# if _GL_HAS_ATTRIBUTE (alloc_size) +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) +# else +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) +# endif #endif -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD +/* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the + function and report an error if it cannot do so. */ +/* Applies to: function. */ +#ifndef _GL_ATTRIBUTE_ALWAYS_INLINE +# if _GL_HAS_ATTRIBUTE (always_inline) +# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) +# else +# define _GL_ATTRIBUTE_ALWAYS_INLINE +# endif #endif -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST +/* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show + in stack traces when debugging. The compiler should omit the function from + stack traces. */ +/* Applies to: function. */ +#ifndef _GL_ATTRIBUTE_ARTIFICIAL +# if _GL_HAS_ATTRIBUTE (artificial) +# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) +# else +# define _GL_ATTRIBUTE_ARTIFICIAL +# endif #endif -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED +/* _GL_ATTRIBUTE_COLD declares that the function is rarely executed. */ +/* Applies to: functions. */ +/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at + . + Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */ +#ifndef _GL_ATTRIBUTE_COLD +# if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ +# ifndef __SUNPRO_C +# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) +# else +# define _GL_ATTRIBUTE_COLD __attribute__ ((cold)) +# endif +# else +# define _GL_ATTRIBUTE_COLD +# endif #endif -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) +/* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate + calls to the function with the same arguments. + This attribute is safe for a function that neither depends on nor affects + observable state, and always returns exactly once - e.g., does not loop + forever, and does not call longjmp. + (This attribute is stricter than _GL_ATTRIBUTE_PURE.) */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_CONST +# if _GL_HAS_ATTRIBUTE (const) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _GL_ATTRIBUTE_CONST +# endif #endif -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. + _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if _GL_GNUC_PREREQ (11, 0) +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif #endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) +/* If gnulib's or has already defined this macro, continue + to use this earlier definition, since may not have been included + yet. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif #endif -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) +/* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated. + The compiler may warn if the entity is used. */ +/* Applies to: + - function, variable, + - struct, union, struct/union member, + - enumeration, enumeration item, + - typedef, + in C++ also: namespace, class, template specialization. */ +#ifndef _GL_ATTRIBUTE_DEPRECATED +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__deprecated__) +# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] +# endif +# endif +# endif +# if !defined _GL_ATTRIBUTE_DEPRECATED && _GL_HAS_ATTRIBUTE (deprecated) +# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) +# endif +# ifndef _GL_ATTRIBUTE_DEPRECATED +# define _GL_ATTRIBUTE_DEPRECATED +# endif #endif -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF +/* _GL_ATTRIBUTE_ERROR(msg) requests an error if a function is called and + the function call is not optimized away. + _GL_ATTRIBUTE_WARNING(msg) requests a warning if a function is called and + the function call is not optimized away. */ +/* Applies to: functions. */ +#if !(defined _GL_ATTRIBUTE_ERROR && defined _GL_ATTRIBUTE_WARNING) +# if _GL_HAS_ATTRIBUTE (error) +# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) +# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) +# elif _GL_HAS_ATTRIBUTE (diagnose_if) +# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error"))) +# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# else +# define _GL_ATTRIBUTE_ERROR(msg) +# define _GL_ATTRIBUTE_WARNING(msg) +# endif #endif -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS +/* _GL_ATTRIBUTE_EXTERNALLY_VISIBLE declares that the entity should remain + visible to debuggers etc., even with '-fwhole-program'. */ +/* Applies to: functions, variables. */ +#ifndef _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +# if _GL_HAS_ATTRIBUTE (externally_visible) +# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) +# else +# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +# endif #endif -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC +/* _GL_ATTRIBUTE_FALLTHROUGH declares that it is not a programming mistake if + the control flow falls through to the immediately following 'case' or + 'default' label. The compiler should not warn in this case. */ +/* Applies to: Empty statement (;), inside a 'switch' statement. */ +/* Always expands to something. */ +#ifndef _GL_ATTRIBUTE_FALLTHROUGH +# if _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__fallthrough__) +# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] +# endif +# endif +# if !defined _GL_ATTRIBUTE_FALLTHROUGH && _GL_HAS_ATTRIBUTE (fallthrough) +# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) +# endif +# ifndef _GL_ATTRIBUTE_FALLTHROUGH +# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) +# endif #endif -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD +/* _GL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK)) + declares that the STRING-INDEXth function argument is a format string of + style ARCHETYPE, which is one of: + printf, gnu_printf + scanf, gnu_scanf, + strftime, gnu_strftime, + strfmon, + or the same thing prefixed and suffixed with '__'. + If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK + are suitable for the format string. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_FORMAT +# if _GL_HAS_ATTRIBUTE (format) +# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +# else +# define _GL_ATTRIBUTE_FORMAT(spec) +# endif #endif -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE +/* _GL_ATTRIBUTE_LEAF declares that if the function is called from some other + compilation unit, it executes code from that unit only by return or by + exception handling. This declaration lets the compiler optimize that unit + more aggressively. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_LEAF +# if _GL_HAS_ATTRIBUTE (leaf) +# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) +# else +# define _GL_ATTRIBUTE_LEAF +# endif #endif -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if _GL_HAS_ATTRIBUTE (malloc) +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif #endif -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING +/* _GL_ATTRIBUTE_MAY_ALIAS declares that pointers to the type may point to the + same storage as pointers to other types. Thus this declaration disables + strict aliasing optimization. */ +/* Applies to: types. */ +/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */ +#ifndef _GL_ATTRIBUTE_MAY_ALIAS +# if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C +# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) +# else +# define _GL_ATTRIBUTE_MAY_ALIAS +# endif #endif -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW +/* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if + the entity is not used. The compiler should not warn if the entity is not + used. */ +/* Applies to: + - function, variable, + - struct, union, struct/union member, + - enumeration, enumeration item, + - typedef, + in C++ also: class. */ +/* In C++ and C23, this is spelled [[__maybe_unused__]]. + GCC's syntax is __attribute__ ((__unused__)). + clang supports both syntaxes. Except that with clang ≥ 6, < 10, in C++ mode, + __has_c_attribute (__maybe_unused__) yields true but the use of + [[__maybe_unused__]] nevertheless produces a warning. */ +#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if defined __clang__ && defined __cplusplus +# if !defined __apple_build_version__ && __clang_major__ >= 10 +# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# elif _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__maybe_unused__) +# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# endif +# endif +# ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED +# endif #endif +/* Alternative spelling of this macro, for convenience and for + compatibility with glibc/include/libc-symbols.h. */ +#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED +/* Earlier spellings of this macro. */ +#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED +/* _GL_ATTRIBUTE_NODISCARD declares that the caller of the function should not + discard the return value. The compiler may warn if the caller does not use + the return value, unless the caller uses something like ignore_value. */ +/* Applies to: function, enumeration, class. */ +#ifndef _GL_ATTRIBUTE_NODISCARD +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if defined __clang__ && defined __cplusplus + /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] produces + a warning. + The 1000 below means a yet unknown threshold. When clang++ version X + starts supporting [[__nodiscard__]] without warning about it, you can + replace the 1000 with X. */ +# if __clang_major__ >= 1000 +# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] +# endif +# elif _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__nodiscard__) +# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] +# endif +# endif +# endif +# if !defined _GL_ATTRIBUTE_NODISCARD && _GL_HAS_ATTRIBUTE (warn_unused_result) +# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) +# endif +# ifndef _GL_ATTRIBUTE_NODISCARD +# define _GL_ATTRIBUTE_NODISCARD +# endif #endif -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE +/* _GL_ATTRIBUTE_NOINLINE tells that the compiler should not inline the + function. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_NOINLINE +# if _GL_HAS_ATTRIBUTE (noinline) +# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) +# else +# define _GL_ATTRIBUTE_NOINLINE +# endif #endif -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL +/* _GL_ATTRIBUTE_NONNULL ((N1, N2,...)) declares that the arguments N1, N2,... + must not be NULL. + _GL_ATTRIBUTE_NONNULL () declares that all pointer arguments must not be + null. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_NONNULL +# if _GL_HAS_ATTRIBUTE (nonnull) +# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) +# else +# define _GL_ATTRIBUTE_NONNULL(args) +# endif #endif -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) +/* _GL_ATTRIBUTE_NONSTRING declares that the contents of a character array is + not meant to be NUL-terminated. */ +/* Applies to: struct/union members and variables that are arrays of element + type '[[un]signed] char'. */ +#ifndef _GL_ATTRIBUTE_NONSTRING +# if _GL_HAS_ATTRIBUTE (nonstring) +# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) +# else +# define _GL_ATTRIBUTE_NONSTRING +# endif #endif +/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +/* Applies to: functions. */ +/* After a function's parameter list, this attribute must come first, before + other attributes. */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if _GL_GNUC_PREREQ (2, 8) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if _GL_HAS_ATTRIBUTE (nothrow) +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif #endif - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG +/* _GL_ATTRIBUTE_PACKED declares: + For struct members: The member has the smallest possible alignment. + For struct, union, class: All members have the smallest possible alignment, + minimizing the memory required. */ +/* Applies to: struct members, struct, union, + in C++ also: class. */ +#ifndef _GL_ATTRIBUTE_PACKED +# if _GL_HAS_ATTRIBUTE (packed) +# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) +# else +# define _GL_ATTRIBUTE_PACKED +# endif #endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) + +/* _GL_ATTRIBUTE_PURE declares that It is OK for a compiler to omit duplicate + calls to the function with the same arguments if observable state is not + changed between calls. + This attribute is safe for a function that does not affect + observable state, and always returns exactly once. + (This attribute is looser than _GL_ATTRIBUTE_CONST.) */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_PURE +# if _GL_HAS_ATTRIBUTE (pure) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else -# define _GL_INLINE extern inline +# define _GL_ATTRIBUTE_PURE # endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED #endif -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA +/* _GL_ATTRIBUTE_RETURNS_NONNULL declares that the function's return value is + a non-NULL pointer. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_RETURNS_NONNULL +# if _GL_HAS_ATTRIBUTE (returns_nonnull) +# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) # else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# define _GL_ATTRIBUTE_RETURNS_NONNULL # endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END #endif -/* Define to `int' if doesn't define. */ -#define gid_t int +/* _GL_ATTRIBUTE_SENTINEL(pos) declares that the variadic function expects a + trailing NULL argument. + _GL_ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99). + _GL_ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_SENTINEL +# if _GL_HAS_ATTRIBUTE (sentinel) +# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) +# else +# define _GL_ATTRIBUTE_SENTINEL(pos) +# endif +#endif -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#ifndef _GL_UNUSED -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) +/* A helper macro. Don't use it directly. */ +#ifndef _GL_ATTRIBUTE_UNUSED +# if _GL_HAS_ATTRIBUTE (unused) +# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else -# define _GL_UNUSED +# define _GL_ATTRIBUTE_UNUSED # endif #endif -/* The __pure__ attribute was added in gcc 2.96. */ -#ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) + +/* _GL_UNUSED_LABEL; declares that it is not a programming mistake if the + immediately preceding label is not used. The compiler should not warn + if the label is not used. */ +/* Applies to: label (both in C and C++). */ +/* Note that g++ < 4.5 does not support the '__attribute__ ((__unused__)) ;' + syntax. But clang does. */ +#ifndef _GL_UNUSED_LABEL +# if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__ +# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED # else -# define _GL_ATTRIBUTE_PURE /* empty */ +# define _GL_UNUSED_LABEL # endif #endif +/* In C++, there is the concept of "language linkage", that encompasses + name mangling and function calling conventions. + The following macros start and end a block of "C" linkage. */ +#ifdef __cplusplus +# define _GL_BEGIN_C_LINKAGE extern "C" { +# define _GL_END_C_LINKAGE } +#else +# define _GL_BEGIN_C_LINKAGE +# define _GL_END_C_LINKAGE +#endif + + +/* Define to `int' if doesn't define. */ +#define gid_t int + /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus @@ -1431,7 +1949,9 @@ /* Define to a type if does not define. */ /* #undef mbstate_t */ -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. +/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where + n1 and n2 are expressions without side effects, that evaluate to real + numbers (excluding NaN). It returns 1 if n1 > n2 0 if n1 == n2 @@ -1451,16 +1971,16 @@ /* Define to the type of st_nlink in struct stat, or a supertype. */ #define nlink_t int -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ +/* Define as a signed integer type capable of holding a process identifier. */ +#ifdef _WIN64 +# define pid_t __int64 +#else +# define pid_t int +#endif /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is - supported directly. */ + supported only directly. */ #define restrict /**/ /* Work around a bug in older versions of Sun C++, which did not #define __restrict__ or support _Restrict or __restrict__ @@ -1477,59 +1997,188 @@ /* #undef size_t */ /* Define as a signed type of the same size as size_t. */ -#define ssize_t int +#ifdef _WIN64 +# define ssize_t long long +#else +# define ssize_t long +#endif /* Define to `int' if doesn't define. */ #define uid_t int -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded - - - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER + + /* This definition is a duplicate of the one in unitypes.h. + It is here so that we can cope with an older version of unitypes.h + that does not contain this definition and that is pre-installed among + the public header files. */ + # if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 + # define _UC_RESTRICT __restrict + # elif 199901L <= __STDC_VERSION__ || defined restrict + # define _UC_RESTRICT restrict + # else + # define _UC_RESTRICT + # endif + + +#if !defined HAVE_C_ALIGNASOF \ + && !(defined __cplusplus && 201103 <= __cplusplus) \ + && !defined alignof +# if defined HAVE_STDALIGN_H +# include +# endif + +/* ISO C23 alignas and alignof for platforms that lack it. + + References: + ISO C23 (latest free draft + ) + sections 6.5.3.4, 6.7.5, 7.15. + C++11 (latest free draft + ) + section 18.10. */ + +/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment + requirement of a structure member (i.e., slot or field) that is of + type TYPE, as an integer constant expression. + + This differs from GCC's and clang's __alignof__ operator, which can + yield a better-performing alignment for an object of that type. For + example, on x86 with GCC and on Linux/x86 with clang, + __alignof__ (double) and __alignof__ (long long) are 8, whereas + alignof (double) and alignof (long long) are 4 unless the option + '-malign-double' is used. + + The result cannot be used as a value for an 'enum' constant, if you + want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ + +/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 + . + clang versions < 8.0.0 have the same bug. */ +# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ + || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ + && !defined __clang__) \ + || (defined __clang__ && __clang_major__ < 8)) +# undef/**/_Alignof +# ifdef __cplusplus +# if (201103 <= __cplusplus || defined _MSC_VER) +# define _Alignof(type) alignof (type) +# else + template struct __alignof_helper { char __a; __t __b; }; +# if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__ +# define _Alignof(type) __builtin_offsetof (__alignof_helper, __b) +# else +# define _Alignof(type) offsetof (__alignof_helper, __b) +# endif +# define _GL_STDALIGN_NEEDS_STDDEF 1 +# endif +# else +# if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__ +# define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b) +# else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +# define _GL_STDALIGN_NEEDS_STDDEF 1 +# endif +# endif +# endif +# if ! (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)) +# undef/**/alignof +# define alignof _Alignof +# endif + +/* alignas (A), also known as _Alignas (A), aligns a variable or type + to the alignment A, where A is an integer constant expression. For + example: + + int alignas (8) foo; + struct s { int a; int alignas (8) bar; }; + + aligns the address of FOO and the offset of BAR to be multiples of 8. + + A should be a power of two that is at least the type's alignment + and at most the implementation's alignment limit. This limit is + 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable + to MSVC through at least version 10.0, A should be an integer + constant, as MSVC does not support expressions such as 1 << 3. + To be portable to Sun C 5.11, do not align auto variables to + anything stricter than their default alignment. + + The following C23 requirements are not supported here: + + - If A is zero, alignas has no effect. + - alignas can be used multiple times; the strictest one wins. + - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). + + */ +# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +# if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER) +# define _Alignas(a) alignas (a) +# elif (!defined __attribute__ \ + && ((defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + : __GNUC__ && !defined __ibmxl__) \ + || (4 <= __clang_major__) \ + || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ + || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)) +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +# elif 1300 <= _MSC_VER +# define _Alignas(a) __declspec (align (a)) +# endif +# endif +# if !defined HAVE_STDALIGN_H +# if ((defined _Alignas \ + && !(defined __cplusplus \ + && (201103 <= __cplusplus || defined _MSC_VER))) \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# define alignas _Alignas +# endif +# endif + +# if defined _GL_STDALIGN_NEEDS_STDDEF +# include +# endif +#endif + +#ifndef HAVE_C_BOOL +# if !defined __cplusplus && !defined __bool_true_false_are_defined +# if HAVE_STDBOOL_H +# include +# else +# if defined __SUNPRO_C +# error " is not usable with this configuration. To make it usable, add -D_STDC_C99= to $CC." +# else +# error " does not exist on this platform. Use gnulib module 'stdbool-c99' instead of gnulib module 'stdbool'." +# endif +# endif +# endif +# if !true +# define true (!false) +# endif +#endif + +#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6))) + #include + #undef/**/assert + #ifdef __sgi + #undef/**/__ASSERT_H__ + #endif + /* Solaris 11.4 defines static_assert as a macro with 2 arguments. + We need it also to be invocable with a single argument. */ + #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus + #undef/**/static_assert + #define static_assert _Static_assert + #endif +#endif + + +/* On Windows, variables that may be in a DLL must be marked specially. + But here, the only such variable is 'exit_failure', and it is always + built into a static library, never into a shared library. */ +#if defined WOE32DLL && !defined IN_RELOCWRAPPER && 0 # define DLL_VARIABLE __declspec (dllimport) #else # define DLL_VARIABLE diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/assert.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/assert.h new file mode 100644 index 000000000..baeb53b67 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/assert.h @@ -0,0 +1,314 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Substitute for and wrapper around + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Do not guard the include, since is supposed to define + the assert macro each time it is included. */ + +#if __GNUC__ >= 3 + +#endif + + +#include "../ucrt/assert.h" + +#if (_MSC_VER < 1931) + +/* The definition of static_assert is copied here. */ +/* Compile-time assert-like macros. + + Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ + +#ifndef _GL_STATIC_ASSERT_H +#define _GL_STATIC_ASSERT_H + + +/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC) + works as per C11. This is supported by GCC 4.6.0+ and by clang 4+. + + Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as + per C23. This is supported by GCC 9.1+. + + Support compilers claiming conformance to the relevant standard, + and also support GCC when not pedantic. If we were willing to slow + 'configure' down we could also use it with other compilers, but + since this affects only the quality of diagnostics, why bother? */ +#ifndef __cplusplus +# if (201112 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__))) +# define _GL_HAVE__STATIC_ASSERT 1 +# endif +# if (202311 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ && 9 <= __GNUC__)) +# define _GL_HAVE__STATIC_ASSERT1 1 +# endif +#endif + +/* FreeBSD 9.1 , included by and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE__STATIC_ASSERT +# include +# undef _Static_assert +#endif + +/* Each of these macros verifies that its argument R is nonzero. To + be portable, R should be an integer constant expression. Unlike + assert (R), there is no run-time overhead. + + If _Static_assert works, verify (R) uses it directly. Similarly, + _GL_STATIC_ASSERT_TRUE works by packaging a _Static_assert inside a struct + that is an operand of sizeof. + + The code below uses several ideas for C++ compilers, and for C + compilers that do not support _Static_assert: + + * The first step is ((R) ? 1 : -1). Given an expression R, of + integral or boolean or floating-point type, this yields an + expression of integral type, whose value is later verified to be + constant and nonnegative. + + * Next this expression W is wrapped in a type + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: W; + }. + If W is negative, this yields a compile-time error. No compiler can + deal with a bit-field of negative size. + + One might think that an array size check would have the same + effect, that is, that the type struct { unsigned int dummy[W]; } + would work as well. However, inside a function, some compilers + (such as C++ compilers and GNU C) allow local parameters and + variables inside array size expressions. With these compilers, + an array size check would not properly diagnose this misuse of + the verify macro: + + void function (int n) { verify (n < 0); } + + * For the verify macro, the struct _gl_static_assert_type will need to + somehow be embedded into a declaration. To be portable, this + declaration must declare an object, a constant, a function, or a + typedef name. If the declared entity uses the type directly, + such as in + + struct dummy {...}; + typedef struct {...} dummy; + extern struct {...} *dummy; + extern void dummy (struct {...} *); + extern struct {...} *dummy (void); + + two uses of the verify macro would yield colliding declarations + if the entity names are not disambiguated. A workaround is to + attach the current line number to the entity name: + + #define _GL_CONCAT0(x, y) x##y + #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) + extern struct {...} * _GL_CONCAT (dummy, __LINE__); + + But this has the problem that two invocations of verify from + within the same macro would collide, since the __LINE__ value + would be the same for both invocations. (The GCC __COUNTER__ + macro solves this problem, but is not portable.) + + A solution is to use the sizeof operator. It yields a number, + getting rid of the identity of the type. Declarations like + + extern int dummy [sizeof (struct {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + + can be repeated. + + * Should the implementation use a named struct or an unnamed struct? + Which of the following alternatives can be used? + + extern int dummy [sizeof (struct {...})]; + extern int dummy [sizeof (struct _gl_static_assert_type {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern void dummy (int [sizeof (struct _gl_static_assert_type {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + extern int (*dummy (void)) [sizeof (struct _gl_static_assert_type {...})]; + + In the second and sixth case, the struct type is exported to the + outer scope; two such declarations therefore collide. GCC warns + about the first, third, and fourth cases. So the only remaining + possibility is the fifth case: + + extern int (*dummy (void)) [sizeof (struct {...})]; + + * GCC warns about duplicate declarations of the dummy function if + -Wredundant-decls is used. GCC 4.3 and later have a builtin + __COUNTER__ macro that can let us generate unique identifiers for + each dummy function, to suppress this warning. + + * This implementation exploits the fact that older versions of GCC, + which do not support _Static_assert, also do not warn about the + last declaration mentioned above. + + * GCC warns if -Wnested-externs is enabled and 'verify' is used + within a function body; but inside a function, you can always + arrange to use verify_expr instead. + + * In C++, any struct definition inside sizeof is invalid. + Use a template type to work around the problem. */ + +/* Concatenate two preprocessor tokens. */ +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y + +/* _GL_COUNTER is an integer, preferably one that changes each time we + use it. Use __COUNTER__ if it works, falling back on __LINE__ + otherwise. __LINE__ isn't perfect, but it's better than a + constant. */ +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif + +/* Generate a symbol with the given prefix, making it unique if + possible. */ +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) + +/* Verify requirement R at compile-time, as an integer constant expression + that returns 1. If R is false, fail at compile-time, preferably + with a diagnostic that includes the string-literal DIAGNOSTIC. */ + +#define _GL_STATIC_ASSERT_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_STATIC_ASSERT_TYPE (R, DIAGNOSTIC))) + +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_static_assert_type +template + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: w; + }; +# define GNULIB_defined_struct__gl_static_assert_type 1 +# endif +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + _gl_static_assert_type<(R) ? 1 : -1> +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_static_assert_error_if_negative: (R) ? 1 : -1; } +#endif + +/* Verify requirement R at compile-time, as a declaration without a + trailing ';'. If R is false, fail at compile-time. + + This macro requires three or more arguments but uses at most the first + two, so that the _Static_assert macro optionally defined below supports + both the C11 two-argument syntax and the C23 one-argument syntax. + + Unfortunately, unlike C11, this implementation must appear as an + ordinary declaration, and cannot appear inside struct { ... }. */ + +#if 202311 <= __STDC_VERSION__ || 200410 <= __cpp_static_assert +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) static_assert (R, DIAGNOSTIC) +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC) +#else +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) \ + extern int (*_GL_GENSYM (_gl_static_assert_function) (void)) \ + [_GL_STATIC_ASSERT_TRUE (R, DIAGNOSTIC)] +# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Wnested-externs" +# endif +#endif + +/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ +#ifdef _GL_STATIC_ASSERT_H +/* Define _Static_assert if needed. */ +/* With clang ≥ 3.8.0 in C++ mode, _Static_assert already works and accepts + 1 or 2 arguments. We better don't override it, because clang's standard + C++ library uses static_assert inside classes in several places, and our + replacement via _GL_STATIC_ASSERT does not work in these contexts. */ +# if (defined __cplusplus && defined __clang__ \ + && (4 <= __clang_major__ + (8 <= __clang_minor__))) +# if 5 <= __clang_major__ +/* Avoid "warning: 'static_assert' with no message is a C++17 extension". */ +# pragma clang diagnostic ignored "-Wc++17-extensions" +# else +/* Avoid "warning: static_assert with no message is a C++1z extension". */ +# pragma clang diagnostic ignored "-Wc++1z-extensions" +# endif +# elif !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert +# if !defined _MSC_VER || defined __clang__ +# define _Static_assert(...) \ + _GL_STATIC_ASSERT (__VA_ARGS__, "static assertion failed", -) +# else +# if defined __cplusplus && _MSC_VER >= 1910 + /* In MSVC 14.1 or newer, static_assert accepts one or two arguments, + but _Static_assert is not defined. */ +# define _Static_assert static_assert +# else + /* Work around MSVC preprocessor incompatibility with ISO C; see + . */ +# define _Static_assert(R, ...) \ + _GL_STATIC_ASSERT ((R), "static assertion failed", -) +# endif +# endif +# endif +/* Define static_assert if needed. */ +# if (!defined static_assert \ + && __STDC_VERSION__ < 202311 \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6 && _MSC_VER < 1910))) +# if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__ +/* MSVC 14 in C++ mode supports the two-arguments static_assert but not + the one-argument static_assert, and it does not support _Static_assert. + We have to play preprocessor tricks to distinguish the two cases. + Since the MSVC preprocessor is not ISO C compliant (see above),. + the solution is specific to MSVC. */ +# define _GL_EXPAND(x) x +# define _GL_SA1(a1) static_assert ((a1), "static assertion failed") +# define _GL_SA2 static_assert +# define _GL_SA3 static_assert +# define _GL_SA_PICK(x1,x2,x3,x4,...) x4 +# define static_assert(...) _GL_EXPAND(_GL_SA_PICK(__VA_ARGS__,_GL_SA3,_GL_SA2,_GL_SA1)) (__VA_ARGS__) +/* Avoid "fatal error C1189: #error: The C++ Standard Library forbids macroizing keywords." */ +# define _ALLOW_KEYWORD_MACROS 1 +# else +# define static_assert _Static_assert /* C11 requires this #define. */ +# endif +# endif +#endif + + +#endif +#endif \ No newline at end of file diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/errno.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/errno.h index db8affc39..fdd118c4d 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/errno.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/errno.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A POSIX-like . - Copyright (C) 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_ERRNO_H @@ -24,11 +24,7 @@ /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/errno.h" -#else #include "../ucrt/errno.h" -#endif #ifndef _GL_ERRNO_H #define _GL_ERRNO_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/error.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/error.h new file mode 100644 index 000000000..d91938fa8 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/error.h @@ -0,0 +1,563 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Declarations for error-reporting functions. + Copyright (C) 1995-1997, 2003, 2006, 2008-2023 Free Software Foundation, + Inc. + This file is part of the GNU C Library. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_ERROR_H + +/* No @PRAGMA_SYSTEM_HEADER@ here, because it would prevent + -Wimplicit-fallthrough warnings for missing FALLTHROUGH after error(...) + or error_at_line(...) invocations. */ + +/* The include_next requires a split double-inclusion guard. */ +#if 0 +# include +#endif + +#ifndef _GL_ERROR_H +#define _GL_ERROR_H + +/* This file uses _GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_FORMAT, + _GL_ATTRIBUTE_MAYBE_UNUSED. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* Get 'unreachable'. */ +#include + +/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM. */ +#include + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +#if GNULIB_VFPRINTF_POSIX +# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD +#else +# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM +#endif + +/* Helper macro for supporting the compiler's control flow analysis better. + It evaluates its arguments only once. + Test case: Compile copy-file.c with "gcc -Wimplicit-fallthrough". */ +#if defined __GNUC__ || defined __clang__ +/* Use 'unreachable' to tell the compiler when the function call does not + return. */ +# define __gl_error_call1(function, status, ...) \ + ((function) (status, __VA_ARGS__), \ + (status) != 0 ? unreachable () : (void) 0) +/* If STATUS is a not a constant, the function call may or may not return; + therefore -Wimplicit-fallthrough will produce a warning. Use a compound + statement in order to evaluate STATUS only once. + If STATUS is a constant, we don't use a compound statement, because that + would trigger a -Wimplicit-fallthrough warning even when STATUS is != 0, + when not optimizing. This causes STATUS to be evaluated twice, but + that's OK since it does not have side effects. */ +# define __gl_error_call(function, status, ...) \ + (__builtin_constant_p (status) \ + ? __gl_error_call1 (function, status, __VA_ARGS__) \ + : __extension__ \ + ({ \ + int const __errstatus = status; \ + __gl_error_call1 (function, __errstatus, __VA_ARGS__); \ + })) +#else +# define __gl_error_call(function, status, ...) \ + (function) (status, __VA_ARGS__) +#endif + +#if GNULIB_REPLACE_ERROR +# undef error_print_progname +# undef error_message_count +# undef error_one_per_line +# define error_print_progname rpl_error_print_progname +# define error_message_count rpl_error_message_count +# define error_one_per_line rpl_error_one_per_line +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Print a message with 'fprintf (stderr, FORMAT, ...)'; + if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). + If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */ +#if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef error +# define error rpl_error +# endif +_GL_FUNCDECL_RPL (error, void, + (int __status, int __errnum, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4))); +_GL_CXXALIAS_RPL (error, void, + (int __status, int __errnum, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# undef error +# define error(status, ...) \ + __gl_error_call (rpl_error, status, __VA_ARGS__) +# endif +#else +# if ! 0 +_GL_FUNCDECL_SYS (error, void, + (int __status, int __errnum, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4))); +# endif +_GL_CXXALIAS_SYS (error, void, + (int __status, int __errnum, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# ifdef error +/* Only gcc ≥ 4.7 has __builtin_va_arg_pack. */ +# if _GL_GNUC_PREREQ (4, 7) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wattributes" +_GL_ATTRIBUTE_MAYBE_UNUSED +static void +_GL_ATTRIBUTE_ALWAYS_INLINE +_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4)) +_gl_inline_error (int __status, int __errnum, const char *__format, ...) +{ + return error (__status, __errnum, __format, __builtin_va_arg_pack ()); +} +# pragma GCC diagnostic pop +# undef error +# define error(status, ...) \ + __gl_error_call (_gl_inline_error, status, __VA_ARGS__) +# endif +# else +# define error(status, ...) \ + __gl_error_call (error, status, __VA_ARGS__) +# endif +# endif +#endif +#if __GLIBC__ >= 2 +_GL_CXXALIASWARN (error); +#endif + +/* Likewise. If FILENAME is non-NULL, include FILENAME:LINENO: in the + message. */ +#if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef error_at_line +# define error_at_line rpl_error_at_line +# endif +_GL_FUNCDECL_RPL (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6))); +_GL_CXXALIAS_RPL (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# undef error_at_line +# define error_at_line(status, ...) \ + __gl_error_call (rpl_error_at_line, status, __VA_ARGS__) +# endif +#else +# if ! 0 +_GL_FUNCDECL_SYS (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6))); +# endif +_GL_CXXALIAS_SYS (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# ifdef error_at_line +/* Only gcc ≥ 4.7 has __builtin_va_arg_pack. */ +# if _GL_GNUC_PREREQ (4, 7) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wattributes" +_GL_ATTRIBUTE_MAYBE_UNUSED +static void +_GL_ATTRIBUTE_ALWAYS_INLINE +_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6)) +_gl_inline_error_at_line (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) +{ + return error_at_line (__status, __errnum, __filename, __lineno, __format, + __builtin_va_arg_pack ()); +} +# pragma GCC diagnostic pop +# undef error_at_line +# define error_at_line(status, ...) \ + __gl_error_call (_gl_inline_error_at_line, status, __VA_ARGS__) +# endif +# else +# define error_at_line(status, ...) \ + __gl_error_call (error_at_line, status, __VA_ARGS__) +# endif +# endif +#endif +_GL_CXXALIASWARN (error_at_line); + +/* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +extern DLL_VARIABLE void (*error_print_progname) (void); + +/* This variable is incremented each time 'error' is called. */ +extern DLL_VARIABLE unsigned int error_message_count; + +/* Sometimes we want to have at most one error per line. This + variable controls whether this mode is selected or not. */ +extern DLL_VARIABLE int error_one_per_line; + +#ifdef __cplusplus +} +#endif + +#endif /* _GL_ERROR_H */ +#endif /* _GL_ERROR_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/fcntl.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/fcntl.h index 51414f9fe..123e0e429 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/fcntl.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/fcntl.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Like , but with non-working flags defined to 0. - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* written by Paul Eggert */ @@ -38,11 +38,7 @@ #if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))) # include #endif -#if (_MSC_VER < 1900) -#include "../include/fcntl.h" -#else #include "../ucrt/fcntl.h" -#endif /* Native Windows platforms declare open(), creat() in . */ #if (0 || 1 || defined GNULIB_POSIXCHECK) \ @@ -68,11 +64,7 @@ # include #endif /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/fcntl.h" -#else #include "../ucrt/fcntl.h" -#endif /* Native Windows platforms declare open(), creat() in . */ #if (0 || 1 || defined GNULIB_POSIXCHECK) \ @@ -83,6 +75,11 @@ #ifndef _GL_FCNTL_H #define _GL_FCNTL_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ # include #endif @@ -90,19 +87,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -190,6 +187,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -237,6 +240,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -262,6 +275,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -359,7 +380,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -387,9 +408,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -405,26 +426,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -433,19 +454,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -518,13 +539,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -533,27 +561,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -581,6 +615,12 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use _GL_FUNCDECL_RPL (creat, int, (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (creat, int, (const char *filename, mode_t mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef creat +# define creat _creat +# endif +_GL_CXXALIAS_MDA (creat, int, (const char *filename, mode_t mode)); # else _GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); # endif @@ -590,6 +630,21 @@ _GL_CXXALIASWARN (creat); /* Assume creat is always declared. */ _GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - " "use gnulib module creat for portability"); +#elif 1 +/* On native Windows, map 'creat' to '_creat', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::creat always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef creat +# define creat _creat +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (creat, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (creat); #endif #if 1 @@ -630,6 +685,12 @@ _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef open +# define open _open +# endif +_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); # else _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); # endif @@ -643,6 +704,22 @@ _GL_CXXALIASWARN (open); /* Assume open is always declared. */ _GL_WARN_ON_USE (open, "open is not always POSIX compliant - " "use gnulib module open for portability"); +#elif 1 +/* On native Windows, map 'open' to '_open', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::open always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef open +# define open _open +# endif +_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); +# else +_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); +# endif +# if !defined __hpux +_GL_CXXALIASWARN (open); +# endif #endif #if 0 @@ -876,6 +953,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " # define AT_EACCESS 4 #endif +/* Ignore this flag if not supported. */ +#ifndef AT_NO_AUTOMOUNT +# define AT_NO_AUTOMOUNT 0 +#endif #endif /* _GL_FCNTL_H */ #endif /* _GL_FCNTL_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/getopt-cdefs.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/getopt-cdefs.h index a82f93cd8..39358da57 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/getopt-cdefs.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/getopt-cdefs.h @@ -1,23 +1,22 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* getopt-on-non-glibc compatibility macros. - Copyright (C) 1989-2020 Free Software Foundation, Inc. + Copyright (C) 1989-2023 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. - This file is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public - License along with gnulib; if not, see - . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GETOPT_CDEFS_H #define _GETOPT_CDEFS_H 1 @@ -58,8 +57,12 @@ #endif #ifndef __THROW -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () +# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4) +# if __cplusplus >= 201103L +# define __THROW noexcept (true) +# else +# define __THROW throw () +# endif # else # define __THROW # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/getopt.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/getopt.h index 955344e12..8e0cb6853 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/getopt.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/getopt.h @@ -1,23 +1,23 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Declarations for getopt. - Copyright (C) 1989-2020 Free Software Foundation, Inc. + Copyright (C) 1989-2023 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library, which supplies a different version of this file. - This file is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public - License along with gnulib; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_GETOPT_H @@ -55,26 +55,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/iconv.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/iconv.h index 6807652cd..9de292ac9 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/iconv.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/iconv.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_ICONV_H @@ -29,21 +29,26 @@ #ifndef _GL_ICONV_H #define _GL_ICONV_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -131,6 +136,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -178,6 +189,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -203,6 +224,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -300,7 +329,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -328,9 +357,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -346,26 +375,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -374,19 +403,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -459,13 +488,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -474,27 +510,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/inttypes.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/inttypes.h index ef069c379..00153bfed 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/inttypes.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/inttypes.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2006-2020 Free Software Foundation, Inc. +/* Copyright (C) 2006-2023 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* @@ -38,11 +38,7 @@ # define __STDC_FORMAT_MACROS 1 # endif -#if (_MSC_VER < 1900) -# include "../include/inttypes.h" -#else # include "../ucrt/inttypes.h" -#endif # define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H # endif @@ -51,6 +47,11 @@ #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H #define INTTYPES_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Include or the gnulib replacement. But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ @@ -69,19 +70,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -169,6 +170,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -216,6 +223,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -241,6 +258,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -338,7 +363,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -366,9 +391,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -384,26 +409,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -412,19 +437,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -497,13 +522,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -512,27 +544,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -1383,8 +1421,21 @@ extern "C" { #endif #if 0 -# if !1 -extern intmax_t imaxabs (intmax_t); +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxabs +# define imaxabs rpl_imaxabs +# endif +_GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x)); +_GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +_GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxabs); # endif #elif defined GNULIB_POSIXCHECK # undef imaxabs @@ -1401,8 +1452,21 @@ typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; # define GNULIB_defined_imaxdiv_t 1 # endif # endif -# if !1 -extern imaxdiv_t imaxdiv (intmax_t, intmax_t); +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxdiv +# define imaxdiv rpl_imaxdiv +# endif +_GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +_GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +_GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxdiv); # endif #elif defined GNULIB_POSIXCHECK # undef imaxdiv diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/langinfo.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/langinfo.h index 502853b91..e6ef3b988 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/langinfo.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/langinfo.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for and wrapper around . - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* * POSIX for platforms that lack it or have an incomplete one. @@ -35,6 +35,11 @@ #ifndef _GL_LANGINFO_H #define _GL_LANGINFO_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if !0 @@ -186,19 +191,19 @@ typedef int nl_item; /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -286,6 +291,12 @@ typedef int nl_item; Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -333,6 +344,16 @@ typedef int nl_item; _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -358,6 +379,14 @@ typedef int nl_item; _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -455,7 +484,7 @@ typedef int nl_item; _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -483,9 +512,9 @@ typedef int nl_item; _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -501,19 +530,19 @@ typedef int nl_item; /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -586,13 +615,20 @@ typedef int nl_item; # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -601,27 +637,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -658,7 +700,9 @@ _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); # endif _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (nl_langinfo); +# endif #elif defined GNULIB_POSIXCHECK # undef nl_langinfo # if HAVE_RAW_DECL_NL_LANGINFO diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/limits.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/limits.h index d27a2d7f4..b2b002ffe 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/limits.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/limits.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright 2016-2020 Free Software Foundation, Inc. + Copyright 2016-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 3, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -100,10 +100,16 @@ # endif #endif -/* Macros specified by ISO/IEC TS 18661-1:2014. */ +/* Assume no multibyte character is longer than 16 bytes. */ +#ifndef MB_LEN_MAX +# define MB_LEN_MAX 16 +#endif + +/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */ #if (! defined ULLONG_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) + && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) # define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) # define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) # define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) @@ -115,7 +121,31 @@ # define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) # define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) # define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) -#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ +#endif + +/* Macros specified by C23. */ + +#if (defined _GNU_SOURCE \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)) +# if ! defined BOOL_WIDTH +# define BOOL_WIDTH 1 +# define BOOL_MAX 1 +# elif ! defined BOOL_MAX +# define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1) +# endif +#endif + +/* Macro specified by POSIX. */ + +/* The maximum ssize_t value. Although it might not be of ssize_t type + as it should be, it's too much trouble to fix this minor detail. */ +#ifndef SSIZE_MAX +# ifdef _WIN64 +# define SSIZE_MAX LLONG_MAX +# else +# define SSIZE_MAX LONG_MAX +# endif +#endif #endif /* _GL_LIMITS_H */ #endif /* _GL_LIMITS_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/locale.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/locale.h index 27edd0062..2e3a82153 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/locale.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/locale.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A POSIX . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -28,11 +28,7 @@ - To handle Solaris header files (through Solaris 10) when combined with gettext's libintl.h. */ -#if (_MSC_VER < 1900) -#include "../include/locale.h" -#else #include "../ucrt/locale.h" -#endif #else /* Normal invocation convention. */ @@ -42,17 +38,18 @@ #define _GL_ALREADY_INCLUDING_LOCALE_H /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/locale.h" -#else #include "../ucrt/locale.h" -#endif #undef _GL_ALREADY_INCLUDING_LOCALE_H #ifndef _GL_LOCALE_H #define _GL_LOCALE_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include @@ -63,19 +60,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -163,6 +160,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -210,6 +213,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -235,6 +248,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -332,7 +353,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -360,9 +381,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -378,26 +399,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -406,19 +427,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -491,13 +512,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -506,27 +534,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -695,8 +729,8 @@ _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " # include "setlocale_null.h" #endif -#if /*@GNULIB_NEWLOCALE@ ||*/ (1 && 0) -# if 0 +#if /*@GNULIB_NEWLOCALE@ ||*/ (1 && 0 && 0) +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef newlocale # define newlocale rpl_newlocale @@ -713,10 +747,10 @@ _GL_CXXALIAS_SYS (newlocale, locale_t, (int category_mask, const char *name, locale_t base)); # endif # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (newlocale); # endif -# if 0 || 0 +# if 0 || 1 # ifndef HAVE_WORKING_NEWLOCALE # define HAVE_WORKING_NEWLOCALE 1 # endif @@ -728,24 +762,24 @@ _GL_WARN_ON_USE (newlocale, "newlocale is not portable"); # endif #endif -#if 0 || (1 && 0) -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef duplocale -# define duplocale rpl_duplocale -# define GNULIB_defined_duplocale 1 -# endif +#if 0 || (1 && 0 && 0) +# if 0 /* locale_t may be undefined if !0. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef duplocale +# define duplocale rpl_duplocale +# define GNULIB_defined_duplocale 1 +# endif _GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); -# else -# if 0 +# else _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); # endif # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (duplocale); # endif -# if 0 || 0 +# if 0 # ifndef HAVE_WORKING_DUPLOCALE # define HAVE_WORKING_DUPLOCALE 1 # endif @@ -758,8 +792,8 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " # endif #endif -#if /*@GNULIB_FREELOCALE@ ||*/ (1 && 0) -# if 0 +#if /*@GNULIB_FREELOCALE@ ||*/ (1 && 0 && 0) +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef freelocale # define freelocale rpl_freelocale @@ -774,7 +808,7 @@ _GL_CXXALIAS_RPL (freelocale, void, (locale_t locale)); _GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale)); # endif # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (freelocale); # endif #elif defined GNULIB_POSIXCHECK diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/malloc/scratch_buffer.gl.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/malloc/scratch_buffer.gl.h new file mode 100644 index 000000000..e139590ac --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/malloc/scratch_buffer.gl.h @@ -0,0 +1,133 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Variable-sized buffer with on-stack default allocation. + Copyright (C) 2015-2023 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SCRATCH_BUFFER_H +#define _SCRATCH_BUFFER_H + +/* Scratch buffers with a default stack allocation and fallback to + heap allocation. It is expected that this function is used in this + way: + + struct scratch_buffer tmpbuf; + scratch_buffer_init (&tmpbuf); + + while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) + if (!scratch_buffer_grow (&tmpbuf)) + return -1; + + scratch_buffer_free (&tmpbuf); + return 0; + + The allocation functions (scratch_buffer_grow, + scratch_buffer_grow_preserve, scratch_buffer_set_array_size) make + sure that the heap allocation, if any, is freed, so that the code + above does not have a memory leak. The buffer still remains in a + state that can be deallocated using scratch_buffer_free, so a loop + like this is valid as well: + + struct scratch_buffer tmpbuf; + scratch_buffer_init (&tmpbuf); + + while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) + if (!scratch_buffer_grow (&tmpbuf)) + break; + + scratch_buffer_free (&tmpbuf); + + scratch_buffer_grow and scratch_buffer_grow_preserve are guaranteed + to grow the buffer by at least 512 bytes. This means that when + using the scratch buffer as a backing store for a non-character + array whose element size, in bytes, is 512 or smaller, the scratch + buffer only has to grow once to make room for at least one more + element. +*/ + +#include +#include +#include + +/* Scratch buffer. Must be initialized with scratch_buffer_init + before its use. */ +struct scratch_buffer { + void *data; /* Pointer to the beginning of the scratch area. */ + size_t length; /* Allocated space at the data pointer, in bytes. */ + union { max_align_t __align; char __c[1024]; } __space; +}; + +/* Initializes *BUFFER so that BUFFER->data points to BUFFER->__space + and BUFFER->length reflects the available space. */ +static inline void +scratch_buffer_init (struct scratch_buffer *buffer) +{ + buffer->data = buffer->__space.__c; + buffer->length = sizeof (buffer->__space); +} + +/* Deallocates *BUFFER (if it was heap-allocated). */ +static inline void +scratch_buffer_free (struct scratch_buffer *buffer) +{ + if (buffer->data != buffer->__space.__c) + free (buffer->data); +} + +/* Grow *BUFFER by some arbitrary amount. The buffer contents is NOT + preserved. Return true on success, false on allocation failure (in + which case the old buffer is freed). On success, the new buffer is + larger than the previous size. On failure, *BUFFER is deallocated, + but remains in a free-able state, and errno is set. */ +bool __libc_scratch_buffer_grow (struct scratch_buffer *buffer); + +/* Alias for __libc_scratch_buffer_grow. */ +static inline _GL_ATTRIBUTE_ALWAYS_INLINE bool +scratch_buffer_grow (struct scratch_buffer *buffer) +{ + return _GL_LIKELY (__libc_scratch_buffer_grow (buffer)); +} + +/* Like __libc_scratch_buffer_grow, but preserve the old buffer + contents on success, as a prefix of the new buffer. */ +bool __libc_scratch_buffer_grow_preserve (struct scratch_buffer *buffer); + +/* Alias for __libc_scratch_buffer_grow_preserve. */ +static inline _GL_ATTRIBUTE_ALWAYS_INLINE bool +scratch_buffer_grow_preserve (struct scratch_buffer *buffer) +{ + return _GL_LIKELY (__libc_scratch_buffer_grow_preserve (buffer)); +} + +/* Grow *BUFFER so that it can store at least NELEM elements of SIZE + bytes. The buffer contents are NOT preserved. Both NELEM and SIZE + can be zero. Return true on success, false on allocation failure + (in which case the old buffer is freed, but *BUFFER remains in a + free-able state, and errno is set). It is unspecified whether this + function can reduce the array size. */ +bool __libc_scratch_buffer_set_array_size (struct scratch_buffer *buffer, + size_t nelem, size_t size); + +/* Alias for __libc_scratch_set_array_size. */ +static inline _GL_ATTRIBUTE_ALWAYS_INLINE bool +scratch_buffer_set_array_size (struct scratch_buffer *buffer, + size_t nelem, size_t size) +{ + return _GL_LIKELY (__libc_scratch_buffer_set_array_size + (buffer, nelem, size)); +} + +#endif /* _SCRATCH_BUFFER_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/signal.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/signal.h index beaa5657a..001e31614 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/signal.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/signal.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -33,11 +33,7 @@ In this situation, some of the functions are not yet declared, therefore we cannot provide the C++ aliases. */ -#if (_MSC_VER < 1900) -#include "../include/signal.h" -#else -#include "../ucrt/signal.h" -#endif +# include "../ucrt/signal.h" #else /* Normal invocation convention. */ @@ -53,43 +49,52 @@ #include /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/signal.h" -#else #include "../ucrt/signal.h" -#endif #undef _GL_ALREADY_INCLUDING_SIGNAL_H #ifndef _GL_SIGNAL_H #define _GL_SIGNAL_H -/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android - declare pthread_sigmask in , not in . +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* For testing the OpenBSD version. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && defined __OpenBSD__ +# include +#endif + +/* Mac OS X 10.3, FreeBSD < 8.0, OpenBSD < 5.1, OSF/1 4.0, Solaris 2.6, Android, + OS/2 kLIBC declare pthread_sigmask in , not in . But avoid namespace pollution on glibc systems.*/ #if (0 || defined GNULIB_POSIXCHECK) \ && ((defined __APPLE__ && defined __MACH__) \ - || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \ - || defined __sun || defined __ANDROID__) \ + || (defined __FreeBSD__ && __FreeBSD__ < 8) \ + || (defined __OpenBSD__ && OpenBSD < 201205) \ + || defined __osf__ || defined __sun || defined __ANDROID__ \ + || defined __KLIBC__) \ && ! defined __GLIBC__ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -177,6 +182,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -224,6 +235,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -249,6 +270,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -346,7 +375,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -374,9 +403,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -392,26 +421,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -420,19 +449,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -505,13 +534,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -520,27 +556,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdckdint.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdckdint.h new file mode 100644 index 000000000..edcda2982 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdckdint.h @@ -0,0 +1,36 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* stdckdint.h -- checked integer arithmetic + + Copyright 2022-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_STDCKDINT_H +#define _GL_STDCKDINT_H + +#include "intprops-internal.h" + +/* Store into *R the low-order bits of A + B, A - B, A * B, respectively. + Return 1 if the result overflows, 0 otherwise. + A, B, and *R can have any integer type other than char, bool, a + bit-precise integer type, or an enumeration type. + + These are like the standard macros introduced in C23, except that + arguments should not have side effects. */ + +#define ckd_add(r, a, b) ((bool) _GL_INT_ADD_WRAPV (a, b, r)) +#define ckd_sub(r, a, b) ((bool) _GL_INT_SUBTRACT_WRAPV (a, b, r)) +#define ckd_mul(r, a, b) ((bool) _GL_INT_MULTIPLY_WRAPV (a, b, r)) + +#endif /* _GL_STDCKDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stddef.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stddef.h index 80b11074e..40a21db6f 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stddef.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stddef.h @@ -1,25 +1,25 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for POSIX 2008 , for platforms that have issues. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake. */ /* - * POSIX 2008 for platforms that have issues. + * POSIX 2008 and ISO C 23 for platforms that have issues. * */ @@ -42,11 +42,14 @@ # ifdef __need_wint_t # define _GL_STDDEF_WINT_T # endif -# if (_MSC_VER < 1900) -# include "../include/stddef.h" -# else -# include "../ucrt/stddef.h" -# endif +# include "../ucrt/stddef.h" + /* On TinyCC, make sure that the macros that indicate the special invocation + convention get undefined. */ +# undef __need_wchar_t +# undef __need_size_t +# undef __need_ptrdiff_t +# undef __need_NULL +# undef __need_wint_t # endif #else @@ -54,13 +57,27 @@ # ifndef _GL_STDDEF_H +/* On AIX 7.2, with xlc in 64-bit mode, defines max_align_t to a + type with alignment 4, but 'long' has alignment 8. */ +# if defined _AIX && defined __LP64__ && !0 +# if !GNULIB_defined_max_align_t +# ifdef _MAX_ALIGN_T +/* /usr/include/stddef.h has already defined max_align_t. Override it. */ +typedef long rpl_max_align_t; +# define max_align_t rpl_max_align_t +# else +/* Prevent /usr/include/stddef.h from defining max_align_t. */ +typedef long max_align_t; +# define _MAX_ALIGN_T +# endif +# define __CLANG_MAX_ALIGN_T_DEFINED +# define GNULIB_defined_max_align_t 1 +# endif +# endif + /* The include_next requires a split double-inclusion guard. */ -# if (_MSC_VER < 1900) -# include "../include/stddef.h" -# else -# include "../ucrt/stddef.h" -# endif +# include "../ucrt/stddef.h" /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ # if (0 \ @@ -85,6 +102,33 @@ # ifndef _GL_STDDEF_H # define _GL_STDDEF_H +/* This file uses _Noreturn, _GL_ATTRIBUTE_NOTHROW. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* Some platforms lack wchar_t. */ #if !1 # define wchar_t int @@ -95,18 +139,20 @@ we are currently compiling with gcc. On MSVC, max_align_t is defined only in C++ mode, after was included. Its definition is good since it has an alignment of 8 (on x86 - and x86_64). */ -#if defined _MSC_VER && defined __cplusplus + and x86_64). + Similarly on OS/2 kLIBC. */ +#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \ + && defined __cplusplus # include #else -# if ! (0 || defined _GCC_MAX_ALIGN_T) +# if ! (0 || (defined _GCC_MAX_ALIGN_T && !defined __clang__)) # if !GNULIB_defined_max_align_t /* On the x86, the maximum storage alignment of double, long, etc. is 4, but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, and the C11 standard allows this. Work around this problem by using __alignof__ (which returns 8 for double) rather than _Alignof (which returns 4), and align each union member accordingly. */ -# ifdef __GNUC__ +# if defined __GNUC__ || (__clang_major__ >= 4) # define _GL_STDDEF_ALIGNAS(type) \ __attribute__ ((__aligned__ (__alignof__ (type)))) # else @@ -120,11 +166,49 @@ typedef union long int __i _GL_STDDEF_ALIGNAS (long int); } rpl_max_align_t; # define max_align_t rpl_max_align_t +# define __CLANG_MAX_ALIGN_T_DEFINED # define GNULIB_defined_max_align_t 1 # endif # endif #endif +/* ISO C 23 § 7.21.1 The unreachable macro */ +#ifndef unreachable + +/* Code borrowed from verify.h. */ +# ifndef _GL_HAS_BUILTIN_UNREACHABLE +# if defined __clang_major__ && __clang_major__ < 5 +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__) +# define _GL_HAS_BUILTIN_UNREACHABLE 1 +# elif defined __has_builtin +# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable) +# else +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# endif +# endif + +# if _GL_HAS_BUILTIN_UNREACHABLE +# define unreachable() __builtin_unreachable () +# elif 1200 <= _MSC_VER +# define unreachable() __assume (0) +# else +/* Declare abort(), without including . */ +extern +# if defined __cplusplus +"C" +# endif +_Noreturn +void abort (void) +# if defined __cplusplus && (__GLIBC__ >= 2) +_GL_ATTRIBUTE_NOTHROW +# endif +; +# define unreachable() abort () +# endif + +#endif + # endif /* _GL_STDDEF_H */ # endif /* _GL_STDDEF_H */ #endif /* __need_XXX */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-runtime/gnulib-lib/stdint.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdint.h similarity index 95% rename from gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-runtime/gnulib-lib/stdint.h rename to gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdint.h index 851128d88..197ddd87c 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-runtime/gnulib-lib/stdint.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdint.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2023 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* * ISO C 99 for platforms that lack it. @@ -303,12 +303,11 @@ typedef gl_uint_fast32_t gl_uint_fast16_t; /* kLIBC's defines _INTPTR_T_DECLARED and needs its own definitions of intptr_t and uintptr_t (which use int and unsigned) to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and + Similarly, MinGW WSL-5.4.1 needs its own intptr_t and uintptr_t to avoid conflicting declarations of system functions like _findclose in . */ # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) + || defined __MINGW32__) # undef intptr_t # undef uintptr_t # ifdef _WIN64 @@ -581,11 +580,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) -> -> -> , and the latter includes and assumes its types are already defined. */ # if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H @@ -594,13 +588,13 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # undef WCHAR_MAX # if # define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) + _STDINT_SIGNED_MIN (16, 0) # else # define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) + _STDINT_UNSIGNED_MIN (16, 0) # endif # define WCHAR_MAX \ - _STDINT_MAX (, , 0) + _STDINT_MAX (, 16, 0) /* wint_t limits */ /* If gnulib's or overrides wint_t, is not diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-runtime/gnulib-lib/stdio.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdio.h similarity index 77% rename from gvsbuild/patches/gettext/msvc/vs14/x64/gettext-runtime/gnulib-lib/stdio.h rename to gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdio.h index 91dc7a8cc..61dd5586c 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-runtime/gnulib-lib/stdio.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdio.h @@ -1,25 +1,30 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 #endif +#ifdef _WIN64 +# define GNULIB_SYM_PREFIX "" +#else +# define GNULIB_SYM_PREFIX "_" +#endif #if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H /* Special invocation convention: @@ -37,6 +42,12 @@ #ifndef _GL_STDIO_H +/* Suppress macOS deprecation warnings for sprintf and vsprintf. */ +#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200809L +# define _GL_DEFINED__POSIX_C_SOURCE +#endif + #define _GL_ALREADY_INCLUDING_STDIO_H /* The include_next requires a split double-inclusion guard. */ @@ -44,9 +55,21 @@ #undef _GL_ALREADY_INCLUDING_STDIO_H +#ifdef _GL_DEFINED__POSIX_C_SOURCE +# undef _GL_DEFINED__POSIX_C_SOURCE +# undef _POSIX_C_SOURCE +#endif + #ifndef _GL_STDIO_H #define _GL_STDIO_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_FORMAT, + _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Get va_list. Needed on many systems, including glibc 2.8. */ #include @@ -57,6 +80,52 @@ May also define off_t to a 64-bit type on native Windows. */ #include +/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ + && ! defined __GLIBC__ +# include +#endif + +/* Android 4.3 declares renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'perror' in , not in . We must include + it before we #define perror rpl_perror. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'remove' in , not in . We must include + it before we #define remove rpl_remove. */ +/* MSVC declares 'rename' in , not in . We must include + it before we #define rename rpl_rename. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. @@ -64,37 +133,83 @@ gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__ # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) # else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ # endif #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones + standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD */ +/* __gnu_printf__ is supported in GCC >= 4.4. */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__ #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__ #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones of the + system printf(), rather than the ones standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM */ +/* On mingw, Gnulib sets __USE_MINGW_ANSI_STDIO in order to get closer to + the standards. The macro GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU indicates + whether this change is effective. On older mingw, it is not. */ #if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM __printf__ #endif +/* _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD + indicates to GCC that the function takes a format string and arguments, + where the format string directives are the ones standardized by ISO C99 + and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument)) + +/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD, + except that it indicates to GCC that the supported format string directives + are the ones of the system printf(), rather than the ones standardized by + ISO C99 and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, formatstring_parameter, first_argument)) + /* _GL_ATTRIBUTE_FORMAT_SCANF indicates to GCC that the function takes a format string and arguments, where the format string directives are the ones standardized by ISO C99 @@ -114,56 +229,21 @@ #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -251,6 +331,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -298,6 +384,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -323,6 +419,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -420,7 +524,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -448,9 +552,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -466,26 +570,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -494,19 +598,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -579,13 +683,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -594,27 +705,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -644,24 +761,56 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # undef putc_unlocked #endif + +/* Maximum number of characters produced by printing a NaN value. */ +#ifndef _PRINTF_NAN_LEN_MAX +# if defined __FreeBSD__ || defined __DragonFly__ \ + || defined __NetBSD__ \ + || (defined __APPLE__ && defined __MACH__) +/* On BSD systems, a NaN value prints as just "nan", without a sign. */ +# define _PRINTF_NAN_LEN_MAX 3 +# elif (__GLIBC__ >= 2) || MUSL_LIBC || defined __OpenBSD__ || defined __sun || defined __CYGWIN__ +/* glibc, musl libc, OpenBSD, Solaris libc, and Cygwin produce "[-]nan". */ +# define _PRINTF_NAN_LEN_MAX 4 +# elif defined _AIX +/* AIX produces "[-]NaNQ". */ +# define _PRINTF_NAN_LEN_MAX 5 +# elif defined _WIN32 && !defined __CYGWIN__ +/* On native Windows, the output can be: + - with MSVC ucrt: "[-]nan" or "[-]nan(ind)" or "[-]nan(snan)", + - with mingw: "[-]1.#IND" or "[-]1.#QNAN". */ +# define _PRINTF_NAN_LEN_MAX 10 +# elif defined __sgi +/* On IRIX, the output typically is "[-]nan0xNNNNNNNN" with 8 hexadecimal + digits. */ +# define _PRINTF_NAN_LEN_MAX 14 +# else +/* We don't know, but 32 should be a safe maximum. */ +# define _PRINTF_NAN_LEN_MAX 32 +# endif +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dprintf rpl_dprintf # endif _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); # else # if !1 _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (dprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF @@ -691,24 +840,103 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " "use gnulib module fclose for portable POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'fcloseall' to '_fcloseall', so that -loldnames is + not required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcloseall on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcloseall +# define fcloseall _fcloseall +# endif +_GL_CXXALIAS_MDA (fcloseall, int, (void)); +# else +# if 1 +# if defined __FreeBSD__ || defined __DragonFly__ +_GL_CXXALIAS_SYS (fcloseall, void, (void)); +# else +_GL_CXXALIAS_SYS (fcloseall, int, (void)); +# endif +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcloseall); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fdopen # define fdopen rpl_fdopen # endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); +_GL_FUNCDECL_RPL (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); # endif _GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen +#else +# if 0 && __GNUC__ >= 11 && !defined fdopen +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef fdopen /* Assume fdopen is always declared. */ _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " "use gnulib module fdopen for portability"); +# elif 1 +/* On native Windows, map 'fdopen' to '_fdopen', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fdopen always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); +# else +_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); +# endif +_GL_CXXALIASWARN (fdopen); +# endif #endif #if 0 @@ -773,29 +1001,61 @@ _GL_CXXALIASWARN (fgets); # endif #endif +#if 1 +/* On native Windows, map 'fileno' to '_fileno', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fileno always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fileno +# define fileno _fileno +# endif +_GL_CXXALIAS_MDA (fileno, int, (FILE *restrict stream)); +# else +_GL_CXXALIAS_SYS (fileno, int, (FILE *restrict stream)); +# endif +_GL_CXXALIASWARN (fileno); +#endif + #if 0 -# if 0 +# if (0 && 0) \ + || (0 && 0) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fopen # define fopen rpl_fopen # endif _GL_FUNCDECL_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif _GL_CXXALIAS_SYS (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (fopen); # endif -#elif defined GNULIB_POSIXCHECK -# undef fopen +#else +# if 0 && __GNUC__ >= 11 && !defined fopen +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif +# if defined GNULIB_POSIXCHECK +# undef fopen /* Assume fopen is always declared. */ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " "use gnulib module fopen for portability"); +# endif #endif #if 0 || 1 @@ -808,7 +1068,7 @@ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX complian # if 0 || 0 _GL_FUNCDECL_RPL (fprintf, int, (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (fprintf, int, @@ -1242,7 +1502,9 @@ _GL_CXXALIAS_SYS (getdelim, ssize_t, int delimiter, FILE *restrict stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getdelim); +# endif #elif defined GNULIB_POSIXCHECK # undef getdelim # if HAVE_RAW_DECL_GETDELIM @@ -1281,7 +1543,7 @@ _GL_CXXALIAS_SYS (getline, ssize_t, (char **restrict lineptr, size_t *restrict linesize, FILE *restrict stream)); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (getline); # endif #elif defined GNULIB_POSIXCHECK @@ -1300,6 +1562,30 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif +#if 1 +/* On native Windows, map 'getw' to '_getw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getw +# define getw _getw +# endif +_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getw); +# endif +#endif + #if 0 || 0 struct obstack; /* Grow an obstack with formatted output. Return the number of @@ -1313,7 +1599,7 @@ struct obstack; # endif _GL_FUNCDECL_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...)); @@ -1321,7 +1607,7 @@ _GL_CXXALIAS_RPL (obstack_printf, int, # if !1 _GL_FUNCDECL_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_printf, int, @@ -1334,7 +1620,7 @@ _GL_CXXALIASWARN (obstack_printf); # endif _GL_FUNCDECL_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); @@ -1342,7 +1628,7 @@ _GL_CXXALIAS_RPL (obstack_vprintf, int, # if !1 _GL_FUNCDECL_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_vprintf, int, @@ -1394,29 +1680,42 @@ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " # undef popen # define popen rpl_popen # endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +_GL_FUNCDECL_RPL (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); # else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +# if !1 || __GNUC__ >= 11 +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); # endif _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); # endif _GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN +#else +# if 0 && __GNUC__ >= 11 && !defined popen +/* For -Wmismatched-dealloc: Associate popen with pclose or rpl_pclose. */ +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef popen +# if HAVE_RAW_DECL_POPEN _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " "use gnulib module popen or pipe for more portability"); +# endif # endif #endif #if 0 || 1 # if (0 && 0) \ || (1 && 1 && (0 || 1)) -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ @@ -1424,14 +1723,14 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " # if 0 || 0 _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *restrict format, ...) - __asm__ ("" + __asm__ (GNULIB_SYM_PREFIX _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *restrict format, ...) - __asm__ ("" + __asm__ (GNULIB_SYM_PREFIX _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); @@ -1443,7 +1742,7 @@ _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); # endif _GL_FUNCDECL_RPL (printf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); # endif @@ -1513,6 +1812,30 @@ _GL_CXXALIASWARN (puts); # endif #endif +#if 1 +/* On native Windows, map 'putw' to '_putw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putw +# define putw _putw +# endif +_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (putw); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1590,7 +1913,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - " #if 1 # if 0 && 0 -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef scanf /* Don't break __attribute__((format(scanf,M,N))). */ @@ -1598,7 +1921,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - " # endif _GL_FUNCDECL_RPL_1 (__scanf__, int, (const char *restrict format, ...) - __asm__ ("" + __asm__ (GNULIB_SYM_PREFIX _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); @@ -1626,10 +1949,11 @@ _GL_CXXALIASWARN (scanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif +# define GNULIB_overrides_snprintf 1 _GL_FUNCDECL_RPL (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (snprintf, int, (char *restrict str, size_t size, @@ -1639,14 +1963,16 @@ _GL_CXXALIAS_RPL (snprintf, int, _GL_FUNCDECL_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (snprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef snprintf # if HAVE_RAW_DECL_SNPRINTF @@ -1669,9 +1995,10 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif +# define GNULIB_overrides_sprintf 1 _GL_FUNCDECL_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...)); @@ -1690,24 +2017,56 @@ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " "POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'tempnam' to '_tempnam', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::tempnam always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tempnam +# define tempnam _tempnam +# endif +_GL_CXXALIAS_MDA (tempnam, char *, (const char *dir, const char *prefix)); +# else +_GL_CXXALIAS_SYS (tempnam, char *, (const char *dir, const char *prefix)); +# endif +_GL_CXXALIASWARN (tempnam); +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define tmpfile rpl_tmpfile # endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); +_GL_FUNCDECL_RPL (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (tmpfile); # endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE +#else +# if 0 && __GNUC__ >= 11 && !defined tmpfile +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef tmpfile +# if HAVE_RAW_DECL_TMPFILE _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " "use gnulib module tmpfile for portability"); +# endif # endif #endif @@ -1720,9 +2079,10 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif +# define GNULIB_overrides_asprintf _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (asprintf, int, (char **result, const char *format, ...)); @@ -1730,7 +2090,7 @@ _GL_CXXALIAS_RPL (asprintf, int, # if !1 _GL_FUNCDECL_SYS (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (asprintf, int, @@ -1741,9 +2101,10 @@ _GL_CXXALIASWARN (asprintf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif +# define GNULIB_overrides_vasprintf 1 _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vasprintf, int, (char **result, const char *format, va_list args)); @@ -1751,7 +2112,7 @@ _GL_CXXALIAS_RPL (vasprintf, int, # if !1 _GL_FUNCDECL_SYS (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (vasprintf, int, @@ -1767,7 +2128,7 @@ _GL_CXXALIASWARN (vasprintf); # endif _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args)); @@ -1775,7 +2136,7 @@ _GL_CXXALIAS_RPL (vdprintf, int, # if !1 _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); # endif /* Need to cast, because on Solaris, the third parameter will likely be @@ -1805,7 +2166,7 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " _GL_FUNCDECL_RPL (vfprintf, int, (FILE *restrict fp, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (vfprintf, int, @@ -1858,7 +2219,9 @@ _GL_CXXALIAS_SYS (vfscanf, int, (FILE *restrict stream, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vfscanf); +# endif #endif #if 0 || 1 @@ -1870,7 +2233,7 @@ _GL_CXXALIASWARN (vfscanf); # define GNULIB_overrides_vprintf 1 # if 0 || 0 _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) @@ -1912,7 +2275,9 @@ _GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); # else _GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vscanf); +# endif #endif #if 0 @@ -1920,10 +2285,11 @@ _GL_CXXALIASWARN (vscanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif +# define GNULIB_overrides_vsnprintf 1 _GL_FUNCDECL_RPL (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (vsnprintf, int, (char *restrict str, size_t size, @@ -1933,14 +2299,16 @@ _GL_CXXALIAS_RPL (vsnprintf, int, _GL_FUNCDECL_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vsnprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef vsnprintf # if HAVE_RAW_DECL_VSNPRINTF @@ -1954,10 +2322,11 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif +# define GNULIB_overrides_vsprintf 1 _GL_FUNCDECL_RPL (vsprintf, int, (char *restrict str, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vsprintf, int, (char *restrict str, diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdlib.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdlib.h index 7a9d6cdfa..22655319f 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdlib.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/stdlib.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2020 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -25,11 +25,7 @@ /* Special invocation conventions inside some gnulib header files, and inside some glibc header files, respectively. */ -#if (_MSC_VER < 1900) -#include "../include/stdlib.h" -#else #include "../ucrt/stdlib.h" -#endif #else /* Normal invocation convention. */ @@ -37,15 +33,18 @@ #ifndef _GL_STDLIB_H /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/stdlib.h" -#else #include "../ucrt/stdlib.h" -#endif #ifndef _GL_STDLIB_H #define _GL_STDLIB_H +/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include @@ -62,8 +61,8 @@ # include #endif -/* Native Windows platforms declare mktemp() in . */ -#if 0 && (defined _WIN32 && ! defined __CYGWIN__) +/* Native Windows platforms declare _mktemp() in . */ +#if defined _WIN32 && !defined __CYGWIN__ # include #endif @@ -76,9 +75,7 @@ # include # endif -# if !1 || 0 || !1 -# include -# endif +# include # if !1 /* Define 'struct random_data'. @@ -108,10 +105,61 @@ struct random_data # include #endif +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ @@ -120,19 +168,19 @@ struct random_data /* The definition of _Noreturn is copied here. */ /* A C macro for declaring that a function does not return. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _Noreturn @@ -147,14 +195,21 @@ struct random_data AIX system header files and several gnulib header files use precisely this syntax with 'extern'. */ # define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) /* _Noreturn works as-is. */ -# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C +# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \ + || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) @@ -165,19 +220,19 @@ struct random_data /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -265,6 +320,12 @@ struct random_data Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -312,6 +373,16 @@ struct random_data _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -337,6 +408,14 @@ struct random_data _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -434,7 +513,7 @@ struct random_data _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -462,9 +541,9 @@ struct random_data _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -480,26 +559,26 @@ struct random_data /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -508,19 +587,19 @@ struct random_data /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -593,13 +672,20 @@ struct random_data # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -608,27 +694,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -662,11 +754,22 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use #if 0 /* Terminate the current process with the given return code, without running the 'atexit' handlers. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef _Exit +# define _Exit rpl__Exit +# endif +_GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status)); +_GL_CXXALIAS_RPL (_Exit, void, (int status)); +# else +# if !1 _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); -# endif +# endif _GL_CXXALIAS_SYS (_Exit, void, (int status)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (_Exit); +# endif #elif defined GNULIB_POSIXCHECK # undef _Exit # if HAVE_RAW_DECL__EXIT @@ -676,6 +779,87 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " #endif +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef free +# define free rpl_free +# endif +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_FUNCDECL_RPL (free, void, (void *ptr) _GL_ATTRIBUTE_NOTHROW); +# else +_GL_FUNCDECL_RPL (free, void, (void *ptr)); +# endif +_GL_CXXALIAS_RPL (free, void, (void *ptr)); +# else +_GL_CXXALIAS_SYS (free, void, (void *ptr)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (free); +# endif +#elif defined GNULIB_POSIXCHECK +# undef free +/* Assume free is always declared. */ +_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - " + "use gnulib module free for portability"); +#endif + + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef aligned_alloc +# define aligned_alloc rpl_aligned_alloc +# endif +_GL_FUNCDECL_RPL (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); +# else +# if 1 +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size)); +# endif +# endif +# if (__GLIBC__ >= 2) && 1 +_GL_CXXALIASWARN (aligned_alloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined aligned_alloc +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef aligned_alloc +# if HAVE_RAW_DECL_ALIGNED_ALLOC +_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " + "use gnulib module aligned_alloc for portability"); +# endif +# endif +#endif + #if 0 /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ @@ -694,25 +878,56 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - " # endif #endif -#if 0 -# if 0 +#if 1 +# if (1 && 1) \ + || (1 && 1) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc # endif -_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); +_GL_FUNCDECL_RPL (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (calloc); # endif -#elif defined GNULIB_POSIXCHECK -# undef calloc +#else +# if 1 && __GNUC__ >= 11 && !defined calloc +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef calloc /* Assume calloc is always declared. */ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " "use gnulib module calloc-posix for portability"); +# endif #endif #if 1 @@ -720,13 +935,25 @@ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define canonicalize_file_name rpl_canonicalize_file_name # endif -_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); # else -# if !0 -_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); +# if !0 || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); # endif @@ -735,12 +962,97 @@ _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); (!0 || 0) # endif _GL_CXXALIASWARN (canonicalize_file_name); -#elif defined GNULIB_POSIXCHECK -# undef canonicalize_file_name -# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME +#else +# if 1 && __GNUC__ >= 11 && !defined canonicalize_file_name +/* For -Wmismatched-dealloc: Associate canonicalize_file_name with free or + rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef canonicalize_file_name +# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - " "use gnulib module canonicalize-lgpl for portability"); +# endif +# endif +#endif + +#if 1 +/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ecvt +# define ecvt _ecvt +# endif +_GL_CXXALIAS_MDA (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (ecvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcvt +# define fcvt _fcvt +# endif +_GL_CXXALIAS_MDA (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gcvt +# define gcvt _gcvt +# endif +_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf)); +# else +# if 1 +_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (gcvt); # endif #endif @@ -749,12 +1061,24 @@ _GL_WARN_ON_USE (canonicalize_file_name, The three numbers are the load average of the last 1 minute, the last 5 minutes, and the last 15 minutes, respectively. LOADAVG is an array of NELEM numbers. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getloadavg +# define getloadavg rpl_getloadavg +# endif +_GL_FUNCDECL_RPL (getloadavg, int, (double loadavg[], int nelem) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getloadavg, int, (double loadavg[], int nelem)); +# else +# if !1 _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getloadavg); +# endif #elif defined GNULIB_POSIXCHECK # undef getloadavg # if HAVE_RAW_DECL_GETLOADAVG @@ -763,6 +1087,41 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " # endif #endif +#if 1 +/* Return the base name of the executing program. + On native Windows this will usually end in ".exe" or ".EXE". */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getprogname +# define getprogname rpl_getprogname +# endif +# if 0 +_GL_FUNCDECL_RPL (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_RPL (getprogname, const char *, (void)); +# endif +_GL_CXXALIAS_RPL (getprogname, const char *, (void)); +# else +# if !0 +# if 0 +_GL_FUNCDECL_SYS (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_SYS (getprogname, const char *, (void)); +# endif +# endif +_GL_CXXALIAS_SYS (getprogname, const char *, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getprogname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getprogname +# if HAVE_RAW_DECL_GETPROGNAME +_GL_WARN_ON_USE (getprogname, "getprogname is unportable - " + "use gnulib module getprogname for portability"); +# endif +#endif + #if 0 /* Assuming *OPTIONP is a comma separated list of elements of the form "token" or "token=value", getsubopt parses the first of these elements. @@ -775,14 +1134,28 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. For more details see the POSIX specification. https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getsubopt +# define getsubopt rpl_getsubopt +# endif +_GL_FUNCDECL_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep)); +# else +# if !1 _GL_FUNCDECL_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep) _GL_ARG_NONNULL ((1, 2, 3))); -# endif +# endif _GL_CXXALIAS_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getsubopt); +# endif #elif defined GNULIB_POSIXCHECK # undef getsubopt # if HAVE_RAW_DECL_GETSUBOPT @@ -811,26 +1184,102 @@ _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " rely on GNU or POSIX semantics for malloc and realloc (for example, by never specifying a zero size), so it does not need malloc or realloc to be redefined. */ -#if 0 -# if 0 +#if 1 +# if (1 && 1) \ + || (1 && 1) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef malloc # define malloc rpl_malloc # endif -_GL_FUNCDECL_RPL (malloc, void *, (size_t size)); +_GL_FUNCDECL_RPL (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (malloc); # endif -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef malloc +#else +# if 1 && __GNUC__ >= 11 && !defined malloc +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef malloc /* Assume malloc is always declared. */ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " "use gnulib module malloc-posix for portability"); +# endif +#endif + +/* Return maximum number of bytes of a multibyte character. */ +#if 0 +# if !GNULIB_defined_MB_CUR_MAX +static inline +int gl_MB_CUR_MAX (void) +{ + /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ + return MB_CUR_MAX + (MB_CUR_MAX == 3); +} +# undef MB_CUR_MAX +# define MB_CUR_MAX gl_MB_CUR_MAX () +# define GNULIB_defined_MB_CUR_MAX 1 +# endif +#endif + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbstowcs +# define mbstowcs rpl_mbstowcs +# endif +_GL_FUNCDECL_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# else +_GL_CXXALIAS_SYS (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbstowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbstowcs +# if HAVE_RAW_DECL_MBSTOWCS +_GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - " + "use gnulib module mbstowcs for portability"); +# endif #endif /* Convert a multibyte character to a wide character. */ @@ -895,12 +1344,24 @@ _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemp +# define mkostemp rpl_mkostemp +# endif +_GL_FUNCDECL_RPL (mkostemp, int, (char * /*template*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemp, int, (char * /*template*/, int /*flags*/)); +# else +# if !1 _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkostemp); +# endif #elif defined GNULIB_POSIXCHECK # undef mkostemp # if HAVE_RAW_DECL_MKOSTEMP @@ -923,14 +1384,28 @@ _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemps +# define mkostemps rpl_mkostemps +# endif +_GL_FUNCDECL_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# else +# if !1 _GL_FUNCDECL_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkostemps); +# endif #elif defined GNULIB_POSIXCHECK # undef mkostemps # if HAVE_RAW_DECL_MKOSTEMPS @@ -995,14 +1470,70 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " # endif #endif +#if 1 +/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::mktemp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mktemp +# define mktemp _mktemp +# endif +_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/)); +# else +_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/)); +# endif +_GL_CXXALIASWARN (mktemp); +#endif + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_memalign +# define posix_memalign rpl_posix_memalign +# endif +_GL_FUNCDECL_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# else +# if 1 +_GL_CXXALIAS_SYS (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# endif +# endif +# if __GLIBC__ >= 2 && 1 +_GL_CXXALIASWARN (posix_memalign); +# endif +#elif defined GNULIB_POSIXCHECK +# undef posix_memalign +# if HAVE_RAW_DECL_POSIX_MEMALIGN +_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " + "use gnulib module posix_memalign for portability"); +# endif +#endif + #if 0 /* Return an FD open to the master side of a pseudo-terminal. Flags should include O_RDWR, and may also include O_NOCTTY. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_openpt +# define posix_openpt rpl_posix_openpt +# endif +_GL_FUNCDECL_RPL (posix_openpt, int, (int flags)); +_GL_CXXALIAS_RPL (posix_openpt, int, (int flags)); +# else +# if !1 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); -# endif +# endif _GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_openpt); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_openpt # if HAVE_RAW_DECL_POSIX_OPENPT @@ -1073,6 +1604,36 @@ _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " # endif _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (putenv, int, (char *string)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +_GL_CXXALIAS_MDA (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); +# else +_GL_CXXALIAS_SYS (putenv, int, (char *string)); +# endif +_GL_CXXALIASWARN (putenv); +#elif 1 +/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putenv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +/* Need to cast, because on mingw, the parameter is either + 'const char *string' or 'char *string'. */ +_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); # else _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif @@ -1083,29 +1644,35 @@ _GL_CXXALIASWARN (putenv); /* Sort an array of NMEMB elements, starting at address BASE, each element occupying SIZE bytes, in ascending order according to the comparison function COMPARE. */ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_qsort_r_fn_types +typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *); +# define GNULIB_defined_qsort_r_fn_types 1 +# endif +# ifdef __cplusplus +} +# endif # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef qsort_r # define qsort_r rpl_qsort_r # endif _GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # else # if !1 _GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); # endif _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # endif _GL_CXXALIASWARN (qsort_r); @@ -1143,7 +1710,9 @@ _GL_FUNCDECL_SYS (random, long, (void)); int. */ _GL_CXXALIAS_SYS_CAST (random, long, (void)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (random); +# endif #elif defined GNULIB_POSIXCHECK # undef random # if HAVE_RAW_DECL_RANDOM @@ -1168,7 +1737,9 @@ _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); unsigned long seed. */ _GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (srandom); +# endif #elif defined GNULIB_POSIXCHECK # undef srandom # if HAVE_RAW_DECL_SRANDOM @@ -1199,7 +1770,9 @@ _GL_FUNCDECL_SYS (initstate, char *, _GL_CXXALIAS_SYS_CAST (initstate, char *, (unsigned int seed, char *buf, size_t buf_size)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (initstate); +# endif #elif defined GNULIB_POSIXCHECK # undef initstate # if HAVE_RAW_DECL_INITSTATE @@ -1224,7 +1797,9 @@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); is const char *arg_state. */ _GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (setstate); +# endif #elif defined GNULIB_POSIXCHECK # undef setstate # if HAVE_RAW_DECL_SETSTATE @@ -1355,37 +1930,80 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " #endif -#if 0 -# if 0 +#if 1 +# if (1 && 1) \ + || (1 && 0) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef realloc # define realloc rpl_realloc # endif -_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); +_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (realloc); # endif -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef realloc +#else +# if 1 && __GNUC__ >= 11 && !defined realloc +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef realloc /* Assume realloc is always declared. */ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " "use gnulib module realloc-posix for portability"); +# endif #endif -#if 0 -# if ! 1 +#if 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef reallocarray +# define reallocarray rpl_reallocarray +# endif +_GL_FUNCDECL_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +_GL_CXXALIAS_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# else +# if ! 0 _GL_FUNCDECL_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); -# endif +# endif _GL_CXXALIAS_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (reallocarray); +# endif #elif defined GNULIB_POSIXCHECK # undef reallocarray # if HAVE_RAW_DECL_REALLOCARRAY @@ -1549,6 +2167,49 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable - " # endif #endif +#if 0 +/* Parse a signed integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is set + to ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtol rpl_strtol +# endif +# define GNULIB_defined_strtol_function 1 +_GL_FUNCDECL_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtol); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtol +# if HAVE_RAW_DECL_STRTOL +_GL_WARN_ON_USE (strtol, "strtol is unportable - " + "use gnulib module strtol for portability"); +# endif +#endif + #if 0 /* Parse a signed integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, @@ -1558,15 +2219,29 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable - " stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set to ERANGE. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoll rpl_strtoll +# endif +# define GNULIB_defined_strtoll_function 1 +_GL_FUNCDECL_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 _GL_FUNCDECL_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoll); #elif defined GNULIB_POSIXCHECK # undef strtoll @@ -1576,6 +2251,48 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " # endif #endif +#if 1 +/* Parse an unsigned integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is ULONG_MAX, and errno is set to ERANGE. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoul rpl_strtoul +# endif +# define GNULIB_defined_strtoul_function 1 +_GL_FUNCDECL_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtoul); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtoul +# if HAVE_RAW_DECL_STRTOUL +_GL_WARN_ON_USE (strtoul, "strtoul is unportable - " + "use gnulib module strtoul for portability"); +# endif +#endif + #if 0 /* Parse an unsigned integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, @@ -1585,15 +2302,29 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoull rpl_strtoull +# endif +# define GNULIB_defined_strtoull_function 1 +_GL_FUNCDECL_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 _GL_FUNCDECL_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoull); #elif defined GNULIB_POSIXCHECK # undef strtoull diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/string.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/string.h index 9aaae38e7..64e11b7f0 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/string.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/string.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2020 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -28,11 +28,7 @@ In this situation system _chk variants due to -D_FORTIFY_SOURCE might be used after any replacements defined here. */ -#if (_MSC_VER < 1900) -#include "../include/string.h" -#else #include "../ucrt/string.h" -#endif #else /* Normal invocation convention. */ @@ -42,17 +38,20 @@ #define _GL_ALREADY_INCLUDING_STRING_H /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/string.h" -#else #include "../ucrt/string.h" -#endif #undef _GL_ALREADY_INCLUDING_STRING_H #ifndef _GL_STRING_H #define _GL_STRING_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include @@ -61,38 +60,105 @@ # include #endif +/* NetBSD 5.0 declares strsignal in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ + && ! defined __GLIBC__ +# include +#endif + +/* AIX 7.2 and Android 13 declare ffsl and ffsll in , not in + . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if ((0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _AIX || defined __ANDROID__)) \ + && ! defined __GLIBC__ +# include +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ # endif #endif -/* NetBSD 5.0 declares strsignal in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ - && ! defined __GLIBC__ -# include -#endif - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -180,6 +246,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -227,6 +299,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -252,6 +334,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -349,7 +439,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -377,9 +467,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -395,26 +485,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -423,19 +513,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -508,13 +598,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -523,27 +620,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -559,6 +662,49 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif /* Clear a block of memory. The compiler will not delete a call to this function, even if the block is dead after the call. */ @@ -594,10 +740,18 @@ _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); /* Find the index of the least-significant set bit. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define ffsll rpl_ffsll +# endif +_GL_FUNCDECL_RPL (ffsll, int, (long long int i)); +_GL_CXXALIAS_RPL (ffsll, int, (long long int i)); +# else +# if !1 _GL_FUNCDECL_SYS (ffsll, int, (long long int i)); -# endif +# endif _GL_CXXALIAS_SYS (ffsll, int, (long long int i)); +# endif _GL_CXXALIASWARN (ffsll); #elif defined GNULIB_POSIXCHECK # undef ffsll @@ -607,10 +761,30 @@ _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); #endif +#if 1 +/* On native Windows, map 'memccpy' to '_memccpy', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::memccpy always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memccpy +# define memccpy _memccpy +# endif +_GL_CXXALIAS_MDA (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# else +_GL_CXXALIAS_SYS (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# endif +_GL_CXXALIASWARN (memccpy); +#endif + + /* Return the first instance of C within N bytes of S, or NULL. */ #if 1 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memchr # define memchr rpl_memchr # endif _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) @@ -626,10 +800,14 @@ _GL_CXXALIAS_SYS_CAST2 (memchr, void const *, (void const *__s, int __c, size_t __n)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memchr, void *, + (void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (memchr, void const *, - (void const *__s, int __c, size_t __n)); + (void const *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (memchr); # endif @@ -678,17 +856,33 @@ _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ -#if 0 -# if ! 1 +#if 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mempcpy +# define mempcpy rpl_mempcpy +# endif +_GL_FUNCDECL_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n)); +# else +# if !0 _GL_FUNCDECL_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); -# endif +# endif _GL_CXXALIAS_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mempcpy); +# endif #elif defined GNULIB_POSIXCHECK # undef mempcpy # if HAVE_RAW_DECL_MEMPCPY @@ -711,10 +905,15 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr, void *, (void const *, int, size_t), void const *, (void const *, int, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); -_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); -# else + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memrchr, void *, + (void *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (memrchr, void const *, + (void const *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (memrchr); # endif #elif defined GNULIB_POSIXCHECK @@ -725,11 +924,28 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " # endif #endif +/* Overwrite a block of memory. The compiler will not optimize + effects away, even if the block is dead after the call. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (memset_explicit, void *, + (void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n)); +_GL_CXXALIASWARN (memset_explicit); +#elif defined GNULIB_POSIXCHECK +# undef memset_explicit +# if HAVE_RAW_DECL_MEMSET_EXPLICIT +_GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - " + "use gnulib module memset_explicit for portability"); +# endif +#endif + /* Find the first occurrence of C in S. More efficient than memchr(S,C,N), at the expense of undefined behavior if C does not occur within N bytes. */ -#if 0 -# if ! 1 +#if 1 +# if ! 0 _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); @@ -741,9 +957,14 @@ _GL_CXXALIAS_SYS_CAST2 (rawmemchr, void *, (void const *__s, int __c_in), void const *, (void const *__s, int __c_in)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); -_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (rawmemchr, void *, + (void *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (rawmemchr, void const *, + (void const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); # else _GL_CXXALIASWARN (rawmemchr); # endif @@ -757,14 +978,28 @@ _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ #if 0 -# if ! 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef stpcpy +# define stpcpy rpl_stpcpy +# endif +_GL_FUNCDECL_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src)); +# else +# if !1 _GL_FUNCDECL_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src) _GL_ARG_NONNULL ((1, 2))); -# endif +# endif _GL_CXXALIAS_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (stpcpy); +# endif #elif defined GNULIB_POSIXCHECK # undef stpcpy # if HAVE_RAW_DECL_STPCPY @@ -799,7 +1034,9 @@ _GL_CXXALIAS_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (stpncpy); +# endif #elif defined GNULIB_POSIXCHECK # undef stpncpy # if HAVE_RAW_DECL_STPNCPY @@ -813,7 +1050,8 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " GB18030 and the character to be searched is a digit. */ # undef strchr /* Assume strchr is always declared. */ -_GL_WARN_ON_USE_CXX (strchr, const char *, (const char *, int), +_GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), "strchr cannot work correctly on character strings " "in some multibyte locales - " "use mbschr if you care about internationalization"); @@ -844,10 +1082,15 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul, char const *, (char const *__s, int __c_in)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); -_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); -# else + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strchrnul, char *, + (char *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strchrnul, char const *, + (char const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strchrnul); # endif #elif defined GNULIB_POSIXCHECK @@ -865,24 +1108,78 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " # undef strdup # define strdup rpl_strdup # endif -_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup /* strdup exists as a function and as a macro. Get rid of the macro. */ # undef strdup # endif -# if !(1 || defined strdup) -_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); +# if (!1 || __GNUC__ >= 11) && !defined strdup +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); # endif _GL_CXXALIASWARN (strdup); -#elif defined GNULIB_POSIXCHECK -# undef strdup -# if HAVE_RAW_DECL_STRDUP +#else +# if __GNUC__ >= 11 && !defined strdup +/* For -Wmismatched-dealloc: Associate strdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strdup +# if HAVE_RAW_DECL_STRDUP _GL_WARN_ON_USE (strdup, "strdup is unportable - " "use gnulib module strdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'creat' to '_creat', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::strdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); +# else +# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup +# undef strdup +# endif +_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); +# endif +_GL_CXXALIASWARN (strdup); # endif #endif @@ -920,22 +1217,51 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - " # undef strndup # define strndup rpl_strndup # endif -_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); # else -# if ! 1 -_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); +# if !1 || (__GNUC__ >= 11 && !defined strndup) +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); # endif _GL_CXXALIASWARN (strndup); -#elif defined GNULIB_POSIXCHECK -# undef strndup -# if HAVE_RAW_DECL_STRNDUP +#else +# if __GNUC__ >= 11 && !defined strndup +/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strndup +# if HAVE_RAW_DECL_STRNDUP _GL_WARN_ON_USE (strndup, "strndup is unportable - " "use gnulib module strndup for portability"); +# endif # endif #endif @@ -995,10 +1321,14 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk, char *, (char const *__s, char const *__accept), const char *, (char const *__s, char const *__accept)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strpbrk, char *, + (char *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strpbrk, char const *, - (char const *__s, char const *__accept)); + (char const *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strpbrk); # endif @@ -1008,7 +1338,8 @@ _GL_CXXALIASWARN (strpbrk); locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strpbrk -_GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), "strpbrk cannot work correctly on character strings " "in multibyte locales - " "use mbspbrk if you care about internationalization"); @@ -1016,7 +1347,8 @@ _GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), #elif defined GNULIB_POSIXCHECK # undef strpbrk # if HAVE_RAW_DECL_STRPBRK -_GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), "strpbrk is unportable - " "use gnulib module strpbrk for portability"); # endif @@ -1037,7 +1369,8 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " GB18030 and the character to be searched is a digit. */ # undef strrchr /* Assume strrchr is always declared. */ -_GL_WARN_ON_USE_CXX (strrchr, const char *, (const char *, int), +_GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), "strrchr cannot work correctly on character strings " "in some multibyte locales - " "use mbsrchr if you care about internationalization"); @@ -1100,10 +1433,14 @@ _GL_CXXALIAS_SYS_CAST2 (strstr, const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strstr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strstr, const char *, - (const char *haystack, const char *needle)); + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strstr); # endif @@ -1149,11 +1486,15 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr, const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strcasestr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strcasestr, const char *, - (const char *haystack, const char *needle)); -# else + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strcasestr); # endif #elif defined GNULIB_POSIXCHECK @@ -1257,7 +1598,9 @@ _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbslen); +# endif #endif #if 0 @@ -1499,7 +1842,7 @@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) # endif _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (strerror_r); # endif #elif defined GNULIB_POSIXCHECK @@ -1510,6 +1853,60 @@ _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " # endif #endif +/* Return the name of the system error code ERRNUM. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerrorname_np +# define strerrorname_np rpl_strerrorname_np +# endif +_GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum)); +_GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum)); +# else +# if !1 +_GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIASWARN (strerrorname_np); +#elif defined GNULIB_POSIXCHECK +# undef strerrorname_np +# if HAVE_RAW_DECL_STRERRORNAME_NP +_GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - " + "use gnulib module strerrorname_np for portability"); +# endif +#endif + +/* Return an abbreviation string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigabbrev_np); +#elif defined GNULIB_POSIXCHECK +# undef sigabbrev_np +# if HAVE_RAW_DECL_SIGABBREV_NP +_GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - " + "use gnulib module sigabbrev_np for portability"); +# endif +#endif + +/* Return an English description string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigdescr_np); +#elif defined GNULIB_POSIXCHECK +# undef sigdescr_np +# if HAVE_RAW_DECL_SIGDESCR_NP +_GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - " + "use gnulib module sigdescr_np for portability"); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/sys/stat.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/sys/stat.h index 5df2a29e0..426458266 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/sys/stat.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/sys/stat.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a more complete sys/stat.h header file. - Copyright (C) 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ @@ -26,14 +26,17 @@ #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if defined __need_system_sys_stat_h /* Special invocation convention. */ -#if (_MSC_VER < 1900) -#include "../include/sys/stat.h" -#else #include "../ucrt/sys/stat.h" -#endif #else /* Normal invocation convention. */ @@ -48,30 +51,54 @@ #include /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/sys/stat.h" -#else #include "../ucrt/sys/stat.h" -#endif #ifndef _GL_SYS_STAT_H #define _GL_SYS_STAT_H +/* This file uses _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -159,6 +186,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -206,6 +239,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -231,6 +274,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -328,7 +379,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -356,9 +407,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -374,26 +425,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -402,19 +453,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -487,13 +538,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -502,27 +560,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -538,6 +602,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif + /* Before doing "#define mknod rpl_mknod" below, we need to include all headers that may declare mknod(). OS/2 kLIBC declares mknod() in , not in . */ @@ -859,11 +924,11 @@ struct stat # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif -/* S_IXUGO is a common extension to POSIX. */ +/* Although S_IXUGO and S_IRWXUGO are not specified by POSIX and are + not implemented in GNU/Linux, some Gnulib-using apps use the macros. */ #if !S_IXUGO # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif - #ifndef S_IRWXUGO # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif @@ -875,6 +940,50 @@ struct stat #endif +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod rpl_chmod +# endif +_GL_FUNCDECL_RPL (chmod, int, (const char *filename, mode_t mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (chmod, int, (const char *filename, mode_t mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod _chmod +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (chmod); +#elif defined GNULIB_POSIXCHECK +# undef chmod +# if HAVE_RAW_DECL_CHMOD +_GL_WARN_ON_USE (chmod, "chmod has portability problems - " + "use gnulib module chmod for portability"); +# endif +#elif 1 +/* On native Windows, map 'chmod' to '_chmod', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chmod always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod _chmod +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (chmod); +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -916,7 +1025,9 @@ _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); # else _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fstat); +# endif #elif 0 # undef fstat # define fstat fstat_used_without_requesting_gnulib_module_fstat @@ -987,7 +1098,7 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (futimens); # endif #elif defined GNULIB_POSIXCHECK @@ -1001,7 +1112,11 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " #if 0 # if !1 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (getumask, mode_t, (void) _GL_ATTRIBUTE_NOTHROW); +# else _GL_FUNCDECL_SYS (getumask, mode_t, (void)); +# endif # endif _GL_CXXALIAS_SYS (getumask, mode_t, (void)); # if 1 @@ -1034,59 +1149,20 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " #endif -#if 1 -# if ! 0 -/* mingw does not support symlinks, therefore it does not have lstat. But - without links, stat does just fine. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lstat stat -# endif -_GL_CXXALIAS_RPL_1 (lstat, stat, int, - (const char *restrict name, struct stat *restrict buf)); -# elif 0 +#if 0 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lstat -# define lstat rpl_lstat +# undef mkdir +# define mkdir rpl_mkdir # endif -_GL_FUNCDECL_RPL (lstat, int, - (const char *restrict name, struct stat *restrict buf) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (lstat, int, - (const char *restrict name, struct stat *restrict buf)); -# else -_GL_CXXALIAS_SYS (lstat, int, - (const char *restrict name, struct stat *restrict buf)); -# endif -# if 0 -_GL_CXXALIASWARN (lstat); -# endif -#elif 0 -# undef lstat -# define lstat lstat_used_without_requesting_gnulib_module_lstat -#elif defined GNULIB_POSIXCHECK -# undef lstat -# if HAVE_RAW_DECL_LSTAT -_GL_WARN_ON_USE (lstat, "lstat is unportable - " - "use gnulib module lstat for portability"); -# endif -#endif - - -#if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkdir -# define mkdir rpl_mkdir -# endif _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) - _GL_ARG_NONNULL ((1))); + _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -#else +# elif defined _WIN32 && !defined __CYGWIN__ /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes and , which are included above. */ -# if defined _WIN32 && ! defined __CYGWIN__ - # if !GNULIB_defined_rpl_mkdir static int rpl_mkdir (char const *name, mode_t mode) @@ -1095,16 +1171,44 @@ rpl_mkdir (char const *name, mode_t mode) } # define GNULIB_defined_rpl_mkdir 1 # endif - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkdir +# define mkdir rpl_mkdir +# endif +_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); +# else +_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); +# endif +_GL_CXXALIASWARN (mkdir); +#elif defined GNULIB_POSIXCHECK +# undef mkdir +# if HAVE_RAW_DECL_MKDIR +_GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " + "use gnulib module mkdir for portability"); +# endif +#elif 1 +/* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::mkdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !GNULIB_defined_rpl_mkdir +static int +rpl_mkdir (char const *name, mode_t mode) +{ + return _mkdir (name); +} +# define GNULIB_defined_rpl_mkdir 1 +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkdir # define mkdir rpl_mkdir # endif _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); # else _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); # endif -#endif _GL_CXXALIASWARN (mkdir); +#endif #if 0 @@ -1150,12 +1254,24 @@ _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkfifoat +# define mkfifoat rpl_mkfifoat +# endif +_GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)); +# else +# if !1 _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); -# endif +# endif _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkfifoat); +# endif #elif defined GNULIB_POSIXCHECK # undef mkfifoat # if HAVE_RAW_DECL_MKFIFOAT @@ -1193,14 +1309,28 @@ _GL_WARN_ON_USE (mknod, "mknod is not portable - " #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mknodat +# define mknodat rpl_mknodat +# endif +_GL_FUNCDECL_RPL (mknodat, int, + (int fd, char const *file, mode_t mode, dev_t dev) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mknodat, int, + (int fd, char const *file, mode_t mode, dev_t dev)); +# else +# if !1 _GL_FUNCDECL_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((2))); -# endif +# endif _GL_CXXALIAS_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mknodat); +# endif #elif defined GNULIB_POSIXCHECK # undef mknodat # if HAVE_RAW_DECL_MKNODAT @@ -1284,6 +1414,62 @@ _GL_WARN_ON_USE (stat, "stat is unportable - " #endif +#if 0 +# if ! 1 +/* mingw does not support symlinks, therefore it does not have lstat. But + without links, stat does just fine. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define lstat stat +# endif +_GL_CXXALIAS_RPL_1 (lstat, stat, int, + (const char *restrict name, struct stat *restrict buf)); +# elif 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lstat +# define lstat rpl_lstat +# endif +_GL_FUNCDECL_RPL (lstat, int, + (const char *restrict name, struct stat *restrict buf) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (lstat, int, + (const char *restrict name, struct stat *restrict buf)); +# else +_GL_CXXALIAS_SYS (lstat, int, + (const char *restrict name, struct stat *restrict buf)); +# endif +# if 1 +_GL_CXXALIASWARN (lstat); +# endif +#elif 0 +# undef lstat +# define lstat lstat_used_without_requesting_gnulib_module_lstat +#elif defined GNULIB_POSIXCHECK +# undef lstat +# if HAVE_RAW_DECL_LSTAT +_GL_WARN_ON_USE (lstat, "lstat is unportable - " + "use gnulib module lstat for portability"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'umask' to '_umask', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::umask always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef umask +# define umask _umask +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (umask, mode_t, (mode_t mask)); +# else +_GL_CXXALIAS_SYS (umask, mode_t, (mode_t mask)); +# endif +_GL_CXXALIASWARN (umask); +#endif + + #if 0 /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat implementation relies on futimesat, which on Solaris 10 makes an invocation @@ -1308,7 +1494,7 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (utimensat); # endif #elif defined GNULIB_POSIXCHECK diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/sys/types.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/sys/types.h index 1aa387faf..f46d600f8 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/sys/types.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/sys/types.h @@ -1,37 +1,40 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a more complete sys/types.h. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if defined _WIN32 && !defined __CYGWIN__ \ && (defined __need_off_t || defined __need___off64_t \ || defined __need_ssize_t || defined __need_time_t) /* Special invocation convention inside mingw header files. */ -#if (_MSC_VER < 1900) -#include "../include/sys/types.h" -#else #include "../ucrt/sys/types.h" -#endif #else /* Normal invocation convention. */ @@ -40,11 +43,7 @@ /* The include_next requires a split double-inclusion guard. */ # define _GL_INCLUDING_SYS_TYPES_H -#if (_MSC_VER < 1900) -#include "../include/sys/types.h" -#else #include "../ucrt/sys/types.h" -#endif # undef _GL_INCLUDING_SYS_TYPES_H #ifndef _GL_SYS_TYPES_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/time.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/time.h index af8b8d7fb..51907474c 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/time.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/time.h @@ -1,26 +1,33 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A more-standard . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. (However, skip this for MinGW as it treats __need_time_t @@ -32,11 +39,7 @@ && !defined __MINGW32__) \ || defined _GL_TIME_H) -#if (_MSC_VER < 1900) -# include "../include/time.h" -#else -#include "../ucrt/time.h" -#endif +# include "../ucrt/time.h" #else @@ -48,30 +51,32 @@ # include # endif -#if (_MSC_VER < 1900) -# include "../include/time.h" -#else -#include "../ucrt/time.h" -#endif +# include "../ucrt/time.h" + +/* This file uses _GL_ATTRIBUTE_DEPRECATED, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +# if !_GL_CONFIG_H_INCLUDED +# error "Please include config.h first." +# endif /* NetBSD 5.0 mis-defines NULL. */ # include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -159,6 +164,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -206,6 +217,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -231,6 +252,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -328,7 +357,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -356,9 +385,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -374,26 +403,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -402,19 +431,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -487,13 +516,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -502,27 +538,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -542,7 +584,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use Or they define it with the wrong member names or define it in (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, but the pthreads-win32 library defines it in . */ -# if (_MSC_VER < 1900) +# if ! 1 # if 0 # include # elif 0 @@ -585,11 +627,87 @@ struct __time_t_must_be_integral { # define GNULIB_defined_struct_time_t_must_be_integral 1 # endif +/* Define TIME_UTC, a positive integer constant used for timespec_get(). */ +# if ! 1 +# if !GNULIB_defined_TIME_UTC +# define TIME_UTC 1 +# define GNULIB_defined_TIME_UTC 1 +# endif +# endif + +/* Set *TS to the current time, and return BASE. + Upon failure, return 0. */ +# if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef timespec_get +# define timespec_get rpl_timespec_get +# endif +_GL_FUNCDECL_RPL (timespec_get, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (timespec_get, int, (struct timespec *ts, int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (timespec_get); +# endif +# elif defined GNULIB_POSIXCHECK +# undef timespec_get +# if HAVE_RAW_DECL_TIMESPEC_GET +_GL_WARN_ON_USE (timespec_get, "timespec_get is unportable - " + "use gnulib module timespec_get for portability"); +# endif +# endif + +/* Set *TS to the current time resolution, and return BASE. + Upon failure, return 0. */ +# if 0 +# if ! 1 +_GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base)); +_GL_CXXALIASWARN (timespec_getres); +# elif defined GNULIB_POSIXCHECK +# undef timespec_getres +# if HAVE_RAW_DECL_TIMESPEC_GETRES +_GL_WARN_ON_USE (timespec_getres, "timespec_getres is unportable - " + "use gnulib module timespec_getres for portability"); +# endif +# endif + +/* Return the number of seconds that have elapsed since the Epoch. */ +# if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define time rpl_time +# endif +_GL_FUNCDECL_RPL (time, time_t, (time_t *__tp)); +_GL_CXXALIAS_RPL (time, time_t, (time_t *__tp)); +# else +_GL_CXXALIAS_SYS (time, time_t, (time_t *__tp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (time); +# endif +# elif defined GNULIB_POSIXCHECK +# undef time +# if HAVE_RAW_DECL_TIME +_GL_WARN_ON_USE (time, "time has consistency problems - " + "use gnulib module time for portability"); +# endif +# endif + /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define nanosleep rpl_nanosleep # endif @@ -608,29 +726,58 @@ _GL_CXXALIAS_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # endif _GL_CXXALIASWARN (nanosleep); +# elif defined GNULIB_POSIXCHECK +# undef nanosleep +# if HAVE_RAW_DECL_NANOSLEEP +_GL_WARN_ON_USE (nanosleep, "nanosleep is unportable - " + "use gnulib module nanosleep for portability"); +# endif # endif /* Initialize time conversion information. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef tzset # define tzset rpl_tzset # endif _GL_FUNCDECL_RPL (tzset, void, (void)); _GL_CXXALIAS_RPL (tzset, void, (void)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tzset +# define tzset _tzset +# endif +_GL_CXXALIAS_MDA (tzset, void, (void)); # else -# if ! 1 -_GL_FUNCDECL_SYS (tzset, void, (void)); +_GL_CXXALIAS_SYS (tzset, void, (void)); +# endif +_GL_CXXALIASWARN (tzset); +# elif 1 +/* On native Windows, map 'tzset' to '_tzset', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::tzset always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tzset +# define tzset _tzset # endif +_GL_CXXALIAS_MDA (tzset, void, (void)); +# else _GL_CXXALIAS_SYS (tzset, void, (void)); # endif _GL_CXXALIASWARN (tzset); +# elif defined GNULIB_POSIXCHECK +# undef tzset +# if HAVE_RAW_DECL_TZSET +_GL_WARN_ON_USE (tzset, "tzset has portability problems - " + "use gnulib module tzset for portability"); +# endif # endif /* Return the 'time_t' representation of TP and normalize TP. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mktime rpl_mktime # endif @@ -642,13 +789,19 @@ _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (mktime); # endif +# elif defined GNULIB_POSIXCHECK +# undef mktime +# if HAVE_RAW_DECL_MKTIME +_GL_WARN_ON_USE (mktime, "mktime has portability problems - " + "use gnulib module mktime for portability"); +# endif # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime_r # define localtime_r rpl_localtime_r @@ -670,7 +823,7 @@ _GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, # if 1 _GL_CXXALIASWARN (localtime_r); # endif -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime_r # define gmtime_r rpl_gmtime_r @@ -692,6 +845,17 @@ _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, # if 1 _GL_CXXALIASWARN (gmtime_r); # endif +# elif defined GNULIB_POSIXCHECK +# undef localtime_r +# if HAVE_RAW_DECL_LOCALTIME_R +_GL_WARN_ON_USE (localtime_r, "localtime_r is unportable - " + "use gnulib module time_r for portability"); +# endif +# undef gmtime_r +# if HAVE_RAW_DECL_GMTIME_R +_GL_WARN_ON_USE (gmtime_r, "gmtime_r is unportable - " + "use gnulib module time_r for portability"); +# endif # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See @@ -712,6 +876,12 @@ _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (localtime); # endif +# elif defined GNULIB_POSIXCHECK +# undef localtime +# if HAVE_RAW_DECL_LOCALTIME +_GL_WARN_ON_USE (localtime, "localtime has portability problems - " + "use gnulib module localtime for portability"); +# endif # endif # if 0 || 0 @@ -743,15 +913,24 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm)); _GL_CXXALIASWARN (strptime); +# elif defined GNULIB_POSIXCHECK +# undef strptime +# if HAVE_RAW_DECL_STRPTIME +_GL_WARN_ON_USE (strptime, "strptime is unportable - " + "use gnulib module strptime for portability"); +# endif # endif /* Convert *TP to a date and time string. See . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define ctime rpl_ctime # endif +# ifndef __cplusplus +_GL_ATTRIBUTE_DEPRECATED +# endif _GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp)); @@ -761,12 +940,18 @@ _GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (ctime); # endif +# elif defined GNULIB_POSIXCHECK +# undef ctime +# if HAVE_RAW_DECL_CTIME +_GL_WARN_ON_USE (ctime, "ctime has portability problems - " + "use gnulib module ctime for portability"); +# endif # endif /* Convert *TP to a date and time string. See . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strftime rpl_strftime # endif @@ -785,30 +970,74 @@ _GL_CXXALIAS_SYS (strftime, size_t, # if __GLIBC__ >= 2 _GL_CXXALIASWARN (strftime); # endif +# elif defined GNULIB_POSIXCHECK +# undef strftime +# if HAVE_RAW_DECL_STRFTIME +_GL_WARN_ON_USE (strftime, "strftime has portability problems - " + "use gnulib module strftime-fixes for portability"); +# endif # endif # if defined _GNU_SOURCE && 0 && ! 0 +/* Functions that use a first-class time zone data type, instead of + relying on an implicit global time zone. + Inspired by NetBSD. */ + +/* Represents a time zone. + (timezone_t) NULL stands for UTC. */ typedef struct tm_zone *timezone_t; + +/* tzalloc (name) + Returns a time zone object for the given time zone NAME. This object + represents the time zone that other functions would use it the TZ + environment variable was set to NAME. + If NAME is NULL, the result represents the time zone that other functions + would use it the TZ environment variable was unset. + May return NULL if NAME is invalid (this is platform dependent) or + upon memory allocation failure. */ _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); + +/* tzfree (tz) + Frees a time zone object. + The argument must have been returned by tzalloc(). */ _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); + +/* localtime_rz (tz, &t, &result) + Converts an absolute time T to a broken-down time RESULT, assuming the + time zone TZ. + This function is like 'localtime_r', but relies on the argument TZ instead + of an implicit global time zone. */ _GL_FUNCDECL_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result)); + +/* mktime_z (tz, &tm) + Normalizes the broken-down time TM and converts it to an absolute time, + assuming the time zone TZ. Returns the absolute time. + This function is like 'mktime', but relies on the argument TZ instead + of an implicit global time zone. */ _GL_FUNCDECL_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result) + (timezone_t __tz, struct tm *restrict __tm) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result)); + (timezone_t __tz, struct tm *restrict __tm)); + +/* Time zone abbreviation strings (returned by 'localtime_rz' or 'mktime_z' + in the 'tm_zone' member of 'struct tm') are valid as long as + - the 'struct tm' argument is not destroyed or overwritten, + and + - the 'timezone_t' argument is not freed through tzfree(). */ + # endif /* Convert TM to a time_t value, assuming UTC. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef timegm # define timegm rpl_timegm @@ -821,7 +1050,15 @@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (timegm); +# endif +# elif defined GNULIB_POSIXCHECK +# undef timegm +# if HAVE_RAW_DECL_TIMEGM +_GL_WARN_ON_USE (timegm, "timegm is unportable - " + "use gnulib module timegm for portability"); +# endif # endif /* Encourage applications to avoid unsafe functions that can overrun @@ -829,23 +1066,31 @@ _GL_CXXALIASWARN (timegm); applications should use strftime (or even sprintf) instead. */ # if defined GNULIB_POSIXCHECK # undef asctime +# if HAVE_RAW_DECL_ASCTIME _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef asctime_r -_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " +# if HAVE_RAW_DECL_ASCTIME_R +_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef ctime -_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " +# if HAVE_RAW_DECL_CTIME +_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef ctime_r -_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " +# if HAVE_RAW_DECL_CTIME_R +_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uchar.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uchar.h new file mode 100644 index 000000000..42613d06c --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uchar.h @@ -0,0 +1,1423 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* substitute - 16-bit and 32-bit wide character types. + Copyright (C) 2019-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2019. */ + +/* + * ISO C 23 for platforms that lack it. + */ + +#ifndef _GL_UCHAR_H + +#if __GNUC__ >= 3 + +#endif + + +/* The include_next requires a split double-inclusion guard. */ +#if 1 +# if defined __HAIKU__ +/* Work around . */ +# include +# endif +/* On AIX 7.2 with xlclang++, /usr/include/uchar.h produces compilation errors + because it contains typedef definitions of char16_t and char32_t, however + char16_t and char32_t are keywords in this situation. To work around it, + define char16_t and char32_t as macros. */ +# if defined __cplusplus && defined _AIX && defined __ibmxl__ && defined __clang__ +# define char16_t gl_char16_t +# define char32_t gl_char32_t +# endif +# include "../ucrt/uchar.h" +#endif + +#ifndef _GL_UCHAR_H +#define _GL_UCHAR_H + +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_BEGIN_C_LINKAGE, + _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* Get uint_least16_t, uint_least32_t. */ +#include + +/* Get mbstate_t, size_t. */ +#include + +/* For the inline functions. */ +#include +#include + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +_GL_INLINE_HEADER_BEGIN + + +#if !(1 || (defined __cplusplus && 0)) + +/* An 8-bit variant of wchar_t. + Note: This type is only mandated by ISO C 23 or newer, and it does + denote UTF-8 units. */ +typedef unsigned char char8_t; + +#elif 1 + +typedef unsigned char gl_char8_t; +# define char8_t gl_char8_t + +#endif + +#if !(1 || (defined __cplusplus && 0)) + +/* A 16-bit variant of wchar_t. + Note: This type is only mandated by ISO C 11 or newer. In ISO C 23 + and newer, it denotes UTF-16 units; in older versions of ISO C it did + so only on platforms on which __STDC_UTF_16__ was defined. */ +typedef uint_least16_t char16_t; + +#elif 0 + +typedef uint_least16_t gl_char16_t; +# define char16_t gl_char16_t + +#endif + +#if !(1 || (defined __cplusplus && 0)) + +/* A 32-bit variant of wchar_t. + Note: This type is only mandated by ISO C 11 or newer. In ISO C 23 + and newer, it denotes UTF-32 code points; in older versions of ISO C + it did so only on platforms on which __STDC_UTF_32__ was defined. + In gnulib, we guarantee that it denotes UTF-32 code points if and + only if the module 'uchar-c23' is in use. */ +typedef uint_least32_t char32_t; + +#elif 0 + +typedef uint_least32_t gl_char32_t; +# define char32_t gl_char32_t + +#endif + +/* Define if a 'char32_t' can hold more characters than a 'wchar_t'. */ +#if 1 /* 32-bit AIX, Cygwin, native Windows */ +# define _GL_SMALL_WCHAR_T 1 +#endif + +/* Define if 'wchar_t', like 'char32_t', + - is a 32-bit type, and + - represents Unicode code points. + For this test, we can use __STDC_ISO_10646__ (defined by glibc, musl libc, + Cygwin) but need to consider _GL_SMALL_WCHAR_T, so as to exclude Cygwin. + We cannot use __STDC_UTF_16__ or __STDC_UTF_32__ + - because these macros provide info about char16_t and char32_t (not + wchar_t!), and + - because GCC >= 4.9 defines these macros on all platforms, even on + FreeBSD and Solaris. + We should better not use __STD_UTF_16__, __STD_UTF_32__ either, because + these macros are misspellings, only defined by Android's . */ +#if defined __STDC_ISO_10646__ && !_GL_SMALL_WCHAR_T +/* glibc, musl libc */ +# define _GL_WCHAR_T_IS_UCS4 1 +#endif +#if _GL_WCHAR_T_IS_UCS4 +static_assert (sizeof (char32_t) == sizeof (wchar_t)); +#endif + + +/* Convert a single-byte character to a 32-bit wide character. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_BTOC32 +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ATTRIBUTE_PURE wint_t +btoc32 (int c) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + btowc (c); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (btoc32, wint_t, (int c) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (btoc32, wint_t, (int c)); +_GL_CXXALIASWARN (btoc32); +#endif + + +/* Test a specific property of a 32-bit wide character. */ +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISALNUM +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isalnum (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswalnum (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isalnum, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isalnum, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isalnum); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISALPHA +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isalpha (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswalpha (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isalpha, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isalpha, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isalpha); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISBLANK +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isblank (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswblank (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isblank, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isblank, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isblank); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISCNTRL +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32iscntrl (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswcntrl (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32iscntrl, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32iscntrl, int, (wint_t wc)); +_GL_CXXALIASWARN (c32iscntrl); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISDIGIT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isdigit (wint_t wc) +{ + return +# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswdigit (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isdigit, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isdigit, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isdigit); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISGRAPH +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isgraph (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswgraph (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isgraph, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isgraph, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isgraph); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISLOWER +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32islower (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswlower (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32islower, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32islower, int, (wint_t wc)); +_GL_CXXALIASWARN (c32islower); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISPRINT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isprint (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswprint (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isprint, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isprint, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isprint); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISPUNCT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32ispunct (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswpunct (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32ispunct, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32ispunct, int, (wint_t wc)); +_GL_CXXALIASWARN (c32ispunct); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISSPACE +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isspace (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswspace (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isspace, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isspace, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isspace); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISUPPER +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isupper (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswupper (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isupper, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isupper, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isupper); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISXDIGIT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isxdigit (wint_t wc) +{ + return +# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswxdigit (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isxdigit, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isxdigit, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isxdigit); +#endif + + +/* Case mapping of a 32-bit wide character. */ +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32TOLOWER +_GL_BEGIN_C_LINKAGE +_GL_INLINE wint_t +c32tolower (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + towlower (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32tolower, wint_t, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32tolower, wint_t, (wint_t wc)); +_GL_CXXALIASWARN (c32tolower); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32TOUPPER +_GL_BEGIN_C_LINKAGE +_GL_INLINE wint_t +c32toupper (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + towupper (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32toupper, wint_t, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32toupper, wint_t, (wint_t wc)); +_GL_CXXALIASWARN (c32toupper); +#endif + + +/* Number of screen columns needed for a 32-bit wide character. */ +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32WIDTH +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32width (char32_t wc) +{ + return +# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcwidth (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32width, int, (char32_t wc)); +# endif +_GL_CXXALIAS_SYS (c32width, int, (char32_t wc)); +_GL_CXXALIASWARN (c32width); +#endif + + +/* Converts a 32-bit wide character to a multibyte character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef c32rtomb +# define c32rtomb rpl_c32rtomb +# endif +_GL_FUNCDECL_RPL (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +_GL_CXXALIAS_RPL (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +# endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_CXXALIASWARN (c32rtomb); +# endif +#elif defined GNULIB_POSIXCHECK +# undef c32rtomb +# if HAVE_RAW_DECL_C32RTOMB +_GL_WARN_ON_USE (c32rtomb, "c32rtomb is not portable - " + "use gnulib module c32rtomb for portability"); +# endif +#endif + + +/* Convert a 32-bit wide string to a string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32SNRTOMBS +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +c32snrtombs (char *dest, const char32_t **srcp, size_t srclen, size_t len, + mbstate_t *ps) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcsnrtombs (dest, (const wchar_t **) srcp, srclen, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32snrtombs, size_t, + (char *dest, const char32_t **srcp, size_t srclen, size_t len, + mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32snrtombs, size_t, + (char *dest, const char32_t **srcp, size_t srclen, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (c32snrtombs); +#endif + + +/* Convert a 32-bit wide string to a string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32SRTOMBS +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +c32srtombs (char *dest, const char32_t **srcp, size_t len, mbstate_t *ps) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcsrtombs (dest, (const wchar_t **) srcp, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32srtombs, size_t, + (char *dest, const char32_t **srcp, size_t len, mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32srtombs, size_t, + (char *dest, const char32_t **srcp, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (c32srtombs); +#endif + + +/* Convert a 32-bit wide string to a string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32STOMBS +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +c32stombs (char *dest, const char32_t *src, size_t len) +{ + mbstate_t state; + + mbszero (&state); + return c32srtombs (dest, &src, len, &state); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32stombs, size_t, + (char *dest, const char32_t *src, size_t len) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32stombs, size_t, + (char *dest, const char32_t *src, size_t len)); +_GL_CXXALIASWARN (c32stombs); +#endif + + +/* Number of screen columns needed for a size-bounded 32-bit wide string. */ +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32SWIDTH +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((1)) int +c32swidth (const char32_t *s, size_t n) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcswidth ((const wchar_t *) s, n); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32swidth, int, (const char32_t *s, size_t n) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (c32swidth, int, (const char32_t *s, size_t n)); +_GL_CXXALIASWARN (c32swidth); +#endif + + +/* Converts a 32-bit wide character to unibyte character. + Returns the single-byte representation of WC if it exists, + or EOF otherwise. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32TOB +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32tob (wint_t wc) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wctob (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32tob, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32tob, int, (wint_t wc)); +_GL_CXXALIASWARN (c32tob); +#endif + + +/* Converts a multibyte character to a 32-bit wide character. */ +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrtoc32 +# define mbrtoc32 rpl_mbrtoc32 +# endif +_GL_FUNCDECL_RPL (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_CXXALIASWARN (mbrtoc32); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrtoc32 +# if HAVE_RAW_DECL_MBRTOC32 +_GL_WARN_ON_USE (mbrtoc32, "mbrtoc32 is not portable - " + "use gnulib module mbrtoc32 for portability"); +# endif +#endif + + +/* Converts a multibyte character and returns the next 16-bit wide + character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrtoc16 +# define mbrtoc16 rpl_mbrtoc16 +# endif +_GL_FUNCDECL_RPL (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_CXXALIASWARN (mbrtoc16); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrtoc16 +# if HAVE_RAW_DECL_MBRTOC16 +_GL_WARN_ON_USE (mbrtoc16, "mbrtoc16 is not portable - " + "use gnulib module mbrtoc16 for portability"); +# endif +#endif + + +/* Convert a string to a 32-bit wide string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSNRTOC32S +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +mbsnrtoc32s (char32_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + mbsnrtowcs ((wchar_t *) dest, srcp, srclen, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (mbsnrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsnrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (mbsnrtoc32s); +#endif + + +/* Convert a string to a 32-bit wide string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSRTOC32S +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +mbsrtoc32s (char32_t *dest, const char **srcp, size_t len, mbstate_t *ps) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + mbsrtowcs ((wchar_t *) dest, srcp, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (mbsrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t len, mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (mbsrtoc32s); +#endif + + +/* Convert a string to a 32-bit wide string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSTOC32S +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +mbstoc32s (char32_t *dest, const char *src, size_t len) +{ + mbstate_t state; + + mbszero (&state); + return mbsrtoc32s (dest, &src, len, &state); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (mbstoc32s, size_t, + (char32_t *dest, const char *src, size_t len) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbstoc32s, size_t, + (char32_t *dest, const char *src, size_t len)); +_GL_CXXALIASWARN (mbstoc32s); +#endif + + +#if 0 || 0 +/* A scalar type. Instances of this type, other than (c32_type_test_t) 0, + represent a character property, sometimes also viewed as a "character class". + It can be applied to 32-bit wide characters. It is the counterpart of + type 'wctype_t' for wide characters. + To test whether a given character has a certain property, use the function + 'c32_apply_type_test'. */ +# if _GL_WCHAR_T_IS_UCS4 +typedef wctype_t c32_type_test_t; +# else +typedef /*bool*/int (*c32_type_test_t) (wint_t wc); +# endif +#endif + +/* Return a character property with the given name, or (c32_type_test_t) 0 + if the designated property does not exist. + This function is the counterpart of function 'wctype' for wide characters. + */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_GET_TYPE_TEST +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((1)) c32_type_test_t +c32_get_type_test (const char *name) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wctype (name); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_get_type_test, c32_type_test_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (c32_get_type_test, c32_type_test_t, (const char *name)); +_GL_CXXALIASWARN (c32_get_type_test); +#endif + +/* Test whether a given 32-bit wide character has the specified character + property. + Return non-zero if true, zero if false or if the argument is WEOF. + This function is the counterpart of function 'iswctype' for wide characters. + */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 +# if !defined IN_C32_APPLY_TYPE_TEST +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32_apply_type_test (wint_t wc, c32_type_test_t property) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswctype (wc, property); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_apply_type_test, int, + (wint_t wc, c32_type_test_t property)); +# endif +# else +_GL_FUNCDECL_SYS (c32_apply_type_test, int, + (wint_t wc, c32_type_test_t property) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32_apply_type_test, int, + (wint_t wc, c32_type_test_t property)); +_GL_CXXALIASWARN (c32_apply_type_test); +#endif + + +#if 0 || 0 +/* A scalar type. Instances of this type, other than (c32_mapping_t) 0, + represent a character mapping. It can be applied to 32-bit wide characters. + It is the counterpart of type 'wctrans_t' for wide characters. + To apply a certain mapping to a given character, use the function + 'c32_apply_mapping'. */ +# if _GL_WCHAR_T_IS_UCS4 +typedef wctrans_t c32_mapping_t; +# else +typedef wint_t (*c32_mapping_t) (wint_t wc); +# endif +#endif + +/* Return a character mapping with the given name, or (c32_mapping_t) 0 + if the designated mapping does not exist. + This function is the counterpart of function 'wctrans' for wide characters. + */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_GET_MAPPING +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((1)) c32_mapping_t +c32_get_mapping (const char *name) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wctrans (name); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_get_mapping, c32_mapping_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (c32_get_mapping, c32_mapping_t, (const char *name)); +_GL_CXXALIASWARN (c32_get_mapping); +#endif + +/* Apply the specified character mapping to a given 32-bit wide character. + Return the result of this mapping. Return the WC argument unchanged if it is + WEOF. + This function is the counterpart of function 'towctrans' for wide characters. + */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_APPLY_MAPPING +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) wint_t +c32_apply_mapping (wint_t wc, c32_mapping_t mapping) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + towctrans (wc, mapping); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_apply_mapping, wint_t, + (wint_t wc, c32_mapping_t mapping) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32_apply_mapping, wint_t, + (wint_t wc, c32_mapping_t mapping)); +_GL_CXXALIASWARN (c32_apply_mapping); +#endif + + +_GL_INLINE_HEADER_END + +#endif /* _GL_UCHAR_H */ +#endif /* _GL_UCHAR_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unicase.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unicase.h new file mode 100644 index 000000000..fdbe9e319 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unicase.h @@ -0,0 +1,472 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Unicode character case mappings. + Copyright (C) 2002, 2009-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNICASE_H +#define _UNICASE_H + +#include "unitypes.h" + +/* Get bool. */ +#include + +/* Get size_t. */ +#include + +/* Get uninorm_t. */ +#include "uninorm.h" + +#if 0 +# include +#else +# define LIBUNISTRING_DLL_VARIABLE +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* ========================================================================= */ + +/* Character case mappings. + These mappings are locale and context independent. + WARNING! These functions are not sufficient for languages such as German. + Better use the functions below that treat an entire string at once and are + language aware. */ + +/* Return the uppercase mapping of a Unicode character. */ +extern ucs4_t + uc_toupper (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the lowercase mapping of a Unicode character. */ +extern ucs4_t + uc_tolower (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the titlecase mapping of a Unicode character. */ +extern ucs4_t + uc_totitle (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* String case mappings. */ + +/* These functions are locale dependent. The iso639_language argument + identifies the language (e.g. "tr" for Turkish). NULL means to use + locale independent case mappings. */ + +/* Return the ISO 639 language code of the current locale. + Return "" if it is unknown, or in the "C" locale. */ +extern const char * + uc_locale_language (void) + _UC_ATTRIBUTE_PURE; + +/* Conventions: + + All functions prefixed with u8_ operate on UTF-8 encoded strings. + Their unit is an uint8_t (1 byte). + + All functions prefixed with u16_ operate on UTF-16 encoded strings. + Their unit is an uint16_t (a 2-byte word). + + All functions prefixed with u32_ operate on UCS-4 encoded strings. + Their unit is an uint32_t (a 4-byte word). + + All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly + n units. + + Functions returning a string result take a (resultbuf, lengthp) argument + pair. If resultbuf is not NULL and the result fits into *lengthp units, + it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly + allocated string is returned. In both cases, *lengthp is set to the + length (number of units) of the returned string. In case of error, + NULL is returned and errno is set. */ + +/* Return the uppercase mapping of a string. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_toupper (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_toupper (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_toupper (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the lowercase mapping of a string. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_tolower (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_tolower (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_tolower (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the titlecase mapping of a string. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_totitle (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_totitle (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_totitle (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* The case-mapping context given by a prefix string. */ +typedef struct casing_prefix_context + { + /* These fields are private, undocumented. */ + uint32_t last_char_except_ignorable; + uint32_t last_char_normal_or_above; + } + casing_prefix_context_t; +/* The case-mapping context of the empty prefix string. */ +extern LIBUNISTRING_DLL_VARIABLE const casing_prefix_context_t unicase_empty_prefix_context; +/* Return the case-mapping context of a given prefix string. */ +extern casing_prefix_context_t + u8_casing_prefix_context (const uint8_t *s, size_t n); +extern casing_prefix_context_t + u16_casing_prefix_context (const uint16_t *s, size_t n); +extern casing_prefix_context_t + u32_casing_prefix_context (const uint32_t *s, size_t n); +/* Return the case-mapping context of the prefix concat(A, S), given the + case-mapping context of the prefix A. */ +extern casing_prefix_context_t + u8_casing_prefixes_context (const uint8_t *s, size_t n, + casing_prefix_context_t a_context); +extern casing_prefix_context_t + u16_casing_prefixes_context (const uint16_t *s, size_t n, + casing_prefix_context_t a_context); +extern casing_prefix_context_t + u32_casing_prefixes_context (const uint32_t *s, size_t n, + casing_prefix_context_t a_context); + +/* The case-mapping context given by a suffix string. */ +typedef struct casing_suffix_context + { + /* These fields are private, undocumented. */ + uint32_t first_char_except_ignorable; + uint32_t bits; + } + casing_suffix_context_t; +/* The case-mapping context of the empty suffix string. */ +extern LIBUNISTRING_DLL_VARIABLE const casing_suffix_context_t unicase_empty_suffix_context; +/* Return the case-mapping context of a given suffix string. */ +extern casing_suffix_context_t + u8_casing_suffix_context (const uint8_t *s, size_t n); +extern casing_suffix_context_t + u16_casing_suffix_context (const uint16_t *s, size_t n); +extern casing_suffix_context_t + u32_casing_suffix_context (const uint32_t *s, size_t n); +/* Return the case-mapping context of the suffix concat(S, A), given the + case-mapping context of the suffix A. */ +extern casing_suffix_context_t + u8_casing_suffixes_context (const uint8_t *s, size_t n, + casing_suffix_context_t a_context); +extern casing_suffix_context_t + u16_casing_suffixes_context (const uint16_t *s, size_t n, + casing_suffix_context_t a_context); +extern casing_suffix_context_t + u32_casing_suffixes_context (const uint32_t *s, size_t n, + casing_suffix_context_t a_context); + +/* Return the uppercase mapping of a string that is surrounded by a prefix + and a suffix. */ +extern uint8_t * + u8_ct_toupper (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_toupper (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_toupper (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the lowercase mapping of a string that is surrounded by a prefix + and a suffix. */ +extern uint8_t * + u8_ct_tolower (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_tolower (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_tolower (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the titlecase mapping of a string that is surrounded by a prefix + and a suffix. */ +extern uint8_t * + u8_ct_totitle (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_totitle (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_totitle (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the case folded string. + Comparing uN_casefold (S1) and uN_casefold (S2) with uN_cmp2() is equivalent + to comparing S1 and S2 with uN_casecmp(). + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_casefold (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_casefold (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_casefold (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); +/* Likewise, for a string that is surrounded by a prefix and a suffix. */ +extern uint8_t * + u8_ct_casefold (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_casefold (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_casefold (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Compare S1 and S2, ignoring differences in case and normalization. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_casecmp (const uint8_t *s1, size_t n1, + const uint8_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u16_casecmp (const uint16_t *s1, size_t n1, + const uint16_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u32_casecmp (const uint32_t *s1, size_t n1, + const uint32_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + ulc_casecmp (const char *s1, size_t n1, + const char *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); + +/* Convert the string S of length N to a NUL-terminated byte sequence, in such + a way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with the gnulib + function memcmp2() is equivalent to comparing S1 and S2 with uN_casecoll(). + NF must be either UNINORM_NFC, UNINORM_NFKC, or NULL for no normalization. */ +extern char * + u8_casexfrm (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); +extern char * + u16_casexfrm (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); +extern char * + u32_casexfrm (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); +extern char * + ulc_casexfrm (const char *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Compare S1 and S2, ignoring differences in case and normalization, using the + collation rules of the current locale. + The nf argument identifies the normalization form to apply after the + case-mapping. It must be either UNINORM_NFC or UNINORM_NFKC. It can also + be NULL, for no normalization. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_casecoll (const uint8_t *s1, size_t n1, + const uint8_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u16_casecoll (const uint16_t *s1, size_t n1, + const uint16_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u32_casecoll (const uint32_t *s1, size_t n1, + const uint32_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + ulc_casecoll (const char *s1, size_t n1, + const char *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); + + +/* Set *RESULTP to true if mapping NFD(S) to upper case is a no-op, or to false + otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_uppercase (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_uppercase (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_uppercase (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if mapping NFD(S) to lower case is a no-op, or to false + otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_lowercase (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_lowercase (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_lowercase (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if mapping NFD(S) to title case is a no-op, or to false + otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_titlecase (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_titlecase (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_titlecase (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if applying case folding to NFD(S) is a no-op, or to + false otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_casefolded (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_casefolded (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_casefolded (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if case matters for S, that is, if mapping NFD(S) to + either upper case or lower case or title case is not a no-op. + Set *RESULTP to false if NFD(S) maps to itself under the upper case mapping, + under the lower case mapping, and under the title case mapping; in other + words, when NFD(S) consists entirely of caseless characters. + Upon failure, return -1 with errno set. */ +extern int + u8_is_cased (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_cased (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_cased (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + + +/* ========================================================================= */ + +#ifdef __cplusplus +} +#endif + +#endif /* _UNICASE_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unictype.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unictype.h new file mode 100644 index 000000000..d752b8a1d --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unictype.h @@ -0,0 +1,1097 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Unicode character classification and properties. + Copyright (C) 2002, 2005-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNICTYPE_H +#define _UNICTYPE_H + +#include "unitypes.h" + +/* Get bool. */ +#include + +/* Get size_t. */ +#include + +#if 0 +# include +#else +# define LIBUNISTRING_DLL_VARIABLE +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* ========================================================================= */ + +/* Field 1 of Unicode Character Database: Character name. + See "uniname.h". */ + +/* ========================================================================= */ + +/* Field 2 of Unicode Character Database: General category. */ + +/* Data type denoting a General category value. This is not just a bitmask, + but rather a bitmask and a pointer to the lookup table, so that programs + that use only the predefined bitmasks (i.e. don't combine bitmasks with & + and |) don't have a link-time dependency towards the big general table. */ +typedef struct +{ + uint32_t bitmask : 31; + /*bool*/ unsigned int generic : 1; + union + { + const void *table; /* when generic is 0 */ + bool (*lookup_fn) (ucs4_t uc, uint32_t bitmask); /* when generic is 1 */ + } lookup; +} +uc_general_category_t; + +/* Bits and bit masks denoting General category values. UnicodeData-3.2.0.html + says a 32-bit integer will always suffice to represent them. + These bit masks can only be used with the uc_is_general_category_withtable + function. */ +enum +{ + UC_CATEGORY_MASK_L = 0x0000001f, + UC_CATEGORY_MASK_LC = 0x00000007, + UC_CATEGORY_MASK_Lu = 0x00000001, + UC_CATEGORY_MASK_Ll = 0x00000002, + UC_CATEGORY_MASK_Lt = 0x00000004, + UC_CATEGORY_MASK_Lm = 0x00000008, + UC_CATEGORY_MASK_Lo = 0x00000010, + UC_CATEGORY_MASK_M = 0x000000e0, + UC_CATEGORY_MASK_Mn = 0x00000020, + UC_CATEGORY_MASK_Mc = 0x00000040, + UC_CATEGORY_MASK_Me = 0x00000080, + UC_CATEGORY_MASK_N = 0x00000700, + UC_CATEGORY_MASK_Nd = 0x00000100, + UC_CATEGORY_MASK_Nl = 0x00000200, + UC_CATEGORY_MASK_No = 0x00000400, + UC_CATEGORY_MASK_P = 0x0003f800, + UC_CATEGORY_MASK_Pc = 0x00000800, + UC_CATEGORY_MASK_Pd = 0x00001000, + UC_CATEGORY_MASK_Ps = 0x00002000, + UC_CATEGORY_MASK_Pe = 0x00004000, + UC_CATEGORY_MASK_Pi = 0x00008000, + UC_CATEGORY_MASK_Pf = 0x00010000, + UC_CATEGORY_MASK_Po = 0x00020000, + UC_CATEGORY_MASK_S = 0x003c0000, + UC_CATEGORY_MASK_Sm = 0x00040000, + UC_CATEGORY_MASK_Sc = 0x00080000, + UC_CATEGORY_MASK_Sk = 0x00100000, + UC_CATEGORY_MASK_So = 0x00200000, + UC_CATEGORY_MASK_Z = 0x01c00000, + UC_CATEGORY_MASK_Zs = 0x00400000, + UC_CATEGORY_MASK_Zl = 0x00800000, + UC_CATEGORY_MASK_Zp = 0x01000000, + UC_CATEGORY_MASK_C = 0x3e000000, + UC_CATEGORY_MASK_Cc = 0x02000000, + UC_CATEGORY_MASK_Cf = 0x04000000, + UC_CATEGORY_MASK_Cs = 0x08000000, + UC_CATEGORY_MASK_Co = 0x10000000, + UC_CATEGORY_MASK_Cn = 0x20000000 +}; + +/* Predefined General category values. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_L; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_LC; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lu; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ll; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lt; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lm; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lo; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_M; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mn; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Me; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_N; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Nd; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Nl; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_No; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_P; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pd; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ps; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pe; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pi; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pf; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Po; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_S; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sm; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sk; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_So; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Z; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zs; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zl; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zp; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_C; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cf; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cs; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Co; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cn; +/* Non-public. */ +extern const uc_general_category_t _UC_CATEGORY_NONE; + +/* Alias names for predefined General category values. */ +#define UC_LETTER UC_CATEGORY_L +#define UC_CASED_LETTER UC_CATEGORY_LC +#define UC_UPPERCASE_LETTER UC_CATEGORY_Lu +#define UC_LOWERCASE_LETTER UC_CATEGORY_Ll +#define UC_TITLECASE_LETTER UC_CATEGORY_Lt +#define UC_MODIFIER_LETTER UC_CATEGORY_Lm +#define UC_OTHER_LETTER UC_CATEGORY_Lo +#define UC_MARK UC_CATEGORY_M +#define UC_NON_SPACING_MARK UC_CATEGORY_Mn +#define UC_COMBINING_SPACING_MARK UC_CATEGORY_Mc +#define UC_ENCLOSING_MARK UC_CATEGORY_Me +#define UC_NUMBER UC_CATEGORY_N +#define UC_DECIMAL_DIGIT_NUMBER UC_CATEGORY_Nd +#define UC_LETTER_NUMBER UC_CATEGORY_Nl +#define UC_OTHER_NUMBER UC_CATEGORY_No +#define UC_PUNCTUATION UC_CATEGORY_P +#define UC_CONNECTOR_PUNCTUATION UC_CATEGORY_Pc +#define UC_DASH_PUNCTUATION UC_CATEGORY_Pd +#define UC_OPEN_PUNCTUATION UC_CATEGORY_Ps /* a.k.a. UC_START_PUNCTUATION */ +#define UC_CLOSE_PUNCTUATION UC_CATEGORY_Pe /* a.k.a. UC_END_PUNCTUATION */ +#define UC_INITIAL_QUOTE_PUNCTUATION UC_CATEGORY_Pi +#define UC_FINAL_QUOTE_PUNCTUATION UC_CATEGORY_Pf +#define UC_OTHER_PUNCTUATION UC_CATEGORY_Po +#define UC_SYMBOL UC_CATEGORY_S +#define UC_MATH_SYMBOL UC_CATEGORY_Sm +#define UC_CURRENCY_SYMBOL UC_CATEGORY_Sc +#define UC_MODIFIER_SYMBOL UC_CATEGORY_Sk +#define UC_OTHER_SYMBOL UC_CATEGORY_So +#define UC_SEPARATOR UC_CATEGORY_Z +#define UC_SPACE_SEPARATOR UC_CATEGORY_Zs +#define UC_LINE_SEPARATOR UC_CATEGORY_Zl +#define UC_PARAGRAPH_SEPARATOR UC_CATEGORY_Zp +#define UC_OTHER UC_CATEGORY_C +#define UC_CONTROL UC_CATEGORY_Cc +#define UC_FORMAT UC_CATEGORY_Cf +#define UC_SURROGATE UC_CATEGORY_Cs /* all of them are invalid characters */ +#define UC_PRIVATE_USE UC_CATEGORY_Co +#define UC_UNASSIGNED UC_CATEGORY_Cn /* some of them are invalid characters */ + +/* Return the union of two general categories. + This corresponds to the unions of the two sets of characters. */ +extern uc_general_category_t + uc_general_category_or (uc_general_category_t category1, + uc_general_category_t category2); + +/* Return the intersection of two general categories as bit masks. + This *does*not* correspond to the intersection of the two sets of + characters. */ +extern uc_general_category_t + uc_general_category_and (uc_general_category_t category1, + uc_general_category_t category2); + +/* Return the intersection of a general category with the complement of a + second general category, as bit masks. + This *does*not* correspond to the intersection with complement, when + viewing the categories as sets of characters. */ +extern uc_general_category_t + uc_general_category_and_not (uc_general_category_t category1, + uc_general_category_t category2); + +/* Return the name of a general category. */ +extern const char * + uc_general_category_name (uc_general_category_t category) + _UC_ATTRIBUTE_PURE; + +/* Return the long name of a general category. */ +extern const char * + uc_general_category_long_name (uc_general_category_t category) + _UC_ATTRIBUTE_PURE; + +/* Return the general category given by name, e.g. "Lu", or by long name, + e.g. "Uppercase Letter". */ +extern uc_general_category_t + uc_general_category_byname (const char *category_name) + _UC_ATTRIBUTE_PURE; + +/* Return the general category of a Unicode character. */ +extern uc_general_category_t + uc_general_category (ucs4_t uc) + _UC_ATTRIBUTE_PURE; + +/* Test whether a Unicode character belongs to a given category. + The CATEGORY argument can be the combination of several predefined + general categories. */ +extern bool + uc_is_general_category (ucs4_t uc, uc_general_category_t category) + _UC_ATTRIBUTE_PURE; +/* Likewise. This function uses a big table comprising all categories. */ +extern bool + uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 3 of Unicode Character Database: Canonical combining class. */ + +/* The possible results of uc_combining_class (0..255) are described in + UCD.html. The list here is not definitive; more values can be added + in future versions. */ +enum +{ + UC_CCC_NR = 0, /* Not Reordered */ + UC_CCC_OV = 1, /* Overlay */ + UC_CCC_NK = 7, /* Nukta */ + UC_CCC_KV = 8, /* Kana Voicing */ + UC_CCC_VR = 9, /* Virama */ + UC_CCC_ATBL = 200, /* Attached Below Left */ + UC_CCC_ATB = 202, /* Attached Below */ + UC_CCC_ATA = 214, /* Attached Above */ + UC_CCC_ATAR = 216, /* Attached Above Right */ + UC_CCC_BL = 218, /* Below Left */ + UC_CCC_B = 220, /* Below */ + UC_CCC_BR = 222, /* Below Right */ + UC_CCC_L = 224, /* Left */ + UC_CCC_R = 226, /* Right */ + UC_CCC_AL = 228, /* Above Left */ + UC_CCC_A = 230, /* Above */ + UC_CCC_AR = 232, /* Above Right */ + UC_CCC_DB = 233, /* Double Below */ + UC_CCC_DA = 234, /* Double Above */ + UC_CCC_IS = 240 /* Iota Subscript */ +}; + +/* Return the canonical combining class of a Unicode character. */ +extern int + uc_combining_class (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the name of a canonical combining class. */ +extern const char * + uc_combining_class_name (int ccc) + _UC_ATTRIBUTE_CONST; + +/* Return the long name of a canonical combining class. */ +extern const char * + uc_combining_class_long_name (int ccc) + _UC_ATTRIBUTE_CONST; + +/* Return the canonical combining class given by name, e.g. "BL", or by long + name, e.g. "Below Left". */ +extern int + uc_combining_class_byname (const char *ccc_name) + _UC_ATTRIBUTE_PURE; + +/* ========================================================================= */ + +/* Field 4 of Unicode Character Database: Bidi class. + Before Unicode 4.0, this field was called "Bidirectional category". */ + +enum +{ + UC_BIDI_L, /* Left-to-Right */ + UC_BIDI_LRE, /* Left-to-Right Embedding */ + UC_BIDI_LRO, /* Left-to-Right Override */ + UC_BIDI_R, /* Right-to-Left */ + UC_BIDI_AL, /* Right-to-Left Arabic */ + UC_BIDI_RLE, /* Right-to-Left Embedding */ + UC_BIDI_RLO, /* Right-to-Left Override */ + UC_BIDI_PDF, /* Pop Directional Format */ + UC_BIDI_EN, /* European Number */ + UC_BIDI_ES, /* European Number Separator */ + UC_BIDI_ET, /* European Number Terminator */ + UC_BIDI_AN, /* Arabic Number */ + UC_BIDI_CS, /* Common Number Separator */ + UC_BIDI_NSM, /* Non-Spacing Mark */ + UC_BIDI_BN, /* Boundary Neutral */ + UC_BIDI_B, /* Paragraph Separator */ + UC_BIDI_S, /* Segment Separator */ + UC_BIDI_WS, /* Whitespace */ + UC_BIDI_ON, /* Other Neutral */ + UC_BIDI_LRI, /* Left-to-Right Isolate */ + UC_BIDI_RLI, /* Right-to-Left Isolate */ + UC_BIDI_FSI, /* First Strong Isolate */ + UC_BIDI_PDI /* Pop Directional Isolate */ +}; + +/* Return the name of a bidi class. */ +extern const char * + uc_bidi_class_name (int bidi_class) + _UC_ATTRIBUTE_CONST; +/* Same; obsolete function name. */ +extern const char * + uc_bidi_category_name (int category) + _UC_ATTRIBUTE_CONST; + +/* Return the long name of a bidi class. */ +extern const char * + uc_bidi_class_long_name (int bidi_class) + _UC_ATTRIBUTE_CONST; + +/* Return the bidi class given by name, e.g. "LRE", or by long name, e.g. + "Left-to-Right Embedding". */ +extern int + uc_bidi_class_byname (const char *bidi_class_name) + _UC_ATTRIBUTE_PURE; +/* Same; obsolete function name. */ +extern int + uc_bidi_category_byname (const char *category_name) + _UC_ATTRIBUTE_PURE; + +/* Return the bidi class of a Unicode character. */ +extern int + uc_bidi_class (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +/* Same; obsolete function name. */ +extern int + uc_bidi_category (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test whether a Unicode character belongs to a given bidi class. */ +extern bool + uc_is_bidi_class (ucs4_t uc, int bidi_class) + _UC_ATTRIBUTE_CONST; +/* Same; obsolete function name. */ +extern bool + uc_is_bidi_category (ucs4_t uc, int category) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 5 of Unicode Character Database: Character decomposition mapping. + See "uninorm.h". */ + +/* ========================================================================= */ + +/* Field 6 of Unicode Character Database: Decimal digit value. */ + +/* Return the decimal digit value of a Unicode character. */ +extern int + uc_decimal_value (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 7 of Unicode Character Database: Digit value. */ + +/* Return the digit value of a Unicode character. */ +extern int + uc_digit_value (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 8 of Unicode Character Database: Numeric value. */ + +/* Return the numeric value of a Unicode character. */ +typedef struct +{ + int numerator; + int denominator; +} +uc_fraction_t; +extern uc_fraction_t + uc_numeric_value (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 9 of Unicode Character Database: Mirrored. */ + +/* Return the mirrored character of a Unicode character UC in *PUC. */ +extern bool + uc_mirror_char (ucs4_t uc, ucs4_t *puc); + +/* ========================================================================= */ + +/* Field 10 of Unicode Character Database: Unicode 1.0 Name. + Not available in this library. */ + +/* ========================================================================= */ + +/* Field 11 of Unicode Character Database: ISO 10646 comment. + Not available in this library. */ + +/* ========================================================================= */ + +/* Field 12, 13, 14 of Unicode Character Database: Uppercase mapping, + lowercase mapping, titlecase mapping. See "unicase.h". */ + +/* ========================================================================= */ + +/* Field 2 of the file ArabicShaping.txt in the Unicode Character Database. */ + +/* Possible joining types. */ +enum +{ + UC_JOINING_TYPE_U, /* Non_Joining */ + UC_JOINING_TYPE_T, /* Transparent */ + UC_JOINING_TYPE_C, /* Join_Causing */ + UC_JOINING_TYPE_L, /* Left_Joining */ + UC_JOINING_TYPE_R, /* Right_Joining */ + UC_JOINING_TYPE_D /* Dual_Joining */ +}; + +/* Return the name of a joining type. */ +extern const char * + uc_joining_type_name (int joining_type) + _UC_ATTRIBUTE_CONST; + +/* Return the long name of a joining type. */ +extern const char * + uc_joining_type_long_name (int joining_type) + _UC_ATTRIBUTE_CONST; + +/* Return the joining type given by name, e.g. "D", or by long name, e.g. + "Dual Joining". */ +extern int + uc_joining_type_byname (const char *joining_type_name) + _UC_ATTRIBUTE_PURE; + +/* Return the joining type of a Unicode character. */ +extern int + uc_joining_type (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Field 3 of the file ArabicShaping.txt in the Unicode Character Database. */ + +/* Possible joining groups. + This enumeration may be extended in the future. */ +enum +{ + UC_JOINING_GROUP_NONE, /* No_Joining_Group */ + UC_JOINING_GROUP_AIN, /* Ain */ + UC_JOINING_GROUP_ALAPH, /* Alaph */ + UC_JOINING_GROUP_ALEF, /* Alef */ + UC_JOINING_GROUP_BEH, /* Beh */ + UC_JOINING_GROUP_BETH, /* Beth */ + UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, /* Burushaski_Yeh_Barree */ + UC_JOINING_GROUP_DAL, /* Dal */ + UC_JOINING_GROUP_DALATH_RISH, /* Dalath_Rish */ + UC_JOINING_GROUP_E, /* E */ + UC_JOINING_GROUP_FARSI_YEH, /* Farsi_Yeh */ + UC_JOINING_GROUP_FE, /* Fe */ + UC_JOINING_GROUP_FEH, /* Feh */ + UC_JOINING_GROUP_FINAL_SEMKATH, /* Final_Semkath */ + UC_JOINING_GROUP_GAF, /* Gaf */ + UC_JOINING_GROUP_GAMAL, /* Gamal */ + UC_JOINING_GROUP_HAH, /* Hah */ + UC_JOINING_GROUP_HE, /* He */ + UC_JOINING_GROUP_HEH, /* Heh */ + UC_JOINING_GROUP_HEH_GOAL, /* Heh_Goal */ + UC_JOINING_GROUP_HETH, /* Heth */ + UC_JOINING_GROUP_KAF, /* Kaf */ + UC_JOINING_GROUP_KAPH, /* Kaph */ + UC_JOINING_GROUP_KHAPH, /* Khaph */ + UC_JOINING_GROUP_KNOTTED_HEH, /* Knotted_Heh */ + UC_JOINING_GROUP_LAM, /* Lam */ + UC_JOINING_GROUP_LAMADH, /* Lamadh */ + UC_JOINING_GROUP_MEEM, /* Meem */ + UC_JOINING_GROUP_MIM, /* Mim */ + UC_JOINING_GROUP_NOON, /* Noon */ + UC_JOINING_GROUP_NUN, /* Nun */ + UC_JOINING_GROUP_NYA, /* Nya */ + UC_JOINING_GROUP_PE, /* Pe */ + UC_JOINING_GROUP_QAF, /* Qaf */ + UC_JOINING_GROUP_QAPH, /* Qaph */ + UC_JOINING_GROUP_REH, /* Reh */ + UC_JOINING_GROUP_REVERSED_PE, /* Reversed_Pe */ + UC_JOINING_GROUP_SAD, /* Sad */ + UC_JOINING_GROUP_SADHE, /* Sadhe */ + UC_JOINING_GROUP_SEEN, /* Seen */ + UC_JOINING_GROUP_SEMKATH, /* Semkath */ + UC_JOINING_GROUP_SHIN, /* Shin */ + UC_JOINING_GROUP_SWASH_KAF, /* Swash_Kaf */ + UC_JOINING_GROUP_SYRIAC_WAW, /* Syriac_Waw */ + UC_JOINING_GROUP_TAH, /* Tah */ + UC_JOINING_GROUP_TAW, /* Taw */ + UC_JOINING_GROUP_TEH_MARBUTA, /* Teh_Marbuta */ + UC_JOINING_GROUP_TEH_MARBUTA_GOAL, /* Teh_Marbuta_Goal */ + UC_JOINING_GROUP_TETH, /* Teth */ + UC_JOINING_GROUP_WAW, /* Waw */ + UC_JOINING_GROUP_YEH, /* Yeh */ + UC_JOINING_GROUP_YEH_BARREE, /* Yeh_Barree */ + UC_JOINING_GROUP_YEH_WITH_TAIL, /* Yeh_With_Tail */ + UC_JOINING_GROUP_YUDH, /* Yudh */ + UC_JOINING_GROUP_YUDH_HE, /* Yudh_He */ + UC_JOINING_GROUP_ZAIN, /* Zain */ + UC_JOINING_GROUP_ZHAIN, /* Zhain */ + UC_JOINING_GROUP_ROHINGYA_YEH, /* Rohingya_Yeh */ + UC_JOINING_GROUP_STRAIGHT_WAW, /* Straight_Waw */ + UC_JOINING_GROUP_MANICHAEAN_ALEPH, /* Manichaean_Aleph */ + UC_JOINING_GROUP_MANICHAEAN_BETH, /* Manichaean_Beth */ + UC_JOINING_GROUP_MANICHAEAN_GIMEL, /* Manichaean_Gimel */ + UC_JOINING_GROUP_MANICHAEAN_DALETH, /* Manichaean_Daleth */ + UC_JOINING_GROUP_MANICHAEAN_WAW, /* Manichaean_Waw */ + UC_JOINING_GROUP_MANICHAEAN_ZAYIN, /* Manichaean_Zayin */ + UC_JOINING_GROUP_MANICHAEAN_HETH, /* Manichaean_Heth */ + UC_JOINING_GROUP_MANICHAEAN_TETH, /* Manichaean_Teth */ + UC_JOINING_GROUP_MANICHAEAN_YODH, /* Manichaean_Yodh */ + UC_JOINING_GROUP_MANICHAEAN_KAPH, /* Manichaean_Kaph */ + UC_JOINING_GROUP_MANICHAEAN_LAMEDH, /* Manichaean_Lamedh */ + UC_JOINING_GROUP_MANICHAEAN_DHAMEDH, /* Manichaean_Dhamedh */ + UC_JOINING_GROUP_MANICHAEAN_THAMEDH, /* Manichaean_Thamedh */ + UC_JOINING_GROUP_MANICHAEAN_MEM, /* Manichaean_Mem */ + UC_JOINING_GROUP_MANICHAEAN_NUN, /* Manichaean_Nun */ + UC_JOINING_GROUP_MANICHAEAN_SAMEKH, /* Manichaean_Aleph */ + UC_JOINING_GROUP_MANICHAEAN_AYIN, /* Manichaean_Ayin */ + UC_JOINING_GROUP_MANICHAEAN_PE, /* Manichaean_Pe */ + UC_JOINING_GROUP_MANICHAEAN_SADHE, /* Manichaean_Sadhe */ + UC_JOINING_GROUP_MANICHAEAN_QOPH, /* Manichaean_Qoph */ + UC_JOINING_GROUP_MANICHAEAN_RESH, /* Manichaean_Resh */ + UC_JOINING_GROUP_MANICHAEAN_TAW, /* Manichaean_Taw */ + UC_JOINING_GROUP_MANICHAEAN_ONE, /* Manichaean_One */ + UC_JOINING_GROUP_MANICHAEAN_FIVE, /* Manichaean_Five */ + UC_JOINING_GROUP_MANICHAEAN_TEN, /* Manichaean_Ten */ + UC_JOINING_GROUP_MANICHAEAN_TWENTY, /* Manichaean_Twenty */ + UC_JOINING_GROUP_MANICHAEAN_HUNDRED, /* Manichaean_Hundred */ + UC_JOINING_GROUP_AFRICAN_FEH, /* African_Feh */ + UC_JOINING_GROUP_AFRICAN_QAF, /* African_Qaf */ + UC_JOINING_GROUP_AFRICAN_NOON, /* African_Noon */ + UC_JOINING_GROUP_MALAYALAM_NGA, /* Malayalam_Nga */ + UC_JOINING_GROUP_MALAYALAM_JA, /* Malayalam_Ja */ + UC_JOINING_GROUP_MALAYALAM_NYA, /* Malayalam_Nya */ + UC_JOINING_GROUP_MALAYALAM_TTA, /* Malayalam_Tta */ + UC_JOINING_GROUP_MALAYALAM_NNA, /* Malayalam_Nna */ + UC_JOINING_GROUP_MALAYALAM_NNNA, /* Malayalam_Nnna */ + UC_JOINING_GROUP_MALAYALAM_BHA, /* Malayalam_Bha */ + UC_JOINING_GROUP_MALAYALAM_RA, /* Malayalam_Ra */ + UC_JOINING_GROUP_MALAYALAM_LLA, /* Malayalam_Lla */ + UC_JOINING_GROUP_MALAYALAM_LLLA, /* Malayalam_Llla */ + UC_JOINING_GROUP_MALAYALAM_SSA, /* Malayalam_Ssa */ + UC_JOINING_GROUP_HANIFI_ROHINGYA_PA, /* Hanifi_Rohingya_Pa */ + UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA, /* Hanifi_Rohingya_Kinna_Ya */ + UC_JOINING_GROUP_THIN_YEH, /* Thin_Yeh */ + UC_JOINING_GROUP_VERTICAL_TAIL /* Vertical_Tail */ +}; + +/* Return the name of a joining group. */ +extern const char * + uc_joining_group_name (int joining_group) + _UC_ATTRIBUTE_CONST; + +/* Return the joining group given by name, e.g. "Teh_Marbuta". */ +extern int + uc_joining_group_byname (const char *joining_group_name) + _UC_ATTRIBUTE_PURE; + +/* Return the joining group of a Unicode character. */ +extern int + uc_joining_group (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Common API for properties. */ + +/* Data type denoting a property. This is not just a number, but rather a + pointer to the test functions, so that programs that use only few of the + properties don't have a link-time dependency towards all the tables. */ +typedef struct +{ + bool (*test_fn) (ucs4_t uc); +} +uc_property_t; + +/* Predefined properties. */ +/* General. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_WHITE_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ALPHABETIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NOT_A_CHARACTER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DEPRECATED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_VARIATION_SELECTOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PRIVATE_USE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE; +/* Case. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UPPERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_UPPERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOWERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_LOWERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TITLECASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASE_IGNORABLE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_LOWERCASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_UPPERCASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_TITLECASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEFOLDED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SOFT_DOTTED; +/* Identifiers. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_SYNTAX; +/* Shaping and rendering. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_JOIN_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_BASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_LINK; +/* Bidi. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_WHITESPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_PDF; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL; +/* Numeric. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_HEX_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT; +/* CJK. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDEOGRAPHIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_RADICAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR; +/* Emoji. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_PRESENTATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_MODIFIER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_MODIFIER_BASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_COMPONENT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EXTENDED_PICTOGRAPHIC; +/* Misc. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ZERO_WIDTH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NON_BREAK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ISO_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_FORMAT_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DASH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_HYPHEN; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LINE_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_QUOTATION_MARK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_MATH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_MATH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LEFT_OF_PAIR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_COMBINING; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_COMPOSITE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DECIMAL_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NUMERIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DIACRITIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EXTENDER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_REGIONAL_INDICATOR; + +/* Return the property given by name, e.g. "White space". */ +extern uc_property_t + uc_property_byname (const char *property_name); + +/* Test whether a property is valid. */ +#define uc_property_is_valid(property) ((property).test_fn != NULL) + +/* Test whether a Unicode character has a given property. */ +extern bool + uc_is_property (ucs4_t uc, uc_property_t property); +extern bool uc_is_property_white_space (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_alphabetic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_alphabetic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_not_a_character (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_deprecated (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_logical_order_exception (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_variation_selector (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_private_use (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_unassigned_code_value (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_uppercase (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_uppercase (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_lowercase (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_lowercase (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_titlecase (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_cased (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_case_ignorable (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_changes_when_lowercased (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_changes_when_uppercased (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_changes_when_titlecased (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_changes_when_casefolded (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_changes_when_casemapped (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_soft_dotted (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_id_start (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_id_start (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_id_continue (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_id_continue (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_xid_start (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_xid_continue (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_pattern_white_space (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_pattern_syntax (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_join_control (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_grapheme_base (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_grapheme_extend (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_grapheme_extend (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_grapheme_link (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_control (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_left_to_right (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_european_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_common_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_block_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_segment_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_whitespace (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_pdf (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_bidi_other_neutral (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_hex_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_ascii_hex_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_ideographic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_unified_ideograph (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_radical (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_ids_binary_operator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_ids_trinary_operator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_presentation (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_modifier (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_modifier_base (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_component (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_extended_pictographic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_zero_width (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_space (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_non_break (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_iso_control (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_format_control (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_dash (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_hyphen (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_punctuation (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_line_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_paragraph_separator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_quotation_mark (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_sentence_terminal (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_terminal_punctuation (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_currency_symbol (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_math (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_other_math (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_paired_punctuation (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_left_of_pair (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_combining (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_composite (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_decimal_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_numeric (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_diacritic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_extender (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_ignorable_control (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_regional_indicator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Subdivision of the Unicode characters into scripts. */ + +typedef struct +{ + unsigned int code : 21; + unsigned int start : 1; + unsigned int end : 1; +} +uc_interval_t; +typedef struct +{ + unsigned int nintervals; + const uc_interval_t *intervals; + const char *name; +} +uc_script_t; + +/* Return the script of a Unicode character. */ +extern const uc_script_t * + uc_script (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the script given by name, e.g. "HAN". */ +extern const uc_script_t * + uc_script_byname (const char *script_name) + _UC_ATTRIBUTE_PURE; + +/* Test whether a Unicode character belongs to a given script. */ +extern bool + uc_is_script (ucs4_t uc, const uc_script_t *script) + _UC_ATTRIBUTE_PURE; + +/* Get the list of all scripts. */ +extern void + uc_all_scripts (const uc_script_t **scripts, size_t *count); + +/* ========================================================================= */ + +/* Subdivision of the Unicode character range into blocks. */ + +typedef struct +{ + ucs4_t start; + ucs4_t end; + const char *name; +} +uc_block_t; + +/* Return the block a character belongs to. */ +extern const uc_block_t * + uc_block (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test whether a Unicode character belongs to a given block. */ +extern bool + uc_is_block (ucs4_t uc, const uc_block_t *block) + _UC_ATTRIBUTE_PURE; + +/* Get the list of all blocks. */ +extern void + uc_all_blocks (const uc_block_t **blocks, size_t *count); + +/* ========================================================================= */ + +/* Properties taken from language standards. */ + +/* Test whether a Unicode character is considered whitespace in ISO C 99. */ +extern bool + uc_is_c_whitespace (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test whether a Unicode character is considered whitespace in Java. */ +extern bool + uc_is_java_whitespace (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +enum +{ + UC_IDENTIFIER_START, /* valid as first or subsequent character */ + UC_IDENTIFIER_VALID, /* valid as subsequent character only */ + UC_IDENTIFIER_INVALID, /* not valid */ + UC_IDENTIFIER_IGNORABLE /* ignorable (Java only) */ +}; + +/* Return the categorization of a Unicode character w.r.t. the ISO C 99 + identifier syntax. */ +extern int + uc_c_ident_category (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the categorization of a Unicode character w.r.t. the Java + identifier syntax. */ +extern int + uc_java_ident_category (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* Like ISO C and . These functions are deprecated, + because this set of functions was designed with ASCII in mind and cannot + reflect the more diverse reality of the Unicode character set. But they + can be a quick-and-dirty porting aid when migrating from wchar_t APIs + to Unicode strings. */ + +/* Test for any character for which 'uc_is_alpha' or 'uc_is_digit' is true. */ +extern bool + uc_is_alnum (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character for which 'uc_is_upper' or 'uc_is_lower' is true, + or any character that is one of a locale-specific set of characters for + which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' + is true. */ +extern bool + uc_is_alpha (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any control character. */ +extern bool + uc_is_cntrl (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character that corresponds to a decimal-digit character. */ +extern bool + uc_is_digit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character for which 'uc_is_print' is true and 'uc_is_space' + is false. */ +extern bool + uc_is_graph (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character that corresponds to a lowercase letter or is one + of a locale-specific set of characters for which none of 'uc_is_cntrl', + 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ +extern bool + uc_is_lower (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any printing character. */ +extern bool + uc_is_print (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any printing character that is one of a locale-specific set of + characters for which neither 'uc_is_space' nor 'uc_is_alnum' is true. */ +extern bool + uc_is_punct (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character that corresponds to a locale-specific set of + characters for which none of 'uc_is_alnum', 'uc_is_graph', or 'uc_is_punct' + is true. */ +extern bool + uc_is_space (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character that corresponds to an uppercase letter or is one + of a locale-specific set of character for which none of 'uc_is_cntrl', + 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */ +extern bool + uc_is_upper (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Test for any character that corresponds to a hexadecimal-digit + character. */ +extern bool + uc_is_xdigit (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* GNU extension. */ +/* Test for any character that corresponds to a standard blank character or + a locale-specific set of characters for which 'uc_is_alnum' is false. */ +extern bool + uc_is_blank (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +#ifdef __cplusplus +} +#endif + +#endif /* _UNICTYPE_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uninorm.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uninorm.h new file mode 100644 index 000000000..cf8ab31b4 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uninorm.h @@ -0,0 +1,256 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Normalization forms (composition and decomposition) of Unicode strings. + Copyright (C) 2001-2002, 2009-2023 Free Software Foundation, Inc. + Written by Bruno Haible , 2009. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNINORM_H +#define _UNINORM_H + +/* Get size_t. */ +#include + +#include "unitypes.h" + +#if 0 +# include +#else +# define LIBUNISTRING_DLL_VARIABLE +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Conventions: + + All functions prefixed with u8_ operate on UTF-8 encoded strings. + Their unit is an uint8_t (1 byte). + + All functions prefixed with u16_ operate on UTF-16 encoded strings. + Their unit is an uint16_t (a 2-byte word). + + All functions prefixed with u32_ operate on UCS-4 encoded strings. + Their unit is an uint32_t (a 4-byte word). + + All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly + n units. + + Functions returning a string result take a (resultbuf, lengthp) argument + pair. If resultbuf is not NULL and the result fits into *lengthp units, + it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly + allocated string is returned. In both cases, *lengthp is set to the + length (number of units) of the returned string. In case of error, + NULL is returned and errno is set. */ + + +enum +{ + UC_DECOMP_CANONICAL,/* Canonical decomposition. */ + UC_DECOMP_FONT, /* A font variant (e.g. a blackletter form). */ + UC_DECOMP_NOBREAK, /* A no-break version of a space or hyphen. */ + UC_DECOMP_INITIAL, /* An initial presentation form (Arabic). */ + UC_DECOMP_MEDIAL, /* A medial presentation form (Arabic). */ + UC_DECOMP_FINAL, /* A final presentation form (Arabic). */ + UC_DECOMP_ISOLATED,/* An isolated presentation form (Arabic). */ + UC_DECOMP_CIRCLE, /* An encircled form. */ + UC_DECOMP_SUPER, /* A superscript form. */ + UC_DECOMP_SUB, /* A subscript form. */ + UC_DECOMP_VERTICAL,/* A vertical layout presentation form. */ + UC_DECOMP_WIDE, /* A wide (or zenkaku) compatibility character. */ + UC_DECOMP_NARROW, /* A narrow (or hankaku) compatibility character. */ + UC_DECOMP_SMALL, /* A small variant form (CNS compatibility). */ + UC_DECOMP_SQUARE, /* A CJK squared font variant. */ + UC_DECOMP_FRACTION,/* A vulgar fraction form. */ + UC_DECOMP_COMPAT /* Otherwise unspecified compatibility character. */ +}; + +/* Maximum size of decomposition of a single Unicode character. */ +#define UC_DECOMPOSITION_MAX_LENGTH 32 + +/* Return the character decomposition mapping of a Unicode character. + DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH + ucs_t elements. + When a decomposition exists, DECOMPOSITION[0..N-1] and *DECOMP_TAG are + filled and N is returned. Otherwise -1 is returned. */ +extern int + uc_decomposition (ucs4_t uc, int *decomp_tag, ucs4_t *decomposition); + +/* Return the canonical character decomposition mapping of a Unicode character. + DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH + ucs_t elements. + When a decomposition exists, DECOMPOSITION[0..N-1] is filled and N is + returned. Otherwise -1 is returned. */ +extern int + uc_canonical_decomposition (ucs4_t uc, ucs4_t *decomposition); + + +/* Attempt to combine the Unicode characters uc1, uc2. + uc1 is known to have canonical combining class 0. + Return the combination of uc1 and uc2, if it exists. + Return 0 otherwise. + Not all decompositions can be recombined using this function. See the + Unicode file CompositionExclusions.txt for details. */ +extern ucs4_t + uc_composition (ucs4_t uc1, ucs4_t uc2) + _UC_ATTRIBUTE_CONST; + + +/* An object of type uninorm_t denotes a Unicode normalization form. */ +struct unicode_normalization_form; +typedef const struct unicode_normalization_form *uninorm_t; + +/* UNINORM_NFD: Normalization form D: canonical decomposition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfd; +#define UNINORM_NFD (&uninorm_nfd) + +/* UNINORM_NFC: Normalization form C: canonical decomposition, then + canonical composition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfc; +#define UNINORM_NFC (&uninorm_nfc) + +/* UNINORM_NFKD: Normalization form KD: compatibility decomposition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfkd; +#define UNINORM_NFKD (&uninorm_nfkd) + +/* UNINORM_NFKC: Normalization form KC: compatibility decomposition, then + canonical composition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfkc; +#define UNINORM_NFKC (&uninorm_nfkc) + +/* Test whether a normalization form does compatibility decomposition. */ +#define uninorm_is_compat_decomposing(nf) \ + ((* (const unsigned int *) (nf) >> 0) & 1) + +/* Test whether a normalization form includes canonical composition. */ +#define uninorm_is_composing(nf) \ + ((* (const unsigned int *) (nf) >> 1) & 1) + +/* Return the decomposing variant of a normalization form. + This maps NFC,NFD -> NFD and NFKC,NFKD -> NFKD. */ +extern uninorm_t + uninorm_decomposing_form (uninorm_t nf) + _UC_ATTRIBUTE_PURE; + + +/* Return the specified normalization form of a string. */ +extern uint8_t * + u8_normalize (uninorm_t nf, const uint8_t *s, size_t n, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_normalize (uninorm_t nf, const uint16_t *s, size_t n, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_normalize (uninorm_t nf, const uint32_t *s, size_t n, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + + +/* Compare S1 and S2, ignoring differences in normalization. + NF must be either UNINORM_NFD or UNINORM_NFKD. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_normcmp (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u16_normcmp (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u32_normcmp (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, + uninorm_t nf, int *resultp); + + +/* Converts the string S of length N to a NUL-terminated byte sequence, in such + a way that comparing uN_normxfrm (S1) and uN_normxfrm (S2) with uN_cmp2() is + equivalent to comparing S1 and S2 with uN_normcoll(). + NF must be either UNINORM_NFC or UNINORM_NFKC. */ +extern char * + u8_normxfrm (const uint8_t *s, size_t n, uninorm_t nf, + char *resultbuf, size_t *lengthp); +extern char * + u16_normxfrm (const uint16_t *s, size_t n, uninorm_t nf, + char *resultbuf, size_t *lengthp); +extern char * + u32_normxfrm (const uint32_t *s, size_t n, uninorm_t nf, + char *resultbuf, size_t *lengthp); + + +/* Compare S1 and S2, ignoring differences in normalization, using the + collation rules of the current locale. + NF must be either UNINORM_NFC or UNINORM_NFKC. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_normcoll (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u16_normcoll (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u32_normcoll (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, + uninorm_t nf, int *resultp); + + +/* Normalization of a stream of Unicode characters. + + A "stream of Unicode characters" is essentially a function that accepts an + ucs4_t argument repeatedly, optionally combined with a function that + "flushes" the stream. */ + +/* Data type of a stream of Unicode characters that normalizes its input + according to a given normalization form and passes the normalized character + sequence to the encapsulated stream of Unicode characters. */ +struct uninorm_filter; + +/* Bring data buffered in the filter to its destination, the encapsulated + stream, then close and free the filter. + Return 0 if successful, or -1 with errno set upon failure. */ +extern int + uninorm_filter_free (struct uninorm_filter *filter); + +/* Create and return a normalization filter for Unicode characters. + The pair (stream_func, stream_data) is the encapsulated stream. + stream_func (stream_data, uc) receives the Unicode character uc + and returns 0 if successful, or -1 with errno set upon failure. + Return the new filter, or NULL with errno set upon failure. */ +extern struct uninorm_filter * + uninorm_filter_create (uninorm_t nf, + int (*stream_func) (void *stream_data, ucs4_t uc), + void *stream_data) + _GL_ATTRIBUTE_DEALLOC (uninorm_filter_free, 1); + +/* Stuff a Unicode character into a normalizing filter. + Return 0 if successful, or -1 with errno set upon failure. */ +extern int + uninorm_filter_write (struct uninorm_filter *filter, ucs4_t uc); + +/* Bring data buffered in the filter to its destination, the encapsulated + stream. + Return 0 if successful, or -1 with errno set upon failure. + Note! If after calling this function, additional characters are written + into the filter, the resulting character sequence in the encapsulated stream + will not necessarily be normalized. */ +extern int + uninorm_filter_flush (struct uninorm_filter *filter); + + +#ifdef __cplusplus +} +#endif + + +#endif /* _UNINORM_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unistd.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unistd.h index 9b91ab44c..834bfdace 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unistd.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unistd.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for and wrapper around . - Copyright (C) 2003-2020 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_UNISTD_H @@ -41,6 +41,24 @@ # undef _GL_INCLUDING_UNISTD_H #endif +/* Avoid lseek bugs in FreeBSD, macOS . + This bug is fixed after FreeBSD 13; see . + Use macOS "9999" to stand for a future fixed macOS version. */ +#if defined __FreeBSD__ && __FreeBSD__ < 14 +# undef SEEK_DATA +# undef SEEK_HOLE +#elif defined __APPLE__ && defined __MACH__ && defined SEEK_DATA +# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ +# include +# endif +# if (!defined MAC_OS_X_VERSION_MIN_REQUIRED \ + || MAC_OS_X_VERSION_MIN_REQUIRED < 99990000) +# include /* It also defines the two macros. */ +# undef SEEK_DATA +# undef SEEK_HOLE +# endif +#endif + /* Get all possible declarations of gethostname(). */ #if 0 && 1 \ && !defined _GL_INCLUDING_WINSOCK2_H @@ -52,6 +70,12 @@ #if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H #define _GL_UNISTD_H +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ /* But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ @@ -94,20 +118,18 @@ # undef __need_system_stdlib_h #endif -/* Native Windows platforms declare chdir, getcwd, rmdir in +/* Native Windows platforms declare _chdir, _getcwd, _rmdir in and/or , not in . - They also declare access(), chmod(), close(), dup(), dup2(), isatty(), - lseek(), read(), unlink(), write() in . */ -#if ((0 || 0 || 0 \ - || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__)) -# include /* mingw32, mingw64 */ -# include /* mingw64, MSVC 9 */ -#elif (1 || 0 || 1 || 0 \ - || 0 || 0 || 0 || 0 \ - || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) + They also declare _access(), _chmod(), _close(), _dup(), _dup2(), _isatty(), + _lseek(), _read(), _unlink(), _write() in . */ +#if defined _WIN32 && !defined __CYGWIN__ # include +# include +#endif + +/* Native Windows platforms declare _execl*, _execv* in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include #endif /* AIX and OSF/1 5.1 declare getdomainname in , not in . @@ -139,27 +161,24 @@ /* MSVC defines off_t in . May also define off_t to a 64-bit type on native Windows. */ -/* But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -/* Get off_t, ssize_t. */ -# include -#endif +/* Get off_t, ssize_t, mode_t. */ +#include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -247,6 +266,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -294,6 +319,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -319,6 +354,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -416,7 +459,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -444,9 +487,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -462,26 +505,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -490,19 +533,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -575,13 +618,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -590,27 +640,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -637,9 +693,6 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # include #endif -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_UNISTD_INLINE # define _GL_UNISTD_INLINE _GL_INLINE @@ -753,6 +806,12 @@ _GL_INLINE_HEADER_BEGIN _GL_FUNCDECL_RPL (access, int, (const char *file, int mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); # else _GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); # endif @@ -766,11 +825,33 @@ _GL_WARN_ON_USE (access, "access does not always support X_OK - " "also, this function is a security risk - " "use the gnulib module faccessat instead"); # endif +#elif 1 +/* On native Windows, map 'access' to '_access', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::access always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); #endif #if 0 +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIASWARN (chdir); #elif defined GNULIB_POSIXCHECK # undef chdir @@ -778,6 +859,20 @@ _GL_CXXALIASWARN (chdir); _GL_WARN_ON_USE (chown, "chdir is not always in - " "use gnulib module chdir for portability"); # endif +#elif 1 +/* On native Windows, map 'chdir' to '_chdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIASWARN (chdir); #endif @@ -822,6 +917,12 @@ _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " # endif _GL_FUNCDECL_RPL (close, int, (int fd)); _GL_CXXALIAS_RPL (close, int, (int fd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close _close +# endif +_GL_CXXALIAS_MDA (close, int, (int fd)); # else _GL_CXXALIAS_SYS (close, int, (int fd)); # endif @@ -834,24 +935,53 @@ _GL_CXXALIASWARN (close); /* Assume close is always declared. */ _GL_WARN_ON_USE (close, "close does not portably work on sockets - " "use gnulib module close for portability"); +#elif 1 +/* On native Windows, map 'close' to '_close', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::close always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close _close +# endif +_GL_CXXALIAS_MDA (close, int, (int fd)); +# else +_GL_CXXALIAS_SYS (close, int, (int fd)); +# endif +_GL_CXXALIASWARN (close); #endif #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef copy_file_range +# define copy_file_range rpl_copy_file_range +# endif +_GL_FUNCDECL_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +_GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +# else +# if !1 _GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); +# endif _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); # endif _GL_CXXALIASWARN (copy_file_range); #elif defined GNULIB_POSIXCHECK -/* Assume copy_file_range is always declared. */ +# undef copy_file_range +# if HAVE_RAW_DECL_COPY_FILE_RANGE _GL_WARN_ON_USE (copy_file_range, "copy_file_range is unportable - " "use gnulib module copy_file_range for portability"); +# endif #endif @@ -862,6 +992,12 @@ _GL_WARN_ON_USE (copy_file_range, # endif _GL_FUNCDECL_RPL (dup, int, (int oldfd)); _GL_CXXALIAS_RPL (dup, int, (int oldfd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup +# define dup _dup +# endif +_GL_CXXALIAS_MDA (dup, int, (int oldfd)); # else _GL_CXXALIAS_SYS (dup, int, (int oldfd)); # endif @@ -872,6 +1008,20 @@ _GL_CXXALIASWARN (dup); _GL_WARN_ON_USE (dup, "dup is unportable - " "use gnulib module dup for portability"); # endif +#elif 1 +/* On native Windows, map 'dup' to '_dup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup +# define dup _dup +# endif +_GL_CXXALIAS_MDA (dup, int, (int oldfd)); +# else +_GL_CXXALIAS_SYS (dup, int, (int oldfd)); +# endif +_GL_CXXALIASWARN (dup); #endif @@ -887,6 +1037,12 @@ _GL_WARN_ON_USE (dup, "dup is unportable - " # endif _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); # else _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); # endif @@ -897,6 +1053,20 @@ _GL_CXXALIASWARN (dup2); _GL_WARN_ON_USE (dup2, "dup2 is unportable - " "use gnulib module dup2 for portability"); # endif +#elif 1 +/* On native Windows, map 'dup2' to '_dup2', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup2 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); +# else +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); #endif @@ -909,17 +1079,22 @@ _GL_WARN_ON_USE (dup2, "dup2 is unportable - " Return newfd if successful, otherwise -1 and errno set. See the Linux man page at . */ -# if 1 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup3 # define dup3 rpl_dup3 # endif _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); # else +# if !1 _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (dup3); +# endif #elif defined GNULIB_POSIXCHECK # undef dup3 # if HAVE_RAW_DECL_DUP3 @@ -997,6 +1172,284 @@ _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " #endif +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl rpl_execl +# endif +_GL_FUNCDECL_RPL (execl, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execl, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#elif defined GNULIB_POSIXCHECK +# undef execl +# if HAVE_RAW_DECL_EXECL +_GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - " + "use gnulib module execl for portability"); +# endif +#elif 1 +/* On native Windows, map 'execl' to '_execl', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execl always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl _execl +# endif +_GL_CXXALIAS_MDA (execl, intptr_t, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle rpl_execle +# endif +_GL_FUNCDECL_RPL (execle, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execle, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#elif defined GNULIB_POSIXCHECK +# undef execle +# if HAVE_RAW_DECL_EXECLE +_GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - " + "use gnulib module execle for portability"); +# endif +#elif 1 +/* On native Windows, map 'execle' to '_execle', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execle always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle _execle +# endif +_GL_CXXALIAS_MDA (execle, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp rpl_execlp +# endif +_GL_FUNCDECL_RPL (execlp, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execlp, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#elif defined GNULIB_POSIXCHECK +# undef execlp +# if HAVE_RAW_DECL_EXECLP +_GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - " + "use gnulib module execlp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execlp' to '_execlp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execlp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp _execlp +# endif +_GL_CXXALIAS_MDA (execlp, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv rpl_execv +# endif +_GL_FUNCDECL_RPL (execv, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execv, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#elif defined GNULIB_POSIXCHECK +# undef execv +# if HAVE_RAW_DECL_EXECV +_GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - " + "use gnulib module execv for portability"); +# endif +#elif 1 +/* On native Windows, map 'execv' to '_execv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv _execv +# endif +_GL_CXXALIAS_MDA_CAST (execv, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve rpl_execve +# endif +_GL_FUNCDECL_RPL (execve, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execve, int, + (const char *program, char * const *argv, char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#elif defined GNULIB_POSIXCHECK +# undef execve +# if HAVE_RAW_DECL_EXECVE +_GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - " + "use gnulib module execve for portability"); +# endif +#elif 1 +/* On native Windows, map 'execve' to '_execve', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execve always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve _execve +# endif +_GL_CXXALIAS_MDA_CAST (execve, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp rpl_execvp +# endif +_GL_FUNCDECL_RPL (execvp, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvp, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#elif defined GNULIB_POSIXCHECK +# undef execvp +# if HAVE_RAW_DECL_EXECVP +_GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - " + "use gnulib module execvp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvp' to '_execvp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp _execvp +# endif +_GL_CXXALIAS_MDA_CAST (execvp, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe rpl_execvpe +# endif +_GL_FUNCDECL_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# else +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (execvpe); +# endif +#elif defined GNULIB_POSIXCHECK +# undef execvpe +# if HAVE_RAW_DECL_EXECVPE +_GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - " + "use gnulib module execvpe for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvpe' to '_execvpe', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvpe on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe _execvpe +# endif +_GL_CXXALIAS_MDA_CAST (execvpe, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# elif 1 +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (execvpe); +# endif +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1017,7 +1470,9 @@ _GL_FUNCDECL_SYS (faccessat, int, _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (faccessat); +# endif #elif defined GNULIB_POSIXCHECK # undef faccessat # if HAVE_RAW_DECL_FACCESSAT @@ -1033,23 +1488,28 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification . */ -# if ! 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchdir +# define fchdir rpl_fchdir +# endif +_GL_FUNCDECL_RPL (fchdir, int, (int /*fd*/)); +_GL_CXXALIAS_RPL (fchdir, int, (int /*fd*/)); +# else +# if !1 || !1 _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); - +# endif +_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); +# endif +_GL_CXXALIASWARN (fchdir); +# if 0 || !1 /* Gnulib internal hooks needed to maintain the fchdir metadata. */ _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) _GL_ARG_NONNULL ((2)); _GL_EXTERN_C void _gl_unregister_fd (int fd); _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); _GL_EXTERN_C const char *_gl_directory_name (int fd); - -# else -# if !1 -_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); -# endif # endif -_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); -_GL_CXXALIASWARN (fchdir); #elif defined GNULIB_POSIXCHECK # undef fchdir # if HAVE_RAW_DECL_FCHDIR @@ -1084,7 +1544,7 @@ _GL_CXXALIASWARN (fchownat); # undef fchownat # if HAVE_RAW_DECL_FCHOWNAT _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " - "use gnulib module openat for portability"); + "use gnulib module fchownat for portability"); # endif #endif @@ -1094,11 +1554,22 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification . */ -# if !1 || !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdatasync +# define fdatasync rpl_fdatasync +# endif +_GL_FUNCDECL_RPL (fdatasync, int, (int fd)); +_GL_CXXALIAS_RPL (fdatasync, int, (int fd)); +# else +# if !1|| !1 _GL_FUNCDECL_SYS (fdatasync, int, (int fd)); -# endif +# endif _GL_CXXALIAS_SYS (fdatasync, int, (int fd)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fdatasync); +# endif #elif defined GNULIB_POSIXCHECK # undef fdatasync # if HAVE_RAW_DECL_FDATASYNC @@ -1145,7 +1616,9 @@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); # endif _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ftruncate); +# endif #elif defined GNULIB_POSIXCHECK # undef ftruncate # if HAVE_RAW_DECL_FTRUNCATE @@ -1162,16 +1635,22 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " or SIZE was too small. See the POSIX:2008 specification . - Additionally, the gnulib module 'getcwd' guarantees the following GNU - extension: If BUF is NULL, an array is allocated with 'malloc'; the array - is SIZE bytes long, unless SIZE == 0, in which case it is as big as - necessary. */ + Additionally, the gnulib module 'getcwd' or 'getcwd-lgpl' guarantees the + following GNU extension: If BUF is NULL, an array is allocated with + 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case + it is as big as necessary. */ # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getcwd rpl_getcwd # endif _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +_GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size)); # else /* Need to cast, because on mingw, the second parameter is int size. */ @@ -1184,6 +1663,22 @@ _GL_CXXALIASWARN (getcwd); _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " "use gnulib module getcwd for portability"); # endif +#elif 1 +/* On native Windows, map 'getcwd' to '_getcwd', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getcwd always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +/* Need to cast, because on mingw, the second parameter is either + 'int size' or 'size_t size'. */ +_GL_CXXALIAS_MDA_CAST (getcwd, char *, (char *buf, size_t size)); +# else +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); #endif @@ -1213,7 +1708,9 @@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) # endif _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getdomainname); +# endif #elif defined GNULIB_POSIXCHECK # undef getdomainname # if HAVE_RAW_DECL_GETDOMAINNAME @@ -1253,11 +1750,22 @@ _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " #if 0 /* Fill a buffer with random bytes. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getentropy +# define getentropy rpl_getentropy +# endif +_GL_FUNCDECL_RPL (getentropy, int, (void *buffer, size_t length)); +_GL_CXXALIAS_RPL (getentropy, int, (void *buffer, size_t length)); +# else +# if !1 _GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length)); -# endif +# endif _GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getentropy); +# endif #elif defined GNULIB_POSIXCHECK # undef getentropy # if HAVE_RAW_DECL_GETENTROPY @@ -1391,7 +1899,9 @@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) int size. */ _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getlogin_r); +# endif #elif defined GNULIB_POSIXCHECK # undef getlogin_r # if HAVE_RAW_DECL_GETLOGIN_R @@ -1493,7 +2003,8 @@ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " Read a password from /dev/tty or stdin. Function getpass() from module 'getpass-gnu': Read a password of arbitrary length from /dev/tty or stdin. */ -# if 0 +# if (0 && 0) \ + || (0 && 0) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getpass # define getpass rpl_getpass @@ -1518,6 +2029,23 @@ _GL_WARN_ON_USE (getpass, "getpass is unportable - " #endif +#if 1 +/* On native Windows, map 'getpid' to '_getpid', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getpid always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpid +# define getpid _getpid +# endif +_GL_CXXALIAS_MDA (getpid, int, (void)); +# else +_GL_CXXALIAS_SYS (getpid, pid_t, (void)); +# endif +_GL_CXXALIASWARN (getpid); +#endif + + #if 0 /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ @@ -1588,8 +2116,15 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - " # undef isatty # define isatty rpl_isatty # endif +# define GNULIB_defined_isatty 1 _GL_FUNCDECL_RPL (isatty, int, (int fd)); _GL_CXXALIAS_RPL (isatty, int, (int fd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); # else _GL_CXXALIAS_SYS (isatty, int, (int fd)); # endif @@ -1600,6 +2135,20 @@ _GL_CXXALIASWARN (isatty); _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " "use gnulib module isatty for portability"); # endif +#elif 1 +/* On native Windows, map 'isatty' to '_isatty', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::isatty always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); #endif @@ -1690,7 +2239,9 @@ _GL_CXXALIAS_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (linkat); +# endif #elif defined GNULIB_POSIXCHECK # undef linkat # if HAVE_RAW_DECL_LINKAT @@ -1711,6 +2262,12 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - " # endif _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence)); # else _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); # endif @@ -1721,6 +2278,20 @@ _GL_CXXALIASWARN (lseek); _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " "systems - use gnulib module lseek for portability"); # endif +#elif 1 +/* On native Windows, map 'lseek' to '_lseek', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::lseek always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, long, (int fd, long offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); #endif @@ -1751,8 +2322,9 @@ _GL_WARN_ON_USE (pipe, "pipe is unportable - " Return 0 upon success, or -1 with errno set upon failure. See also the Linux man page at . */ -# if 1 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pipe2 # define pipe2 rpl_pipe2 # endif _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); @@ -1761,7 +2333,9 @@ _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pipe2); +# endif #elif defined GNULIB_POSIXCHECK # undef pipe2 # if HAVE_RAW_DECL_PIPE2 @@ -1796,7 +2370,9 @@ _GL_FUNCDECL_SYS (pread, ssize_t, _GL_CXXALIAS_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pread); +# endif #elif defined GNULIB_POSIXCHECK # undef pread # if HAVE_RAW_DECL_PREAD @@ -1831,7 +2407,9 @@ _GL_FUNCDECL_SYS (pwrite, ssize_t, _GL_CXXALIAS_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pwrite); +# endif #elif defined GNULIB_POSIXCHECK # undef pwrite # if HAVE_RAW_DECL_PWRITE @@ -1853,11 +2431,32 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (read); +#elif 1 +/* On native Windows, map 'read' to '_read', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::read always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count)); +# endif # else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); # endif _GL_CXXALIASWARN (read); #endif @@ -1924,7 +2523,9 @@ _GL_CXXALIAS_SYS (readlinkat, ssize_t, (int fd, char const *restrict file, char *restrict buf, size_t len)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (readlinkat); +# endif #elif defined GNULIB_POSIXCHECK # undef readlinkat # if HAVE_RAW_DECL_READLINKAT @@ -1942,6 +2543,12 @@ _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " # endif _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (rmdir, int, (char const *name)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); # else _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); # endif @@ -1952,6 +2559,20 @@ _GL_CXXALIASWARN (rmdir); _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " "use gnulib module rmdir for portability"); # endif +#elif 1 +/* On native Windows, map 'rmdir' to '_rmdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::rmdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); #endif @@ -1964,15 +2585,27 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " Platforms with no ability to set the hostname return -1 and set errno = ENOSYS. */ -# if !1 || !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sethostname +# define sethostname rpl_sethostname +# endif +_GL_FUNCDECL_RPL (sethostname, int, (const char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (sethostname, int, (const char *name, size_t len)); +# else +# if !1 || !1 _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) _GL_ARG_NONNULL ((1))); -# endif +# endif /* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 and FreeBSD 6.4 the second parameter is int. On Solaris 11 2011-10, the first parameter is not const. */ _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sethostname); +# endif #elif defined GNULIB_POSIXCHECK # undef sethostname # if HAVE_RAW_DECL_SETHOSTNAME @@ -2010,6 +2643,31 @@ _GL_WARN_ON_USE (sleep, "sleep is unportable - " #endif +#if 1 +/* On native Windows, map 'swab' to '_swab', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::swab always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef swab +# define swab _swab +# endif +/* Need to cast, because in old mingw the arguments are + (const char *from, char *to, size_t n). */ +_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n)); +# else +# if defined __hpux /* HP-UX */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n)); +# elif defined __sun && (defined __SunOS_5_10 || defined __XOPEN_OR_POSIX) && !defined _XPG4 /* Solaris */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n)); +# else +_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n)); +# endif +# endif +_GL_CXXALIASWARN (swab); +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -2056,7 +2714,9 @@ _GL_FUNCDECL_SYS (symlinkat, int, _GL_CXXALIAS_SYS (symlinkat, int, (char const *contents, int fd, char const *file)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (symlinkat); +# endif #elif defined GNULIB_POSIXCHECK # undef symlinkat # if HAVE_RAW_DECL_SYMLINKAT @@ -2086,7 +2746,9 @@ _GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) # endif _GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (truncate); +# endif #elif defined GNULIB_POSIXCHECK # undef truncate # if HAVE_RAW_DECL_TRUNCATE @@ -2116,7 +2778,9 @@ _GL_FUNCDECL_SYS (ttyname_r, int, _GL_CXXALIAS_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ttyname_r); +# endif #elif defined GNULIB_POSIXCHECK # undef ttyname_r # if HAVE_RAW_DECL_TTYNAME_R @@ -2134,6 +2798,12 @@ _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " # endif _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unlink, int, (char const *file)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); # else _GL_CXXALIAS_SYS (unlink, int, (char const *file)); # endif @@ -2144,6 +2814,20 @@ _GL_CXXALIASWARN (unlink); _GL_WARN_ON_USE (unlink, "unlink is not portable - " "use gnulib module unlink for portability"); # endif +#elif 1 +/* On native Windows, map 'unlink' to '_unlink', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::unlink always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); #endif @@ -2168,7 +2852,7 @@ _GL_CXXALIASWARN (unlinkat); # undef unlinkat # if HAVE_RAW_DECL_UNLINKAT _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " - "use gnulib module openat for portability"); + "use gnulib module unlinkat for portability"); # endif #endif @@ -2215,11 +2899,32 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - " _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#elif 1 +/* On native Windows, map 'write' to '_write', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::write always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count)); +# endif # else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); # endif _GL_CXXALIASWARN (write); #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unistr.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unistr.h index 7b4d3f108..1ca6c20d5 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unistr.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unistr.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Elementary Unicode string functions. - Copyright (C) 2001-2002, 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2005-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNISTR_H @@ -20,15 +20,15 @@ #include "unitypes.h" -/* Get common macros for C. */ -#include "unused-parameter.h" - /* Get bool. */ #include -/* Get size_t. */ +/* Get size_t, ptrdiff_t. */ #include +/* Get free(). */ +#include + #ifdef __cplusplus extern "C" { #endif @@ -194,7 +194,7 @@ extern int # else static inline int u32_mbtouc_unsafe (ucs4_t *puc, - const uint32_t *s, size_t n _GL_UNUSED_PARAMETER) + const uint32_t *s, _GL_ATTRIBUTE_MAYBE_UNUSED size_t n) { uint32_t c = *s; @@ -260,7 +260,8 @@ extern int u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n); # else static inline int -u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER) +u32_mbtouc (ucs4_t *puc, const uint32_t *s, + _GL_ATTRIBUTE_MAYBE_UNUSED size_t n) { uint32_t c = *s; @@ -306,13 +307,13 @@ extern int #if GNULIB_UNISTR_U8_UCTOMB || HAVE_LIBUNISTRING /* Auxiliary function, also used by u8_chr, u8_strchr, u8_strrchr. */ extern int - u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n); + u8_uctomb_aux (uint8_t *s, ucs4_t uc, ptrdiff_t n); # if !HAVE_INLINE extern int - u8_uctomb (uint8_t *s, ucs4_t uc, int n); + u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u8_uctomb (uint8_t *s, ucs4_t uc, int n) +u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0x80 && n > 0) { @@ -328,13 +329,13 @@ u8_uctomb (uint8_t *s, ucs4_t uc, int n) #if GNULIB_UNISTR_U16_UCTOMB || HAVE_LIBUNISTRING /* Auxiliary function, also used by u16_chr, u16_strchr, u16_strrchr. */ extern int - u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n); + u16_uctomb_aux (uint16_t *s, ucs4_t uc, ptrdiff_t n); # if !HAVE_INLINE extern int - u16_uctomb (uint16_t *s, ucs4_t uc, int n); + u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u16_uctomb (uint16_t *s, ucs4_t uc, int n) +u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0xd800 && n > 0) { @@ -350,10 +351,10 @@ u16_uctomb (uint16_t *s, ucs4_t uc, int n) #if GNULIB_UNISTR_U32_UCTOMB || HAVE_LIBUNISTRING # if !HAVE_INLINE extern int - u32_uctomb (uint32_t *s, ucs4_t uc, int n); + u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u32_uctomb (uint32_t *s, ucs4_t uc, int n) +u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000)) { @@ -380,6 +381,15 @@ extern uint16_t * extern uint32_t * u32_cpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); +/* Copy N units from SRC to DEST, returning pointer after last written unit. */ +/* Similar to mempcpy(). */ +extern uint8_t * + u8_pcpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n); +extern uint16_t * + u16_pcpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n); +extern uint32_t * + u32_pcpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); + /* Copy N units from SRC to DEST, guaranteeing correct behavior for overlapping memory areas. */ /* Similar to memmove(). */ @@ -627,11 +637,14 @@ extern int /* Duplicate S, returning an identical malloc'd string. */ /* Similar to strdup(), wcsdup(). */ extern uint8_t * - u8_strdup (const uint8_t *s); + u8_strdup (const uint8_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; extern uint16_t * - u16_strdup (const uint16_t *s); + u16_strdup (const uint16_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; extern uint32_t * - u32_strdup (const uint32_t *s); + u32_strdup (const uint32_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; /* Find the first occurrence of UC in STR. */ /* Similar to strchr(), wcschr(). */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unitypes.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unitypes.h index b277a0858..cd57d2721 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unitypes.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/unitypes.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Elementary types and macros for the GNU UniString library. - Copyright (C) 2002, 2005-2006, 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNITYPES_H @@ -27,7 +27,7 @@ typedef uint32_t ucs4_t; /* Attribute of a function whose result depends only on the arguments (not pointers!) and which has no side effects. */ #ifndef _UC_ATTRIBUTE_CONST -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__ # define _UC_ATTRIBUTE_CONST __attribute__ ((__const__)) # else # define _UC_ATTRIBUTE_CONST @@ -37,7 +37,7 @@ typedef uint32_t ucs4_t; /* Attribute of a function whose result depends only on the arguments (possibly pointers) and global memory, and which has no side effects. */ #ifndef _UC_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _UC_ATTRIBUTE_PURE @@ -48,7 +48,9 @@ typedef uint32_t ucs4_t; pass a pointer to a different object in the specified pointer argument than in the other pointer arguments. */ #ifndef _UC_RESTRICT -# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) +# if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 # define _UC_RESTRICT __restrict # elif 199901L <= __STDC_VERSION__ || defined restrict # define _UC_RESTRICT restrict diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uniwidth.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uniwidth.h index b28898b54..0ff97ac4f 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uniwidth.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/uniwidth.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Display width functions. - Copyright (C) 2001-2002, 2005, 2007, 2009-2020 Free Software Foundation, + Copyright (C) 2001-2002, 2005, 2007, 2009-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNIWIDTH_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/wchar.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/wchar.h index 8271b5f9b..e946594d4 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/wchar.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/wchar.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake. */ @@ -53,11 +53,7 @@ the latter includes . But here, we have no way to detect whether is completely included or is still being included. */ -#if (_MSC_VER < 1900) -#include "../include/wchar.h" -#else #include "../ucrt/wchar.h" -#endif #else /* Normal invocation convention. */ @@ -70,62 +66,115 @@ # include /* for __GLIBC__ */ #endif -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . - In some builds of uClibc, is nonexistent and wchar_t is defined +/* In some builds of uClibc, is nonexistent and wchar_t is defined by . But avoid namespace pollution on glibc systems. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include #endif -#ifndef __GLIBC__ -# include -# include -#endif /* Include the original if it exists. Some builds of uClibc lack it. */ /* The include_next requires a split double-inclusion guard. */ #if 1 -#if (_MSC_VER < 1900) -# include "../include/wchar.h" -#else # include "../ucrt/wchar.h" #endif -#endif #undef _GL_ALREADY_INCLUDING_WCHAR_H #ifndef _GL_WCHAR_H #define _GL_WCHAR_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ # endif #endif +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -213,6 +262,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -260,6 +315,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -285,6 +350,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -382,7 +455,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -410,9 +483,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -428,26 +501,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -456,19 +529,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -541,13 +614,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -556,27 +636,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -638,6 +724,56 @@ typedef int rpl_mbstate_t; # endif #endif +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif + + +#if 1 +/* Get memset(). */ +# include +#endif + /* Convert a single-byte character to a wide character. */ #if 0 @@ -695,7 +831,7 @@ _GL_WARN_ON_USE (wctob, "wctob is unportable - " #endif -/* Test whether *PS is in the initial state. */ +/* Test whether *PS is in an initial state. */ #if 1 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -722,6 +858,208 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " #endif +/* Put *PS into an initial state. */ +#if 1 +/* ISO C 23 § 7.31.6.(3) says that zeroing an mbstate_t is a way to put the + mbstate_t into an initial state. However, on many platforms an mbstate_t + is large, and it is possible - as an optimization - to get away with zeroing + only part of it. So, instead of + + mbstate_t state = { 0 }; + + or + + mbstate_t state; + memset (&state, 0, sizeof (mbstate_t)); + + we can write this faster code: + + mbstate_t state; + mbszero (&state); + */ +/* _GL_MBSTATE_INIT_SIZE describes how mbsinit() behaves: It is the number of + bytes at the beginning of an mbstate_t that need to be zero, for mbsinit() + to return true. + _GL_MBSTATE_ZERO_SIZE is the number of bytes at the beginning of an mbstate_t + that need to be zero, + - for mbsinit() to return true, and + - for all other multibyte-aware functions to operate properly. + 0 < _GL_MBSTATE_INIT_SIZE <= _GL_MBSTATE_ZERO_SIZE <= sizeof (mbstate_t). + These values are determined by source code inspection, where possible, and + by running the gnulib unit tests. + We need _GL_MBSTATE_INIT_SIZE because if we define _GL_MBSTATE_ZERO_SIZE + without considering what mbsinit() does, we get test failures such as + assertion "mbsinit (&iter->state)" failed + */ +# if GNULIB_defined_mbstate_t /* AIX, IRIX */ +/* mbstate_t has at least 4 bytes. They are used as coded in + gnulib/lib/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 1 +/* define _GL_MBSTATE_ZERO_SIZE 4 + does not work: it causes test failures. + So, use the safe fallback value, below. */ +# elif __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 /* glibc */ +/* mbstate_t is defined in . + For more details, see glibc/iconv/skeleton.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (((mbstate_t) {0}).__count) */ +# define _GL_MBSTATE_ZERO_SIZE /* 8 */ sizeof (mbstate_t) +# elif defined MUSL_LIBC /* musl libc */ +/* mbstate_t is defined in . + It is an opaque aligned 8-byte struct, of which at most the first + 4 bytes are used. + For more details, see src/multibyte/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (unsigned) */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __APPLE__ && defined __MACH__ /* macOS */ +/* On macOS, mbstate_t is defined in . + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + Libc-/locale/FreeBSD/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8,utf2}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 10 + utf2.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __FreeBSD__ /* FreeBSD */ +/* On FreeBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + src/lib/libc/locale/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __NetBSD__ /* NetBSD */ +/* On NetBSD, mbstate_t is defined in src/sys/sys/ansi.h. + It is an opaque aligned 128-byte struct, of which at most the first + 28 bytes are used. + For more details, see the *State types in + src/lib/libc/citrus/modules/citrus_*.c + (ignoring citrus_{hz,iso2022,utf7,viqr,zw}.c, since these implement + stateful encodings, not usable as locale encodings). */ +/* File ZERO_SIZE + citrus/citrus_none.c 0 + citrus/modules/citrus_euc.c 8 + citrus/modules/citrus_euctw.c 8 + citrus/modules/citrus_mskanji.c 8 + citrus/modules/citrus_big5.c 8 + citrus/modules/citrus_gbk2k.c 8 + citrus/modules/citrus_dechanyu.c 8 + citrus/modules/citrus_johab.c 6 + citrus/modules/citrus_utf8.c 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 28. */ +# define _GL_MBSTATE_ZERO_SIZE 28 +# elif defined __OpenBSD__ /* OpenBSD */ +/* On OpenBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see src/lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 + citrus_utf8.c 12 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __minix /* Minix */ +/* On Minix, mbstate_t is defined in sys/sys/ansi.h. + It is an opaque aligned 128-byte struct. + For more details, see the *State types in + lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 */ +/* But 1 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 4. */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __sun /* Solaris */ +/* On Solaris, mbstate_t is defined in . + It is an opaque aligned 24-byte or 32-byte struct, of which at most the first + 20 or 28 bytes are used. + For more details on OpenSolaris derivatives, see the *State types in + illumos-gate/usr/src/lib/libc/port/locale/ + {none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 12 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures + - in OpenIndiana and OmniOS: for values < 16, + - in Solaris 10 and 11: for values < 20 (in 32-bit mode) + or < 28 (in 64-bit mode). + Since we don't have a good way to distinguish the OpenSolaris derivatives + from the proprietary Solaris versions, and can't inspect the Solaris source + code, use the safe fallback values, below. */ +# elif defined __CYGWIN__ /* Cygwin */ +/* On Cygwin, mbstate_t is defined in . + For more details, see newlib/libc/stdlib/mbtowc_r.c and + winsup/cygwin/strfuncs.cc. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (int) */ +# define _GL_MBSTATE_ZERO_SIZE 8 +# elif defined _WIN32 && !defined __CYGWIN__ /* Native Windows. */ +/* MSVC defines 'mbstate_t' as an aligned 8-byte struct. + On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined + as an aligned 8-byte struct, of which the first 4 bytes matter. + Use the safe values, below. */ +# elif defined __ANDROID__ /* Android */ +/* Android defines 'mbstate_t' in . + It is an opaque 4-byte or 8-byte struct. + For more details, see + bionic/libc/private/bionic_mbstate.h + bionic/libc/bionic/mbrtoc32.cpp + bionic/libc/bionic/mbrtoc16.cpp + */ +# define _GL_MBSTATE_INIT_SIZE 4 +# define _GL_MBSTATE_ZERO_SIZE 4 +# endif +/* Use safe values as defaults. */ +# ifndef _GL_MBSTATE_INIT_SIZE +# define _GL_MBSTATE_INIT_SIZE sizeof (mbstate_t) +# endif +# ifndef _GL_MBSTATE_ZERO_SIZE +# define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t) +# endif +_GL_BEGIN_C_LINKAGE +# if defined IN_MBSZERO +_GL_EXTERN_INLINE +# else +_GL_INLINE +# endif +_GL_ARG_NONNULL ((1)) void +mbszero (mbstate_t *ps) +{ + memset (ps, 0, _GL_MBSTATE_ZERO_SIZE); +} +_GL_END_C_LINKAGE +_GL_CXXALIAS_SYS (mbszero, void, (mbstate_t *ps)); +_GL_CXXALIASWARN (mbszero); +#endif + + /* Convert a multibyte character to a wide character. */ #if 1 # if 1 @@ -858,7 +1196,9 @@ _GL_CXXALIAS_SYS (mbsnrtowcs, size_t, const char **restrict srcp, size_t srclen, size_t len, mbstate_t *restrict ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbsnrtowcs); +# endif #elif defined GNULIB_POSIXCHECK # undef mbsnrtowcs # if HAVE_RAW_DECL_MBSNRTOWCS @@ -1046,13 +1386,25 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " /* Compare N wide characters of S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmemcmp +# define wmemcmp rpl_wmemcmp +# endif +_GL_FUNCDECL_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 _GL_FUNCDECL_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmemcmp); # endif @@ -1111,14 +1463,27 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " /* Copy N wide characters of SRC to DEST. Return pointer to wide characters after the last written wide character. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmempcpy +# define wmempcpy rpl_wmempcpy +# endif +_GL_FUNCDECL_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +_GL_CXXALIAS_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# else +# if !1 _GL_FUNCDECL_SYS (wmempcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); -# endif +# endif _GL_CXXALIAS_SYS (wmempcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmempcpy); # endif @@ -1169,7 +1534,10 @@ _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " /* Return the number of wide characters in S, but at most MAXLEN. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) _GL_ATTRIBUTE_PURE); # endif @@ -1206,7 +1574,10 @@ _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src)); # endif @@ -1247,7 +1618,10 @@ _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcpncpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); @@ -1309,11 +1683,21 @@ _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " /* Compare S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcscmp +# define wcscmp rpl_wcscmp +# endif +_GL_FUNCDECL_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# else +# if !1 _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcscmp); # endif @@ -1328,13 +1712,25 @@ _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " /* Compare no more than N wide characters of S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsncmp +# define wcsncmp rpl_wcsncmp +# endif +_GL_FUNCDECL_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 _GL_FUNCDECL_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsncmp); # endif @@ -1349,7 +1745,10 @@ _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " /* Compare S1 and S2, ignoring case. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) _GL_ATTRIBUTE_PURE); # endif @@ -1366,7 +1765,10 @@ _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " /* Compare no more than N chars of S1 and S2, ignoring case. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcsncasecmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); @@ -1426,16 +1828,79 @@ _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " /* Duplicate S, returning an identical malloc'd string. */ #if 0 -# if !1 -_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s)); -# endif +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif _GL_CXXALIASWARN (wcsdup); -#elif defined GNULIB_POSIXCHECK -# undef wcsdup -# if HAVE_RAW_DECL_WCSDUP +#else +# if __GNUC__ >= 11 && !defined wcsdup +/* For -Wmismatched-dealloc: Associate wcsdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef wcsdup +# if HAVE_RAW_DECL_WCSDUP _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " "use gnulib module wcsdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'wcsdup' to '_wcsdup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::wcsdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# if 1 +_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (wcsdup); +# endif # endif #endif @@ -1500,7 +1965,7 @@ _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " #endif -/* Return the length of the initial segmet of WCS which consists entirely +/* Return the length of the initial segment of WCS which consists entirely of wide characters not in REJECT. */ #if 0 # if !1 @@ -1520,7 +1985,7 @@ _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " #endif -/* Return the length of the initial segmet of WCS which consists entirely +/* Return the length of the initial segment of WCS which consists entirely of wide characters in ACCEPT. */ #if 0 # if !1 @@ -1575,12 +2040,25 @@ _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " /* Find the first occurrence of NEEDLE in HAYSTACK. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsstr +# define wcsstr rpl_wcsstr +# endif +_GL_FUNCDECL_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle)); +# else +# if !1 _GL_FUNCDECL_SYS (wcsstr, wchar_t *, (const wchar_t *restrict haystack, const wchar_t *restrict needle) _GL_ATTRIBUTE_PURE); -# endif +# endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); @@ -1591,6 +2069,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcsstr, (const wchar_t *restrict, const wchar_t *restrict), const wchar_t *, (const wchar_t *restrict, const wchar_t *restrict)); +# endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcsstr, wchar_t *, @@ -1718,6 +2197,24 @@ _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " #endif +#if 0 && (defined _WIN32 && !defined __CYGWIN__) +/* Gets the name of the current working directory. + (a) If BUF is non-NULL, it is assumed to have room for SIZE wide characters. + This function stores the working directory (NUL-terminated) in BUF and + returns BUF. + (b) If BUF is NULL, an array is allocated with 'malloc'. The array is SIZE + wide characters long, unless SIZE == 0, in which case it is as big as + necessary. + If the directory couldn't be determined or SIZE was too small, this function + returns NULL and sets errno. For a directory of length LEN, SIZE should be + >= LEN + 3 in case (a) or >= LEN + 1 in case (b). + Possible errno values include: + - ERANGE if SIZE is too small. + - ENOMEM if the memory could no be allocated. */ +_GL_FUNCDECL_SYS (wgetcwd, wchar_t *, (wchar_t *buf, size_t size)); +#endif + + #endif /* _GL_WCHAR_H */ #endif /* _GL_WCHAR_H */ #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/wctype.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/wctype.h index da004863f..9421920c4 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/wctype.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/gnulib-lib/wctype.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 , for platforms that lack it. - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Bruno Haible and Paul Eggert. */ @@ -38,26 +38,21 @@ is being processed, which doesn't include the idempotency guard. */ -#if (_MSC_VER < 1900) -#include "../include/wctype.h" -#else #include "../ucrt/wctype.h" -#endif #else /* Normal invocation convention. */ #ifndef _GL_WCTYPE_H +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if 1 -/* Solaris 2.5 has a bug: must be included before . - Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include +/* Solaris 2.5 has a bug: must be included before . */ # include #endif @@ -74,19 +69,12 @@ BeOS 5 has the functions but no . */ /* The include_next requires a split double-inclusion guard. */ #if 1 -#if (_MSC_VER < 1900) -# include "../include/wctype.h" -#else # include "../ucrt/wctype.h" #endif -#endif #ifndef _GL_WCTYPE_H #define _GL_WCTYPE_H -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_WCTYPE_INLINE # define _GL_WCTYPE_INLINE _GL_INLINE @@ -94,19 +82,19 @@ _GL_INLINE_HEADER_BEGIN /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -194,6 +182,12 @@ _GL_INLINE_HEADER_BEGIN Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -241,6 +235,16 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -266,6 +270,14 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -363,7 +375,7 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -391,9 +403,9 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -407,21 +419,49 @@ _GL_INLINE_HEADER_BEGIN #endif /* _GL_CXXDEFS_H */ +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -494,13 +534,20 @@ _GL_INLINE_HEADER_BEGIN # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -509,27 +556,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -592,7 +645,8 @@ typedef unsigned int rpl_wint_t; /* FreeBSD 4.4 to 4.11 has but lacks the functions. Linux libc5 has and the functions but they are broken. mingw and MSVC have and the functions but they take a wchar_t - as argument, not an rpl_wint_t. + as argument, not an rpl_wint_t. Additionally, the mingw iswprint function + and the Android iswpunct function are broken. Assume all 11 functions (all isw* except iswblank) are implemented the same way, or not at all. */ # if ! 1 || 1 @@ -644,7 +698,11 @@ rpl_iswlower (wint_t wc) _GL_WCTYPE_INLINE int rpl_iswprint (wint_t wc) { +# ifdef __MINGW32__ + return ((wchar_t) wc == wc ? wc == ' ' || iswgraph ((wchar_t) wc) : 0); +# else return ((wchar_t) wc == wc ? iswprint ((wchar_t) wc) : 0); +# endif } _GL_WCTYPE_INLINE int @@ -927,7 +985,7 @@ towupper # else /* Only some of the functions are missing or broken. */ -# if 1 && (_MSC_VER < 1800) +# if 1 && (! 1 || 0) /* Only the iswblank function is missing. */ # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -949,6 +1007,16 @@ _GL_FUNCDECL_RPL (iswdigit, int, (wint_t wc)); # endif # endif +# if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef iswpunct +# define iswpunct rpl_iswpunct +# endif +_GL_FUNCDECL_RPL (iswpunct, int, (wint_t wc)); +# endif +# endif + # if 1 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1088,14 +1156,32 @@ _GL_CXXALIASWARN (iswblank); typedef void * wctype_t; # define GNULIB_defined_wctype_t 1 # endif +#elif 0 +# if !GNULIB_defined_wctype_t +typedef void *rpl_wctype_t; +# undef wctype_t +# define wctype_t rpl_wctype_t +# define GNULIB_defined_wctype_t 1 +# endif #endif /* Get a descriptor for a wide character property. */ #if 0 -# if !1 -_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)); -# endif +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctype +# define wctype rpl_wctype +# endif +_GL_FUNCDECL_RPL (wctype, wctype_t, (const char *name) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (wctype, wctype_t, (const char *name)); +# else +# if !1 +_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wctype); # endif @@ -1111,7 +1197,7 @@ _GL_WARN_ON_USE (wctype, "wctype is unportable - " The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctype() function. */ #if 0 -# if 1 +# if 1 || 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef iswctype # define iswctype rpl_iswctype @@ -1152,14 +1238,32 @@ _GL_CXXALIASWARN (towupper); typedef void * wctrans_t; # define GNULIB_defined_wctrans_t 1 # endif +#elif 0 +# if !GNULIB_defined_wctrans_t +typedef void *rpl_wctrans_t; +# undef wctrans_t +# define wctrans_t rpl_wctrans_t +# define GNULIB_defined_wctrans_t 1 +# endif #endif /* Get a descriptor for a wide character case conversion. */ #if 0 -# if !1 -_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)); -# endif +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctrans +# define wctrans rpl_wctrans +# endif +_GL_FUNCDECL_RPL (wctrans, wctrans_t, (const char *name) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (wctrans, wctrans_t, (const char *name)); +# else +# if !1 +_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wctrans); # endif @@ -1175,10 +1279,19 @@ _GL_WARN_ON_USE (wctrans, "wctrans is unportable - " The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctrans() function. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef towctrans +# define towctrans rpl_towctrans +# endif +_GL_FUNCDECL_RPL (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +_GL_CXXALIAS_RPL (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +# else +# if !1 _GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); -# endif +# endif _GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (towctrans); # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/config.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/config.h new file mode 100644 index 000000000..134f86d55 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/config.h @@ -0,0 +1,2006 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Witness that has been included. */ +#define _GL_CONFIG_H_INCLUDED 1 + + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to the number of bits in type 'ptrdiff_t'. */ +/* #undef BITSIZEOF_PTRDIFF_T */ + +/* Define to the number of bits in type 'sig_atomic_t'. */ +/* #undef BITSIZEOF_SIG_ATOMIC_T */ + +/* Define to the number of bits in type 'size_t'. */ +/* #undef BITSIZEOF_SIZE_T */ + +/* Define to the number of bits in type 'wchar_t'. */ +/* #undef BITSIZEOF_WCHAR_T */ + +/* Define to the number of bits in type 'wint_t'. */ +/* #undef BITSIZEOF_WINT_T */ + +/* Define if you wish *printf() functions that have a safe handling of + non-IEEE-754 'long double' values. */ +#define CHECK_PRINTF_SAFE 1 + +/* Define to 1 if using 'alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'double'. */ +#define DBL_EXPBIT0_BIT 20 + +/* Define as the word index where to find the exponent of 'double'. */ +#define DBL_EXPBIT0_WORD 1 + +/* Define as the bit index in the word where to find the sign of 'double'. */ +/* #undef DBL_SIGNBIT_BIT */ + +/* Define as the word index where to find the sign of 'double'. */ +/* #undef DBL_SIGNBIT_WORD */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Define to 1 if the package shall run at any location in the file system. */ +#define ENABLE_RELOCATABLE 1 + +/* Define to nothing if C supports flexible array members, and to 1 if it does + not. That way, with a declaration like 'struct s { int n; short + d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 + compilers. Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate + the size in bytes of such a struct containing an N-element array. */ +#define FLEXIBLE_ARRAY_MEMBER /**/ + +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'float'. */ +#define FLT_EXPBIT0_BIT 23 + +/* Define as the word index where to find the exponent of 'float'. */ +#define FLT_EXPBIT0_WORD 0 + +/* Define as the bit index in the word where to find the sign of 'float'. */ +/* #undef FLT_SIGNBIT_BIT */ + +/* Define as the word index where to find the sign of 'float'. */ +/* #undef FLT_SIGNBIT_WORD */ + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fscanf shall be considered present. */ +#define GNULIB_FSCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module lock shall be considered present. */ +#define GNULIB_LOCK 1 + +/* Define to 1 if printf and friends should be labeled with attribute + "__gnu_printf__" instead of "__printf__" */ +/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ +#define GNULIB_SCANF 1 + +/* Define to 1 when the gnulib module fgetc should be tested. */ +#define GNULIB_TEST_FGETC 1 + +/* Define to 1 when the gnulib module fgets should be tested. */ +#define GNULIB_TEST_FGETS 1 + +/* Define to 1 when the gnulib module fprintf should be tested. */ +#define GNULIB_TEST_FPRINTF 1 + +/* Define to 1 when the gnulib module fputc should be tested. */ +#define GNULIB_TEST_FPUTC 1 + +/* Define to 1 when the gnulib module fputs should be tested. */ +#define GNULIB_TEST_FPUTS 1 + +/* Define to 1 when the gnulib module fread should be tested. */ +#define GNULIB_TEST_FREAD 1 + +/* Define to 1 when the gnulib module free-posix should be tested. */ +#define GNULIB_TEST_FREE_POSIX 1 + +/* Define to 1 when the gnulib module frexp should be tested. */ +#define GNULIB_TEST_FREXP 1 + +/* Define to 1 when the gnulib module frexpl should be tested. */ +#define GNULIB_TEST_FREXPL 1 + +/* Define to 1 when the gnulib module fscanf should be tested. */ +#define GNULIB_TEST_FSCANF 1 + +/* Define to 1 when the gnulib module fwrite should be tested. */ +#define GNULIB_TEST_FWRITE 1 + +/* Define to 1 when the gnulib module getc should be tested. */ +#define GNULIB_TEST_GETC 1 + +/* Define to 1 when the gnulib module getchar should be tested. */ +#define GNULIB_TEST_GETCHAR 1 + +/* Define to 1 when the gnulib module localename should be tested. */ +#define GNULIB_TEST_LOCALENAME 1 + +/* Define to 1 when the gnulib module mbrtowc should be tested. */ +#define GNULIB_TEST_MBRTOWC 1 + +/* Define to 1 when the gnulib module mbsinit should be tested. */ +#define GNULIB_TEST_MBSINIT 1 + +/* Define to 1 when the gnulib module mbszero should be tested. */ +#define GNULIB_TEST_MBSZERO 1 + +/* Define to 1 when the gnulib module memchr should be tested. */ +#define GNULIB_TEST_MEMCHR 1 + +/* Define to 1 when the gnulib module printf should be tested. */ +#define GNULIB_TEST_PRINTF 1 + +/* Define to 1 when the gnulib module putc should be tested. */ +#define GNULIB_TEST_PUTC 1 + +/* Define to 1 when the gnulib module putchar should be tested. */ +#define GNULIB_TEST_PUTCHAR 1 + +/* Define to 1 when the gnulib module puts should be tested. */ +#define GNULIB_TEST_PUTS 1 + +/* Define to 1 when the gnulib module scanf should be tested. */ +#define GNULIB_TEST_SCANF 1 + +/* Define to 1 when the gnulib module setlocale_null should be tested. */ +#define GNULIB_TEST_SETLOCALE_NULL 1 + +/* Define to 1 when the gnulib module signbit should be tested. */ +#define GNULIB_TEST_SIGNBIT 1 + +/* Define to 1 when the gnulib module tsearch should be tested. */ +#define GNULIB_TEST_TSEARCH 1 + +/* Define to 1 when the gnulib module vfprintf should be tested. */ +#define GNULIB_TEST_VFPRINTF 1 + +/* Define to 1 when the gnulib module vprintf should be tested. */ +#define GNULIB_TEST_VPRINTF 1 + +/* Define to 1 when the gnulib module wmemcpy should be tested. */ +#define GNULIB_TEST_WMEMCPY 1 + +/* Define to 1 when the gnulib module wmemset should be tested. */ +#define GNULIB_TEST_WMEMSET 1 + +/* Define to 1 if you have 'alloca' after including , a header that + may be supplied by this distribution. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if works. */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the `asprintf' function. */ +/* #undef HAVE_ASPRINTF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BP_SYM_H */ + +/* Define to 1 if the compiler understands __builtin_expect. */ +/* #undef HAVE_BUILTIN_EXPECT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define if the copysignf function is declared in and available in + libc. */ +/* #undef HAVE_COPYSIGNF_IN_LIBC */ + +/* Define if the copysignl function is declared in and available in + libc. */ +/* #undef HAVE_COPYSIGNL_IN_LIBC */ + +/* Define if the copysign function is declared in and available in + libc. */ +/* #undef HAVE_COPYSIGN_IN_LIBC */ + +/* Define to 1 if you have the header file. */ +#define HAVE_CRTDEFS_H 1 + +/* Define to 1 if bool, true and false work as per C2023. */ +/* #undef HAVE_C_BOOL */ + +/* Define to 1 if the static_assert keyword works. */ +#if (_MSC_VER >= 1931) +# define HAVE_C_STATIC_ASSERT 1 +#endif + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. + */ +#define HAVE_DECL_ALARM 0 + +/* Define to 1 if you have the declaration of `copysign', and to 0 if you + don't. */ +/* #undef HAVE_DECL_COPYSIGN */ + +/* Define to 1 if you have the declaration of `copysignf', and to 0 if you + don't. */ +/* #undef HAVE_DECL_COPYSIGNF */ + +/* Define to 1 if you have the declaration of `copysignl', and to 0 if you + don't. */ +/* #undef HAVE_DECL_COPYSIGNL */ + +/* Define to 1 if you have the declaration of `ecvt', and to 0 if you don't. + */ +#define HAVE_DECL_ECVT 1 + +/* Define to 1 if you have the declaration of `execvpe', and to 0 if you + don't. */ +#define HAVE_DECL_EXECVPE 0 + +/* Define to 1 if you have the declaration of `fcloseall', and to 0 if you + don't. */ +#define HAVE_DECL_FCLOSEALL 1 + +/* Define to 1 if you have the declaration of `fcvt', and to 0 if you don't. + */ +#define HAVE_DECL_FCVT 1 + +/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_FEOF_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FGETS_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `gcvt', and to 0 if you don't. + */ +#define HAVE_DECL_GCVT 1 + +/* Define to 1 if you have the declaration of `getw', and to 0 if you don't. + */ +#define HAVE_DECL_GETW 1 + +/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you + don't. */ +/* #undef HAVE_DECL_MBRTOWC */ + +/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you + don't. */ +#define HAVE_DECL_MBSINIT 1 + +/* Define to 1 if you have the declaration of `putw', and to 0 if you don't. + */ +#define HAVE_DECL_PUTW 1 + +/* Define to 1 if you have the declaration of `wcsdup', and to 0 if you don't. + */ +#define HAVE_DECL_WCSDUP 1 + +/* Define to 1 if you have the declaration of `wcsnlen', and to 0 if you + don't. */ +#define HAVE_DECL_WCSNLEN 1 + +/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNPRINTF 1 + +/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNWPRINTF 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the `duplocale' function. */ +/* #undef HAVE_DUPLOCALE */ + +/* Define if the locale_t type contains insufficient information, as on + OpenBSD. */ +/* #undef HAVE_FAKE_LOCALES */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FEATURES_H */ + +/* Define to 1 if you have the `freelocale' function. */ +/* #undef HAVE_FREELOCALE */ + +/* Define if the 'free' function is guaranteed to preserve errno. */ +/* #undef HAVE_FREE_POSIX */ + +/* Define if the frexpl function is available in libc. */ +#define HAVE_FREXPL_IN_LIBC 1 + +/* Define if the frexp function is available in libc. */ +#define HAVE_FREXP_IN_LIBC 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getegid' function. */ +/* #undef HAVE_GETEGID */ + +/* Define to 1 if you have the `geteuid' function. */ +/* #undef HAVE_GETEUID */ + +/* Define to 1 if you have the `getgid' function. */ +/* #undef HAVE_GETGID */ + +/* Define to 1 if you have the `getlocalename_l' function. */ +/* #undef HAVE_GETLOCALENAME_L */ + +/* Define to 1 if you have the `getpagesize' function. */ +/* #undef HAVE_GETPAGESIZE */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the `getuid' function. */ +/* #undef HAVE_GETUID */ + +/* Define if the uselocale exists, may be safely called, and returns + sufficient information. */ +/* #undef HAVE_GOOD_USELOCALE */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* Define if you have the 'intmax_t' type in or . */ +#define HAVE_INTMAX_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if exists, doesn't clash with , and + declares uintmax_t. */ +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 + +/* Define if the isnan(double) function is available in libc. */ +#define HAVE_ISNAND_IN_LIBC 1 + +/* Define if the isnan(float) function is available in libc. */ +/* #undef HAVE_ISNANF_IN_LIBC */ + +/* Define if the isnan(long double) function is available in libc. */ +/* #undef HAVE_ISNANL_IN_LIBC */ + +/* Define if you have and nl_langinfo(CODESET). */ +/* #undef HAVE_LANGINFO_CODESET */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LANGINFO_H */ + +/* Define if your file defines LC_MESSAGES. */ +/* #undef HAVE_LC_MESSAGES */ + +/* Define if the ldexpl function is available in libc. */ +#define HAVE_LDEXPL_IN_LIBC 1 + +/* Define if the ldexp function is available in libc. */ +#define HAVE_LDEXP_IN_LIBC 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type 'long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including + config.h and . */ +/* #undef HAVE_MAP_ANONYMOUS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MATH_H 1 + +/* Define to 1 if you have the `mbrtowc' function. */ +#define HAVE_MBRTOWC 1 + +/* Define to 1 if you have the `mbsinit' function. */ +/* #undef HAVE_MBSINIT */ + +/* Define to 1 if declares mbstate_t. */ +#define HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the `mempcpy' function. */ +/* #undef HAVE_MEMPCPY */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have a working `mmap' system call. */ +/* #undef HAVE_MMAP */ + +/* Define to 1 if you have the `mprotect' function. */ +/* #undef HAVE_MPROTECT */ + +/* Define to 1 if you have the `munmap' function. */ +/* #undef HAVE_MUNMAP */ + +/* Define if the locale_t type does not contain the name of each locale + category. */ +/* #undef HAVE_NAMELESS_LOCALES */ + +/* Define to 1 if you have the `newlocale' function. */ +/* #undef HAVE_NEWLOCALE */ + +/* Define to 1 if you have the `nl_langinfo' function. */ +/* #undef HAVE_NL_LANGINFO */ + +/* Define if your printf() function supports format strings with positions. */ +/* #undef HAVE_POSIX_PRINTF */ + +/* Define if you have the header and the POSIX threads API. */ +/* #undef HAVE_PTHREAD_API */ + +/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ +/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ + +/* Define if the POSIX multithreading library has read/write locks. */ +/* #undef HAVE_PTHREAD_RWLOCK */ + +/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a + reader. */ +/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ + +/* Define to 1 if 'long double' and 'double' have the same representation. */ +#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SEARCH_H 1 + +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WCHAR_T */ + +/* Define to 1 if 'wint_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WINT_T */ + +/* Define to 1 if you have the `snprintf' function. */ +/* #undef HAVE_SNPRINTF */ + +/* Define if the return value of the snprintf function is the number of of + bytes (excluding the terminating NUL) that would have been produced if the + buffer had been large enough. */ +#define HAVE_SNPRINTF_RETVAL_C99 1 + +/* Define if the string produced by the snprintf function is always NUL + terminated. */ +#define HAVE_SNPRINTF_TRUNCATION_C99 1 + +/* Define if the locale_t type is as on Solaris 11.4. */ +/* #undef HAVE_SOLARIS114_LOCALES */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define if exists, doesn't clash with , and declares + uintmax_t. */ +#define HAVE_STDINT_H_WITH_UINTMAX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stpcpy' function. */ +/* #undef HAVE_STPCPY */ + +/* Define to 1 if you have the `strcasecmp' function. */ +/* #undef HAVE_STRCASECMP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRINGS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the `swprintf' function. */ +/* #undef HAVE_SWPRINTF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MMAN_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SINGLE_THREADED_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the `thrd_create' function. */ +/* #undef HAVE_THRD_CREATE */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_THREADS_H */ + +/* Define to 1 if you have the `tsearch' function. */ +/* #undef HAVE_TSEARCH */ + +/* Define to 1 if you have the `twalk' function. */ +/* #undef HAVE_TWALK */ + +/* Define if you have the 'uintmax_t' type in or . */ +#define HAVE_UINTMAX_T 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTD_H */ + +/* Define to 1 if the system has the type `unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define to 1 if you have the `uselocale' function. */ +/* #undef HAVE_USELOCALE */ + +/* Define to 1 if you have the `vasnprintf' function. */ +/* #undef HAVE_VASNPRINTF */ + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +#define HAVE_VISIBILITY 0 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the `wcrtomb' function. */ +#define HAVE_WCRTOMB 1 + +/* Define to 1 if you have the `wcslen' function. */ +#define HAVE_WCSLEN 1 + +/* Define to 1 if you have the `wcsnlen' function. */ +#define HAVE_WCSNLEN 1 + +/* Define to 1 if the compiler and linker support weak declarations of + symbols. */ +/* #undef HAVE_WEAK_SYMBOLS */ + +/* Define if you have the 'wint_t' type. */ +#define HAVE_WINT_T 1 + +/* Define if the swprintf function works correctly when it produces output + that contains null wide characters. */ +#define HAVE_WORKING_SWPRINTF 1 + +/* Define if the uselocale function exists and may safely be called. */ +/* #undef HAVE_WORKING_USELOCALE */ + +/* Define to 1 if you have the `wprintf' function. */ +/* #undef HAVE_WPRINTF */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_XLOCALE_H */ + +/* Define to 1 if you have the `__fsetlocking' function. */ +/* #undef HAVE___FSETLOCKING */ + +/* Define to 1 if ctype.h defines __header_inline. */ +/* #undef HAVE___HEADER_INLINE */ + +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Oracle Developer Studio 12.6 + (Sun C 5.15 SunOS_sparc 2017/05/30). + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: + + OS X 10.8 and earlier; see: + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log + + FreeBSD; see: + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. + + GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. It defines a macro + __GNUC_STDC_INLINE__ to indicate this situation or a macro + __GNUC_GNU_INLINE__ to indicate the opposite situation. + GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline + semantics but warns, unless -fgnu89-inline is used: + warning: C99 inline functions are not supported; using GNU89 + warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute + It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. + */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined HAVE___HEADER_INLINE \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? (defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + && !defined __PCC__) \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined __PCC__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE _GL_UNUSED static +# define _GL_EXTERN_INLINE _GL_UNUSED static +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* Define to the value of ${prefix}, as a string. */ +#define INSTALLPREFIX "c:/vs14.0" + +/* Define if integer division by zero raises signal SIGFPE. */ +#define INTDIV0_RAISES_SIGFPE 0 + +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'long double'. */ +#define LDBL_EXPBIT0_BIT 20 + +/* Define as the word index where to find the exponent of 'long double'. */ +#define LDBL_EXPBIT0_WORD 1 + +/* Define as the bit index in the word where to find the sign of 'long + double'. */ +/* #undef LDBL_SIGNBIT_BIT */ + +/* Define as the word index where to find the sign of 'long double'. */ +/* #undef LDBL_SIGNBIT_WORD */ + +/* Define if localename.c overrides newlocale(), duplocale(), freelocale(). */ +/* #undef LOCALENAME_ENHANCE_LOCALE_FUNCS */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ +/* #undef MAP_ANONYMOUS */ + +/* Define if the mbrtowc function does not return (size_t) -2 for empty input. + */ +#define MBRTOWC_EMPTY_INPUT_BUG 1 + +/* Define if the mbrtowc function may signal encoding errors in the C locale. + */ +/* #undef MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ */ + +/* Define if the mbrtowc function has the NULL pwc argument bug. */ +/* #undef MBRTOWC_NULL_ARG1_BUG */ + +/* Define if the mbrtowc function has the NULL string argument bug. */ +/* #undef MBRTOWC_NULL_ARG2_BUG */ + +/* Define if the mbrtowc function does not return 0 for a NUL character. */ +/* #undef MBRTOWC_NUL_RETVAL_BUG */ + +/* Define if the mbrtowc function returns a wrong return value. */ +#define MBRTOWC_RETVAL_BUG 1 + +/* Define if the mbrtowc function stores a wide character when reporting + incomplete input. */ +#define MBRTOWC_STORES_INCOMPLETE_BUG 1 + +/* Use GNU style printf and scanf. */ +#ifndef __USE_MINGW_ANSI_STDIO +# define __USE_MINGW_ANSI_STDIO 1 +#endif + + +/* Define to 1 on musl libc. */ +/* #undef MUSL_LIBC */ + +/* Define if the vasnprintf implementation needs special code for the 'a' and + 'A' directives. */ +#define NEED_PRINTF_DIRECTIVE_A 1 + +/* Define if the vasnprintf implementation needs special code for the 'b' + directive. */ +#define NEED_PRINTF_DIRECTIVE_B 1 + +/* Define if the vasnprintf implementation needs special code for the 'F' + directive. */ +/* #undef NEED_PRINTF_DIRECTIVE_F */ + +/* Define if the vasnprintf implementation needs special code for the 'lc' + directive. */ +#define NEED_PRINTF_DIRECTIVE_LC 1 + +/* Define if the vasnprintf implementation needs special code for the 'ls' + directive. */ +/* #undef NEED_PRINTF_DIRECTIVE_LS */ + +/* Define if the vasnprintf implementation needs special code for 'double' + arguments. */ +#define NEED_PRINTF_DOUBLE 1 + +/* Define if the vasnprintf implementation needs special code for surviving + out-of-memory conditions. */ +#define NEED_PRINTF_ENOMEM 1 + +/* Define if the vasnprintf implementation needs special code for the # flag + with a zero precision and a zero value in the 'x' and 'X' directives. */ +/* #undef NEED_PRINTF_FLAG_ALT_PRECISION_ZERO */ + +/* Define if the vasnprintf implementation needs special code for the ' flag. + */ +#define NEED_PRINTF_FLAG_GROUPING 1 + +/* Define if the vasnprintf implementation needs special code for the '-' + flag. */ +/* #undef NEED_PRINTF_FLAG_LEFTADJUST */ + +/* Define if the vasnprintf implementation needs special code for the 0 flag. + */ +/* #undef NEED_PRINTF_FLAG_ZERO */ + +/* Define if the vasnprintf implementation needs special code for infinite + 'double' arguments. */ +/* #undef NEED_PRINTF_INFINITE_DOUBLE */ + +/* Define if the vasnprintf implementation needs special code for infinite + 'long double' arguments. */ +/* #undef NEED_PRINTF_INFINITE_LONG_DOUBLE */ + +/* Define if the vasnprintf implementation needs special code for 'long + double' arguments. */ +#define NEED_PRINTF_LONG_DOUBLE 1 + +/* Define if the vasnprintf implementation needs special code for supporting + large precisions without arbitrary bounds. */ +/* #undef NEED_PRINTF_UNBOUNDED_PRECISION */ + +/* Define if the vasnwprintf implementation needs special code for the 'c' + directive. */ +/* #undef NEED_WPRINTF_DIRECTIVE_C */ + +/* Define if the vasnwprintf implementation needs special code for the 'a' + directive with 'long double' arguments. */ +#define NEED_WPRINTF_DIRECTIVE_LA 1 + +/* Define if the vasnwprintf implementation needs special code for the 'lc' + directive. */ +/* #undef NEED_WPRINTF_DIRECTIVE_LC */ + +/* Name of package */ +#define PACKAGE "libintl" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "bug-gettext@gnu.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libintl" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libintl 0.22.3" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libintl" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.22.3" + +/* Define if the pthread_in_use() detection is hard. */ +/* #undef PTHREAD_IN_USE_DETECTION_HARD */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +/* #undef PTRDIFF_T_SUFFIX */ + +/* Define if vasnprintf exists but is overridden by gnulib. */ +/* #undef REPLACE_VASNPRINTF */ + +/* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */ +#define SETLOCALE_NULL_ALL_MTSAFE 1 + +/* Define to 1 if setlocale (category, NULL) is multithread-safe. */ +#define SETLOCALE_NULL_ONE_MTSAFE 1 + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +/* #undef SIG_ATOMIC_T_SUFFIX */ + +/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#ifndef SIZE_MAX +/* # undef SIZE_MAX */ +#endif + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +/* #undef SIZE_T_SUFFIX */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Define if the combination of the ISO C and POSIX multithreading APIs can be + used. */ +/* #undef USE_ISOC_AND_POSIX_THREADS */ + +/* Define if the ISO C multithreading library can be used. */ +/* #undef USE_ISOC_THREADS */ + +/* Define if the POSIX multithreading library can be used. */ +/* #undef USE_POSIX_THREADS */ + +/* Define if references to the POSIX multithreading library are satisfied by + libc. */ +/* #undef USE_POSIX_THREADS_FROM_LIBC */ + +/* Define if references to the POSIX multithreading library should be made + weak. */ +/* #undef USE_POSIX_THREADS_WEAK */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# define __STDC_WANT_IEC_60559_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Define if the native Windows multithreading API can be used. */ +#define USE_WINDOWS_THREADS 1 + +/* Version number of package */ +#define VERSION "0.22.3" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +/* #undef WCHAR_T_SUFFIX */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +/* #undef WINT_T_SUFFIX */ + +/* Define when --enable-shared is used on mingw or Cygwin. */ +#define WOE32DLL 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ +#if defined __GNUC__ && defined __GNUC_MINOR__ +# define _GL_GNUC_PREREQ(major, minor) \ + ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) +#else +# define _GL_GNUC_PREREQ(major, minor) 0 +#endif + + +/* Define to enable the declarations of ISO C 11 types and functions. */ +/* #undef _ISOC11_SOURCE */ + +/* Define to 1 on Solaris. */ +/* #undef _LCONV_C99 */ + +/* The _Noreturn keyword of C11. */ +#ifndef _Noreturn +# if (defined __cplusplus \ + && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ + || (defined _MSC_VER && 1900 <= _MSC_VER)) \ + && 0) + /* [[noreturn]] is not practically usable, because with it the syntax + extern _Noreturn void func (...); + would not be valid; such a declaration would only be valid with 'extern' + and '_Noreturn' swapped, or without the 'extern' keyword. However, some + AIX system header files and several gnulib header files use precisely + this syntax with 'extern'. */ +# define _Noreturn [[noreturn]] +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (_GL_GNUC_PREREQ (4, 7) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) + /* _Noreturn works as-is. */ +# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C +# define _Noreturn __attribute__ ((__noreturn__)) +# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + +/* For standard stat data types on VMS. */ +#define _USE_STD_STAT 1 + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_CONSTANT_MACROS */ + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_LIMIT_MACROS */ + +/* The _GL_ASYNC_SAFE marker should be attached to functions that are + signal handlers (for signals other than SIGABRT, SIGPIPE) or can be + invoked from such signal handlers. Such functions have some restrictions: + * All functions that it calls should be marked _GL_ASYNC_SAFE as well, + or should be listed as async-signal-safe in POSIX + + section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in + particular, are NOT async-signal-safe. + * All memory locations (variables and struct fields) that these functions + access must be marked 'volatile'. This holds for both read and write + accesses. Otherwise the compiler might optimize away stores to and + reads from such locations that occur in the program, depending on its + data flow analysis. For example, when the program contains a loop + that is intended to inspect a variable set from within a signal handler + while (!signal_occurred) + ; + the compiler is allowed to transform this into an endless loop if the + variable 'signal_occurred' is not declared 'volatile'. + Additionally, recall that: + * A signal handler should not modify errno (except if it is a handler + for a fatal signal and ends by raising the same signal again, thus + provoking the termination of the process). If it invokes a function + that may clobber errno, it needs to save and restore the value of + errno. */ +#define _GL_ASYNC_SAFE + + +/* Attributes. */ +#if (defined __has_attribute \ + && (!defined __clang_minor__ \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 5 <= __clang_major__))) +# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) +#else +# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr +# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) +# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) +# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) +# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) +# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) +# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) +# define _GL_ATTR_diagnose_if 0 +# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) +# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) +# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) +# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) +# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) +# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) +# ifdef _ICC +# define _GL_ATTR_may_alias 0 +# else +# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) +# endif +# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) +# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) +# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) +# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) +# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) +# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) +# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) +# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) +# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) +# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) +#endif + +/* Use __has_c_attribute if available. However, do not use with + pre-C23 GCC, which can issue false positives if -Wpedantic. */ +#if (defined __has_c_attribute \ + && ! (_GL_GNUC_PREREQ (4, 6) \ + && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710)) +# define _GL_HAVE___HAS_C_ATTRIBUTE 1 +#else +# define _GL_HAVE___HAS_C_ATTRIBUTE 0 +#endif + +/* Define if, in a function declaration, the attributes in bracket syntax + [[...]] must come before the attributes in __attribute__((...)) syntax. + If this is defined, it is best to avoid the bracket syntax, so that the + various _GL_ATTRIBUTE_* can be cumulated on the same declaration in any + order. */ +#ifdef __cplusplus +# if defined __clang__ +# define _GL_BRACKET_BEFORE_ATTRIBUTE 1 +# endif +#else +# if defined __GNUC__ && !defined __clang__ +# define _GL_BRACKET_BEFORE_ATTRIBUTE 1 +# endif +#endif + +/* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function + is the size of the returned memory block. + _GL_ATTRIBUTE_ALLOC_SIZE ((M, N)) declares that the Mth argument multiplied + by the Nth argument of the function is the size of the returned memory block. + */ +/* Applies to: function, pointer to function, function types. */ +#ifndef _GL_ATTRIBUTE_ALLOC_SIZE +# if _GL_HAS_ATTRIBUTE (alloc_size) +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) +# else +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) +# endif +#endif + +/* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the + function and report an error if it cannot do so. */ +/* Applies to: function. */ +#ifndef _GL_ATTRIBUTE_ALWAYS_INLINE +# if _GL_HAS_ATTRIBUTE (always_inline) +# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) +# else +# define _GL_ATTRIBUTE_ALWAYS_INLINE +# endif +#endif + +/* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show + in stack traces when debugging. The compiler should omit the function from + stack traces. */ +/* Applies to: function. */ +#ifndef _GL_ATTRIBUTE_ARTIFICIAL +# if _GL_HAS_ATTRIBUTE (artificial) +# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) +# else +# define _GL_ATTRIBUTE_ARTIFICIAL +# endif +#endif + +/* _GL_ATTRIBUTE_COLD declares that the function is rarely executed. */ +/* Applies to: functions. */ +/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at + . + Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */ +#ifndef _GL_ATTRIBUTE_COLD +# if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ +# ifndef __SUNPRO_C +# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) +# else +# define _GL_ATTRIBUTE_COLD __attribute__ ((cold)) +# endif +# else +# define _GL_ATTRIBUTE_COLD +# endif +#endif + +/* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate + calls to the function with the same arguments. + This attribute is safe for a function that neither depends on nor affects + observable state, and always returns exactly once - e.g., does not loop + forever, and does not call longjmp. + (This attribute is stricter than _GL_ATTRIBUTE_PURE.) */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_CONST +# if _GL_HAS_ATTRIBUTE (const) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _GL_ATTRIBUTE_CONST +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. + _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if _GL_GNUC_PREREQ (11, 0) +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif +/* If gnulib's or has already defined this macro, continue + to use this earlier definition, since may not have been included + yet. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated. + The compiler may warn if the entity is used. */ +/* Applies to: + - function, variable, + - struct, union, struct/union member, + - enumeration, enumeration item, + - typedef, + in C++ also: namespace, class, template specialization. */ +#ifndef _GL_ATTRIBUTE_DEPRECATED +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__deprecated__) +# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] +# endif +# endif +# endif +# if !defined _GL_ATTRIBUTE_DEPRECATED && _GL_HAS_ATTRIBUTE (deprecated) +# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) +# endif +# ifndef _GL_ATTRIBUTE_DEPRECATED +# define _GL_ATTRIBUTE_DEPRECATED +# endif +#endif + +/* _GL_ATTRIBUTE_ERROR(msg) requests an error if a function is called and + the function call is not optimized away. + _GL_ATTRIBUTE_WARNING(msg) requests a warning if a function is called and + the function call is not optimized away. */ +/* Applies to: functions. */ +#if !(defined _GL_ATTRIBUTE_ERROR && defined _GL_ATTRIBUTE_WARNING) +# if _GL_HAS_ATTRIBUTE (error) +# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) +# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) +# elif _GL_HAS_ATTRIBUTE (diagnose_if) +# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error"))) +# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# else +# define _GL_ATTRIBUTE_ERROR(msg) +# define _GL_ATTRIBUTE_WARNING(msg) +# endif +#endif + +/* _GL_ATTRIBUTE_EXTERNALLY_VISIBLE declares that the entity should remain + visible to debuggers etc., even with '-fwhole-program'. */ +/* Applies to: functions, variables. */ +#ifndef _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +# if _GL_HAS_ATTRIBUTE (externally_visible) +# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) +# else +# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +# endif +#endif + +/* _GL_ATTRIBUTE_FALLTHROUGH declares that it is not a programming mistake if + the control flow falls through to the immediately following 'case' or + 'default' label. The compiler should not warn in this case. */ +/* Applies to: Empty statement (;), inside a 'switch' statement. */ +/* Always expands to something. */ +#ifndef _GL_ATTRIBUTE_FALLTHROUGH +# if _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__fallthrough__) +# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] +# endif +# endif +# if !defined _GL_ATTRIBUTE_FALLTHROUGH && _GL_HAS_ATTRIBUTE (fallthrough) +# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) +# endif +# ifndef _GL_ATTRIBUTE_FALLTHROUGH +# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) +# endif +#endif + +/* _GL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK)) + declares that the STRING-INDEXth function argument is a format string of + style ARCHETYPE, which is one of: + printf, gnu_printf + scanf, gnu_scanf, + strftime, gnu_strftime, + strfmon, + or the same thing prefixed and suffixed with '__'. + If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK + are suitable for the format string. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_FORMAT +# if _GL_HAS_ATTRIBUTE (format) +# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +# else +# define _GL_ATTRIBUTE_FORMAT(spec) +# endif +#endif + +/* _GL_ATTRIBUTE_LEAF declares that if the function is called from some other + compilation unit, it executes code from that unit only by return or by + exception handling. This declaration lets the compiler optimize that unit + more aggressively. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_LEAF +# if _GL_HAS_ATTRIBUTE (leaf) +# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) +# else +# define _GL_ATTRIBUTE_LEAF +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if _GL_HAS_ATTRIBUTE (malloc) +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_MAY_ALIAS declares that pointers to the type may point to the + same storage as pointers to other types. Thus this declaration disables + strict aliasing optimization. */ +/* Applies to: types. */ +/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */ +#ifndef _GL_ATTRIBUTE_MAY_ALIAS +# if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C +# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) +# else +# define _GL_ATTRIBUTE_MAY_ALIAS +# endif +#endif + +/* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if + the entity is not used. The compiler should not warn if the entity is not + used. */ +/* Applies to: + - function, variable, + - struct, union, struct/union member, + - enumeration, enumeration item, + - typedef, + in C++ also: class. */ +/* In C++ and C23, this is spelled [[__maybe_unused__]]. + GCC's syntax is __attribute__ ((__unused__)). + clang supports both syntaxes. Except that with clang ≥ 6, < 10, in C++ mode, + __has_c_attribute (__maybe_unused__) yields true but the use of + [[__maybe_unused__]] nevertheless produces a warning. */ +#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if defined __clang__ && defined __cplusplus +# if !defined __apple_build_version__ && __clang_major__ >= 10 +# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# elif _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__maybe_unused__) +# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# endif +# endif +# ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED +# endif +#endif +/* Alternative spelling of this macro, for convenience and for + compatibility with glibc/include/libc-symbols.h. */ +#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED +/* Earlier spellings of this macro. */ +#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED + +/* _GL_ATTRIBUTE_NODISCARD declares that the caller of the function should not + discard the return value. The compiler may warn if the caller does not use + the return value, unless the caller uses something like ignore_value. */ +/* Applies to: function, enumeration, class. */ +#ifndef _GL_ATTRIBUTE_NODISCARD +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if defined __clang__ && defined __cplusplus + /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] produces + a warning. + The 1000 below means a yet unknown threshold. When clang++ version X + starts supporting [[__nodiscard__]] without warning about it, you can + replace the 1000 with X. */ +# if __clang_major__ >= 1000 +# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] +# endif +# elif _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__nodiscard__) +# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] +# endif +# endif +# endif +# if !defined _GL_ATTRIBUTE_NODISCARD && _GL_HAS_ATTRIBUTE (warn_unused_result) +# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) +# endif +# ifndef _GL_ATTRIBUTE_NODISCARD +# define _GL_ATTRIBUTE_NODISCARD +# endif +#endif + +/* _GL_ATTRIBUTE_NOINLINE tells that the compiler should not inline the + function. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_NOINLINE +# if _GL_HAS_ATTRIBUTE (noinline) +# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) +# else +# define _GL_ATTRIBUTE_NOINLINE +# endif +#endif + +/* _GL_ATTRIBUTE_NONNULL ((N1, N2,...)) declares that the arguments N1, N2,... + must not be NULL. + _GL_ATTRIBUTE_NONNULL () declares that all pointer arguments must not be + null. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_NONNULL +# if _GL_HAS_ATTRIBUTE (nonnull) +# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) +# else +# define _GL_ATTRIBUTE_NONNULL(args) +# endif +#endif + +/* _GL_ATTRIBUTE_NONSTRING declares that the contents of a character array is + not meant to be NUL-terminated. */ +/* Applies to: struct/union members and variables that are arrays of element + type '[[un]signed] char'. */ +#ifndef _GL_ATTRIBUTE_NONSTRING +# if _GL_HAS_ATTRIBUTE (nonstring) +# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) +# else +# define _GL_ATTRIBUTE_NONSTRING +# endif +#endif + +/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +/* Applies to: functions. */ +/* After a function's parameter list, this attribute must come first, before + other attributes. */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if _GL_GNUC_PREREQ (2, 8) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if _GL_HAS_ATTRIBUTE (nothrow) +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* _GL_ATTRIBUTE_PACKED declares: + For struct members: The member has the smallest possible alignment. + For struct, union, class: All members have the smallest possible alignment, + minimizing the memory required. */ +/* Applies to: struct members, struct, union, + in C++ also: class. */ +#ifndef _GL_ATTRIBUTE_PACKED +# if _GL_HAS_ATTRIBUTE (packed) +# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) +# else +# define _GL_ATTRIBUTE_PACKED +# endif +#endif + +/* _GL_ATTRIBUTE_PURE declares that It is OK for a compiler to omit duplicate + calls to the function with the same arguments if observable state is not + changed between calls. + This attribute is safe for a function that does not affect + observable state, and always returns exactly once. + (This attribute is looser than _GL_ATTRIBUTE_CONST.) */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_PURE +# if _GL_HAS_ATTRIBUTE (pure) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE +# endif +#endif + +/* _GL_ATTRIBUTE_RETURNS_NONNULL declares that the function's return value is + a non-NULL pointer. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_RETURNS_NONNULL +# if _GL_HAS_ATTRIBUTE (returns_nonnull) +# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) +# else +# define _GL_ATTRIBUTE_RETURNS_NONNULL +# endif +#endif + +/* _GL_ATTRIBUTE_SENTINEL(pos) declares that the variadic function expects a + trailing NULL argument. + _GL_ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99). + _GL_ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_SENTINEL +# if _GL_HAS_ATTRIBUTE (sentinel) +# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) +# else +# define _GL_ATTRIBUTE_SENTINEL(pos) +# endif +#endif + +/* A helper macro. Don't use it directly. */ +#ifndef _GL_ATTRIBUTE_UNUSED +# if _GL_HAS_ATTRIBUTE (unused) +# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define _GL_ATTRIBUTE_UNUSED +# endif +#endif + + +/* _GL_UNUSED_LABEL; declares that it is not a programming mistake if the + immediately preceding label is not used. The compiler should not warn + if the label is not used. */ +/* Applies to: label (both in C and C++). */ +/* Note that g++ < 4.5 does not support the '__attribute__ ((__unused__)) ;' + syntax. But clang does. */ +#ifndef _GL_UNUSED_LABEL +# if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__ +# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED +# else +# define _GL_UNUSED_LABEL +# endif +#endif + + +/* In C++, there is the concept of "language linkage", that encompasses + name mangling and function calling conventions. + The following macros start and end a block of "C" linkage. */ +#ifdef __cplusplus +# define _GL_BEGIN_C_LINKAGE extern "C" { +# define _GL_END_C_LINKAGE } +#else +# define _GL_BEGIN_C_LINKAGE +# define _GL_END_C_LINKAGE +#endif + + +/* Hidden symbol. */ +/* #undef frexp */ + +/* Hidden symbol. */ +/* #undef frexpl */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to long or long long if and don't define. */ +/* #undef intmax_t */ + +/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for Mac OS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif + +/* Hidden symbol. */ +/* #undef mbrtowc */ + +/* Hidden symbol. */ +/* #undef mbsinit */ + +/* Define to a type if does not define. */ +/* #undef mbstate_t */ + +/* Hidden symbol. */ +/* #undef memchr */ + +/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where + n1 and n2 are expressions without side effects, that evaluate to real + numbers (excluding NaN). + It returns + 1 if n1 > n2 + 0 if n1 == n2 + -1 if n1 < n2 + The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional + jump with nearly all GCC versions up to GCC 10. + This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many + GCC versions up to GCC 9. + The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 + avoids conditional jumps in all GCC versions >= 3.4. */ +#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) + + +/* Define to `int' if does not define. */ +#define mode_t int + +/* Define as a signed integer type capable of holding a process identifier. */ +#ifdef _WIN64 +# define pid_t __int64 +#else +# define pid_t int +#endif + +/* Define as the type of the result of subtracting two pointers, if the system + doesn't define it. */ +/* #undef ptrdiff_t */ + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported only directly. */ +#define restrict /**/ +/* Work around a bug in older versions of Sun C++, which did not + #define __restrict__ or support _Restrict or __restrict__ + even though the corresponding Sun C compiler ended up with + "#define restrict _Restrict" or "#define restrict __restrict__" + in the previous line. This workaround can be removed once + we assume Oracle Developer Studio 12.5 (2016) or later. */ +#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ +# define _Restrict +# define __restrict__ +#endif + +/* Hidden symbol. */ +/* #undef rpl_fgetc */ + +/* Hidden symbol. */ +/* #undef rpl_fgets */ + +/* Hidden symbol. */ +/* #undef rpl_fprintf */ + +/* Hidden symbol. */ +/* #undef rpl_fputc */ + +/* Hidden symbol. */ +/* #undef rpl_fputs */ + +/* Hidden symbol. */ +/* #undef rpl_fread */ + +/* Hidden symbol. */ +/* #undef rpl_frexp */ + +/* Hidden symbol. */ +/* #undef rpl_frexpl */ + +/* Hidden symbol. */ +/* #undef rpl_fscanf */ + +/* Hidden symbol. */ +/* #undef rpl_fwrite */ + +/* Hidden symbol. */ +#define rpl_mbrtowc _libintl_mbrtowc + +/* Hidden symbol. */ +#define rpl_mbsinit _libintl_mbsinit + +/* Hidden symbol. */ +/* #undef rpl_memchr */ + +/* Hidden symbol. */ +#define rpl_tdelete _libintl_tdelete + +/* Hidden symbol. */ +#define rpl_tfind _libintl_tfind + +/* Hidden symbol. */ +#define rpl_tsearch _libintl_tsearch + +/* Hidden symbol. */ +#define rpl_twalk _libintl_twalk + +/* Hidden symbol. */ +/* #undef rpl_vfprintf */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define as a signed type of the same size as size_t. */ +#ifdef _WIN64 +# define ssize_t long long +#else +# define ssize_t long +#endif + +/* Hidden symbol. */ +#define tdelete _libintl_tdelete + +/* Hidden symbol. */ +#define tfind _libintl_tfind + +/* Hidden symbol. */ +#define tsearch _libintl_tsearch + +/* Hidden symbol. */ +#define twalk _libintl_twalk + +/* Define to unsigned long or unsigned long long if and + don't define. */ +/* #undef uintmax_t */ + + +#define __libc_lock_t gl_lock_t +#define __libc_lock_define gl_lock_define +#define __libc_lock_define_initialized gl_lock_define_initialized +#define __libc_lock_init gl_lock_init +#define __libc_lock_lock gl_lock_lock +#define __libc_lock_unlock gl_lock_unlock +#define __libc_lock_recursive_t gl_recursive_lock_t +#define __libc_lock_define_recursive gl_recursive_lock_define +#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized +#define __libc_lock_init_recursive gl_recursive_lock_init +#define __libc_lock_lock_recursive gl_recursive_lock_lock +#define __libc_lock_unlock_recursive gl_recursive_lock_unlock + + + +#define asnprintf _libintl_asnprintf +#define rpl_asnprintf _libintl_asnprintf +/* Symbols defined by main intl code. The prefix '_nl_' is used by glibc. + For hiding the symbols on AIX and Solaris 10 with compilers that don't + support the __visibility__ attribute, map them to prefix '_libintl_'. */ +#define _nl_explode_name _libintl_explode_name +#define _nl_find_domain _libintl_find_domain +#define _nl_find_msg _libintl_find_msg +#define _nl_language_preferences_default _libintl_language_preferences_default +#define _nl_load_domain _libintl_load_domain +#define _nl_log_untranslated _libintl_log_untranslated +#define _nl_make_l10nflist _libintl_make_l10nflist +#define _nl_normalize_codeset _libintl_normalize_codeset +#define _nl_state_lock _libintl_state_lock +/* Symbols defined by gnulib module 'float'. */ +#define gl_LDBL_MAX _libintl_LDBL_MAX +/* Symbols defined by gnulib module 'free-posix'. */ +#define rpl_free _libintl_free +/* Symbols defined by gnulib module 'hard-locale'. */ +#define hard_locale _libintl_hard_locale +/* Symbols defined by gnulib module 'isnand-nolibm'. */ +#define rpl_isnand _libintl_isnand +/* Symbols defined by gnulib module 'isnanf-nolibm'. */ +#define rpl_isnanf _libintl_isnanf +/* Symbols defined by gnulib module 'isnanl-nolibm'. */ +#define rpl_isnanl _libintl_isnanl +/* Symbols defined by gnulib module 'localename'. */ +#define gl_locale_name_canonicalize _libintl_locale_name_canonicalize +#define gl_locale_name_from_win32_LANGID _libintl_locale_name_from_win32_LANGID +#define gl_locale_name_from_win32_LCID _libintl_locale_name_from_win32_LCID +#define gl_locale_name_thread_unsafe _libintl_locale_name_thread_unsafe +#define gl_locale_name_thread _libintl_locale_name_thread +#define gl_locale_name_posix _libintl_locale_name_posix +#define gl_locale_name_environ _libintl_locale_name_environ +#define gl_locale_name_default _libintl_locale_name_default +#define gl_locale_name _libintl_locale_name +#define rpl_newlocale _libintl_newlocale +#define rpl_duplocale _libintl_duplocale +#define rpl_freelocale _libintl_freelocale +/* Symbols defined by gnulib module 'lock'. */ +#if USE_ISOC_THREADS || USE_ISOC_AND_POSIX_THREADS +#define glthread_lock_init _libintl_lock_init +#define glthread_lock_lock _libintl_lock_lock +#define glthread_lock_unlock _libintl_lock_unlock +#define glthread_lock_destroy _libintl_lock_destroy +#define glthread_rwlock_init _libintl_rwlock_init +#define glthread_rwlock_rdlock _libintl_rwlock_rdlock +#define glthread_rwlock_wrlock _libintl_rwlock_wrlock +#define glthread_rwlock_unlock _libintl_rwlock_unlock +#define glthread_rwlock_destroy _libintl_rwlock_destroy +#define glthread_recursive_lock_init _libintl_recursive_lock_init +#define glthread_recursive_lock_lock _libintl_recursive_lock_lock +#define glthread_recursive_lock_unlock _libintl_recursive_lock_unlock +#define glthread_recursive_lock_destroy _libintl_recursive_lock_destroy +#endif +#define glthread_rwlock_init_for_glibc _libintl_rwlock_init_for_glibc +#define glthread_rwlock_init_multithreaded _libintl_rwlock_init_multithreaded +#define glthread_rwlock_rdlock_multithreaded _libintl_rwlock_rdlock_multithreaded +#define glthread_rwlock_wrlock_multithreaded _libintl_rwlock_wrlock_multithreaded +#define glthread_rwlock_unlock_multithreaded _libintl_rwlock_unlock_multithreaded +#define glthread_rwlock_destroy_multithreaded _libintl_rwlock_destroy_multithreaded +#define glthread_recursive_lock_init_multithreaded _libintl_recursive_lock_init_multithreaded +#define glthread_recursive_lock_lock_multithreaded _libintl_recursive_lock_lock_multithreaded +#define glthread_recursive_lock_unlock_multithreaded _libintl_recursive_lock_unlock_multithreaded +#define glthread_recursive_lock_destroy_multithreaded _libintl_recursive_lock_destroy_multithreaded +#define glthread_once_singlethreaded _libintl_once_singlethreaded +#define glthread_once_multithreaded _libintl_once_multithreaded +/* Symbols defined by gnulib module 'mbszero'. */ +#define mbszero _libintl_mbszero +/* Symbols defined by gnulib module 'printf-frexp'. */ +#define printf_frexp _libintl_printf_frexp +/* Symbols defined by gnulib module 'printf-frexpl'. */ +#define printf_frexpl _libintl_printf_frexpl +/* Symbols defined by gnulib module 'relocatable-lib-lgpl'. */ +#define relocate _libintl_relocate +#define relocate2 _libintl_relocate2 +/* Symbols defined by gnulib module 'setlocale-null'. */ +#define setlocale_null _libintl_setlocale_null +#define setlocale_null_r _libintl_setlocale_null_r +/* Symbols defined by gnulib module 'signbit'. */ +#define gl_signbitf _libintl_signbitf +#define gl_signbitd _libintl_signbitd +#define gl_signbitl _libintl_signbitl +/* Symbols defined by gnulib module 'threadlib'. */ +#define glthread_in_use _libintl_glthread_in_use +/* Symbols defined by gnulib module 'vasnprintf'. */ +#define printf_fetchargs _libintl_printf_fetchargs +#define printf_parse _libintl_printf_parse +#define vasnprintf _libintl_vasnprintf +#define rpl_vasnprintf _libintl_vasnprintf +/* Symbols defined by gnulib module 'vasnwprintf'. */ +#define asnwprintf _libintl_asnwprintf +#define wprintf_parse _libintl_wprintf_parse +#define vasnwprintf _libintl_vasnwprintf +/* Symbols defined by gnulib module 'windows-mutex'. */ +#define glwthread_mutex_init _libintl_glwthread_mutex_init +#define glwthread_mutex_lock _libintl_glwthread_mutex_lock +#define glwthread_mutex_trylock _libintl_glwthread_mutex_trylock +#define glwthread_mutex_unlock _libintl_glwthread_mutex_unlock +#define glwthread_mutex_destroy _libintl_glwthread_mutex_destroy +/* Symbols defined by gnulib module 'windows-once'. */ +#define glwthread_once _libintl_glwthread_once +/* Symbols defined by gnulib module 'windows-recmutex'. */ +#define glwthread_recmutex_init _libintl_glwthread_recmutex_init +#define glwthread_recmutex_lock _libintl_glwthread_recmutex_lock +#define glwthread_recmutex_trylock _libintl_glwthread_recmutex_trylock +#define glwthread_recmutex_unlock _libintl_glwthread_recmutex_unlock +#define glwthread_recmutex_destroy _libintl_glwthread_recmutex_destroy +/* Symbols defined by gnulib module 'windows-rwlock'. */ +#define glwthread_rwlock_init _libintl_glwthread_rwlock_init +#define glwthread_rwlock_rdlock _libintl_glwthread_rwlock_rdlock +#define glwthread_rwlock_wrlock _libintl_glwthread_rwlock_wrlock +#define glwthread_rwlock_tryrdlock _libintl_glwthread_rwlock_tryrdlock +#define glwthread_rwlock_trywrlock _libintl_glwthread_rwlock_trywrlock +#define glwthread_rwlock_unlock _libintl_glwthread_rwlock_unlock +#define glwthread_rwlock_destroy _libintl_glwthread_rwlock_destroy +/* Symbols defined by gnulib module 'xsize'. */ +#define xmax _libintl_xmax +#define xsum _libintl_xsum +#define xsum3 _libintl_xsum3 +#define xsum4 _libintl_xsum4 + + +#ifndef HAVE_C_BOOL +# if !defined __cplusplus && !defined __bool_true_false_are_defined +# if HAVE_STDBOOL_H +# include +# else +# if defined __SUNPRO_C +# error " is not usable with this configuration. To make it usable, add -D_STDC_C99= to $CC." +# else +# error " does not exist on this platform. Use gnulib module 'stdbool-c99' instead of gnulib module 'stdbool'." +# endif +# endif +# endif +# if !true +# define true (!false) +# endif +#endif + +#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6))) + #include + #undef/**/assert + #ifdef __sgi + #undef/**/__ASSERT_H__ + #endif + /* Solaris 11.4 defines static_assert as a macro with 2 arguments. + We need it also to be invocable with a single argument. */ + #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus + #undef/**/static_assert + #define static_assert _Static_assert + #endif +#endif + + +/* Tweak gnulib code according to the needs of this library. */ +#define IN_LIBINTL 1 + +/* On Windows, variables that may be in a DLL must be marked specially. */ +#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER +# define DLL_VARIABLE __declspec (dllimport) +#else +# define DLL_VARIABLE +#endif + +/* Extra OS/2 (emx+gcc) defines. */ +#if defined __EMX__ && !defined __KLIBC__ +# include "os2compat.h" +#endif + diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/alloca.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/alloca.h similarity index 90% rename from gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/alloca.h rename to gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/alloca.h index 477523ae6..9a7d12625 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/alloca.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/alloca.h @@ -3,16 +3,16 @@ Copyright (C) 1995, 1999, 2001-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. + GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public License + You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* When this file is included, it may be preceded only by preprocessor diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/assert.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/assert.h new file mode 100644 index 000000000..baeb53b67 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/assert.h @@ -0,0 +1,314 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Substitute for and wrapper around + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Do not guard the include, since is supposed to define + the assert macro each time it is included. */ + +#if __GNUC__ >= 3 + +#endif + + +#include "../ucrt/assert.h" + +#if (_MSC_VER < 1931) + +/* The definition of static_assert is copied here. */ +/* Compile-time assert-like macros. + + Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ + +#ifndef _GL_STATIC_ASSERT_H +#define _GL_STATIC_ASSERT_H + + +/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC) + works as per C11. This is supported by GCC 4.6.0+ and by clang 4+. + + Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as + per C23. This is supported by GCC 9.1+. + + Support compilers claiming conformance to the relevant standard, + and also support GCC when not pedantic. If we were willing to slow + 'configure' down we could also use it with other compilers, but + since this affects only the quality of diagnostics, why bother? */ +#ifndef __cplusplus +# if (201112 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__))) +# define _GL_HAVE__STATIC_ASSERT 1 +# endif +# if (202311 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ && 9 <= __GNUC__)) +# define _GL_HAVE__STATIC_ASSERT1 1 +# endif +#endif + +/* FreeBSD 9.1 , included by and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE__STATIC_ASSERT +# include +# undef _Static_assert +#endif + +/* Each of these macros verifies that its argument R is nonzero. To + be portable, R should be an integer constant expression. Unlike + assert (R), there is no run-time overhead. + + If _Static_assert works, verify (R) uses it directly. Similarly, + _GL_STATIC_ASSERT_TRUE works by packaging a _Static_assert inside a struct + that is an operand of sizeof. + + The code below uses several ideas for C++ compilers, and for C + compilers that do not support _Static_assert: + + * The first step is ((R) ? 1 : -1). Given an expression R, of + integral or boolean or floating-point type, this yields an + expression of integral type, whose value is later verified to be + constant and nonnegative. + + * Next this expression W is wrapped in a type + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: W; + }. + If W is negative, this yields a compile-time error. No compiler can + deal with a bit-field of negative size. + + One might think that an array size check would have the same + effect, that is, that the type struct { unsigned int dummy[W]; } + would work as well. However, inside a function, some compilers + (such as C++ compilers and GNU C) allow local parameters and + variables inside array size expressions. With these compilers, + an array size check would not properly diagnose this misuse of + the verify macro: + + void function (int n) { verify (n < 0); } + + * For the verify macro, the struct _gl_static_assert_type will need to + somehow be embedded into a declaration. To be portable, this + declaration must declare an object, a constant, a function, or a + typedef name. If the declared entity uses the type directly, + such as in + + struct dummy {...}; + typedef struct {...} dummy; + extern struct {...} *dummy; + extern void dummy (struct {...} *); + extern struct {...} *dummy (void); + + two uses of the verify macro would yield colliding declarations + if the entity names are not disambiguated. A workaround is to + attach the current line number to the entity name: + + #define _GL_CONCAT0(x, y) x##y + #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) + extern struct {...} * _GL_CONCAT (dummy, __LINE__); + + But this has the problem that two invocations of verify from + within the same macro would collide, since the __LINE__ value + would be the same for both invocations. (The GCC __COUNTER__ + macro solves this problem, but is not portable.) + + A solution is to use the sizeof operator. It yields a number, + getting rid of the identity of the type. Declarations like + + extern int dummy [sizeof (struct {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + + can be repeated. + + * Should the implementation use a named struct or an unnamed struct? + Which of the following alternatives can be used? + + extern int dummy [sizeof (struct {...})]; + extern int dummy [sizeof (struct _gl_static_assert_type {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern void dummy (int [sizeof (struct _gl_static_assert_type {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + extern int (*dummy (void)) [sizeof (struct _gl_static_assert_type {...})]; + + In the second and sixth case, the struct type is exported to the + outer scope; two such declarations therefore collide. GCC warns + about the first, third, and fourth cases. So the only remaining + possibility is the fifth case: + + extern int (*dummy (void)) [sizeof (struct {...})]; + + * GCC warns about duplicate declarations of the dummy function if + -Wredundant-decls is used. GCC 4.3 and later have a builtin + __COUNTER__ macro that can let us generate unique identifiers for + each dummy function, to suppress this warning. + + * This implementation exploits the fact that older versions of GCC, + which do not support _Static_assert, also do not warn about the + last declaration mentioned above. + + * GCC warns if -Wnested-externs is enabled and 'verify' is used + within a function body; but inside a function, you can always + arrange to use verify_expr instead. + + * In C++, any struct definition inside sizeof is invalid. + Use a template type to work around the problem. */ + +/* Concatenate two preprocessor tokens. */ +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y + +/* _GL_COUNTER is an integer, preferably one that changes each time we + use it. Use __COUNTER__ if it works, falling back on __LINE__ + otherwise. __LINE__ isn't perfect, but it's better than a + constant. */ +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif + +/* Generate a symbol with the given prefix, making it unique if + possible. */ +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) + +/* Verify requirement R at compile-time, as an integer constant expression + that returns 1. If R is false, fail at compile-time, preferably + with a diagnostic that includes the string-literal DIAGNOSTIC. */ + +#define _GL_STATIC_ASSERT_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_STATIC_ASSERT_TYPE (R, DIAGNOSTIC))) + +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_static_assert_type +template + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: w; + }; +# define GNULIB_defined_struct__gl_static_assert_type 1 +# endif +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + _gl_static_assert_type<(R) ? 1 : -1> +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_static_assert_error_if_negative: (R) ? 1 : -1; } +#endif + +/* Verify requirement R at compile-time, as a declaration without a + trailing ';'. If R is false, fail at compile-time. + + This macro requires three or more arguments but uses at most the first + two, so that the _Static_assert macro optionally defined below supports + both the C11 two-argument syntax and the C23 one-argument syntax. + + Unfortunately, unlike C11, this implementation must appear as an + ordinary declaration, and cannot appear inside struct { ... }. */ + +#if 202311 <= __STDC_VERSION__ || 200410 <= __cpp_static_assert +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) static_assert (R, DIAGNOSTIC) +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC) +#else +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) \ + extern int (*_GL_GENSYM (_gl_static_assert_function) (void)) \ + [_GL_STATIC_ASSERT_TRUE (R, DIAGNOSTIC)] +# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Wnested-externs" +# endif +#endif + +/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ +#ifdef _GL_STATIC_ASSERT_H +/* Define _Static_assert if needed. */ +/* With clang ≥ 3.8.0 in C++ mode, _Static_assert already works and accepts + 1 or 2 arguments. We better don't override it, because clang's standard + C++ library uses static_assert inside classes in several places, and our + replacement via _GL_STATIC_ASSERT does not work in these contexts. */ +# if (defined __cplusplus && defined __clang__ \ + && (4 <= __clang_major__ + (8 <= __clang_minor__))) +# if 5 <= __clang_major__ +/* Avoid "warning: 'static_assert' with no message is a C++17 extension". */ +# pragma clang diagnostic ignored "-Wc++17-extensions" +# else +/* Avoid "warning: static_assert with no message is a C++1z extension". */ +# pragma clang diagnostic ignored "-Wc++1z-extensions" +# endif +# elif !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert +# if !defined _MSC_VER || defined __clang__ +# define _Static_assert(...) \ + _GL_STATIC_ASSERT (__VA_ARGS__, "static assertion failed", -) +# else +# if defined __cplusplus && _MSC_VER >= 1910 + /* In MSVC 14.1 or newer, static_assert accepts one or two arguments, + but _Static_assert is not defined. */ +# define _Static_assert static_assert +# else + /* Work around MSVC preprocessor incompatibility with ISO C; see + . */ +# define _Static_assert(R, ...) \ + _GL_STATIC_ASSERT ((R), "static assertion failed", -) +# endif +# endif +# endif +/* Define static_assert if needed. */ +# if (!defined static_assert \ + && __STDC_VERSION__ < 202311 \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6 && _MSC_VER < 1910))) +# if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__ +/* MSVC 14 in C++ mode supports the two-arguments static_assert but not + the one-argument static_assert, and it does not support _Static_assert. + We have to play preprocessor tricks to distinguish the two cases. + Since the MSVC preprocessor is not ISO C compliant (see above),. + the solution is specific to MSVC. */ +# define _GL_EXPAND(x) x +# define _GL_SA1(a1) static_assert ((a1), "static assertion failed") +# define _GL_SA2 static_assert +# define _GL_SA3 static_assert +# define _GL_SA_PICK(x1,x2,x3,x4,...) x4 +# define static_assert(...) _GL_EXPAND(_GL_SA_PICK(__VA_ARGS__,_GL_SA3,_GL_SA2,_GL_SA1)) (__VA_ARGS__) +/* Avoid "fatal error C1189: #error: The C++ Standard Library forbids macroizing keywords." */ +# define _ALLOW_KEYWORD_MACROS 1 +# else +# define static_assert _Static_assert /* C11 requires this #define. */ +# endif +# endif +#endif + + +#endif +#endif \ No newline at end of file diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/errno.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/errno.h similarity index 93% rename from gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/errno.h rename to gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/errno.h index a8ea67933..fdd118c4d 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/errno.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/errno.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A POSIX-like . - Copyright (C) 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, see . */ + along with this program. If not, see . */ #ifndef _GL_ERRNO_H @@ -24,11 +24,7 @@ /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -# include "../include/errno.h" -#else -# include "../ucrt/errno.h" -#endif +#include "../ucrt/errno.h" #ifndef _GL_ERRNO_H #define _GL_ERRNO_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/inttypes.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/inttypes.h new file mode 100644 index 000000000..00153bfed --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/inttypes.h @@ -0,0 +1,1546 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Copyright (C) 2006-2023 Free Software Foundation, Inc. + Written by Paul Eggert, Bruno Haible, Derek Price. + This file is part of gnulib. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* + * ISO C 99 for platforms that lack it. + * + */ + +#if __GNUC__ >= 3 + +#endif + + +/* Include the original if it exists, and if this file + has not been included yet or if this file includes gnulib stdint.h + which in turn includes this file. + The include_next requires a split double-inclusion guard. */ +#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +# if 1 + + /* Some pre-C++11 implementations need this. */ +# if defined __cplusplus && ! defined __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS 1 +# endif + +# include "../ucrt/inttypes.h" + +# define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H +# endif +#endif + +#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +#define INTTYPES_H + +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* Include or the gnulib replacement. + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif +/* Get CHAR_BIT, INT_MAX, LONG_MAX, etc. */ +#include +/* On mingw, __USE_MINGW_ANSI_STDIO only works if is also included */ +#if defined _WIN32 && ! defined __CYGWIN__ +# include +#endif + +#if !(INT_MAX == 0x7fffffff && INT_MIN + INT_MAX == -1) +# error "This file assumes that 'int' is 32-bit two's complement. Please report your platform and compiler to ." +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + +/* 7.8.1 Macros for format specifiers */ + +#if defined _TNS_R_TARGET + /* Tandem NonStop R series and compatible platforms released before + July 2005 support %Ld but not %lld. */ +# define _LONG_LONG_FORMAT_PREFIX "L" +#else +# define _LONG_LONG_FORMAT_PREFIX "ll" +#endif + +#if !defined PRId8 +# ifdef INT8_MAX +# define PRId8 "d" +# endif +#endif +#if !defined PRIi8 +# ifdef INT8_MAX +# define PRIi8 "i" +# endif +#endif +#if !defined PRIo8 +# ifdef UINT8_MAX +# define PRIo8 "o" +# endif +#endif +#if !defined PRIu8 +# ifdef UINT8_MAX +# define PRIu8 "u" +# endif +#endif +#if !defined PRIx8 +# ifdef UINT8_MAX +# define PRIx8 "x" +# endif +#endif +#if !defined PRIX8 +# ifdef UINT8_MAX +# define PRIX8 "X" +# endif +#endif +#if !defined PRId16 +# ifdef INT16_MAX +# define PRId16 "d" +# endif +#endif +#if !defined PRIi16 +# ifdef INT16_MAX +# define PRIi16 "i" +# endif +#endif +#if !defined PRIo16 +# ifdef UINT16_MAX +# define PRIo16 "o" +# endif +#endif +#if !defined PRIu16 +# ifdef UINT16_MAX +# define PRIu16 "u" +# endif +#endif +#if !defined PRIx16 +# ifdef UINT16_MAX +# define PRIx16 "x" +# endif +#endif +#if !defined PRIX16 +# ifdef UINT16_MAX +# define PRIX16 "X" +# endif +#endif +#if !defined PRId32 +# ifdef INT32_MAX +# define PRId32 "d" +# endif +#endif +#if !defined PRIi32 +# ifdef INT32_MAX +# define PRIi32 "i" +# endif +#endif +#if !defined PRIo32 +# ifdef UINT32_MAX +# define PRIo32 "o" +# endif +#endif +#if !defined PRIu32 +# ifdef UINT32_MAX +# define PRIu32 "u" +# endif +#endif +#if !defined PRIx32 +# ifdef UINT32_MAX +# define PRIx32 "x" +# endif +#endif +#if !defined PRIX32 +# ifdef UINT32_MAX +# define PRIX32 "X" +# endif +#endif +#ifdef INT64_MAX +# if (0 ? defined _LP64 : defined _LP64) +# define _PRI64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRI64_PREFIX "I64" +# elif LONG_MAX >> 30 == 1 +# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRId64 +# define PRId64 _PRI64_PREFIX "d" +# endif +# if !defined PRIi64 +# define PRIi64 _PRI64_PREFIX "i" +# endif +#endif +#ifdef UINT64_MAX +# if (0 ? defined _LP64 : defined _LP64) +# define _PRIu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRIu64_PREFIX "I64" +# elif ULONG_MAX >> 31 == 1 +# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRIo64 +# define PRIo64 _PRIu64_PREFIX "o" +# endif +# if !defined PRIu64 +# define PRIu64 _PRIu64_PREFIX "u" +# endif +# if !defined PRIx64 +# define PRIx64 _PRIu64_PREFIX "x" +# endif +# if !defined PRIX64 +# define PRIX64 _PRIu64_PREFIX "X" +# endif +#endif + +#if !defined PRIdLEAST8 +# define PRIdLEAST8 "d" +#endif +#if !defined PRIiLEAST8 +# define PRIiLEAST8 "i" +#endif +#if !defined PRIoLEAST8 +# define PRIoLEAST8 "o" +#endif +#if !defined PRIuLEAST8 +# define PRIuLEAST8 "u" +#endif +#if !defined PRIxLEAST8 +# define PRIxLEAST8 "x" +#endif +#if !defined PRIXLEAST8 +# define PRIXLEAST8 "X" +#endif +#if !defined PRIdLEAST16 +# define PRIdLEAST16 "d" +#endif +#if !defined PRIiLEAST16 +# define PRIiLEAST16 "i" +#endif +#if !defined PRIoLEAST16 +# define PRIoLEAST16 "o" +#endif +#if !defined PRIuLEAST16 +# define PRIuLEAST16 "u" +#endif +#if !defined PRIxLEAST16 +# define PRIxLEAST16 "x" +#endif +#if !defined PRIXLEAST16 +# define PRIXLEAST16 "X" +#endif +#if !defined PRIdLEAST32 +# define PRIdLEAST32 "d" +#endif +#if !defined PRIiLEAST32 +# define PRIiLEAST32 "i" +#endif +#if !defined PRIoLEAST32 +# define PRIoLEAST32 "o" +#endif +#if !defined PRIuLEAST32 +# define PRIuLEAST32 "u" +#endif +#if !defined PRIxLEAST32 +# define PRIxLEAST32 "x" +#endif +#if !defined PRIXLEAST32 +# define PRIXLEAST32 "X" +#endif +#ifdef INT64_MAX +# if !defined PRIdLEAST64 +# define PRIdLEAST64 PRId64 +# endif +# if !defined PRIiLEAST64 +# define PRIiLEAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoLEAST64 +# define PRIoLEAST64 PRIo64 +# endif +# if !defined PRIuLEAST64 +# define PRIuLEAST64 PRIu64 +# endif +# if !defined PRIxLEAST64 +# define PRIxLEAST64 PRIx64 +# endif +# if !defined PRIXLEAST64 +# define PRIXLEAST64 PRIX64 +# endif +#endif + +#if !defined PRIdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIdFAST8 PRId64 +# else +# define PRIdFAST8 "d" +# endif +#endif +#if !defined PRIiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIiFAST8 PRIi64 +# else +# define PRIiFAST8 "i" +# endif +#endif +#if !defined PRIoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIoFAST8 PRIo64 +# else +# define PRIoFAST8 "o" +# endif +#endif +#if !defined PRIuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIuFAST8 PRIu64 +# else +# define PRIuFAST8 "u" +# endif +#endif +#if !defined PRIxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIxFAST8 PRIx64 +# else +# define PRIxFAST8 "x" +# endif +#endif +#if !defined PRIXFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIXFAST8 PRIX64 +# else +# define PRIXFAST8 "X" +# endif +#endif +#if !defined PRIdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIdFAST16 PRId64 +# else +# define PRIdFAST16 "d" +# endif +#endif +#if !defined PRIiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIiFAST16 PRIi64 +# else +# define PRIiFAST16 "i" +# endif +#endif +#if !defined PRIoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIoFAST16 PRIo64 +# else +# define PRIoFAST16 "o" +# endif +#endif +#if !defined PRIuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIuFAST16 PRIu64 +# else +# define PRIuFAST16 "u" +# endif +#endif +#if !defined PRIxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIxFAST16 PRIx64 +# else +# define PRIxFAST16 "x" +# endif +#endif +#if !defined PRIXFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIXFAST16 PRIX64 +# else +# define PRIXFAST16 "X" +# endif +#endif +#if !defined PRIdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIdFAST32 PRId64 +# else +# define PRIdFAST32 "d" +# endif +#endif +#if !defined PRIiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIiFAST32 PRIi64 +# else +# define PRIiFAST32 "i" +# endif +#endif +#if !defined PRIoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIoFAST32 PRIo64 +# else +# define PRIoFAST32 "o" +# endif +#endif +#if !defined PRIuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIuFAST32 PRIu64 +# else +# define PRIuFAST32 "u" +# endif +#endif +#if !defined PRIxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIxFAST32 PRIx64 +# else +# define PRIxFAST32 "x" +# endif +#endif +#if !defined PRIXFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIXFAST32 PRIX64 +# else +# define PRIXFAST32 "X" +# endif +#endif +#ifdef INT64_MAX +# if !defined PRIdFAST64 +# define PRIdFAST64 PRId64 +# endif +# if !defined PRIiFAST64 +# define PRIiFAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoFAST64 +# define PRIoFAST64 PRIo64 +# endif +# if !defined PRIuFAST64 +# define PRIuFAST64 PRIu64 +# endif +# if !defined PRIxFAST64 +# define PRIxFAST64 PRIx64 +# endif +# if !defined PRIXFAST64 +# define PRIXFAST64 PRIX64 +# endif +#endif + +#if !defined PRIdMAX +# if 1 +# define PRIdMAX PRId64 +# else +# define PRIdMAX "ld" +# endif +#endif +#if !defined PRIiMAX +# if 1 +# define PRIiMAX PRIi64 +# else +# define PRIiMAX "li" +# endif +#endif +#if !defined PRIoMAX +# if 1 +# define PRIoMAX PRIo64 +# else +# define PRIoMAX "lo" +# endif +#endif +#if !defined PRIuMAX +# if 1 +# define PRIuMAX PRIu64 +# else +# define PRIuMAX "lu" +# endif +#endif +#if !defined PRIxMAX +# if 1 +# define PRIxMAX PRIx64 +# else +# define PRIxMAX "lx" +# endif +#endif +#if !defined PRIXMAX +# if 1 +# define PRIXMAX PRIX64 +# else +# define PRIXMAX "lX" +# endif +#endif + +#if !defined PRIdPTR +# ifdef INTPTR_MAX +# define PRIdPTR __PRIPTR_PREFIX "d" +# endif +#endif +#if !defined PRIiPTR +# ifdef INTPTR_MAX +# define PRIiPTR __PRIPTR_PREFIX "i" +# endif +#endif +#if !defined PRIoPTR +# ifdef UINTPTR_MAX +# define PRIoPTR __PRIPTR_PREFIX "o" +# endif +#endif +#if !defined PRIuPTR +# ifdef UINTPTR_MAX +# define PRIuPTR __PRIPTR_PREFIX "u" +# endif +#endif +#if !defined PRIxPTR +# ifdef UINTPTR_MAX +# define PRIxPTR __PRIPTR_PREFIX "x" +# endif +#endif +#if !defined PRIXPTR +# ifdef UINTPTR_MAX +# define PRIXPTR __PRIPTR_PREFIX "X" +# endif +#endif + +#if !defined SCNd8 +# ifdef INT8_MAX +# define SCNd8 "hhd" +# endif +#endif +#if !defined SCNi8 +# ifdef INT8_MAX +# define SCNi8 "hhi" +# endif +#endif +#if !defined SCNo8 +# ifdef UINT8_MAX +# define SCNo8 "hho" +# endif +#endif +#if !defined SCNu8 +# ifdef UINT8_MAX +# define SCNu8 "hhu" +# endif +#endif +#if !defined SCNx8 +# ifdef UINT8_MAX +# define SCNx8 "hhx" +# endif +#endif +#if !defined SCNd16 +# ifdef INT16_MAX +# define SCNd16 "hd" +# endif +#endif +#if !defined SCNi16 +# ifdef INT16_MAX +# define SCNi16 "hi" +# endif +#endif +#if !defined SCNo16 +# ifdef UINT16_MAX +# define SCNo16 "ho" +# endif +#endif +#if !defined SCNu16 +# ifdef UINT16_MAX +# define SCNu16 "hu" +# endif +#endif +#if !defined SCNx16 +# ifdef UINT16_MAX +# define SCNx16 "hx" +# endif +#endif +#if !defined SCNd32 +# ifdef INT32_MAX +# define SCNd32 "d" +# endif +#endif +#if !defined SCNi32 +# ifdef INT32_MAX +# define SCNi32 "i" +# endif +#endif +#if !defined SCNo32 +# ifdef UINT32_MAX +# define SCNo32 "o" +# endif +#endif +#if !defined SCNu32 +# ifdef UINT32_MAX +# define SCNu32 "u" +# endif +#endif +#if !defined SCNx32 +# ifdef UINT32_MAX +# define SCNx32 "x" +# endif +#endif +#ifdef INT64_MAX +# if (0 ? defined _LP64 : defined _LP64) +# define _SCN64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCN64_PREFIX "I64" +# elif LONG_MAX >> 30 == 1 +# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNd64 +# define SCNd64 _SCN64_PREFIX "d" +# endif +# if !defined SCNi64 +# define SCNi64 _SCN64_PREFIX "i" +# endif +#endif +#ifdef UINT64_MAX +# if (0 ? defined _LP64 : defined _LP64) +# define _SCNu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCNu64_PREFIX "I64" +# elif ULONG_MAX >> 31 == 1 +# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNo64 +# define SCNo64 _SCNu64_PREFIX "o" +# endif +# if !defined SCNu64 +# define SCNu64 _SCNu64_PREFIX "u" +# endif +# if !defined SCNx64 +# define SCNx64 _SCNu64_PREFIX "x" +# endif +#endif + +#if !defined SCNdLEAST8 +# define SCNdLEAST8 "hhd" +#endif +#if !defined SCNiLEAST8 +# define SCNiLEAST8 "hhi" +#endif +#if !defined SCNoLEAST8 +# define SCNoLEAST8 "hho" +#endif +#if !defined SCNuLEAST8 +# define SCNuLEAST8 "hhu" +#endif +#if !defined SCNxLEAST8 +# define SCNxLEAST8 "hhx" +#endif +#if !defined SCNdLEAST16 +# define SCNdLEAST16 "hd" +#endif +#if !defined SCNiLEAST16 +# define SCNiLEAST16 "hi" +#endif +#if !defined SCNoLEAST16 +# define SCNoLEAST16 "ho" +#endif +#if !defined SCNuLEAST16 +# define SCNuLEAST16 "hu" +#endif +#if !defined SCNxLEAST16 +# define SCNxLEAST16 "hx" +#endif +#if !defined SCNdLEAST32 +# define SCNdLEAST32 "d" +#endif +#if !defined SCNiLEAST32 +# define SCNiLEAST32 "i" +#endif +#if !defined SCNoLEAST32 +# define SCNoLEAST32 "o" +#endif +#if !defined SCNuLEAST32 +# define SCNuLEAST32 "u" +#endif +#if !defined SCNxLEAST32 +# define SCNxLEAST32 "x" +#endif +#ifdef INT64_MAX +# if !defined SCNdLEAST64 +# define SCNdLEAST64 SCNd64 +# endif +# if !defined SCNiLEAST64 +# define SCNiLEAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoLEAST64 +# define SCNoLEAST64 SCNo64 +# endif +# if !defined SCNuLEAST64 +# define SCNuLEAST64 SCNu64 +# endif +# if !defined SCNxLEAST64 +# define SCNxLEAST64 SCNx64 +# endif +#endif + +#if !defined SCNdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNdFAST8 SCNd64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNdFAST8 "hd" +# elif INT_FAST8_MAX == 0x7f +# define SCNdFAST8 "hhd" +# else +# define SCNdFAST8 "d" +# endif +#endif +#if !defined SCNiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNiFAST8 SCNi64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNiFAST8 "hi" +# elif INT_FAST8_MAX == 0x7f +# define SCNiFAST8 "hhi" +# else +# define SCNiFAST8 "i" +# endif +#endif +#if !defined SCNoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNoFAST8 SCNo64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNoFAST8 "ho" +# elif UINT_FAST8_MAX == 0xff +# define SCNoFAST8 "hho" +# else +# define SCNoFAST8 "o" +# endif +#endif +#if !defined SCNuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNuFAST8 SCNu64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNuFAST8 "hu" +# elif UINT_FAST8_MAX == 0xff +# define SCNuFAST8 "hhu" +# else +# define SCNuFAST8 "u" +# endif +#endif +#if !defined SCNxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNxFAST8 SCNx64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNxFAST8 "hx" +# elif UINT_FAST8_MAX == 0xff +# define SCNxFAST8 "hhx" +# else +# define SCNxFAST8 "x" +# endif +#endif +#if !defined SCNdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNdFAST16 SCNd64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNdFAST16 "hd" +# else +# define SCNdFAST16 "d" +# endif +#endif +#if !defined SCNiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNiFAST16 SCNi64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNiFAST16 "hi" +# else +# define SCNiFAST16 "i" +# endif +#endif +#if !defined SCNoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNoFAST16 SCNo64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNoFAST16 "ho" +# else +# define SCNoFAST16 "o" +# endif +#endif +#if !defined SCNuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNuFAST16 SCNu64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNuFAST16 "hu" +# else +# define SCNuFAST16 "u" +# endif +#endif +#if !defined SCNxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNxFAST16 SCNx64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNxFAST16 "hx" +# else +# define SCNxFAST16 "x" +# endif +#endif +#if !defined SCNdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNdFAST32 SCNd64 +# else +# define SCNdFAST32 "d" +# endif +#endif +#if !defined SCNiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNiFAST32 SCNi64 +# else +# define SCNiFAST32 "i" +# endif +#endif +#if !defined SCNoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNoFAST32 SCNo64 +# else +# define SCNoFAST32 "o" +# endif +#endif +#if !defined SCNuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNuFAST32 SCNu64 +# else +# define SCNuFAST32 "u" +# endif +#endif +#if !defined SCNxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNxFAST32 SCNx64 +# else +# define SCNxFAST32 "x" +# endif +#endif +#ifdef INT64_MAX +# if !defined SCNdFAST64 +# define SCNdFAST64 SCNd64 +# endif +# if !defined SCNiFAST64 +# define SCNiFAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoFAST64 +# define SCNoFAST64 SCNo64 +# endif +# if !defined SCNuFAST64 +# define SCNuFAST64 SCNu64 +# endif +# if !defined SCNxFAST64 +# define SCNxFAST64 SCNx64 +# endif +#endif + +#if !defined SCNdMAX +# if 1 +# define SCNdMAX SCNd64 +# else +# define SCNdMAX "ld" +# endif +#endif +#if !defined SCNiMAX +# if 1 +# define SCNiMAX SCNi64 +# else +# define SCNiMAX "li" +# endif +#endif +#if !defined SCNoMAX +# if 1 +# define SCNoMAX SCNo64 +# else +# define SCNoMAX "lo" +# endif +#endif +#if !defined SCNuMAX +# if 1 +# define SCNuMAX SCNu64 +# else +# define SCNuMAX "lu" +# endif +#endif +#if !defined SCNxMAX +# if 1 +# define SCNxMAX SCNx64 +# else +# define SCNxMAX "lx" +# endif +#endif + +#if !defined SCNdPTR +# ifdef INTPTR_MAX +# define SCNdPTR __PRIPTR_PREFIX "d" +# endif +#endif +#if !defined SCNiPTR +# ifdef INTPTR_MAX +# define SCNiPTR __PRIPTR_PREFIX "i" +# endif +#endif +#if !defined SCNoPTR +# ifdef UINTPTR_MAX +# define SCNoPTR __PRIPTR_PREFIX "o" +# endif +#endif +#if !defined SCNuPTR +# ifdef UINTPTR_MAX +# define SCNuPTR __PRIPTR_PREFIX "u" +# endif +#endif +#if !defined SCNxPTR +# ifdef UINTPTR_MAX +# define SCNxPTR __PRIPTR_PREFIX "x" +# endif +#endif + +/* 7.8.2 Functions for greatest-width integer types */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxabs +# define imaxabs rpl_imaxabs +# endif +_GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x)); +_GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +_GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxabs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef imaxabs +# if HAVE_RAW_DECL_IMAXABS +_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " + "use gnulib module imaxabs for portability"); +# endif +#endif + +#if 0 +# if !1 +# if !GNULIB_defined_imaxdiv_t +typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; +# define GNULIB_defined_imaxdiv_t 1 +# endif +# endif +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxdiv +# define imaxdiv rpl_imaxdiv +# endif +_GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +_GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +_GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxdiv); +# endif +#elif defined GNULIB_POSIXCHECK +# undef imaxdiv +# if HAVE_RAW_DECL_IMAXDIV +_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " + "use gnulib module imaxdiv for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoimax +# define strtoimax rpl_strtoimax +# endif +_GL_FUNCDECL_RPL (strtoimax, intmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoimax, intmax_t, + (const char *restrict, char **restrict, int)); +# else +# if !1 +# undef strtoimax +_GL_FUNCDECL_SYS (strtoimax, intmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoimax, intmax_t, + (const char *restrict, char **restrict, int)); +# endif +_GL_CXXALIASWARN (strtoimax); +#elif defined GNULIB_POSIXCHECK +# undef strtoimax +# if HAVE_RAW_DECL_STRTOIMAX +_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " + "use gnulib module strtoimax for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoumax +# define strtoumax rpl_strtoumax +# endif +_GL_FUNCDECL_RPL (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int)); +# else +# if !1 +# undef strtoumax +_GL_FUNCDECL_SYS (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int)); +# endif +_GL_CXXALIASWARN (strtoumax); +#elif defined GNULIB_POSIXCHECK +# undef strtoumax +# if HAVE_RAW_DECL_STRTOUMAX +_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " + "use gnulib module strtoumax for portability"); +# endif +#endif + +/* Don't bother defining or declaring wcstoimax and wcstoumax, since + wide-character functions like this are hardly ever useful. */ + +#ifdef __cplusplus +} +#endif + +#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/sys/ioctl.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/langinfo.h similarity index 67% rename from gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/sys/ioctl.h rename to gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/langinfo.h index efe25f78a..e6ef3b988 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/sys/ioctl.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/langinfo.h @@ -1,21 +1,26 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Substitute for and wrapper around . - Copyright (C) 2008-2020 Free Software Foundation, Inc. +/* Substitute for and wrapper around . + Copyright (C) 2009-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ +/* + * POSIX for platforms that lack it or have an incomplete one. + * + */ -#ifndef _GL_SYS_IOCTL_H +#ifndef _GL_LANGINFO_H #if __GNUC__ >= 3 @@ -24,35 +29,181 @@ /* The include_next requires a split double-inclusion guard. */ #if 0 -# include +# include #endif -#ifndef _GL_SYS_IOCTL_H -#define _GL_SYS_IOCTL_H +#ifndef _GL_LANGINFO_H +#define _GL_LANGINFO_H + +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + + +#if !0 + +/* A platform that lacks . */ + +/* Assume that it also lacks and the nl_item type. */ +# if !GNULIB_defined_nl_item +typedef int nl_item; +# define GNULIB_defined_nl_item 1 +# endif + +/* nl_langinfo items of the LC_CTYPE category */ +# define CODESET 10000 +/* nl_langinfo items of the LC_NUMERIC category */ +# define RADIXCHAR 10001 +# define DECIMAL_POINT RADIXCHAR +# define THOUSEP 10002 +# define THOUSANDS_SEP THOUSEP +# define GROUPING 10114 +/* nl_langinfo items of the LC_TIME category */ +# define D_T_FMT 10003 +# define D_FMT 10004 +# define T_FMT 10005 +# define T_FMT_AMPM 10006 +# define AM_STR 10007 +# define PM_STR 10008 +# define DAY_1 10009 +# define DAY_2 (DAY_1 + 1) +# define DAY_3 (DAY_1 + 2) +# define DAY_4 (DAY_1 + 3) +# define DAY_5 (DAY_1 + 4) +# define DAY_6 (DAY_1 + 5) +# define DAY_7 (DAY_1 + 6) +# define ABDAY_1 10016 +# define ABDAY_2 (ABDAY_1 + 1) +# define ABDAY_3 (ABDAY_1 + 2) +# define ABDAY_4 (ABDAY_1 + 3) +# define ABDAY_5 (ABDAY_1 + 4) +# define ABDAY_6 (ABDAY_1 + 5) +# define ABDAY_7 (ABDAY_1 + 6) +# define MON_1 10023 +# define MON_2 (MON_1 + 1) +# define MON_3 (MON_1 + 2) +# define MON_4 (MON_1 + 3) +# define MON_5 (MON_1 + 4) +# define MON_6 (MON_1 + 5) +# define MON_7 (MON_1 + 6) +# define MON_8 (MON_1 + 7) +# define MON_9 (MON_1 + 8) +# define MON_10 (MON_1 + 9) +# define MON_11 (MON_1 + 10) +# define MON_12 (MON_1 + 11) +# define ALTMON_1 10200 +# define ALTMON_2 (ALTMON_1 + 1) +# define ALTMON_3 (ALTMON_1 + 2) +# define ALTMON_4 (ALTMON_1 + 3) +# define ALTMON_5 (ALTMON_1 + 4) +# define ALTMON_6 (ALTMON_1 + 5) +# define ALTMON_7 (ALTMON_1 + 6) +# define ALTMON_8 (ALTMON_1 + 7) +# define ALTMON_9 (ALTMON_1 + 8) +# define ALTMON_10 (ALTMON_1 + 9) +# define ALTMON_11 (ALTMON_1 + 10) +# define ALTMON_12 (ALTMON_1 + 11) +# define ABMON_1 10035 +# define ABMON_2 (ABMON_1 + 1) +# define ABMON_3 (ABMON_1 + 2) +# define ABMON_4 (ABMON_1 + 3) +# define ABMON_5 (ABMON_1 + 4) +# define ABMON_6 (ABMON_1 + 5) +# define ABMON_7 (ABMON_1 + 6) +# define ABMON_8 (ABMON_1 + 7) +# define ABMON_9 (ABMON_1 + 8) +# define ABMON_10 (ABMON_1 + 9) +# define ABMON_11 (ABMON_1 + 10) +# define ABMON_12 (ABMON_1 + 11) +# define ERA 10047 +# define ERA_D_FMT 10048 +# define ERA_D_T_FMT 10049 +# define ERA_T_FMT 10050 +# define ALT_DIGITS 10051 +/* nl_langinfo items of the LC_MONETARY category */ +# define CRNCYSTR 10052 +# define CURRENCY_SYMBOL CRNCYSTR +# define INT_CURR_SYMBOL 10100 +# define MON_DECIMAL_POINT 10101 +# define MON_THOUSANDS_SEP 10102 +# define MON_GROUPING 10103 +# define POSITIVE_SIGN 10104 +# define NEGATIVE_SIGN 10105 +# define FRAC_DIGITS 10106 +# define INT_FRAC_DIGITS 10107 +# define P_CS_PRECEDES 10108 +# define N_CS_PRECEDES 10109 +# define P_SEP_BY_SPACE 10110 +# define N_SEP_BY_SPACE 10111 +# define P_SIGN_POSN 10112 +# define N_SIGN_POSN 10113 +/* nl_langinfo items of the LC_MESSAGES category */ +# define YESEXPR 10053 +# define NOEXPR 10054 + +#else + +/* A platform that has . */ + +# if !0 +# define CODESET 10000 +# define GNULIB_defined_CODESET 1 +# endif + +# if !0 +# define T_FMT_AMPM 10006 +# define GNULIB_defined_T_FMT_AMPM 1 +# endif + +# if !0 +# define ALTMON_1 10200 +# define ALTMON_2 (ALTMON_1 + 1) +# define ALTMON_3 (ALTMON_1 + 2) +# define ALTMON_4 (ALTMON_1 + 3) +# define ALTMON_5 (ALTMON_1 + 4) +# define ALTMON_6 (ALTMON_1 + 5) +# define ALTMON_7 (ALTMON_1 + 6) +# define ALTMON_8 (ALTMON_1 + 7) +# define ALTMON_9 (ALTMON_1 + 8) +# define ALTMON_10 (ALTMON_1 + 9) +# define ALTMON_11 (ALTMON_1 + 10) +# define ALTMON_12 (ALTMON_1 + 11) +# define GNULIB_defined_ALTMON 1 +# endif + +# if !0 +# define ERA 10047 +# define ERA_D_FMT 10048 +# define ERA_D_T_FMT 10049 +# define ERA_T_FMT 10050 +# define ALT_DIGITS 10051 +# define GNULIB_defined_ERA 1 +# endif + +# if !0 +# define YESEXPR 10053 +# define NOEXPR 10054 +# define GNULIB_defined_YESEXPR 1 +# endif -/* AIX 5.1 and Solaris 10 declare ioctl() in and in , - but not in . - Haiku declares ioctl() in , but not in . - But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -# include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -140,6 +291,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -187,6 +344,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -212,6 +379,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -309,7 +484,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -337,9 +512,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -355,19 +530,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -440,13 +615,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -455,27 +637,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -491,39 +679,38 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif - /* Declare overridden functions. */ -#if IN_GETTEXT_TOOLS_GNULIB_TESTS + +/* Return a piece of locale dependent information. + Note: The difference between nl_langinfo (CODESET) and locale_charset () + is that the latter normalizes the encoding names to GNU conventions. */ + +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ioctl -# define ioctl rpl_ioctl +# undef nl_langinfo +# define nl_langinfo rpl_nl_langinfo # endif -_GL_FUNCDECL_RPL (ioctl, int, - (int fd, int request, ... /* {void *,char *} arg */)); -_GL_CXXALIAS_RPL (ioctl, int, - (int fd, int request, ... /* {void *,char *} arg */)); +_GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item)); +_GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item)); # else -# if 1 || 1 -_GL_FUNCDECL_SYS (ioctl, int, - (int fd, int request, ... /* {void *,char *} arg */)); +# if !1 +_GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); # endif -_GL_CXXALIAS_SYS (ioctl, int, - (int fd, int request, ... /* {void *,char *} arg */)); +_GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (nl_langinfo); # endif -_GL_CXXALIASWARN (ioctl); -#elif 1 -# undef ioctl -# define ioctl ioctl_used_without_requesting_gnulib_module_ioctl #elif defined GNULIB_POSIXCHECK -# undef ioctl -# if HAVE_RAW_DECL_IOCTL -_GL_WARN_ON_USE (ioctl, "ioctl does not portably work on sockets - " - "use gnulib module ioctl for portability"); +# undef nl_langinfo +# if HAVE_RAW_DECL_NL_LANGINFO +_GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " + "use gnulib module nl_langinfo for portability"); # endif #endif -#endif /* _GL_SYS_IOCTL_H */ -#endif /* _GL_SYS_IOCTL_H */ +#endif /* _GL_LANGINFO_H */ +#endif /* _GL_LANGINFO_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/limits.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/limits.h new file mode 100644 index 000000000..b2b002ffe --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/limits.h @@ -0,0 +1,152 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A GNU-like . + + Copyright 2016-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +#if defined _GL_ALREADY_INCLUDING_LIMITS_H +/* Special invocation convention: + On Haiku/x86_64, we have a sequence of nested includes + -> -> . + In this situation, LONG_MAX and INT_MAX are not yet defined, + therefore we should not attempt to define LONG_BIT. */ + +#include "../include/limits.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_LIMITS_H + +# define _GL_ALREADY_INCLUDING_LIMITS_H + +/* The include_next requires a split double-inclusion guard. */ +# include "../include/limits.h" + +# undef _GL_ALREADY_INCLUDING_LIMITS_H + +#ifndef _GL_LIMITS_H +#define _GL_LIMITS_H + +#ifndef LLONG_MIN +# if defined LONG_LONG_MIN /* HP-UX 11.31 */ +# define LLONG_MIN LONG_LONG_MIN +# elif defined LONGLONG_MIN /* IRIX 6.5 */ +# define LLONG_MIN LONGLONG_MIN +# elif defined __GNUC__ +# define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL) +# endif +#endif +#ifndef LLONG_MAX +# if defined LONG_LONG_MAX /* HP-UX 11.31 */ +# define LLONG_MAX LONG_LONG_MAX +# elif defined LONGLONG_MAX /* IRIX 6.5 */ +# define LLONG_MAX LONGLONG_MAX +# elif defined __GNUC__ +# define LLONG_MAX __LONG_LONG_MAX__ +# endif +#endif +#ifndef ULLONG_MAX +# if defined ULONG_LONG_MAX /* HP-UX 11.31 */ +# define ULLONG_MAX ULONG_LONG_MAX +# elif defined ULONGLONG_MAX /* IRIX 6.5 */ +# define ULLONG_MAX ULONGLONG_MAX +# elif defined __GNUC__ +# define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL) +# endif +#endif + +/* The number of usable bits in an unsigned or signed integer type + with minimum value MIN and maximum value MAX, as an int expression + suitable in #if. Cover all known practical hosts. This + implementation exploits the fact that MAX is 1 less than a power of + 2, and merely counts the number of 1 bits in MAX; "COBn" means + "count the number of 1 bits in the low-order n bits"). */ +#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max)) +#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n)) +#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n)) +#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n)) +#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n)) +#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n)) +#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1)) + +#ifndef WORD_BIT +/* Assume 'int' is 32 bits wide. */ +# define WORD_BIT 32 +#endif +#ifndef LONG_BIT +/* Assume 'long' is 32 or 64 bits wide. */ +# if LONG_MAX == INT_MAX +# define LONG_BIT 32 +# else +# define LONG_BIT 64 +# endif +#endif + +/* Assume no multibyte character is longer than 16 bytes. */ +#ifndef MB_LEN_MAX +# define MB_LEN_MAX 16 +#endif + +/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */ + +#if (! defined ULLONG_WIDTH \ + && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) +# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) +# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) +# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) +# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX) +# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX) +# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX) +# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX) +# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX) +# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) +# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) +# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) +#endif + +/* Macros specified by C23. */ + +#if (defined _GNU_SOURCE \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)) +# if ! defined BOOL_WIDTH +# define BOOL_WIDTH 1 +# define BOOL_MAX 1 +# elif ! defined BOOL_MAX +# define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1) +# endif +#endif + +/* Macro specified by POSIX. */ + +/* The maximum ssize_t value. Although it might not be of ssize_t type + as it should be, it's too much trouble to fix this minor detail. */ +#ifndef SSIZE_MAX +# ifdef _WIN64 +# define SSIZE_MAX LLONG_MAX +# else +# define SSIZE_MAX LONG_MAX +# endif +#endif + +#endif /* _GL_LIMITS_H */ +#endif /* _GL_LIMITS_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/locale.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/locale.h new file mode 100644 index 000000000..1b49ec684 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/locale.h @@ -0,0 +1,823 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A POSIX . + Copyright (C) 2007-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +#if (defined _WIN32 && !defined __CYGWIN__ && defined __need_locale_t) \ + || defined _GL_ALREADY_INCLUDING_LOCALE_H + +/* Special invocation convention: + - Inside mingw header files, + - To handle Solaris header files (through Solaris 10) when combined + with gettext's libintl.h. */ + +#include "../ucrt/locale.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_LOCALE_H + +#define _GL_ALREADY_INCLUDING_LOCALE_H + +/* The include_next requires a split double-inclusion guard. */ +#include "../ucrt/locale.h" + +#undef _GL_ALREADY_INCLUDING_LOCALE_H + +#ifndef _GL_LOCALE_H +#define _GL_LOCALE_H + +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* NetBSD 5.0 mis-defines NULL. */ +#include + +/* Mac OS X 10.5 defines the locale_t type in . */ +#if 0 +# include +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + +/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C. + On systems that don't define it, use the same value as GNU libintl. */ +#if !defined LC_MESSAGES +# define LC_MESSAGES 1729 +#endif + +/* On native Windows with MSVC, 'struct lconv' lacks the members int_p_* and + int_n_*. Instead of overriding 'struct lconv', merely define these member + names as macros. This avoids trouble in C++ mode. */ +#if defined _MSC_VER +# define int_p_cs_precedes p_cs_precedes +# define int_p_sign_posn p_sign_posn +# define int_p_sep_by_space p_sep_by_space +# define int_n_cs_precedes n_cs_precedes +# define int_n_sign_posn n_sign_posn +# define int_n_sep_by_space n_sep_by_space +#endif + +/* Bionic libc's 'struct lconv' is just a dummy. */ +#if 0 +# define lconv rpl_lconv +struct lconv +{ + /* All 'char *' are actually 'const char *'. */ + + /* Members that depend on the LC_NUMERIC category of the locale. See + */ + + /* Symbol used as decimal point. */ + char *decimal_point; + /* Symbol used to separate groups of digits to the left of the decimal + point. */ + char *thousands_sep; + /* Definition of the size of groups of digits to the left of the decimal + point. */ + char *grouping; + + /* Members that depend on the LC_MONETARY category of the locale. See + */ + + /* Symbol used as decimal point. */ + char *mon_decimal_point; + /* Symbol used to separate groups of digits to the left of the decimal + point. */ + char *mon_thousands_sep; + /* Definition of the size of groups of digits to the left of the decimal + point. */ + char *mon_grouping; + /* Sign used to indicate a value >= 0. */ + char *positive_sign; + /* Sign used to indicate a value < 0. */ + char *negative_sign; + + /* For formatting local currency. */ + /* Currency symbol (3 characters) followed by separator (1 character). */ + char *currency_symbol; + /* Number of digits after the decimal point. */ + char frac_digits; + /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char p_cs_precedes; + /* For values >= 0: Position of the sign. */ + char p_sign_posn; + /* For values >= 0: Placement of spaces between currency symbol, sign, and + number. */ + char p_sep_by_space; + /* For values < 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char n_cs_precedes; + /* For values < 0: Position of the sign. */ + char n_sign_posn; + /* For values < 0: Placement of spaces between currency symbol, sign, and + number. */ + char n_sep_by_space; + + /* For formatting international currency. */ + /* Currency symbol (3 characters) followed by separator (1 character). */ + char *int_curr_symbol; + /* Number of digits after the decimal point. */ + char int_frac_digits; + /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char int_p_cs_precedes; + /* For values >= 0: Position of the sign. */ + char int_p_sign_posn; + /* For values >= 0: Placement of spaces between currency symbol, sign, and + number. */ + char int_p_sep_by_space; + /* For values < 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char int_n_cs_precedes; + /* For values < 0: Position of the sign. */ + char int_n_sign_posn; + /* For values < 0: Placement of spaces between currency symbol, sign, and + number. */ + char int_n_sep_by_space; +}; +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef localeconv +# define localeconv rpl_localeconv +# endif +_GL_FUNCDECL_RPL (localeconv, struct lconv *, (void)); +_GL_CXXALIAS_RPL (localeconv, struct lconv *, (void)); +# else +_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (localeconv); +# endif +#elif 0 +# undef localeconv +# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv +#elif defined GNULIB_POSIXCHECK +# undef localeconv +# if HAVE_RAW_DECL_LOCALECONV +_GL_WARN_ON_USE (localeconv, + "localeconv returns too few information on some platforms - " + "use gnulib module localeconv for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setlocale +# define setlocale rpl_setlocale +# define GNULIB_defined_setlocale 1 +# endif +_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale)); +_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale)); +# else +_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (setlocale); +# endif +#elif defined GNULIB_POSIXCHECK +# undef setlocale +# if HAVE_RAW_DECL_SETLOCALE +_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " + "use gnulib module setlocale for portability"); +# endif +#endif + +#if 1 +/* Included here for convenience. */ +# include "setlocale_null.h" +#endif + +#if /*@GNULIB_NEWLOCALE@ ||*/ (1 && 0 && 0) +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef newlocale +# define newlocale rpl_newlocale +# define GNULIB_defined_newlocale 1 +# endif +_GL_FUNCDECL_RPL (newlocale, locale_t, + (int category_mask, const char *name, locale_t base) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (newlocale, locale_t, + (int category_mask, const char *name, locale_t base)); +# else +# if 0 +_GL_CXXALIAS_SYS (newlocale, locale_t, + (int category_mask, const char *name, locale_t base)); +# endif +# endif +# if __GLIBC__ >= 2 && 0 +_GL_CXXALIASWARN (newlocale); +# endif +# if 0 || 1 +# ifndef HAVE_WORKING_NEWLOCALE +# define HAVE_WORKING_NEWLOCALE 1 +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# undef newlocale +# if HAVE_RAW_DECL_NEWLOCALE +_GL_WARN_ON_USE (newlocale, "newlocale is not portable"); +# endif +#endif + +#if 0 || (1 && 0 && 0) +# if 0 /* locale_t may be undefined if !0. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef duplocale +# define duplocale rpl_duplocale +# define GNULIB_defined_duplocale 1 +# endif +_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); +# else +_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); +# endif +# endif +# if __GLIBC__ >= 2 && 0 +_GL_CXXALIASWARN (duplocale); +# endif +# if 0 +# ifndef HAVE_WORKING_DUPLOCALE +# define HAVE_WORKING_DUPLOCALE 1 +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# undef duplocale +# if HAVE_RAW_DECL_DUPLOCALE +_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " + "use gnulib module duplocale for portability"); +# endif +#endif + +#if /*@GNULIB_FREELOCALE@ ||*/ (1 && 0 && 0) +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef freelocale +# define freelocale rpl_freelocale +# define GNULIB_defined_freelocale 1 +# endif +_GL_FUNCDECL_RPL (freelocale, void, (locale_t locale) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (freelocale, void, (locale_t locale)); +# else +# if 0 +/* Need to cast, because on FreeBSD and Mac OS X 10.13, the return type is + int. */ +_GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale)); +# endif +# endif +# if __GLIBC__ >= 2 && 0 +_GL_CXXALIASWARN (freelocale); +# endif +#elif defined GNULIB_POSIXCHECK +# undef freelocale +# if HAVE_RAW_DECL_FREELOCALE +_GL_WARN_ON_USE (freelocale, "freelocale is not portable"); +# endif +#endif + +#endif /* _GL_LOCALE_H */ +#endif /* _GL_LOCALE_H */ +#endif /* !(__need_locale_t || _GL_ALREADY_INCLUDING_LOCALE_H) */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/math.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/math.h similarity index 84% rename from gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/math.h rename to gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/math.h index 91bc1bdf7..cd34bb0b0 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/math.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/math.h @@ -1,21 +1,26 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2007-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ +/* On Android, in C++ mode, when /usr/include/c++/v1/math.h is being included + and /usr/include/math.h has not yet been included, skip this file, since it + would lead to many syntax errors. */ +#if !(defined __ANDROID__ && defined _LIBCPP_MATH_H && !defined INFINITY) + #ifndef _GL_MATH_H #if __GNUC__ >= 3 @@ -23,40 +28,68 @@ #endif +#if defined _GL_INCLUDING_MATH_H +/* Special invocation convention: + - On FreeBSD 12.2 we have a sequence of nested includes + -> -> -> -> + -> -> -> -> + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. */ + +#include "../ucrt/math.h" + +#else +/* Normal invocation convention. */ + /* The include_next requires a split double-inclusion guard. */ +#define _GL_INCLUDING_MATH_H #include "../ucrt/math.h" +#undef _GL_INCLUDING_MATH_H #ifndef _GL_MATH_H #define _GL_MATH_H +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_CONST, + GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ #if defined __VMS && ! defined NAN # include #endif -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_MATH_INLINE # define _GL_MATH_INLINE _GL_INLINE #endif +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __const__ was added in gcc 2.95. */ +#ifndef _GL_ATTRIBUTE_CONST +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__ +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _GL_ATTRIBUTE_CONST /* empty */ +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -144,6 +177,12 @@ _GL_INLINE_HEADER_BEGIN Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -191,6 +230,16 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -216,6 +265,14 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -313,7 +370,7 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -341,9 +398,9 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -359,26 +416,26 @@ _GL_INLINE_HEADER_BEGIN /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -387,19 +444,19 @@ _GL_INLINE_HEADER_BEGIN /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -472,13 +529,20 @@ _GL_INLINE_HEADER_BEGIN # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -487,27 +551,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -603,12 +673,6 @@ static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; #endif -/* For clang: Use __has_builtin to determine whether a builtin is available. */ -#ifndef __has_builtin -# define __has_builtin(name) 0 -#endif - - /* POSIX allows platforms that don't support NAN. But all major machines in the past 15 years have supported something close to IEEE NaN, so we define this unconditionally. We also must define @@ -737,7 +801,9 @@ _GL_WARN_ON_USE (acosf, "acosf is unportable - " _GL_FUNCDECL_SYS (acosl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (acosl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (acosl); +# endif #elif defined GNULIB_POSIXCHECK # undef acosl # if HAVE_RAW_DECL_ACOSL @@ -777,7 +843,9 @@ _GL_WARN_ON_USE (asinf, "asinf is unportable - " _GL_FUNCDECL_SYS (asinl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (asinl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (asinl); +# endif #elif defined GNULIB_POSIXCHECK # undef asinl # if HAVE_RAW_DECL_ASINL @@ -817,7 +885,9 @@ _GL_WARN_ON_USE (atanf, "atanf is unportable - " _GL_FUNCDECL_SYS (atanl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (atanl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (atanl); +# endif #elif defined GNULIB_POSIXCHECK # undef atanl # if HAVE_RAW_DECL_ATANL @@ -881,7 +951,7 @@ _GL_FUNCDECL_SYS (cbrt, double, (double x)); # endif _GL_CXXALIAS_SYS (cbrt, double, (double x)); # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (cbrt); +_GL_CXXALIASWARN1 (cbrt, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef cbrt @@ -905,7 +975,9 @@ _GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (cbrtl); +# endif #elif defined GNULIB_POSIXCHECK # undef cbrtl # if HAVE_RAW_DECL_CBRTL @@ -951,7 +1023,7 @@ _GL_CXXALIAS_RPL (ceil, double, (double x)); _GL_CXXALIAS_SYS (ceil, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ceil); +_GL_CXXALIASWARN1 (ceil, double, (double x)); # endif #endif @@ -970,7 +1042,9 @@ _GL_FUNCDECL_SYS (ceill, long double, (long double x)); # endif _GL_CXXALIAS_SYS (ceill, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ceill); +# endif #elif defined GNULIB_POSIXCHECK # undef ceill # if HAVE_RAW_DECL_CEILL @@ -1001,7 +1075,7 @@ _GL_FUNCDECL_SYS (copysign, double, (double x, double y)); # endif _GL_CXXALIAS_SYS (copysign, double, (double x, double y)); # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (copysign); +_GL_CXXALIASWARN1 (copysign, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef copysign @@ -1016,7 +1090,9 @@ _GL_WARN_ON_USE (copysign, "copysign is unportable - " _GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (copysignl); +# endif #elif defined GNULIB_POSIXCHECK # undef copysignl # if HAVE_RAW_DECL_COPYSIGNL @@ -1056,7 +1132,9 @@ _GL_WARN_ON_USE (cosf, "cosf is unportable - " _GL_FUNCDECL_SYS (cosl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (cosl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (cosl); +# endif #elif defined GNULIB_POSIXCHECK # undef cosl # if HAVE_RAW_DECL_COSL @@ -1130,7 +1208,9 @@ _GL_FUNCDECL_SYS (expl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (expl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (expl); +# endif #elif defined GNULIB_POSIXCHECK # undef expl # if HAVE_RAW_DECL_EXPL @@ -1169,7 +1249,7 @@ _GL_FUNCDECL_SYS (exp2, double, (double x)); _GL_CXXALIAS_SYS (exp2, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (exp2); +_GL_CXXALIASWARN1 (exp2, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef exp2 @@ -1194,7 +1274,9 @@ _GL_FUNCDECL_SYS (exp2l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (exp2l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (exp2l); +# endif #elif defined GNULIB_POSIXCHECK # undef exp2l # if HAVE_RAW_DECL_EXP2L @@ -1242,7 +1324,7 @@ _GL_FUNCDECL_SYS (expm1, double, (double x)); _GL_CXXALIAS_SYS (expm1, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (expm1); +_GL_CXXALIASWARN1 (expm1, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef expm1 @@ -1269,7 +1351,9 @@ _GL_FUNCDECL_SYS (expm1l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (expm1l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (expm1l); +# endif #elif defined GNULIB_POSIXCHECK # undef expm1l # if HAVE_RAW_DECL_EXPM1L @@ -1285,7 +1369,9 @@ _GL_WARN_ON_USE (expm1l, "expm1l is unportable - " _GL_FUNCDECL_SYS (fabsf, float, (float x)); # endif _GL_CXXALIAS_SYS (fabsf, float, (float x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fabsf); +# endif #elif defined GNULIB_POSIXCHECK # undef fabsf # if HAVE_RAW_DECL_FABSF @@ -1309,7 +1395,9 @@ _GL_FUNCDECL_SYS (fabsl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (fabsl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fabsl); +# endif #elif defined GNULIB_POSIXCHECK # undef fabsl # if HAVE_RAW_DECL_FABSL @@ -1355,7 +1443,7 @@ _GL_CXXALIAS_RPL (floor, double, (double x)); _GL_CXXALIAS_SYS (floor, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (floor); +_GL_CXXALIASWARN1 (floor, double, (double x)); # endif #endif @@ -1374,7 +1462,9 @@ _GL_FUNCDECL_SYS (floorl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (floorl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (floorl); +# endif #elif defined GNULIB_POSIXCHECK # undef floorl # if HAVE_RAW_DECL_FLOORL @@ -1424,7 +1514,7 @@ _GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fma); +_GL_CXXALIASWARN1 (fma, double, (double x, double y, double z)); # endif #elif defined GNULIB_POSIXCHECK # undef fma @@ -1455,7 +1545,9 @@ _GL_FUNCDECL_SYS (fmal, long double, _GL_CXXALIAS_SYS (fmal, long double, (long double x, long double y, long double z)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fmal); +# endif #elif defined GNULIB_POSIXCHECK # undef fmal # if HAVE_RAW_DECL_FMAL @@ -1501,7 +1593,7 @@ _GL_CXXALIAS_RPL (fmod, double, (double x, double y)); _GL_CXXALIAS_SYS (fmod, double, (double x, double y)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fmod); +_GL_CXXALIASWARN1 (fmod, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef fmod @@ -1526,7 +1618,9 @@ _GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fmodl); +# endif #elif defined GNULIB_POSIXCHECK # undef fmodl # if HAVE_RAW_DECL_FMODL @@ -1558,7 +1652,9 @@ _GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (frexpf); +# endif #elif defined GNULIB_POSIXCHECK # undef frexpf # if HAVE_RAW_DECL_FREXPF @@ -1574,7 +1670,7 @@ _GL_WARN_ON_USE (frexpf, "frexpf is unportable - " If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ -#if 0 +#if 1 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef frexp @@ -1602,7 +1698,7 @@ _GL_WARN_ON_USE (frexp, "frexp is unportable - " If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ -#if 0 && 0 +#if 1 && 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef frexpl # define frexpl rpl_frexpl @@ -1615,14 +1711,16 @@ _GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); _GL_FUNCDECL_SYS (frexpl, long double, (long double x, int *expptr) _GL_ARG_NONNULL ((2))); # endif -# if 0 +# if 1 _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); # endif #endif -#if 0 && !(0 && !1) +#if 1 && !(0 && !1) +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (frexpl); +# endif #endif -#if !0 && defined GNULIB_POSIXCHECK +#if !1 && defined GNULIB_POSIXCHECK # undef frexpl # if HAVE_RAW_DECL_FREXPL _GL_WARN_ON_USE (frexpl, "frexpl is unportable - " @@ -1646,7 +1744,9 @@ _GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); # endif _GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (hypotf); +# endif #elif defined GNULIB_POSIXCHECK # undef hypotf # if HAVE_RAW_DECL_HYPOTF @@ -1668,7 +1768,7 @@ _GL_CXXALIAS_RPL (hypot, double, (double x, double y)); _GL_CXXALIAS_SYS (hypot, double, (double x, double y)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (hypot); +_GL_CXXALIASWARN1 (hypot, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef hypot @@ -1693,7 +1793,9 @@ _GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (hypotl); +# endif #elif defined GNULIB_POSIXCHECK # undef hypotl # if HAVE_RAW_DECL_HYPOTL @@ -1741,7 +1843,7 @@ _GL_FUNCDECL_SYS (ilogb, int, (double x)); _GL_CXXALIAS_SYS (ilogb, int, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ilogb); +_GL_CXXALIASWARN1 (ilogb, int, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef ilogb @@ -1761,11 +1863,14 @@ _GL_FUNCDECL_RPL (ilogbl, int, (long double x)); _GL_CXXALIAS_RPL (ilogbl, int, (long double x)); # else # if !1 +# undef ilogbl _GL_FUNCDECL_SYS (ilogbl, int, (long double x)); # endif _GL_CXXALIAS_SYS (ilogbl, int, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ilogbl); +# endif #elif defined GNULIB_POSIXCHECK # undef ilogbl # if HAVE_RAW_DECL_ILOGBL @@ -1775,6 +1880,55 @@ _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " #endif +#if 1 +/* On native Windows, map 'j0' to '_j0', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::j0 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef j0 +# define j0 _j0 +# endif +_GL_CXXALIAS_MDA (j0, double, (double x)); +# else +_GL_CXXALIAS_SYS (j0, double, (double x)); +# endif +_GL_CXXALIASWARN (j0); +#endif + +#if 1 +/* On native Windows, map 'j1' to '_j1', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::j1 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef j1 +# define j1 _j1 +# endif +_GL_CXXALIAS_MDA (j1, double, (double x)); +# else +_GL_CXXALIAS_SYS (j1, double, (double x)); +# endif +_GL_CXXALIASWARN (j1); +#endif + +#if 1 +/* On native Windows, map 'jn' to '_jn', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::jn always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef jn +# define jn _jn +# endif +_GL_CXXALIAS_MDA (jn, double, (int n, double x)); +# else +_GL_CXXALIAS_SYS (jn, double, (int n, double x)); +# endif +_GL_CXXALIASWARN (jn); +#endif + + /* Return x * 2^exp. */ #if 0 # if !1 @@ -1782,7 +1936,9 @@ _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " _GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); # endif _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ldexpf); +# endif #elif defined GNULIB_POSIXCHECK # undef ldexpf # if HAVE_RAW_DECL_LDEXPF @@ -1791,6 +1947,29 @@ _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " # endif #endif +/* Return x * 2^exp. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ldexp +# define ldexp rpl_ldexp +# endif +_GL_FUNCDECL_RPL (ldexp, double, (double x, int exp)); +_GL_CXXALIAS_RPL (ldexp, double, (double x, int exp)); +# else +/* Assume ldexp is always declared. */ +_GL_CXXALIAS_SYS (ldexp, double, (double x, int exp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN1 (ldexp, double, (double x, int exp)); +# endif +#elif defined GNULIB_POSIXCHECK +# undef ldexp +/* Assume ldexp is always declared. */ +_GL_WARN_ON_USE (ldexp, "ldexp is unportable - " + "use gnulib module ldexp for portability"); +#endif + /* Return x * 2^exp. */ #if 0 && 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1808,7 +1987,9 @@ _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); # endif #endif #if 0 +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ldexpl); +# endif #endif #if !0 && defined GNULIB_POSIXCHECK # undef ldexpl @@ -1855,7 +2036,7 @@ _GL_CXXALIAS_RPL (log, double, (double x)); _GL_CXXALIAS_SYS (log, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log); +_GL_CXXALIASWARN1 (log, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log @@ -1880,7 +2061,9 @@ _GL_FUNCDECL_SYS (logl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (logl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (logl); +# endif #elif defined GNULIB_POSIXCHECK # undef logl # if HAVE_RAW_DECL_LOGL @@ -1914,7 +2097,7 @@ _GL_WARN_ON_USE (log10f, "log10f is unportable - " # endif #endif -#if 1 +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef log10 @@ -1926,7 +2109,7 @@ _GL_CXXALIAS_RPL (log10, double, (double x)); _GL_CXXALIAS_SYS (log10, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log10); +_GL_CXXALIASWARN1 (log10, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log10 @@ -1951,7 +2134,9 @@ _GL_FUNCDECL_SYS (log10l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log10l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log10l); +# endif #elif defined GNULIB_POSIXCHECK # undef log10l # if HAVE_RAW_DECL_LOG10L @@ -1999,7 +2184,7 @@ _GL_FUNCDECL_SYS (log1p, double, (double x)); _GL_CXXALIAS_SYS (log1p, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log1p); +_GL_CXXALIASWARN1 (log1p, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log1p @@ -2023,7 +2208,9 @@ _GL_FUNCDECL_SYS (log1pl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log1pl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log1pl); +# endif #elif defined GNULIB_POSIXCHECK # undef log1pl # if HAVE_RAW_DECL_LOG1PL @@ -2048,7 +2235,9 @@ _GL_FUNCDECL_SYS (log2f, float, (float x)); # endif _GL_CXXALIAS_SYS (log2f, float, (float x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log2f); +# endif #elif defined GNULIB_POSIXCHECK # undef log2f # if HAVE_RAW_DECL_LOG2F @@ -2073,7 +2262,7 @@ _GL_FUNCDECL_SYS (log2, double, (double x)); _GL_CXXALIAS_SYS (log2, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log2); +_GL_CXXALIASWARN1 (log2, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log2 @@ -2097,7 +2286,9 @@ _GL_FUNCDECL_SYS (log2l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log2l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log2l); +# endif #elif defined GNULIB_POSIXCHECK # undef log2l # if HAVE_RAW_DECL_LOG2L @@ -2145,7 +2336,7 @@ _GL_FUNCDECL_SYS (logb, double, (double x)); _GL_CXXALIAS_SYS (logb, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (logb); +_GL_CXXALIASWARN1 (logb, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef logb @@ -2169,7 +2360,9 @@ _GL_FUNCDECL_SYS (logbl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (logbl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (logbl); +# endif #elif defined GNULIB_POSIXCHECK # undef logbl # if HAVE_RAW_DECL_LOGBL @@ -2215,7 +2408,7 @@ _GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); _GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (modf); +_GL_CXXALIASWARN1 (modf, double, (double x, double *iptr)); # endif #elif defined GNULIB_POSIXCHECK # undef modf @@ -2242,7 +2435,9 @@ _GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) # endif _GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (modfl); +# endif #elif defined GNULIB_POSIXCHECK # undef modfl # if HAVE_RAW_DECL_MODFL @@ -2306,7 +2501,7 @@ _GL_FUNCDECL_SYS (remainder, double, (double x, double y)); _GL_CXXALIAS_SYS (remainder, double, (double x, double y)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remainder); +_GL_CXXALIASWARN1 (remainder, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef remainder @@ -2333,7 +2528,9 @@ _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (remainderl); +# endif #elif defined GNULIB_POSIXCHECK # undef remainderl # if HAVE_RAW_DECL_REMAINDERL @@ -2363,7 +2560,7 @@ _GL_FUNCDECL_SYS (rint, double, (double x)); # endif _GL_CXXALIAS_SYS (rint, double, (double x)); # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rint); +_GL_CXXALIASWARN1 (rint, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef rint @@ -2387,7 +2584,9 @@ _GL_FUNCDECL_SYS (rintl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (rintl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (rintl); +# endif #elif defined GNULIB_POSIXCHECK # undef rintl # if HAVE_RAW_DECL_RINTL @@ -2435,7 +2634,7 @@ _GL_FUNCDECL_SYS (round, double, (double x)); _GL_CXXALIAS_SYS (round, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (round); +_GL_CXXALIASWARN1 (round, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef round @@ -2462,7 +2661,9 @@ _GL_FUNCDECL_SYS (roundl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (roundl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (roundl); +# endif #elif defined GNULIB_POSIXCHECK # undef roundl # if HAVE_RAW_DECL_ROUNDL @@ -2482,7 +2683,7 @@ _GL_FUNCDECL_RPL (sinf, float, (float x)); _GL_CXXALIAS_RPL (sinf, float, (float x)); # else # if !1 - # undef sinf +# undef sinf _GL_FUNCDECL_SYS (sinf, float, (float x)); # endif _GL_CXXALIAS_SYS (sinf, float, (float x)); @@ -2502,7 +2703,9 @@ _GL_WARN_ON_USE (sinf, "sinf is unportable - " _GL_FUNCDECL_SYS (sinl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (sinl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sinl); +# endif #elif defined GNULIB_POSIXCHECK # undef sinl # if HAVE_RAW_DECL_SINL @@ -2576,7 +2779,9 @@ _GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sqrtl); +# endif #elif defined GNULIB_POSIXCHECK # undef sqrtl # if HAVE_RAW_DECL_SQRTL @@ -2616,7 +2821,9 @@ _GL_WARN_ON_USE (tanf, "tanf is unportable - " _GL_FUNCDECL_SYS (tanl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (tanl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (tanl); +# endif #elif defined GNULIB_POSIXCHECK # undef tanl # if HAVE_RAW_DECL_TANL @@ -2689,7 +2896,7 @@ _GL_FUNCDECL_SYS (trunc, double, (double x)); _GL_CXXALIAS_SYS (trunc, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (trunc); +_GL_CXXALIASWARN1 (trunc, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef trunc @@ -2713,7 +2920,9 @@ _GL_FUNCDECL_SYS (truncl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (truncl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (truncl); +# endif #elif defined GNULIB_POSIXCHECK # undef truncl # if HAVE_RAW_DECL_TRUNCL @@ -2723,6 +2932,55 @@ _GL_WARN_ON_USE (truncl, "truncl is unportable - " #endif +#if 1 +/* On native Windows, map 'y0' to '_y0', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::y0 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef y0 +# define y0 _y0 +# endif +_GL_CXXALIAS_MDA (y0, double, (double x)); +# else +_GL_CXXALIAS_SYS (y0, double, (double x)); +# endif +_GL_CXXALIASWARN (y0); +#endif + +#if 1 +/* On native Windows, map 'y1' to '_y1', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::y1 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef y1 +# define y1 _y1 +# endif +_GL_CXXALIAS_MDA (y1, double, (double x)); +# else +_GL_CXXALIAS_SYS (y1, double, (double x)); +# endif +_GL_CXXALIASWARN (y1); +#endif + +#if 1 +/* On native Windows, map 'yn' to '_yn', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::yn always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef yn +# define yn _yn +# endif +_GL_CXXALIAS_MDA (yn, double, (int n, double x)); +# else +_GL_CXXALIAS_SYS (yn, double, (int n, double x)); +# endif +_GL_CXXALIASWARN (yn); +#endif + + /* Definitions of function-like macros come here, after the function declarations. */ @@ -2742,11 +3000,12 @@ _GL_EXTERN_C int gl_isfinitel (long double x); # if defined isfinite || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) # undef isfinite -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isfinite through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) # define isfinite rpl_isfinite +# define GNULIB_NAMESPACE_LACKS_ISFINITE 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) # endif @@ -2761,8 +3020,8 @@ _GL_WARN_REAL_FLOATING_DECL (isfinite); #endif -#if 1 -# if 1 +#if 0 +# if 0 _GL_EXTERN_C int gl_isinff (float x); _GL_EXTERN_C int gl_isinfd (double x); _GL_EXTERN_C int gl_isinfl (long double x); @@ -2776,11 +3035,12 @@ _GL_EXTERN_C int gl_isinfl (long double x); # if defined isinf || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) # undef isinf -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isinf through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) # define isinf rpl_isinf +# define GNULIB_NAMESPACE_LACKS_ISINF 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) # endif @@ -2795,15 +3055,16 @@ _GL_WARN_REAL_FLOATING_DECL (isinf); #endif -#if 1 +#if 0 /* Test for NaN for 'float' numbers. */ -# if 0 +# if 1 /* The original included above provides a declaration of isnan macro or (older) isnanf function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ +# if (__GNUC__ >= 4) || (__clang_major__ >= 4) + /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. + GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't. */ # undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) +# define isnanf(x) __builtin_isnan ((float)(x)) # elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) @@ -2816,15 +3077,15 @@ _GL_EXTERN_C int isnanf (float x); # endif #endif -#if 1 +#if 0 /* Test for NaN for 'double' numbers. This function is a gnulib extension, unlike isnan() which applied only to 'double' numbers earlier but now is a type-generic macro. */ # if 1 /* The original included above provides a declaration of isnan macro. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ +# if (__GNUC__ >= 4) || (__clang_major__ >= 4) + /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. */ # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) # else @@ -2839,15 +3100,16 @@ _GL_EXTERN_C int isnand (double x); # endif #endif -#if 1 +#if 0 /* Test for NaN for 'long double' numbers. */ -# if 0 +# if 1 /* The original included above provides a declaration of isnan macro or (older) isnanl function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ +# if (__GNUC__ >= 4) || (__clang_major__ >= 4) + /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. + GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't. */ # undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) +# define isnanl(x) __builtin_isnan ((long double)(x)) # elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) @@ -2861,26 +3123,26 @@ _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; #endif /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ -#if 1 -# if 1 +#if 0 +# if 0 /* We can't just use the isnanf macro (e.g.) as exposed by isnanf.h (e.g.) here, because those may end up being macros that recursively expand back to isnan. So use the gnulib replacements for them directly. */ -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) -# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) +# if 1 && (__GNUC__ >= 4) || (__clang_major__ >= 4) +# define gl_isnan_f(x) __builtin_isnan ((float)(x)) # else _GL_EXTERN_C int rpl_isnanf (float x); # define gl_isnan_f(x) rpl_isnanf (x) # endif -# if 1 && __GNUC__ >= 4 +# if 1 && (__GNUC__ >= 4) || (__clang_major__ >= 4) # define gl_isnan_d(x) __builtin_isnan ((double)(x)) # else _GL_EXTERN_C int rpl_isnand (double x); # define gl_isnan_d(x) rpl_isnand (x) # endif -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) -# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) +# if 1 && (__GNUC__ >= 4) || (__clang_major__ >= 4) +# define gl_isnan_l(x) __builtin_isnan ((long double)(x)) # else _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; # define gl_isnan_l(x) rpl_isnanl (x) @@ -2890,22 +3152,28 @@ _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ gl_isnan_f (x)) -# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl))) +# elif (__GNUC__ >= 4) || (__clang_major__ >= 4) # undef isnan # define isnan(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ + (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \ sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ - __builtin_isnanf ((float)(x))) + __builtin_isnan ((float)(x))) # endif # ifdef __cplusplus # if defined isnan || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) # undef isnan -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ != 12) || (defined __FreeBSD__ && (__clang_major__ < 7 || __clang_major__ >= 11)) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isnan through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) # define isnan rpl_isnan +# define GNULIB_NAMESPACE_LACKS_ISNAN 1 +# elif (defined __FreeBSD__ && __clang_major__ >= 14) + /* Neither of the two possible _GL_MATH_CXX_REAL_FLOATING_DECL_2 invocations + works. Inline functions are already present in /usr/include/c++/v1/math.h, + which comes from LLVM. */ +# define GNULIB_NAMESPACE_LACKS_ISNAN 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) # endif @@ -2929,7 +3197,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); # if (0 \ && (!defined __cplusplus || __cplusplus < 201103)) # undef signbit - /* GCC 4.0 and newer provides three built-ins for signbit. */ + /* GCC >= 4.0 and clang provide three built-ins for signbit. */ # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ @@ -2940,12 +3208,13 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); _GL_EXTERN_C int gl_signbitf (float arg); _GL_EXTERN_C int gl_signbitd (double arg); _GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ +# if __GNUC__ >= 2 || defined __clang__ # define _GL_NUM_UINT_WORDS(type) \ ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf # define gl_signbitf_OPTIMIZED_MACRO # define gl_signbitf(arg) \ + __extension__ \ ({ union { float _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ } _m; \ @@ -2956,6 +3225,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd # define gl_signbitd_OPTIMIZED_MACRO # define gl_signbitd(arg) \ + __extension__ \ ({ union { double _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ } _m; \ @@ -2966,6 +3236,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl # define gl_signbitl_OPTIMIZED_MACRO # define gl_signbitl(arg) \ + __extension__ \ ({ union { long double _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ } _m; \ @@ -2984,11 +3255,12 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined signbit || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) # undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines signbit through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) # define signbit rpl_signbit +# define GNULIB_NAMESPACE_LACKS_SIGNBIT 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) # endif @@ -3002,7 +3274,85 @@ _GL_WARN_REAL_FLOATING_DECL (signbit); # endif #endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef totalorderf +# define totalorderf rpl_totalorderf +# endif +_GL_FUNCDECL_RPL (totalorderf, int, (float const *, float const *)); +_GL_CXXALIAS_RPL (totalorderf, int, (float const *, float const *)); +# else +# if !1 +_GL_FUNCDECL_SYS (totalorderf, int, (float const *, float const *)); +# endif +_GL_CXXALIAS_SYS (totalorderf, int, (float const *, float const *)); +# endif +_GL_CXXALIASWARN (totalorderf); +#elif defined GNULIB_POSIXCHECK +# undef totalorderf +# if HAVE_RAW_DECL_TOTALORDERF +_GL_WARN_ON_USE (totalorderf, "totalorderf is unportable - " + "use gnulib module totalorderf for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef totalorder +# define totalorder rpl_totalorder +# endif +_GL_FUNCDECL_RPL (totalorder, int, (double const *, double const *)); +_GL_CXXALIAS_RPL (totalorder, int, (double const *, double const *)); +# else +# if !1 +_GL_FUNCDECL_SYS (totalorder, int, (double const *, double const *)); +# endif +_GL_CXXALIAS_SYS (totalorder, int, (double const *, double const *)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN1 (totalorder, int, (double const *, double const *)); +# endif +#elif defined GNULIB_POSIXCHECK +# undef totalorder +# if HAVE_RAW_DECL_TOTALORDER +_GL_WARN_ON_USE (totalorder, "totalorder is unportable - " + "use gnulib module totalorder for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef totalorderl +# define totalorderl rpl_totalorderl +# endif +_GL_FUNCDECL_RPL (totalorderl, int, + (long double const *, long double const *)); +_GL_CXXALIAS_RPL (totalorderl, int, + (long double const *, long double const *)); +# else +# if !1 +_GL_FUNCDECL_SYS (totalorderl, int, + (long double const *, long double const *)); +# endif +_GL_CXXALIAS_SYS (totalorderl, int, + (long double const *, long double const *)); +# endif +_GL_CXXALIASWARN (totalorderl); +#elif defined GNULIB_POSIXCHECK +# undef totalorderl +# if HAVE_RAW_DECL_TOTALORDERL +_GL_WARN_ON_USE (totalorderl, "totalorderl is unportable - " + "use gnulib module totalorderl for portability"); +# endif +#endif + _GL_INLINE_HEADER_END #endif /* _GL_MATH_H */ +#endif /* _GL_INCLUDING_MATH_H */ #endif /* _GL_MATH_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/search.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/search.h new file mode 100644 index 000000000..997c8b434 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/search.h @@ -0,0 +1,797 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A GNU-like . + + Copyright (C) 2007-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_SEARCH_H + +#if __GNUC__ >= 3 + +#endif + + +/* The include_next requires a split double-inclusion guard. */ +#if 1 +# include "../ucrt/search.h" +#endif + +#ifndef _GL_SEARCH_H +#define _GL_SEARCH_H + +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +#ifdef __cplusplus +extern "C" { +#endif +#if !GNULIB_defined_lsearch_fn_types +typedef int (*_gl_lsearch_compar_fn) (const void *, const void *); +# define GNULIB_defined_lsearch_fn_types 1 +#endif +#ifdef __cplusplus +} +#endif + +#if 1 +/* On native Windows, map 'lfind' to '_lfind', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::lfind always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lfind +# define lfind _lfind +# endif +_GL_CXXALIAS_MDA (lfind, void *, + (const void *key, const void *base, unsigned int *nmemb, + unsigned int size, + _gl_lsearch_compar_fn compar)); +# else +_GL_CXXALIAS_SYS (lfind, void *, + (const void *key, const void *base, size_t *nmemb, + size_t size, + _gl_lsearch_compar_fn compar)); +# endif +_GL_CXXALIASWARN (lfind); +#endif + +#if 1 +/* On native Windows, map 'lsearch' to '_lsearch', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::lsearch always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lsearch +# define lsearch _lsearch +# endif +_GL_CXXALIAS_MDA (lsearch, void *, + (const void *key, void *base, unsigned int *nmemb, + unsigned int size, + _gl_lsearch_compar_fn compar)); +# else +_GL_CXXALIAS_SYS (lsearch, void *, + (const void *key, void *base, size_t *nmemb, + size_t size, + _gl_lsearch_compar_fn compar)); +# endif +_GL_CXXALIASWARN (lsearch); +#endif + + +#if 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define tsearch rpl_tsearch +# define tfind rpl_tfind +# define tdelete rpl_tdelete +# endif +# endif +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define twalk rpl_twalk +# endif +# endif + +/* See + + for details. */ + +# if !0 +# if !GNULIB_defined_search_types +typedef enum +{ + preorder, + postorder, + endorder, + leaf +} +VISIT; +# define GNULIB_defined_search_types 1 +# endif +# endif + +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_search_fn_types +typedef int (*_gl_search_compar_fn) (const void *, const void *); +typedef void (*_gl_search_action_fn) (const void *, VISIT, int); +# define GNULIB_defined_search_fn_types 1 +# endif +# ifdef __cplusplus +} +# endif + +/* Searches an element in the tree *VROOTP that compares equal to KEY. + If one is found, it is returned. Otherwise, a new element equal to KEY + is inserted in the tree and is returned. */ +# if 0 +_GL_FUNCDECL_RPL (tsearch, void *, + (const void *key, void **vrootp, + _gl_search_compar_fn compar) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (tsearch, void *, + (const void *key, void **vrootp, + _gl_search_compar_fn compar)); +# else +# if !0 +_GL_FUNCDECL_SYS (tsearch, void *, + (const void *key, void **vrootp, + _gl_search_compar_fn compar) + _GL_ARG_NONNULL ((1, 2, 3))); +# endif +_GL_CXXALIAS_SYS (tsearch, void *, + (const void *key, void **vrootp, + _gl_search_compar_fn compar)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (tsearch); +# endif + +/* Searches an element in the tree *VROOTP that compares equal to KEY. + If one is found, it is returned. Otherwise, NULL is returned. */ +# if 0 +_GL_FUNCDECL_RPL (tfind, void *, + (const void *key, void *const *vrootp, + _gl_search_compar_fn compar) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (tfind, void *, + (const void *key, void *const *vrootp, + _gl_search_compar_fn compar)); +# else +# if !0 +_GL_FUNCDECL_SYS (tfind, void *, + (const void *key, void *const *vrootp, + _gl_search_compar_fn compar) + _GL_ARG_NONNULL ((1, 2, 3))); +# endif +/* Need to cast, because on Cygwin 1.5.x systems, the second parameter is + void **vrootp. */ +_GL_CXXALIAS_SYS_CAST (tfind, void *, + (const void *key, void *const *vrootp, + _gl_search_compar_fn compar)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (tfind); +# endif + +/* Searches an element in the tree *VROOTP that compares equal to KEY. + If one is found, it is removed from the tree, and its parent node is + returned. Otherwise, NULL is returned. */ +# if 0 +_GL_FUNCDECL_RPL (tdelete, void *, + (const void *restrict key, void **restrict vrootp, + _gl_search_compar_fn compar) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (tdelete, void *, + (const void *restrict key, void **restrict vrootp, + _gl_search_compar_fn compar)); +# else +# if !0 +_GL_FUNCDECL_SYS (tdelete, void *, + (const void *restrict key, void **restrict vrootp, + _gl_search_compar_fn compar) + _GL_ARG_NONNULL ((1, 2, 3))); +# endif +_GL_CXXALIAS_SYS (tdelete, void *, + (const void *restrict key, void **restrict vrootp, + _gl_search_compar_fn compar)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (tdelete); +# endif + +/* Perform a depth-first, left-to-right traversal of the tree VROOT. + The ACTION function is called: + - for non-leaf nodes: 3 times, before the left subtree traversal, + after the left subtree traversal but before the right subtree traversal, + and after the right subtree traversal, + - for leaf nodes: once. + The arguments passed to ACTION are: + 1. the node; it can be cast to a 'const void * const *', i.e. into a + pointer to the key, + 2. an indicator which visit of the node this is, + 3. the level of the node in the tree (0 for the root). */ +# if 0 +_GL_FUNCDECL_RPL (twalk, void, + (const void *vroot, _gl_search_action_fn action) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (twalk, void, + (const void *vroot, _gl_search_action_fn action)); +# else +# if !0 +_GL_FUNCDECL_SYS (twalk, void, + (const void *vroot, _gl_search_action_fn action) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (twalk, void, + (const void *vroot, _gl_search_action_fn action)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (twalk); +# endif + +/* Flags used by tsearch.c. */ +# define GNULIB_defined_tsearch (0 || !0) +# define GNULIB_defined_twalk (0 || !0) + +#elif defined GNULIB_POSIXCHECK +# undef tsearch +# if HAVE_RAW_DECL_TSEARCH +_GL_WARN_ON_USE (tsearch, "tsearch is unportable - " + "use gnulib module tsearch for portability"); +# endif +# undef tfind +# if HAVE_RAW_DECL_TFIND +_GL_WARN_ON_USE (tfind, "tfind is unportable - " + "use gnulib module tsearch for portability"); +# endif +# undef tdelete +# if HAVE_RAW_DECL_TDELETE +_GL_WARN_ON_USE (tdelete, "tdelete is unportable - " + "use gnulib module tsearch for portability"); +# endif +# undef twalk +# if HAVE_RAW_DECL_TWALK +_GL_WARN_ON_USE (twalk, "twalk is unportable - " + "use gnulib module tsearch for portability"); +# endif +#endif + + +#endif /* _GL_SEARCH_H */ +#endif /* _GL_SEARCH_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stddef.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stddef.h new file mode 100644 index 000000000..40a21db6f --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stddef.h @@ -0,0 +1,214 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A substitute for POSIX 2008 , for platforms that have issues. + + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake. */ + +/* + * POSIX 2008 and ISO C 23 for platforms that have issues. + * + */ + +#if __GNUC__ >= 3 + +#endif + + +#if defined __need_wchar_t || defined __need_size_t \ + || defined __need_ptrdiff_t || defined __need_NULL \ + || defined __need_wint_t +/* Special invocation convention inside gcc header files. In + particular, gcc provides a version of that blindly + redefines NULL even when __need_wint_t was defined, even though + wint_t is not normally provided by . Hence, we must + remember if special invocation has ever been used to obtain wint_t, + in which case we need to clean up NULL yet again. */ + +# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) +# ifdef __need_wint_t +# define _GL_STDDEF_WINT_T +# endif +# include "../ucrt/stddef.h" + /* On TinyCC, make sure that the macros that indicate the special invocation + convention get undefined. */ +# undef __need_wchar_t +# undef __need_size_t +# undef __need_ptrdiff_t +# undef __need_NULL +# undef __need_wint_t +# endif + +#else +/* Normal invocation convention. */ + +# ifndef _GL_STDDEF_H + +/* On AIX 7.2, with xlc in 64-bit mode, defines max_align_t to a + type with alignment 4, but 'long' has alignment 8. */ +# if defined _AIX && defined __LP64__ && !0 +# if !GNULIB_defined_max_align_t +# ifdef _MAX_ALIGN_T +/* /usr/include/stddef.h has already defined max_align_t. Override it. */ +typedef long rpl_max_align_t; +# define max_align_t rpl_max_align_t +# else +/* Prevent /usr/include/stddef.h from defining max_align_t. */ +typedef long max_align_t; +# define _MAX_ALIGN_T +# endif +# define __CLANG_MAX_ALIGN_T_DEFINED +# define GNULIB_defined_max_align_t 1 +# endif +# endif + +/* The include_next requires a split double-inclusion guard. */ + +# include "../ucrt/stddef.h" + +/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ +# if (0 \ + && (!defined _GL_STDDEF_H || defined _GL_STDDEF_WINT_T)) +# undef NULL +# ifdef __cplusplus + /* ISO C++ says that the macro NULL must expand to an integer constant + expression, hence '((void *) 0)' is not allowed in C++. */ +# if __GNUG__ >= 3 + /* GNU C++ has a __null macro that behaves like an integer ('int' or + 'long') but has the same size as a pointer. Use that, to avoid + warnings. */ +# define NULL __null +# else +# define NULL 0L +# endif +# else +# define NULL ((void *) 0) +# endif +# endif + +# ifndef _GL_STDDEF_H +# define _GL_STDDEF_H + +/* This file uses _Noreturn, _GL_ATTRIBUTE_NOTHROW. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* Some platforms lack wchar_t. */ +#if !1 +# define wchar_t int +#endif + +/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is + a hack in case the configure-time test was done with g++ even though + we are currently compiling with gcc. + On MSVC, max_align_t is defined only in C++ mode, after was + included. Its definition is good since it has an alignment of 8 (on x86 + and x86_64). + Similarly on OS/2 kLIBC. */ +#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \ + && defined __cplusplus +# include +#else +# if ! (0 || (defined _GCC_MAX_ALIGN_T && !defined __clang__)) +# if !GNULIB_defined_max_align_t +/* On the x86, the maximum storage alignment of double, long, etc. is 4, + but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, + and the C11 standard allows this. Work around this problem by + using __alignof__ (which returns 8 for double) rather than _Alignof + (which returns 4), and align each union member accordingly. */ +# if defined __GNUC__ || (__clang_major__ >= 4) +# define _GL_STDDEF_ALIGNAS(type) \ + __attribute__ ((__aligned__ (__alignof__ (type)))) +# else +# define _GL_STDDEF_ALIGNAS(type) /* */ +# endif +typedef union +{ + char *__p _GL_STDDEF_ALIGNAS (char *); + double __d _GL_STDDEF_ALIGNAS (double); + long double __ld _GL_STDDEF_ALIGNAS (long double); + long int __i _GL_STDDEF_ALIGNAS (long int); +} rpl_max_align_t; +# define max_align_t rpl_max_align_t +# define __CLANG_MAX_ALIGN_T_DEFINED +# define GNULIB_defined_max_align_t 1 +# endif +# endif +#endif + +/* ISO C 23 § 7.21.1 The unreachable macro */ +#ifndef unreachable + +/* Code borrowed from verify.h. */ +# ifndef _GL_HAS_BUILTIN_UNREACHABLE +# if defined __clang_major__ && __clang_major__ < 5 +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__) +# define _GL_HAS_BUILTIN_UNREACHABLE 1 +# elif defined __has_builtin +# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable) +# else +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# endif +# endif + +# if _GL_HAS_BUILTIN_UNREACHABLE +# define unreachable() __builtin_unreachable () +# elif 1200 <= _MSC_VER +# define unreachable() __assume (0) +# else +/* Declare abort(), without including . */ +extern +# if defined __cplusplus +"C" +# endif +_Noreturn +void abort (void) +# if defined __cplusplus && (__GLIBC__ >= 2) +_GL_ATTRIBUTE_NOTHROW +# endif +; +# define unreachable() abort () +# endif + +#endif + +# endif /* _GL_STDDEF_H */ +# endif /* _GL_STDDEF_H */ +#endif /* __need_XXX */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-runtime/gnulib-lib/stdint.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stdint.h similarity index 95% rename from gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-runtime/gnulib-lib/stdint.h rename to gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stdint.h index 851128d88..5d5a53428 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-runtime/gnulib-lib/stdint.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stdint.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2023 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* * ISO C 99 for platforms that lack it. @@ -303,12 +303,11 @@ typedef gl_uint_fast32_t gl_uint_fast16_t; /* kLIBC's defines _INTPTR_T_DECLARED and needs its own definitions of intptr_t and uintptr_t (which use int and unsigned) to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and + Similarly, MinGW WSL-5.4.1 needs its own intptr_t and uintptr_t to avoid conflicting declarations of system functions like _findclose in . */ # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) + || defined __MINGW32__) # undef intptr_t # undef uintptr_t # ifdef _WIN64 @@ -581,11 +580,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) -> -> -> , and the latter includes and assumes its types are already defined. */ # if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/lib/stdio.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stdio.h similarity index 77% rename from gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/lib/stdio.h rename to gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stdio.h index ae58831aa..e5e003b3c 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/lib/stdio.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stdio.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -35,7 +35,13 @@ #else /* Normal invocation convention. */ -#ifndef _GL_LTS_STDIO_H +#ifndef _GL_STDIO_H + +/* Suppress macOS deprecation warnings for sprintf and vsprintf. */ +#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200809L +# define _GL_DEFINED__POSIX_C_SOURCE +#endif #define _GL_ALREADY_INCLUDING_STDIO_H @@ -44,8 +50,20 @@ #undef _GL_ALREADY_INCLUDING_STDIO_H -#ifndef _GL_LTS_STDIO_H -#define _GL_LTS_STDIO_H +#ifdef _GL_DEFINED__POSIX_C_SOURCE +# undef _GL_DEFINED__POSIX_C_SOURCE +# undef _POSIX_C_SOURCE +#endif + +#ifndef _GL_STDIO_H +#define _GL_STDIO_H + +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_FORMAT, + _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif /* Get va_list. Needed on many systems, including glibc 2.8. */ #include @@ -57,6 +75,52 @@ May also define off_t to a 64-bit type on native Windows. */ #include +/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ + && ! defined __GLIBC__ +# include +#endif + +/* Android 4.3 declares renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'perror' in , not in . We must include + it before we #define perror rpl_perror. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'remove' in , not in . We must include + it before we #define remove rpl_remove. */ +/* MSVC declares 'rename' in , not in . We must include + it before we #define rename rpl_rename. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. @@ -64,37 +128,83 @@ gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__ # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) # else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ # endif #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones + standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD */ +/* __gnu_printf__ is supported in GCC >= 4.4. */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__ #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__ #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones of the + system printf(), rather than the ones standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM */ +/* On mingw, Gnulib sets __USE_MINGW_ANSI_STDIO in order to get closer to + the standards. The macro GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU indicates + whether this change is effective. On older mingw, it is not. */ #if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM __printf__ #endif +/* _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD + indicates to GCC that the function takes a format string and arguments, + where the format string directives are the ones standardized by ISO C99 + and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument)) + +/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD, + except that it indicates to GCC that the supported format string directives + are the ones of the system printf(), rather than the ones standardized by + ISO C99 and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, formatstring_parameter, first_argument)) + /* _GL_ATTRIBUTE_FORMAT_SCANF indicates to GCC that the function takes a format string and arguments, where the format string directives are the ones standardized by ISO C99 @@ -114,56 +224,21 @@ #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -251,6 +326,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -298,6 +379,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -323,6 +414,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -420,7 +519,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -448,9 +547,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -466,26 +565,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -494,19 +593,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -579,13 +678,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -594,27 +700,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -644,24 +756,56 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # undef putc_unlocked #endif + +/* Maximum number of characters produced by printing a NaN value. */ +#ifndef _PRINTF_NAN_LEN_MAX +# if defined __FreeBSD__ || defined __DragonFly__ \ + || defined __NetBSD__ \ + || (defined __APPLE__ && defined __MACH__) +/* On BSD systems, a NaN value prints as just "nan", without a sign. */ +# define _PRINTF_NAN_LEN_MAX 3 +# elif (__GLIBC__ >= 2) || MUSL_LIBC || defined __OpenBSD__ || defined __sun || defined __CYGWIN__ +/* glibc, musl libc, OpenBSD, Solaris libc, and Cygwin produce "[-]nan". */ +# define _PRINTF_NAN_LEN_MAX 4 +# elif defined _AIX +/* AIX produces "[-]NaNQ". */ +# define _PRINTF_NAN_LEN_MAX 5 +# elif defined _WIN32 && !defined __CYGWIN__ +/* On native Windows, the output can be: + - with MSVC ucrt: "[-]nan" or "[-]nan(ind)" or "[-]nan(snan)", + - with mingw: "[-]1.#IND" or "[-]1.#QNAN". */ +# define _PRINTF_NAN_LEN_MAX 10 +# elif defined __sgi +/* On IRIX, the output typically is "[-]nan0xNNNNNNNN" with 8 hexadecimal + digits. */ +# define _PRINTF_NAN_LEN_MAX 14 +# else +/* We don't know, but 32 should be a safe maximum. */ +# define _PRINTF_NAN_LEN_MAX 32 +# endif +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dprintf rpl_dprintf # endif _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); # else # if !1 _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (dprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF @@ -691,24 +835,103 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " "use gnulib module fclose for portable POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'fcloseall' to '_fcloseall', so that -loldnames is + not required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcloseall on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcloseall +# define fcloseall _fcloseall +# endif +_GL_CXXALIAS_MDA (fcloseall, int, (void)); +# else +# if 1 +# if defined __FreeBSD__ || defined __DragonFly__ +_GL_CXXALIAS_SYS (fcloseall, void, (void)); +# else +_GL_CXXALIAS_SYS (fcloseall, int, (void)); +# endif +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcloseall); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fdopen # define fdopen rpl_fdopen # endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); +_GL_FUNCDECL_RPL (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); # endif _GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen +#else +# if 0 && __GNUC__ >= 11 && !defined fdopen +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef fdopen /* Assume fdopen is always declared. */ _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " "use gnulib module fdopen for portability"); +# elif 1 +/* On native Windows, map 'fdopen' to '_fdopen', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fdopen always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); +# else +_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); +# endif +_GL_CXXALIASWARN (fdopen); +# endif #endif #if 0 @@ -773,29 +996,61 @@ _GL_CXXALIASWARN (fgets); # endif #endif +#if 1 +/* On native Windows, map 'fileno' to '_fileno', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fileno always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fileno +# define fileno _fileno +# endif +_GL_CXXALIAS_MDA (fileno, int, (FILE *restrict stream)); +# else +_GL_CXXALIAS_SYS (fileno, int, (FILE *restrict stream)); +# endif +_GL_CXXALIASWARN (fileno); +#endif + #if 0 -# if 0 +# if (0 && 0) \ + || (0 && 0) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fopen # define fopen rpl_fopen # endif _GL_FUNCDECL_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif _GL_CXXALIAS_SYS (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (fopen); # endif -#elif defined GNULIB_POSIXCHECK -# undef fopen +#else +# if 0 && __GNUC__ >= 11 && !defined fopen +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif +# if defined GNULIB_POSIXCHECK +# undef fopen /* Assume fopen is always declared. */ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " "use gnulib module fopen for portability"); +# endif #endif #if 0 || 1 @@ -808,7 +1063,7 @@ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX complian # if 0 || 0 _GL_FUNCDECL_RPL (fprintf, int, (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (fprintf, int, @@ -1242,7 +1497,9 @@ _GL_CXXALIAS_SYS (getdelim, ssize_t, int delimiter, FILE *restrict stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getdelim); +# endif #elif defined GNULIB_POSIXCHECK # undef getdelim # if HAVE_RAW_DECL_GETDELIM @@ -1281,7 +1538,7 @@ _GL_CXXALIAS_SYS (getline, ssize_t, (char **restrict lineptr, size_t *restrict linesize, FILE *restrict stream)); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (getline); # endif #elif defined GNULIB_POSIXCHECK @@ -1300,6 +1557,30 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif +#if 1 +/* On native Windows, map 'getw' to '_getw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getw +# define getw _getw +# endif +_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getw); +# endif +#endif + #if 0 || 0 struct obstack; /* Grow an obstack with formatted output. Return the number of @@ -1313,7 +1594,7 @@ struct obstack; # endif _GL_FUNCDECL_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...)); @@ -1321,7 +1602,7 @@ _GL_CXXALIAS_RPL (obstack_printf, int, # if !1 _GL_FUNCDECL_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_printf, int, @@ -1334,7 +1615,7 @@ _GL_CXXALIASWARN (obstack_printf); # endif _GL_FUNCDECL_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); @@ -1342,7 +1623,7 @@ _GL_CXXALIAS_RPL (obstack_vprintf, int, # if !1 _GL_FUNCDECL_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_vprintf, int, @@ -1394,29 +1675,42 @@ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " # undef popen # define popen rpl_popen # endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +_GL_FUNCDECL_RPL (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); # else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +# if !1 || __GNUC__ >= 11 +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); # endif _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); # endif _GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN +#else +# if 0 && __GNUC__ >= 11 && !defined popen +/* For -Wmismatched-dealloc: Associate popen with pclose or rpl_pclose. */ +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef popen +# if HAVE_RAW_DECL_POPEN _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " "use gnulib module popen or pipe for more portability"); +# endif # endif #endif #if 0 || 1 # if (0 && 0) \ || (1 && 0 && (0 || 0)) -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ @@ -1426,7 +1720,7 @@ _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *restrict format, ...) __asm__ ( _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL_1 (__printf__, int, @@ -1443,7 +1737,7 @@ _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); # endif _GL_FUNCDECL_RPL (printf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); # endif @@ -1513,6 +1807,30 @@ _GL_CXXALIASWARN (puts); # endif #endif +#if 1 +/* On native Windows, map 'putw' to '_putw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putw +# define putw _putw +# endif +_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (putw); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1590,7 +1908,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - " #if 1 # if 0 && 0 -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef scanf /* Don't break __attribute__((format(scanf,M,N))). */ @@ -1621,15 +1939,16 @@ _GL_CXXALIASWARN (scanf); # endif #endif -#if 1 -# if 1 +#if 0 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif +# define GNULIB_overrides_snprintf 1 _GL_FUNCDECL_RPL (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (snprintf, int, (char *restrict str, size_t size, @@ -1639,14 +1958,16 @@ _GL_CXXALIAS_RPL (snprintf, int, _GL_FUNCDECL_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (snprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef snprintf # if HAVE_RAW_DECL_SNPRINTF @@ -1669,9 +1990,10 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif +# define GNULIB_overrides_sprintf 1 _GL_FUNCDECL_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...)); @@ -1690,28 +2012,60 @@ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " "POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'tempnam' to '_tempnam', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::tempnam always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tempnam +# define tempnam _tempnam +# endif +_GL_CXXALIAS_MDA (tempnam, char *, (const char *dir, const char *prefix)); +# else +_GL_CXXALIAS_SYS (tempnam, char *, (const char *dir, const char *prefix)); +# endif +_GL_CXXALIASWARN (tempnam); +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define tmpfile rpl_tmpfile # endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); +_GL_FUNCDECL_RPL (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (tmpfile); # endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE +#else +# if 0 && __GNUC__ >= 11 && !defined tmpfile +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef tmpfile +# if HAVE_RAW_DECL_TMPFILE _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " "use gnulib module tmpfile for portability"); +# endif # endif #endif -#if 1 +#if 0 /* Write formatted output to a string dynamically allocated with malloc(). If the memory allocation succeeds, store the address of the string in *RESULT and return the number of resulting bytes, excluding the trailing @@ -1720,17 +2074,18 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif +# define GNULIB_overrides_asprintf _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (asprintf, int, (char **result, const char *format, ...)); # else -# if !0 +# if !1 _GL_FUNCDECL_SYS (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (asprintf, int, @@ -1741,17 +2096,18 @@ _GL_CXXALIASWARN (asprintf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif +# define GNULIB_overrides_vasprintf 1 _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vasprintf, int, (char **result, const char *format, va_list args)); # else -# if !0 +# if !1 _GL_FUNCDECL_SYS (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (vasprintf, int, @@ -1767,7 +2123,7 @@ _GL_CXXALIASWARN (vasprintf); # endif _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args)); @@ -1775,7 +2131,7 @@ _GL_CXXALIAS_RPL (vdprintf, int, # if !1 _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); # endif /* Need to cast, because on Solaris, the third parameter will likely be @@ -1805,7 +2161,7 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " _GL_FUNCDECL_RPL (vfprintf, int, (FILE *restrict fp, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (vfprintf, int, @@ -1858,7 +2214,9 @@ _GL_CXXALIAS_SYS (vfscanf, int, (FILE *restrict stream, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vfscanf); +# endif #endif #if 0 || 1 @@ -1870,7 +2228,7 @@ _GL_CXXALIASWARN (vfscanf); # define GNULIB_overrides_vprintf 1 # if 0 || 0 _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) @@ -1912,18 +2270,21 @@ _GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); # else _GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vscanf); +# endif #endif -#if 1 -# if 1 +#if 0 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif +# define GNULIB_overrides_vsnprintf 1 _GL_FUNCDECL_RPL (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (vsnprintf, int, (char *restrict str, size_t size, @@ -1933,14 +2294,16 @@ _GL_CXXALIAS_RPL (vsnprintf, int, _GL_FUNCDECL_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vsnprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef vsnprintf # if HAVE_RAW_DECL_VSNPRINTF @@ -1954,10 +2317,11 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif +# define GNULIB_overrides_vsprintf 1 _GL_FUNCDECL_RPL (vsprintf, int, (char *restrict str, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vsprintf, int, (char *restrict str, @@ -1981,6 +2345,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " "POSIX compliance"); #endif -#endif /* _GL_LTS_STDIO_H */ -#endif /* _GL_LTS_STDIO_H */ +#endif /* _GL_STDIO_H */ +#endif /* _GL_STDIO_H */ #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stdlib.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stdlib.h new file mode 100644 index 000000000..9bc5ae6ff --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/stdlib.h @@ -0,0 +1,2399 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A GNU-like . + + Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc +/* Special invocation conventions inside some gnulib header files, + and inside some glibc header files, respectively. */ + +#include "../ucrt/stdlib.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_STDLIB_H + +/* The include_next requires a split double-inclusion guard. */ +#include "../ucrt/stdlib.h" + +#ifndef _GL_STDLIB_H +#define _GL_STDLIB_H + +/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* NetBSD 5.0 mis-defines NULL. */ +#include + +/* MirBSD 10 defines WEXITSTATUS in , not in . */ +#if 0 && !defined WEXITSTATUS +# include +#endif + +/* Solaris declares getloadavg() in . */ +#if (0 || defined GNULIB_POSIXCHECK) && 0 +/* OpenIndiana has a bug: must be included before + . */ +# include +# include +#endif + +/* Native Windows platforms declare _mktemp() in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include +#endif + +#if 0 + +/* OSF/1 5.1 declares 'struct random_data' in , which is included + from if _REENTRANT is defined. Include it whenever we need + 'struct random_data'. */ +# if 1 +# include +# endif + +# include + +# if !1 +/* Define 'struct random_data'. + But allow multiple gnulib generated replacements to coexist. */ +# if !GNULIB_defined_struct_random_data +struct random_data +{ + int32_t *fptr; /* Front pointer. */ + int32_t *rptr; /* Rear pointer. */ + int32_t *state; /* Array of state values. */ + int rand_type; /* Type of random number generator. */ + int rand_deg; /* Degree of random number generator. */ + int rand_sep; /* Distance between front and rear. */ + int32_t *end_ptr; /* Pointer behind state table. */ +}; +# define GNULIB_defined_struct_random_data 1 +# endif +# endif +#endif + +#if (0 || 0 || 0 || 0 || 0 || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__) +/* On Mac OS X 10.3, only declares mkstemp. */ +/* On Mac OS X 10.5, only declares mkstemps. */ +/* On Mac OS X 10.13, only declares mkostemp and mkostemps. */ +/* On Cygwin 1.7.1, only declares getsubopt. */ +/* But avoid namespace pollution on glibc systems and native Windows. */ +# include +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + +/* The definition of _Noreturn is copied here. */ +/* A C macro for declaring that a function does not return. + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _Noreturn +# if (defined __cplusplus \ + && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ + || (defined _MSC_VER && 1900 <= _MSC_VER)) \ + && 0) + /* [[noreturn]] is not practically usable, because with it the syntax + extern _Noreturn void func (...); + would not be valid; such a declaration would only be valid with 'extern' + and '_Noreturn' swapped, or without the 'extern' keyword. However, some + AIX system header files and several gnulib header files use precisely + this syntax with 'extern'. */ +# define _Noreturn [[noreturn]] +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) + /* _Noreturn works as-is. */ +# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ +#ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +#endif +/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere + with proper operation of xargs. */ +#ifndef EXIT_FAILURE +# define EXIT_FAILURE 1 +#elif EXIT_FAILURE != 1 +# undef EXIT_FAILURE +# define EXIT_FAILURE 1 +#endif + + +#if 0 +/* Terminate the current process with the given return code, without running + the 'atexit' handlers. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef _Exit +# define _Exit rpl__Exit +# endif +_GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status)); +_GL_CXXALIAS_RPL (_Exit, void, (int status)); +# else +# if !1 +_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); +# endif +_GL_CXXALIAS_SYS (_Exit, void, (int status)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (_Exit); +# endif +#elif defined GNULIB_POSIXCHECK +# undef _Exit +# if HAVE_RAW_DECL__EXIT +_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " + "use gnulib module _Exit for portability"); +# endif +#endif + + +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef free +# define free rpl_free +# endif +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_FUNCDECL_RPL (free, void, (void *ptr) _GL_ATTRIBUTE_NOTHROW); +# else +_GL_FUNCDECL_RPL (free, void, (void *ptr)); +# endif +_GL_CXXALIAS_RPL (free, void, (void *ptr)); +# else +_GL_CXXALIAS_SYS (free, void, (void *ptr)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (free); +# endif +#elif defined GNULIB_POSIXCHECK +# undef free +/* Assume free is always declared. */ +_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - " + "use gnulib module free for portability"); +#endif + + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef aligned_alloc +# define aligned_alloc rpl_aligned_alloc +# endif +_GL_FUNCDECL_RPL (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); +# else +# if 1 +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size)); +# endif +# endif +# if (__GLIBC__ >= 2) && 1 +_GL_CXXALIASWARN (aligned_alloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined aligned_alloc +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef aligned_alloc +# if HAVE_RAW_DECL_ALIGNED_ALLOC +_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " + "use gnulib module aligned_alloc for portability"); +# endif +# endif +#endif + +#if 0 +/* Parse a signed decimal integer. + Returns the value of the integer. Errors are not detected. */ +# if !1 +_GL_FUNCDECL_SYS (atoll, long long, (const char *string) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (atoll, long long, (const char *string)); +_GL_CXXALIASWARN (atoll); +#elif defined GNULIB_POSIXCHECK +# undef atoll +# if HAVE_RAW_DECL_ATOLL +_GL_WARN_ON_USE (atoll, "atoll is unportable - " + "use gnulib module atoll for portability"); +# endif +#endif + +#if 0 +# if (0 && 0) \ + || (0 && 0) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef calloc +# define calloc rpl_calloc +# endif +_GL_FUNCDECL_RPL (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); +# else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (calloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined calloc +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef calloc +/* Assume calloc is always declared. */ +_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " + "use gnulib module calloc-posix for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define canonicalize_file_name rpl_canonicalize_file_name +# endif +_GL_FUNCDECL_RPL (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); +# else +# if !1 || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); +# endif +# ifndef GNULIB_defined_canonicalize_file_name +# define GNULIB_defined_canonicalize_file_name \ + (!1 || 0) +# endif +_GL_CXXALIASWARN (canonicalize_file_name); +#else +# if 1 && __GNUC__ >= 11 && !defined canonicalize_file_name +/* For -Wmismatched-dealloc: Associate canonicalize_file_name with free or + rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef canonicalize_file_name +# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME +_GL_WARN_ON_USE (canonicalize_file_name, + "canonicalize_file_name is unportable - " + "use gnulib module canonicalize-lgpl for portability"); +# endif +# endif +#endif + +#if 1 +/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ecvt +# define ecvt _ecvt +# endif +_GL_CXXALIAS_MDA (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (ecvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcvt +# define fcvt _fcvt +# endif +_GL_CXXALIAS_MDA (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gcvt +# define gcvt _gcvt +# endif +_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf)); +# else +# if 1 +_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (gcvt); +# endif +#endif + +#if 0 +/* Store max(NELEM,3) load average numbers in LOADAVG[]. + The three numbers are the load average of the last 1 minute, the last 5 + minutes, and the last 15 minutes, respectively. + LOADAVG is an array of NELEM numbers. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getloadavg +# define getloadavg rpl_getloadavg +# endif +_GL_FUNCDECL_RPL (getloadavg, int, (double loadavg[], int nelem) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getloadavg, int, (double loadavg[], int nelem)); +# else +# if !1 +_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getloadavg); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getloadavg +# if HAVE_RAW_DECL_GETLOADAVG +_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " + "use gnulib module getloadavg for portability"); +# endif +#endif + +#if 0 +/* Return the base name of the executing program. + On native Windows this will usually end in ".exe" or ".EXE". */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getprogname +# define getprogname rpl_getprogname +# endif +# if 1 +_GL_FUNCDECL_RPL (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_RPL (getprogname, const char *, (void)); +# endif +_GL_CXXALIAS_RPL (getprogname, const char *, (void)); +# else +# if !1 +# if 1 +_GL_FUNCDECL_SYS (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_SYS (getprogname, const char *, (void)); +# endif +# endif +_GL_CXXALIAS_SYS (getprogname, const char *, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getprogname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getprogname +# if HAVE_RAW_DECL_GETPROGNAME +_GL_WARN_ON_USE (getprogname, "getprogname is unportable - " + "use gnulib module getprogname for portability"); +# endif +#endif + +#if 0 +/* Assuming *OPTIONP is a comma separated list of elements of the form + "token" or "token=value", getsubopt parses the first of these elements. + If the first element refers to a "token" that is member of the given + NULL-terminated array of tokens: + - It replaces the comma with a NUL byte, updates *OPTIONP to point past + the first option and the comma, sets *VALUEP to the value of the + element (or NULL if it doesn't contain an "=" sign), + - It returns the index of the "token" in the given array of tokens. + Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. + For more details see the POSIX specification. + https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getsubopt +# define getsubopt rpl_getsubopt +# endif +_GL_FUNCDECL_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep)); +# else +# if !1 +_GL_FUNCDECL_SYS (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep) + _GL_ARG_NONNULL ((1, 2, 3))); +# endif +_GL_CXXALIAS_SYS (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getsubopt); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getsubopt +# if HAVE_RAW_DECL_GETSUBOPT +_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " + "use gnulib module getsubopt for portability"); +# endif +#endif + +#if 0 +/* Change the ownership and access permission of the slave side of the + pseudo-terminal whose master side is specified by FD. */ +# if !1 +_GL_FUNCDECL_SYS (grantpt, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (grantpt, int, (int fd)); +_GL_CXXALIASWARN (grantpt); +#elif defined GNULIB_POSIXCHECK +# undef grantpt +# if HAVE_RAW_DECL_GRANTPT +_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " + "use gnulib module grantpt for portability"); +# endif +#endif + +/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not + rely on GNU or POSIX semantics for malloc and realloc (for example, + by never specifying a zero size), so it does not need malloc or + realloc to be redefined. */ +#if 0 +# if (0 && 0) \ + || (0 && 0) +# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ + || _GL_USE_STDLIB_ALLOC) +# undef malloc +# define malloc rpl_malloc +# endif +_GL_FUNCDECL_RPL (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (malloc, void *, (size_t size)); +# else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (malloc, void *, (size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (malloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined malloc +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef malloc +/* Assume malloc is always declared. */ +_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " + "use gnulib module malloc-posix for portability"); +# endif +#endif + +/* Return maximum number of bytes of a multibyte character. */ +#if 0 +# if !GNULIB_defined_MB_CUR_MAX +static inline +int gl_MB_CUR_MAX (void) +{ + /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ + return MB_CUR_MAX + (MB_CUR_MAX == 3); +} +# undef MB_CUR_MAX +# define MB_CUR_MAX gl_MB_CUR_MAX () +# define GNULIB_defined_MB_CUR_MAX 1 +# endif +#endif + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbstowcs +# define mbstowcs rpl_mbstowcs +# endif +_GL_FUNCDECL_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# else +_GL_CXXALIAS_SYS (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbstowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbstowcs +# if HAVE_RAW_DECL_MBSTOWCS +_GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - " + "use gnulib module mbstowcs for portability"); +# endif +#endif + +/* Convert a multibyte character to a wide character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbtowc +# define mbtowc rpl_mbtowc +# endif +_GL_FUNCDECL_RPL (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +_GL_CXXALIAS_RPL (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +# endif +_GL_CXXALIAS_SYS (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbtowc); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbtowc +# if HAVE_RAW_DECL_MBTOWC +_GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " + "use gnulib module mbtowc for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary directory from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the directory name unique. + Returns TEMPLATE, or a null pointer if it cannot get a unique name. + The directory is created mode 700. */ +# if !1 +_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); +_GL_CXXALIASWARN (mkdtemp); +#elif defined GNULIB_POSIXCHECK +# undef mkdtemp +# if HAVE_RAW_DECL_MKDTEMP +_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " + "use gnulib module mkdtemp for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + The file is then created, with the specified flags, ensuring it didn't exist + before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemp +# define mkostemp rpl_mkostemp +# endif +_GL_FUNCDECL_RPL (mkostemp, int, (char * /*template*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemp, int, (char * /*template*/, int /*flags*/)); +# else +# if !1 +_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mkostemp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mkostemp +# if HAVE_RAW_DECL_MKOSTEMP +_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " + "use gnulib module mkostemp for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE before a suffix of length + SUFFIXLEN must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + The file is then created, with the specified flags, ensuring it didn't exist + before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemps +# define mkostemps rpl_mkostemps +# endif +_GL_FUNCDECL_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# else +# if !1 +_GL_FUNCDECL_SYS (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mkostemps); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mkostemps +# if HAVE_RAW_DECL_MKOSTEMPS +_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " + "use gnulib module mkostemps for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The file is then created, ensuring it didn't exist before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mkstemp rpl_mkstemp +# endif +_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); +# endif +_GL_CXXALIASWARN (mkstemp); +#elif defined GNULIB_POSIXCHECK +# undef mkstemp +# if HAVE_RAW_DECL_MKSTEMP +_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " + "use gnulib module mkstemp for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE prior to a suffix of length + SUFFIXLEN must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The file is then created, ensuring it didn't exist before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if !1 +_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); +_GL_CXXALIASWARN (mkstemps); +#elif defined GNULIB_POSIXCHECK +# undef mkstemps +# if HAVE_RAW_DECL_MKSTEMPS +_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " + "use gnulib module mkstemps for portability"); +# endif +#endif + +#if 1 +/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::mktemp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mktemp +# define mktemp _mktemp +# endif +_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/)); +# else +_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/)); +# endif +_GL_CXXALIASWARN (mktemp); +#endif + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_memalign +# define posix_memalign rpl_posix_memalign +# endif +_GL_FUNCDECL_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# else +# if 1 +_GL_CXXALIAS_SYS (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# endif +# endif +# if __GLIBC__ >= 2 && 1 +_GL_CXXALIASWARN (posix_memalign); +# endif +#elif defined GNULIB_POSIXCHECK +# undef posix_memalign +# if HAVE_RAW_DECL_POSIX_MEMALIGN +_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " + "use gnulib module posix_memalign for portability"); +# endif +#endif + +#if 0 +/* Return an FD open to the master side of a pseudo-terminal. Flags should + include O_RDWR, and may also include O_NOCTTY. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_openpt +# define posix_openpt rpl_posix_openpt +# endif +_GL_FUNCDECL_RPL (posix_openpt, int, (int flags)); +_GL_CXXALIAS_RPL (posix_openpt, int, (int flags)); +# else +# if !1 +_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); +# endif +_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (posix_openpt); +# endif +#elif defined GNULIB_POSIXCHECK +# undef posix_openpt +# if HAVE_RAW_DECL_POSIX_OPENPT +_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " + "use gnulib module posix_openpt for portability"); +# endif +#endif + +#if 0 +/* Return the pathname of the pseudo-terminal slave associated with + the master FD is open on, or NULL on errors. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ptsname +# define ptsname rpl_ptsname +# endif +_GL_FUNCDECL_RPL (ptsname, char *, (int fd)); +_GL_CXXALIAS_RPL (ptsname, char *, (int fd)); +# else +# if !1 +_GL_FUNCDECL_SYS (ptsname, char *, (int fd)); +# endif +_GL_CXXALIAS_SYS (ptsname, char *, (int fd)); +# endif +_GL_CXXALIASWARN (ptsname); +#elif defined GNULIB_POSIXCHECK +# undef ptsname +# if HAVE_RAW_DECL_PTSNAME +_GL_WARN_ON_USE (ptsname, "ptsname is not portable - " + "use gnulib module ptsname for portability"); +# endif +#endif + +#if 0 +/* Set the pathname of the pseudo-terminal slave associated with + the master FD is open on and return 0, or set errno and return + non-zero on errors. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ptsname_r +# define ptsname_r rpl_ptsname_r +# endif +_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +# ifndef GNULIB_defined_ptsname_r +# define GNULIB_defined_ptsname_r (!1 || 0) +# endif +_GL_CXXALIASWARN (ptsname_r); +#elif defined GNULIB_POSIXCHECK +# undef ptsname_r +# if HAVE_RAW_DECL_PTSNAME_R +_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " + "use gnulib module ptsname_r for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv rpl_putenv +# endif +_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (putenv, int, (char *string)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +_GL_CXXALIAS_MDA (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); +# else +_GL_CXXALIAS_SYS (putenv, int, (char *string)); +# endif +_GL_CXXALIASWARN (putenv); +#elif 1 +/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putenv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +/* Need to cast, because on mingw, the parameter is either + 'const char *string' or 'char *string'. */ +_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); +# else +_GL_CXXALIAS_SYS (putenv, int, (char *string)); +# endif +_GL_CXXALIASWARN (putenv); +#endif + +#if 0 +/* Sort an array of NMEMB elements, starting at address BASE, each element + occupying SIZE bytes, in ascending order according to the comparison + function COMPARE. */ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_qsort_r_fn_types +typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *); +# define GNULIB_defined_qsort_r_fn_types 1 +# endif +# ifdef __cplusplus +} +# endif +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef qsort_r +# define qsort_r rpl_qsort_r +# endif +_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg) _GL_ARG_NONNULL ((1, 4))); +_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg)); +# else +# if !1 +_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg) _GL_ARG_NONNULL ((1, 4))); +# endif +_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg)); +# endif +_GL_CXXALIASWARN (qsort_r); +#elif defined GNULIB_POSIXCHECK +# undef qsort_r +# if HAVE_RAW_DECL_QSORT_R +_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " + "use gnulib module qsort_r for portability"); +# endif +#endif + + +#if 0 +# if !1 +# ifndef RAND_MAX +# define RAND_MAX 2147483647 +# endif +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef random +# define random rpl_random +# endif +_GL_FUNCDECL_RPL (random, long, (void)); +_GL_CXXALIAS_RPL (random, long, (void)); +# else +# if !1 +_GL_FUNCDECL_SYS (random, long, (void)); +# endif +/* Need to cast, because on Haiku, the return type is + int. */ +_GL_CXXALIAS_SYS_CAST (random, long, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (random); +# endif +#elif defined GNULIB_POSIXCHECK +# undef random +# if HAVE_RAW_DECL_RANDOM +_GL_WARN_ON_USE (random, "random is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef srandom +# define srandom rpl_srandom +# endif +_GL_FUNCDECL_RPL (srandom, void, (unsigned int seed)); +_GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); +# else +# if !1 +_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); +# endif +/* Need to cast, because on FreeBSD, the first parameter is + unsigned long seed. */ +_GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (srandom); +# endif +#elif defined GNULIB_POSIXCHECK +# undef srandom +# if HAVE_RAW_DECL_SRANDOM +_GL_WARN_ON_USE (srandom, "srandom is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef initstate +# define initstate rpl_initstate +# endif +_GL_FUNCDECL_RPL (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size)); +# else +# if !1 || !1 +_GL_FUNCDECL_SYS (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size) + _GL_ARG_NONNULL ((2))); +# endif +/* Need to cast, because on FreeBSD, the first parameter is + unsigned long seed. */ +_GL_CXXALIAS_SYS_CAST (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (initstate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef initstate +# if HAVE_RAW_DECL_INITSTATE +_GL_WARN_ON_USE (initstate, "initstate is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setstate +# define setstate rpl_setstate +# endif +_GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (setstate, char *, (char *arg_state)); +# else +# if !1 || !1 +_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Mac OS X 10.13, HP-UX, Solaris the first parameter + is const char *arg_state. */ +_GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (setstate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef setstate +# if HAVE_RAW_DECL_SETSTATE +_GL_WARN_ON_USE (setstate, "setstate is unportable - " + "use gnulib module random for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef random_r +# define random_r rpl_random_r +# endif +_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result)); +# else +# if !1 +_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); +# endif +_GL_CXXALIASWARN (random_r); +#elif defined GNULIB_POSIXCHECK +# undef random_r +# if HAVE_RAW_DECL_RANDOM_R +_GL_WARN_ON_USE (random_r, "random_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef srandom_r +# define srandom_r rpl_srandom_r +# endif +_GL_FUNCDECL_RPL (srandom_r, int, + (unsigned int seed, struct random_data *rand_state) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (srandom_r, int, + (unsigned int seed, struct random_data *rand_state)); +# else +# if !1 +_GL_FUNCDECL_SYS (srandom_r, int, + (unsigned int seed, struct random_data *rand_state) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (srandom_r, int, + (unsigned int seed, struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (srandom_r); +#elif defined GNULIB_POSIXCHECK +# undef srandom_r +# if HAVE_RAW_DECL_SRANDOM_R +_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef initstate_r +# define initstate_r rpl_initstate_r +# endif +_GL_FUNCDECL_RPL (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state) + _GL_ARG_NONNULL ((2, 4))); +_GL_CXXALIAS_RPL (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state)); +# else +# if !1 +_GL_FUNCDECL_SYS (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state) + _GL_ARG_NONNULL ((2, 4))); +# endif +/* Need to cast, because on Haiku, the third parameter is + unsigned long buf_size. */ +_GL_CXXALIAS_SYS_CAST (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (initstate_r); +#elif defined GNULIB_POSIXCHECK +# undef initstate_r +# if HAVE_RAW_DECL_INITSTATE_R +_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setstate_r +# define setstate_r rpl_setstate_r +# endif +_GL_FUNCDECL_RPL (setstate_r, int, + (char *arg_state, struct random_data *rand_state) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (setstate_r, int, + (char *arg_state, struct random_data *rand_state)); +# else +# if !1 +_GL_FUNCDECL_SYS (setstate_r, int, + (char *arg_state, struct random_data *rand_state) + _GL_ARG_NONNULL ((1, 2))); +# endif +/* Need to cast, because on Haiku, the first parameter is + void *arg_state. */ +_GL_CXXALIAS_SYS_CAST (setstate_r, int, + (char *arg_state, struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (setstate_r); +#elif defined GNULIB_POSIXCHECK +# undef setstate_r +# if HAVE_RAW_DECL_SETSTATE_R +_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + + +#if 0 +# if (0 && 0) \ + || (0 && 0) +# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ + || _GL_USE_STDLIB_ALLOC) +# undef realloc +# define realloc rpl_realloc +# endif +_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); +# else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (realloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined realloc +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef realloc +/* Assume realloc is always declared. */ +_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " + "use gnulib module realloc-posix for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef reallocarray +# define reallocarray rpl_reallocarray +# endif +_GL_FUNCDECL_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +_GL_CXXALIAS_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# endif +_GL_CXXALIAS_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (reallocarray); +# endif +#elif defined GNULIB_POSIXCHECK +# undef reallocarray +# if HAVE_RAW_DECL_REALLOCARRAY +_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " + "use gnulib module reallocarray for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define realpath rpl_realpath +# endif +_GL_FUNCDECL_RPL (realpath, char *, + (const char *restrict name, char *restrict resolved) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (realpath, char *, + (const char *restrict name, char *restrict resolved)); +# else +# if !1 +_GL_FUNCDECL_SYS (realpath, char *, + (const char *restrict name, char *restrict resolved) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (realpath, char *, + (const char *restrict name, char *restrict resolved)); +# endif +_GL_CXXALIASWARN (realpath); +#elif defined GNULIB_POSIXCHECK +# undef realpath +# if HAVE_RAW_DECL_REALPATH +_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " + "canonicalize or canonicalize-lgpl for portability"); +# endif +#endif + +#if 0 +/* Test a user response to a question. + Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ +# if !1 +_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); +_GL_CXXALIASWARN (rpmatch); +#elif defined GNULIB_POSIXCHECK +# undef rpmatch +# if HAVE_RAW_DECL_RPMATCH +_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " + "use gnulib module rpmatch for portability"); +# endif +#endif + +#if 0 +/* Look up NAME in the environment, returning 0 in insecure situations. */ +# if !1 +_GL_FUNCDECL_SYS (secure_getenv, char *, + (char const *name) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); +_GL_CXXALIASWARN (secure_getenv); +#elif defined GNULIB_POSIXCHECK +# undef secure_getenv +# if HAVE_RAW_DECL_SECURE_GETENV +_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " + "use gnulib module secure_getenv for portability"); +# endif +#endif + +#if 0 +/* Set NAME to VALUE in the environment. + If REPLACE is nonzero, overwrite an existing value. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setenv +# define setenv rpl_setenv +# endif +_GL_FUNCDECL_RPL (setenv, int, + (const char *name, const char *value, int replace) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (setenv, int, + (const char *name, const char *value, int replace)); +# else +# if !1 +_GL_FUNCDECL_SYS (setenv, int, + (const char *name, const char *value, int replace) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (setenv, int, + (const char *name, const char *value, int replace)); +# endif +# if !(0 && !1) +_GL_CXXALIASWARN (setenv); +# endif +#elif defined GNULIB_POSIXCHECK +# undef setenv +# if HAVE_RAW_DECL_SETENV +_GL_WARN_ON_USE (setenv, "setenv is unportable - " + "use gnulib module setenv for portability"); +# endif +#endif + +#if 0 + /* Parse a double from STRING, updating ENDP if appropriate. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtod rpl_strtod +# endif +# define GNULIB_defined_strtod_function 1 +_GL_FUNCDECL_RPL (strtod, double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtod, double, + (const char *restrict str, char **restrict endp)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtod, double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtod, double, + (const char *restrict str, char **restrict endp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtod); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtod +# if HAVE_RAW_DECL_STRTOD +_GL_WARN_ON_USE (strtod, "strtod is unportable - " + "use gnulib module strtod for portability"); +# endif +#endif + +#if 0 + /* Parse a 'long double' from STRING, updating ENDP if appropriate. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtold rpl_strtold +# endif +# define GNULIB_defined_strtold_function 1 +_GL_FUNCDECL_RPL (strtold, long double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtold, long double, + (const char *restrict str, char **restrict endp)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtold, long double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtold, long double, + (const char *restrict str, char **restrict endp)); +# endif +_GL_CXXALIASWARN (strtold); +#elif defined GNULIB_POSIXCHECK +# undef strtold +# if HAVE_RAW_DECL_STRTOLD +_GL_WARN_ON_USE (strtold, "strtold is unportable - " + "use gnulib module strtold for portability"); +# endif +#endif + +#if 0 +/* Parse a signed integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is set + to ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtol rpl_strtol +# endif +# define GNULIB_defined_strtol_function 1 +_GL_FUNCDECL_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtol); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtol +# if HAVE_RAW_DECL_STRTOL +_GL_WARN_ON_USE (strtol, "strtol is unportable - " + "use gnulib module strtol for portability"); +# endif +#endif + +#if 0 +/* Parse a signed integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set + to ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoll rpl_strtoll +# endif +# define GNULIB_defined_strtoll_function 1 +_GL_FUNCDECL_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +_GL_CXXALIASWARN (strtoll); +#elif defined GNULIB_POSIXCHECK +# undef strtoll +# if HAVE_RAW_DECL_STRTOLL +_GL_WARN_ON_USE (strtoll, "strtoll is unportable - " + "use gnulib module strtoll for portability"); +# endif +#endif + +#if 0 +/* Parse an unsigned integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is ULONG_MAX, and errno is set to ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoul rpl_strtoul +# endif +# define GNULIB_defined_strtoul_function 1 +_GL_FUNCDECL_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtoul); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtoul +# if HAVE_RAW_DECL_STRTOUL +_GL_WARN_ON_USE (strtoul, "strtoul is unportable - " + "use gnulib module strtoul for portability"); +# endif +#endif + +#if 0 +/* Parse an unsigned integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is ULLONG_MAX, and errno is set to + ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoull rpl_strtoull +# endif +# define GNULIB_defined_strtoull_function 1 +_GL_FUNCDECL_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +_GL_CXXALIASWARN (strtoull); +#elif defined GNULIB_POSIXCHECK +# undef strtoull +# if HAVE_RAW_DECL_STRTOULL +_GL_WARN_ON_USE (strtoull, "strtoull is unportable - " + "use gnulib module strtoull for portability"); +# endif +#endif + +#if 0 +/* Unlock the slave side of the pseudo-terminal whose master side is specified + by FD, so that it can be opened. */ +# if !1 +_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); +_GL_CXXALIASWARN (unlockpt); +#elif defined GNULIB_POSIXCHECK +# undef unlockpt +# if HAVE_RAW_DECL_UNLOCKPT +_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " + "use gnulib module unlockpt for portability"); +# endif +#endif + +#if 0 +/* Remove the variable NAME from the environment. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unsetenv +# define unsetenv rpl_unsetenv +# endif +_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); +# else +# if !1 +_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); +# endif +# if !(0 && !1) +_GL_CXXALIASWARN (unsetenv); +# endif +#elif defined GNULIB_POSIXCHECK +# undef unsetenv +# if HAVE_RAW_DECL_UNSETENV +_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " + "use gnulib module unsetenv for portability"); +# endif +#endif + +/* Convert a wide character to a multibyte character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctomb +# define wctomb rpl_wctomb +# endif +_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); +_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); +# else +_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wctomb); +# endif +#endif + + +#endif /* _GL_STDLIB_H */ +#endif /* _GL_STDLIB_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/string.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/string.h new file mode 100644 index 000000000..a7a268dd3 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/string.h @@ -0,0 +1,1953 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A GNU-like . + + Copyright (C) 1995-1996, 2001-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +#if defined _GL_ALREADY_INCLUDING_STRING_H +/* Special invocation convention: + - On OS X/NetBSD we have a sequence of nested includes + -> -> "string.h" + In this situation system _chk variants due to -D_FORTIFY_SOURCE + might be used after any replacements defined here. */ + +#include "../ucrt/string.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_STRING_H + +#define _GL_ALREADY_INCLUDING_STRING_H + +/* The include_next requires a split double-inclusion guard. */ +#include "../ucrt/string.h" + +#undef _GL_ALREADY_INCLUDING_STRING_H + +#ifndef _GL_STRING_H +#define _GL_STRING_H + +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* NetBSD 5.0 mis-defines NULL. */ +#include + +/* MirBSD defines mbslen as a macro. */ +#if 0 && defined __MirBSD__ +# include +#endif + +/* NetBSD 5.0 declares strsignal in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ + && ! defined __GLIBC__ +# include +#endif + +/* AIX 7.2 and Android 13 declare ffsl and ffsll in , not in + . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if ((0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _AIX || defined __ANDROID__)) \ + && ! defined __GLIBC__ +# include +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif + +/* Clear a block of memory. The compiler will not delete a call to + this function, even if the block is dead after the call. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (explicit_bzero, void, + (void *__dest, size_t __n) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n)); +_GL_CXXALIASWARN (explicit_bzero); +#elif defined GNULIB_POSIXCHECK +# undef explicit_bzero +# if HAVE_RAW_DECL_EXPLICIT_BZERO +_GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - " + "use gnulib module explicit_bzero for portability"); +# endif +#endif + +/* Find the index of the least-significant set bit. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (ffsl, int, (long int i)); +# endif +_GL_CXXALIAS_SYS (ffsl, int, (long int i)); +_GL_CXXALIASWARN (ffsl); +#elif defined GNULIB_POSIXCHECK +# undef ffsl +# if HAVE_RAW_DECL_FFSL +_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); +# endif +#endif + + +/* Find the index of the least-significant set bit. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define ffsll rpl_ffsll +# endif +_GL_FUNCDECL_RPL (ffsll, int, (long long int i)); +_GL_CXXALIAS_RPL (ffsll, int, (long long int i)); +# else +# if !1 +_GL_FUNCDECL_SYS (ffsll, int, (long long int i)); +# endif +_GL_CXXALIAS_SYS (ffsll, int, (long long int i)); +# endif +_GL_CXXALIASWARN (ffsll); +#elif defined GNULIB_POSIXCHECK +# undef ffsll +# if HAVE_RAW_DECL_FFSLL +_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'memccpy' to '_memccpy', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::memccpy always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memccpy +# define memccpy _memccpy +# endif +_GL_CXXALIAS_MDA (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# else +_GL_CXXALIAS_SYS (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# endif +_GL_CXXALIASWARN (memccpy); +#endif + + +/* Return the first instance of C within N bytes of S, or NULL. */ +#if 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memchr +# define memchr rpl_memchr +# endif +_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); +# else + /* On some systems, this function is defined as an overloaded function: + extern "C" { const void * std::memchr (const void *, int, size_t); } + extern "C++" { void * std::memchr (void *, int, size_t); } */ +_GL_CXXALIAS_SYS_CAST2 (memchr, + void *, (void const *__s, int __c, size_t __n), + void const *, (void const *__s, int __c, size_t __n)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memchr, void *, + (void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (memchr, void const *, + (void const *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (memchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef memchr +/* Assume memchr is always declared. */ +_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +#endif + +/* Return the first occurrence of NEEDLE in HAYSTACK. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define memmem rpl_memmem +# endif +_GL_FUNCDECL_RPL (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 3))); +_GL_CXXALIAS_RPL (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 3))); +# endif +_GL_CXXALIAS_SYS (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len)); +# endif +_GL_CXXALIASWARN (memmem); +#elif defined GNULIB_POSIXCHECK +# undef memmem +# if HAVE_RAW_DECL_MEMMEM +_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " + "use gnulib module memmem-simple for portability, " + "and module memmem for speed" ); +# endif +#endif + +/* Copy N bytes of SRC to DEST, return pointer to bytes after the + last written byte. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mempcpy +# define mempcpy rpl_mempcpy +# endif +_GL_FUNCDECL_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n)); +# else +# if !1 +_GL_FUNCDECL_SYS (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mempcpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mempcpy +# if HAVE_RAW_DECL_MEMPCPY +_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " + "use gnulib module mempcpy for portability"); +# endif +#endif + +/* Search backwards through a block for a byte (specified as an int). */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const void * std::memrchr (const void *, int, size_t); } + extern "C++" { void * std::memrchr (void *, int, size_t); } */ +_GL_CXXALIAS_SYS_CAST2 (memrchr, + void *, (void const *, int, size_t), + void const *, (void const *, int, size_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memrchr, void *, + (void *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (memrchr, void const *, + (void const *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (memrchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef memrchr +# if HAVE_RAW_DECL_MEMRCHR +_GL_WARN_ON_USE (memrchr, "memrchr is unportable - " + "use gnulib module memrchr for portability"); +# endif +#endif + +/* Overwrite a block of memory. The compiler will not optimize + effects away, even if the block is dead after the call. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (memset_explicit, void *, + (void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n)); +_GL_CXXALIASWARN (memset_explicit); +#elif defined GNULIB_POSIXCHECK +# undef memset_explicit +# if HAVE_RAW_DECL_MEMSET_EXPLICIT +_GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - " + "use gnulib module memset_explicit for portability"); +# endif +#endif + +/* Find the first occurrence of C in S. More efficient than + memchr(S,C,N), at the expense of undefined behavior if C does not + occur within N bytes. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const void * std::rawmemchr (const void *, int); } + extern "C++" { void * std::rawmemchr (void *, int); } */ +_GL_CXXALIAS_SYS_CAST2 (rawmemchr, + void *, (void const *__s, int __c_in), + void const *, (void const *__s, int __c_in)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (rawmemchr, void *, + (void *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (rawmemchr, void const *, + (void const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +# else +_GL_CXXALIASWARN (rawmemchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef rawmemchr +# if HAVE_RAW_DECL_RAWMEMCHR +_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " + "use gnulib module rawmemchr for portability"); +# endif +#endif + +/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef stpcpy +# define stpcpy rpl_stpcpy +# endif +_GL_FUNCDECL_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src)); +# else +# if !1 +_GL_FUNCDECL_SYS (stpcpy, char *, + (char *restrict __dst, char const *restrict __src) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (stpcpy, char *, + (char *restrict __dst, char const *restrict __src)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (stpcpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef stpcpy +# if HAVE_RAW_DECL_STPCPY +_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " + "use gnulib module stpcpy for portability"); +# endif +#endif + +/* Copy no more than N bytes of SRC to DST, returning a pointer past the + last non-NUL byte written into DST. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef stpncpy +# define stpncpy rpl_stpncpy +# endif +_GL_FUNCDECL_RPL (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (stpncpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef stpncpy +# if HAVE_RAW_DECL_STPNCPY +_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + "use gnulib module stpncpy for portability"); +# endif +#endif + +#if defined GNULIB_POSIXCHECK +/* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +# undef strchr +/* Assume strchr is always declared. */ +_GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), + "strchr cannot work correctly on character strings " + "in some multibyte locales - " + "use mbschr if you care about internationalization"); +#endif + +/* Find the first occurrence of C in S or the final NUL byte. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strchrnul rpl_strchrnul +# endif +_GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strchrnul, char *, + (const char *str, int ch)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const char * std::strchrnul (const char *, int); } + extern "C++" { char * std::strchrnul (char *, int); } */ +_GL_CXXALIAS_SYS_CAST2 (strchrnul, + char *, (char const *__s, int __c_in), + char const *, (char const *__s, int __c_in)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strchrnul, char *, + (char *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strchrnul, char const *, + (char const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (strchrnul); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strchrnul +# if HAVE_RAW_DECL_STRCHRNUL +_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " + "use gnulib module strchrnul for portability"); +# endif +#endif + +/* Duplicate S, returning an identical malloc'd string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup rpl_strdup +# endif +_GL_FUNCDECL_RPL (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); +# else +# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup + /* strdup exists as a function and as a macro. Get rid of the macro. */ +# undef strdup +# endif +# if (!1 || __GNUC__ >= 11) && !defined strdup +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); +# endif +_GL_CXXALIASWARN (strdup); +#else +# if __GNUC__ >= 11 && !defined strdup +/* For -Wmismatched-dealloc: Associate strdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strdup +# if HAVE_RAW_DECL_STRDUP +_GL_WARN_ON_USE (strdup, "strdup is unportable - " + "use gnulib module strdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'creat' to '_creat', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::strdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); +# else +# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup +# undef strdup +# endif +_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); +# endif +_GL_CXXALIASWARN (strdup); +# endif +#endif + +/* Append no more than N characters from SRC onto DEST. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strncat +# define strncat rpl_strncat +# endif +_GL_FUNCDECL_RPL (strncat, char *, + (char *restrict dest, const char *restrict src, size_t n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (strncat, char *, + (char *restrict dest, const char *restrict src, size_t n)); +# else +_GL_CXXALIAS_SYS (strncat, char *, + (char *restrict dest, const char *restrict src, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strncat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strncat +# if HAVE_RAW_DECL_STRNCAT +_GL_WARN_ON_USE (strncat, "strncat is unportable - " + "use gnulib module strncat for portability"); +# endif +#endif + +/* Return a newly allocated copy of at most N bytes of STRING. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strndup +# define strndup rpl_strndup +# endif +_GL_FUNCDECL_RPL (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); +# else +# if !1 || (__GNUC__ >= 11 && !defined strndup) +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); +# endif +_GL_CXXALIASWARN (strndup); +#else +# if __GNUC__ >= 11 && !defined strndup +/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strndup +# if HAVE_RAW_DECL_STRNDUP +_GL_WARN_ON_USE (strndup, "strndup is unportable - " + "use gnulib module strndup for portability"); +# endif +# endif +#endif + +/* Find the length (number of bytes) of STRING, but scan at most + MAXLEN bytes. If no '\0' terminator is found in that many bytes, + return MAXLEN. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strnlen +# define strnlen rpl_strnlen +# endif +_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)); +# endif +_GL_CXXALIASWARN (strnlen); +#elif defined GNULIB_POSIXCHECK +# undef strnlen +# if HAVE_RAW_DECL_STRNLEN +_GL_WARN_ON_USE (strnlen, "strnlen is unportable - " + "use gnulib module strnlen for portability"); +# endif +#endif + +#if defined GNULIB_POSIXCHECK +/* strcspn() assumes the second argument is a list of single-byte characters. + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +# undef strcspn +/* Assume strcspn is always declared. */ +_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " + "in multibyte locales - " + "use mbscspn if you care about internationalization"); +#endif + +/* Find the first occurrence in S of any character in ACCEPT. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C" { const char * strpbrk (const char *, const char *); } + extern "C++" { char * strpbrk (char *, const char *); } */ +_GL_CXXALIAS_SYS_CAST2 (strpbrk, + char *, (char const *__s, char const *__accept), + const char *, (char const *__s, char const *__accept)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strpbrk, char *, + (char *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strpbrk, char const *, + (char const *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (strpbrk); +# endif +# if defined GNULIB_POSIXCHECK +/* strpbrk() assumes the second argument is a list of single-byte characters. + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +# undef strpbrk +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " + "in multibyte locales - " + "use mbspbrk if you care about internationalization"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strpbrk +# if HAVE_RAW_DECL_STRPBRK +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk is unportable - " + "use gnulib module strpbrk for portability"); +# endif +#endif + +#if defined GNULIB_POSIXCHECK +/* strspn() assumes the second argument is a list of single-byte characters. + Even in this simple case, it cannot work with multibyte strings. */ +# undef strspn +/* Assume strspn is always declared. */ +_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + "in multibyte locales - " + "use mbsspn if you care about internationalization"); +#endif + +#if defined GNULIB_POSIXCHECK +/* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +# undef strrchr +/* Assume strrchr is always declared. */ +_GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), + "strrchr cannot work correctly on character strings " + "in some multibyte locales - " + "use mbsrchr if you care about internationalization"); +#endif + +/* Search the next delimiter (char listed in DELIM) starting at *STRINGP. + If one is found, overwrite it with a NUL, and advance *STRINGP + to point to the next char after it. Otherwise, set *STRINGP to NULL. + If *STRINGP was already NULL, nothing happens. + Return the old value of *STRINGP. + + This is a variant of strtok() that is multithread-safe and supports + empty fields. + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + Caveat: It doesn't work with multibyte strings unless all of the delimiter + characters are ASCII characters < 0x30. + + See also strtok_r(). */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (strsep, char *, + (char **restrict __stringp, char const *restrict __delim) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (strsep, char *, + (char **restrict __stringp, char const *restrict __delim)); +_GL_CXXALIASWARN (strsep); +# if defined GNULIB_POSIXCHECK +# undef strsep +_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " + "in multibyte locales - " + "use mbssep if you care about internationalization"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strsep +# if HAVE_RAW_DECL_STRSEP +_GL_WARN_ON_USE (strsep, "strsep is unportable - " + "use gnulib module strsep for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strstr rpl_strstr +# endif +_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); +# else + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const char * strstr (const char *, const char *); } + extern "C++" { char * strstr (char *, const char *); } */ +_GL_CXXALIAS_SYS_CAST2 (strstr, + char *, (const char *haystack, const char *needle), + const char *, (const char *haystack, const char *needle)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strstr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strstr, const char *, + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (strstr); +# endif +#elif defined GNULIB_POSIXCHECK +/* strstr() does not work with multibyte strings if the locale encoding is + different from UTF-8: + POSIX says that it operates on "strings", and "string" in POSIX is defined + as a sequence of bytes, not of characters. */ +# undef strstr +/* Assume strstr is always declared. */ +_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " + "work correctly on character strings in most " + "multibyte locales - " + "use mbsstr if you care about internationalization, " + "or use strstr if you care about speed"); +#endif + +/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive + comparison. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strcasestr rpl_strcasestr +# endif +_GL_FUNCDECL_RPL (strcasestr, char *, + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (strcasestr, char *, + (const char *haystack, const char *needle)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (strcasestr, char *, + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const char * strcasestr (const char *, const char *); } + extern "C++" { char * strcasestr (char *, const char *); } */ +_GL_CXXALIAS_SYS_CAST2 (strcasestr, + char *, (const char *haystack, const char *needle), + const char *, (const char *haystack, const char *needle)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strcasestr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strcasestr, const char *, + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (strcasestr); +# endif +#elif defined GNULIB_POSIXCHECK +/* strcasestr() does not work with multibyte strings: + It is a glibc extension, and glibc implements it only for unibyte + locales. */ +# undef strcasestr +# if HAVE_RAW_DECL_STRCASESTR +_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " + "strings in multibyte locales - " + "use mbscasestr if you care about " + "internationalization, or use c-strcasestr if you want " + "a locale independent function"); +# endif +#endif + +/* Parse S into tokens separated by characters in DELIM. + If S is NULL, the saved pointer in SAVE_PTR is used as + the next starting point. For example: + char s[] = "-abc-=-def"; + char *sp; + x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" + x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL + x = strtok_r(NULL, "=", &sp); // x = NULL + // s = "abc\0-def\0" + + This is a variant of strtok() that is multithread-safe. + + For the POSIX documentation for this function, see: + https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtok.html + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + Caveat: It doesn't work with multibyte strings unless all of the delimiter + characters are ASCII characters < 0x30. + + See also strsep(). */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtok_r +# define strtok_r rpl_strtok_r +# endif +_GL_FUNCDECL_RPL (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr)); +# else +# if 0 || defined GNULIB_POSIXCHECK +# undef strtok_r +# endif +# if ! 1 +_GL_FUNCDECL_SYS (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr) + _GL_ARG_NONNULL ((2, 3))); +# endif +_GL_CXXALIAS_SYS (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr)); +# endif +_GL_CXXALIASWARN (strtok_r); +# if defined GNULIB_POSIXCHECK +_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " + "strings in multibyte locales - " + "use mbstok_r if you care about internationalization"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtok_r +# if HAVE_RAW_DECL_STRTOK_R +_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " + "use gnulib module strtok_r for portability"); +# endif +#endif + + +/* The following functions are not specified by POSIX. They are gnulib + extensions. */ + +#if 0 +/* Return the number of multibyte characters in the character string STRING. + This considers multibyte characters, unlike strlen, which counts bytes. */ +# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ +# undef mbslen +# endif +# if 0 /* AIX, OSF/1, MirBSD define mbslen already in libc. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbslen rpl_mbslen +# endif +_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); +# else +_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbslen); +# endif +#endif + +#if 0 +/* Return the number of multibyte characters in the character string starting + at STRING and ending at STRING + LEN. */ +_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1)); +#endif + +#if 0 +/* Locate the first single-byte character C in the character string STRING, + and return a pointer to it. Return NULL if C is not found in STRING. + Unlike strchr(), this function works correctly in multibyte locales with + encodings such as GB18030. */ +# if defined __hpux +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbschr rpl_mbschr /* avoid collision with HP-UX function */ +# endif +_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); +# else +_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); +# endif +_GL_CXXALIASWARN (mbschr); +#endif + +#if 0 +/* Locate the last single-byte character C in the character string STRING, + and return a pointer to it. Return NULL if C is not found in STRING. + Unlike strrchr(), this function works correctly in multibyte locales with + encodings such as GB18030. */ +# if defined __hpux || defined __INTERIX +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbsrchr rpl_mbsrchr /* avoid collision with system function */ +# endif +_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); +# else +_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); +# endif +_GL_CXXALIASWARN (mbsrchr); +#endif + +#if 0 +/* Find the first occurrence of the character string NEEDLE in the character + string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. + Unlike strstr(), this function works correctly in multibyte locales with + encodings different from UTF-8. */ +_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Compare the character strings S1 and S2, ignoring case, returning less than, + equal to or greater than zero if S1 is lexicographically less than, equal to + or greater than S2. + Note: This function may, in multibyte locales, return 0 for strings of + different lengths! + Unlike strcasecmp(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Compare the initial segment of the character string S1 consisting of at most + N characters with the initial segment of the character string S2 consisting + of at most N characters, ignoring case, returning less than, equal to or + greater than zero if the initial segment of S1 is lexicographically less + than, equal to or greater than the initial segment of S2. + Note: This function may, in multibyte locales, return 0 for initial segments + of different lengths! + Unlike strncasecmp(), this function works correctly in multibyte locales. + But beware that N is not a byte count but a character count! */ +_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Compare the initial segment of the character string STRING consisting of + at most mbslen (PREFIX) characters with the character string PREFIX, + ignoring case. If the two match, return a pointer to the first byte + after this prefix in STRING. Otherwise, return NULL. + Note: This function may, in multibyte locales, return non-NULL if STRING + is of smaller length than PREFIX! + Unlike strncasecmp(), this function works correctly in multibyte + locales. */ +_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Find the first occurrence of the character string NEEDLE in the character + string HAYSTACK, using case-insensitive comparison. + Note: This function may, in multibyte locales, return success even if + strlen (haystack) < strlen (needle) ! + Unlike strcasestr(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Find the first occurrence in the character string STRING of any character + in the character string ACCEPT. Return the number of bytes from the + beginning of the string to this occurrence, or to the end of the string + if none exists. + Unlike strcspn(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Find the first occurrence in the character string STRING of any character + in the character string ACCEPT. Return the pointer to it, or NULL if none + exists. + Unlike strpbrk(), this function works correctly in multibyte locales. */ +# if defined __hpux +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ +# endif +_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); +# else +_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); +# endif +_GL_CXXALIASWARN (mbspbrk); +#endif + +#if 0 +/* Find the first occurrence in the character string STRING of any character + not in the character string REJECT. Return the number of bytes from the + beginning of the string to this occurrence, or to the end of the string + if none exists. + Unlike strspn(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Search the next delimiter (multibyte character listed in the character + string DELIM) starting at the character string *STRINGP. + If one is found, overwrite it with a NUL, and advance *STRINGP to point + to the next multibyte character after it. Otherwise, set *STRINGP to NULL. + If *STRINGP was already NULL, nothing happens. + Return the old value of *STRINGP. + + This is a variant of mbstok_r() that supports empty fields. + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + + See also mbstok_r(). */ +_GL_EXTERN_C char * mbssep (char **stringp, const char *delim) + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Parse the character string STRING into tokens separated by characters in + the character string DELIM. + If STRING is NULL, the saved pointer in SAVE_PTR is used as + the next starting point. For example: + char s[] = "-abc-=-def"; + char *sp; + x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" + x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL + x = mbstok_r(NULL, "=", &sp); // x = NULL + // s = "abc\0-def\0" + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + + See also mbssep(). */ +_GL_EXTERN_C char * mbstok_r (char *restrict string, const char *delim, + char **save_ptr) + _GL_ARG_NONNULL ((2, 3)); +#endif + +/* Map any int, typically from errno, into an error message. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerror +# define strerror rpl_strerror +# endif +_GL_FUNCDECL_RPL (strerror, char *, (int)); +_GL_CXXALIAS_RPL (strerror, char *, (int)); +# else +_GL_CXXALIAS_SYS (strerror, char *, (int)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strerror); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strerror +/* Assume strerror is always declared. */ +_GL_WARN_ON_USE (strerror, "strerror is unportable - " + "use gnulib module strerror to guarantee non-NULL result"); +#endif + +/* Map any int, typically from errno, into an error message. Multithread-safe. + Uses the POSIX declaration, not the glibc declaration. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerror_r +# define strerror_r rpl_strerror_r +# endif +_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); +# else +# if !1 +_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); +# endif +# if __GLIBC__ >= 2 && 1 +_GL_CXXALIASWARN (strerror_r); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strerror_r +# if HAVE_RAW_DECL_STRERROR_R +_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " + "use gnulib module strerror_r-posix for portability"); +# endif +#endif + +/* Return the name of the system error code ERRNUM. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerrorname_np +# define strerrorname_np rpl_strerrorname_np +# endif +_GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum)); +_GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum)); +# else +# if !1 +_GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIASWARN (strerrorname_np); +#elif defined GNULIB_POSIXCHECK +# undef strerrorname_np +# if HAVE_RAW_DECL_STRERRORNAME_NP +_GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - " + "use gnulib module strerrorname_np for portability"); +# endif +#endif + +/* Return an abbreviation string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigabbrev_np); +#elif defined GNULIB_POSIXCHECK +# undef sigabbrev_np +# if HAVE_RAW_DECL_SIGABBREV_NP +_GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - " + "use gnulib module sigabbrev_np for portability"); +# endif +#endif + +/* Return an English description string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigdescr_np); +#elif defined GNULIB_POSIXCHECK +# undef sigdescr_np +# if HAVE_RAW_DECL_SIGDESCR_NP +_GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - " + "use gnulib module sigdescr_np for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strsignal rpl_strsignal +# endif +_GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); +_GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); +# endif +/* Need to cast, because on Cygwin 1.5.x systems, the return type is + 'const char *'. */ +_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); +# endif +_GL_CXXALIASWARN (strsignal); +#elif defined GNULIB_POSIXCHECK +# undef strsignal +# if HAVE_RAW_DECL_STRSIGNAL +_GL_WARN_ON_USE (strsignal, "strsignal is unportable - " + "use gnulib module strsignal for portability"); +# endif +#endif + +#if 0 +# if !1 +_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); +_GL_CXXALIASWARN (strverscmp); +#elif defined GNULIB_POSIXCHECK +# undef strverscmp +# if HAVE_RAW_DECL_STRVERSCMP +_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " + "use gnulib module strverscmp for portability"); +# endif +#endif + + +#endif /* _GL_STRING_H */ +#endif /* _GL_STRING_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/sys/types.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/sys/types.h new file mode 100644 index 000000000..1bd6dc076 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/sys/types.h @@ -0,0 +1,114 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Provide a more complete sys/types.h. + + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +#if defined _WIN32 && !defined __CYGWIN__ \ + && (defined __need_off_t || defined __need___off64_t \ + || defined __need_ssize_t || defined __need_time_t) + +/* Special invocation convention inside mingw header files. */ + +#include "../ucrt/sys/types.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_SYS_TYPES_H + +/* The include_next requires a split double-inclusion guard. */ +# define _GL_INCLUDING_SYS_TYPES_H +#include "../ucrt/sys/types.h" +# undef _GL_INCLUDING_SYS_TYPES_H + +#ifndef _GL_SYS_TYPES_H +#define _GL_SYS_TYPES_H + +/* Override off_t if Large File Support is requested on native Windows. */ +#if 0 +/* Same as int64_t in . */ +# if defined _MSC_VER +# define off_t __int64 +# else +# define off_t long long int +# endif +/* Indicator, for gnulib internal purposes. */ +# define _GL_WINDOWS_64_BIT_OFF_T 1 +#endif + +/* Override dev_t and ino_t if distinguishable inodes support is requested + on native Windows. */ +#if 0 + +# if 0 == 2 +/* Experimental, not useful in Windows 10. */ + +/* Define dev_t to a 64-bit type. */ +# if !defined GNULIB_defined_dev_t +typedef unsigned long long int rpl_dev_t; +# undef dev_t +# define dev_t rpl_dev_t +# define GNULIB_defined_dev_t 1 +# endif + +/* Define ino_t to a 128-bit type. */ +# if !defined GNULIB_defined_ino_t +/* MSVC does not have a 128-bit integer type. + GCC has a 128-bit integer type __int128, but only on 64-bit targets. */ +typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t; +# undef ino_t +# define ino_t rpl_ino_t +# define GNULIB_defined_ino_t 1 +# endif + +# else /* 0 == 1 */ + +/* Define ino_t to a 64-bit type. */ +# if !defined GNULIB_defined_ino_t +typedef unsigned long long int rpl_ino_t; +# undef ino_t +# define ino_t rpl_ino_t +# define GNULIB_defined_ino_t 1 +# endif + +# endif + +/* Indicator, for gnulib internal purposes. */ +# define _GL_WINDOWS_STAT_INODES 0 + +#endif + +/* MSVC 9 defines size_t in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (defined _WIN32 && ! defined __CYGWIN__) && ! defined __GLIBC__ +# include +#endif + +#endif /* _GL_SYS_TYPES_H */ +#endif /* _GL_SYS_TYPES_H */ +#endif /* __need_XXX */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/unistd.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/unistd.h new file mode 100644 index 000000000..7f38a2f42 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/unistd.h @@ -0,0 +1,2936 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Substitute for and wrapper around . + Copyright (C) 2003-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_UNISTD_H + +#if __GNUC__ >= 3 + +#endif + + +#if 0 && defined _GL_INCLUDING_UNISTD_H +/* Special invocation convention: + - On Mac OS X 10.3.9 we have a sequence of nested includes + -> -> -> + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. */ + +#include + +#else +/* Normal invocation convention. */ + +/* The include_next requires a split double-inclusion guard. */ +#if 0 +# define _GL_INCLUDING_UNISTD_H +# include +# undef _GL_INCLUDING_UNISTD_H +#endif + +/* Avoid lseek bugs in FreeBSD, macOS . + This bug is fixed after FreeBSD 13; see . + Use macOS "9999" to stand for a future fixed macOS version. */ +#if defined __FreeBSD__ && __FreeBSD__ < 14 +# undef SEEK_DATA +# undef SEEK_HOLE +#elif defined __APPLE__ && defined __MACH__ && defined SEEK_DATA +# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ +# include +# endif +# if (!defined MAC_OS_X_VERSION_MIN_REQUIRED \ + || MAC_OS_X_VERSION_MIN_REQUIRED < 99990000) +# include /* It also defines the two macros. */ +# undef SEEK_DATA +# undef SEEK_HOLE +# endif +#endif + +/* Get all possible declarations of gethostname(). */ +#if 0 && 0 \ + && !defined _GL_INCLUDING_WINSOCK2_H +# define _GL_INCLUDING_WINSOCK2_H +# include +# undef _GL_INCLUDING_WINSOCK2_H +#endif + +#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H +#define _GL_UNISTD_H + +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* NetBSD 5.0 mis-defines NULL. Also get size_t. */ +/* But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif + +/* mingw doesn't define the SEEK_* or *_FILENO macros in . */ +/* MSVC declares 'unlink' in , not in . We must include + it before we #define unlink rpl_unlink. */ +/* Cygwin 1.7.1 declares symlinkat in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ + || ((0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__)) \ + || ((0 || defined GNULIB_POSIXCHECK) \ + && defined __CYGWIN__)) \ + && ! defined __GLIBC__ +# include +#endif + +/* Cygwin 1.7.1 and Android 4.3 declare unlinkat in , not in + . */ +/* But avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && (defined __CYGWIN__ || defined __ANDROID__) \ + && ! defined __GLIBC__ +# include +#endif + +/* mingw fails to declare _exit in . */ +/* mingw, MSVC, BeOS, Haiku declare environ in , not in + . */ +/* Solaris declares getcwd not only in but also in . */ +/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system is + included here. */ +/* But avoid namespace pollution on glibc systems. */ +#if !defined __GLIBC__ && !defined __osf__ +# define __need_system_stdlib_h +# include +# undef __need_system_stdlib_h +#endif + +/* Native Windows platforms declare _chdir, _getcwd, _rmdir in + and/or , not in . + They also declare _access(), _chmod(), _close(), _dup(), _dup2(), _isatty(), + _lseek(), _read(), _unlink(), _write() in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include +# include +#endif + +/* Native Windows platforms declare _execl*, _execv* in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include +#endif + +/* AIX and OSF/1 5.1 declare getdomainname in , not in . + NonStop Kernel declares gethostname in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if ((0 && (defined _AIX || defined __osf__)) \ + || (0 && defined __TANDEM)) \ + && !defined __GLIBC__ +# include +#endif + +/* Mac OS X 10.13, Solaris 11.4, and Android 9.0 declare getentropy in + , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && ((defined __APPLE__ && defined __MACH__) || defined __sun \ + || defined __ANDROID__) \ + && 0 \ + && !defined __GLIBC__ +# include +#endif + +/* Android 4.3 declares fchownat in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ + && !defined __GLIBC__ +# include +#endif + +/* MSVC defines off_t in . + May also define off_t to a 64-bit type on native Windows. */ +/* Get off_t, ssize_t, mode_t. */ +#include + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +/* Get getopt(), optarg, optind, opterr, optopt. */ +/* Also, don't include inside libgettextpo, because we use + the getopt module only in gettext-tools/gnulib-lib/, not in + gettext-tools/libgettextpo/, but there is only a single + GNULIB_UNISTD_H_GETOPT variable for both. */ +#if 0 && 00 && !defined GTPO_CONFIG_H && !defined _GL_SYSTEM_GETOPT +# include +# include +#endif + +_GL_INLINE_HEADER_BEGIN +#ifndef _GL_UNISTD_INLINE +# define _GL_UNISTD_INLINE _GL_INLINE +#endif + +/* Hide some function declarations from . */ + +#if 0 && 0 +# if !defined _GL_SYS_SOCKET_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef socket +# define socket socket_used_without_including_sys_socket_h +# undef connect +# define connect connect_used_without_including_sys_socket_h +# undef accept +# define accept accept_used_without_including_sys_socket_h +# undef bind +# define bind bind_used_without_including_sys_socket_h +# undef getpeername +# define getpeername getpeername_used_without_including_sys_socket_h +# undef getsockname +# define getsockname getsockname_used_without_including_sys_socket_h +# undef getsockopt +# define getsockopt getsockopt_used_without_including_sys_socket_h +# undef listen +# define listen listen_used_without_including_sys_socket_h +# undef recv +# define recv recv_used_without_including_sys_socket_h +# undef send +# define send send_used_without_including_sys_socket_h +# undef recvfrom +# define recvfrom recvfrom_used_without_including_sys_socket_h +# undef sendto +# define sendto sendto_used_without_including_sys_socket_h +# undef setsockopt +# define setsockopt setsockopt_used_without_including_sys_socket_h +# undef shutdown +# define shutdown shutdown_used_without_including_sys_socket_h +# else + _GL_WARN_ON_USE (socket, + "socket() used without including "); + _GL_WARN_ON_USE (connect, + "connect() used without including "); + _GL_WARN_ON_USE (accept, + "accept() used without including "); + _GL_WARN_ON_USE (bind, + "bind() used without including "); + _GL_WARN_ON_USE (getpeername, + "getpeername() used without including "); + _GL_WARN_ON_USE (getsockname, + "getsockname() used without including "); + _GL_WARN_ON_USE (getsockopt, + "getsockopt() used without including "); + _GL_WARN_ON_USE (listen, + "listen() used without including "); + _GL_WARN_ON_USE (recv, + "recv() used without including "); + _GL_WARN_ON_USE (send, + "send() used without including "); + _GL_WARN_ON_USE (recvfrom, + "recvfrom() used without including "); + _GL_WARN_ON_USE (sendto, + "sendto() used without including "); + _GL_WARN_ON_USE (setsockopt, + "setsockopt() used without including "); + _GL_WARN_ON_USE (shutdown, + "shutdown() used without including "); +# endif +# endif +# if !defined _GL_SYS_SELECT_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef select +# define select select_used_without_including_sys_select_h +# else + _GL_WARN_ON_USE (select, + "select() used without including "); +# endif +# endif +#endif + + +/* OS/2 EMX lacks these macros. */ +#ifndef STDIN_FILENO +# define STDIN_FILENO 0 +#endif +#ifndef STDOUT_FILENO +# define STDOUT_FILENO 1 +#endif +#ifndef STDERR_FILENO +# define STDERR_FILENO 2 +#endif + +/* Ensure *_OK macros exist. */ +#ifndef F_OK +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 +#endif + + +/* Declare overridden functions. */ + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access rpl_access +# endif +_GL_FUNCDECL_RPL (access, int, (const char *file, int mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); +#elif defined GNULIB_POSIXCHECK +# undef access +# if HAVE_RAW_DECL_ACCESS +/* The access() function is a security risk. */ +_GL_WARN_ON_USE (access, "access does not always support X_OK - " + "use gnulib module access for portability; " + "also, this function is a security risk - " + "use the gnulib module faccessat instead"); +# endif +#elif 1 +/* On native Windows, map 'access' to '_access', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::access always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); +#endif + + +#if 0 +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIASWARN (chdir); +#elif defined GNULIB_POSIXCHECK +# undef chdir +# if HAVE_RAW_DECL_CHDIR +_GL_WARN_ON_USE (chown, "chdir is not always in - " + "use gnulib module chdir for portability"); +# endif +#elif 1 +/* On native Windows, map 'chdir' to '_chdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIASWARN (chdir); +#endif + + +#if 0 +/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE + to GID (if GID is not -1). Follow symbolic links. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define dup2 rpl_dup2 +# endif +_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); +_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); +# else +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); +#elif defined GNULIB_POSIXCHECK +# undef dup2 +# if HAVE_RAW_DECL_DUP2 +_GL_WARN_ON_USE (dup2, "dup2 is unportable - " + "use gnulib module dup2 for portability"); +# endif +#elif 1 +/* On native Windows, map 'dup2' to '_dup2', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup2 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); +# else +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); +#endif + + +#if 0 +/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the + specified flags. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + Close NEWFD first if it is open. + Return newfd if successful, otherwise -1 and errno set. + See the Linux man page at + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup3 +# define dup3 rpl_dup3 +# endif +_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); +_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); +# else +# if !1 +_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif +_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (dup3); +# endif +#elif defined GNULIB_POSIXCHECK +# undef dup3 +# if HAVE_RAW_DECL_DUP3 +_GL_WARN_ON_USE (dup3, "dup3 is unportable - " + "use gnulib module dup3 for portability"); +# endif +#endif + + +#if 0 +# if defined __CYGWIN__ && !defined __i386__ +/* The 'environ' variable is defined in a DLL. Therefore its declaration needs + the '__declspec(dllimport)' attribute, but the system's lacks it. + This leads to a link error on 64-bit Cygwin when the option + -Wl,--disable-auto-import is in use. */ +_GL_EXTERN_C __declspec(dllimport) char **environ; +# endif +# if !1 +/* Set of environment variables and values. An array of strings of the form + "VARIABLE=VALUE", terminated with a NULL. */ +# if defined __APPLE__ && defined __MACH__ +# include +# if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR +# define _GL_USE_CRT_EXTERNS +# endif +# endif +# ifdef _GL_USE_CRT_EXTERNS +# include +# define environ (*_NSGetEnviron ()) +# else +# ifdef __cplusplus +extern "C" { +# endif +extern char **environ; +# ifdef __cplusplus +} +# endif +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# if HAVE_RAW_DECL_ENVIRON +_GL_UNISTD_INLINE char *** +_GL_WARN_ON_USE_ATTRIBUTE ("environ is unportable - " + "use gnulib module environ for portability") +rpl_environ (void) +{ + return &environ; +} +# undef environ +# define environ (*rpl_environ ()) +# endif +#endif + + +#if 0 +/* Like access(), except that it uses the effective user id and group id of + the current process. */ +# if !1 +_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); +_GL_CXXALIASWARN (euidaccess); +# if defined GNULIB_POSIXCHECK +/* Like access(), this function is a security risk. */ +_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " + "use the gnulib module faccessat instead"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef euidaccess +# if HAVE_RAW_DECL_EUIDACCESS +_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " + "use gnulib module euidaccess for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl rpl_execl +# endif +_GL_FUNCDECL_RPL (execl, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execl, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#elif defined GNULIB_POSIXCHECK +# undef execl +# if HAVE_RAW_DECL_EXECL +_GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - " + "use gnulib module execl for portability"); +# endif +#elif 1 +/* On native Windows, map 'execl' to '_execl', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execl always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl _execl +# endif +_GL_CXXALIAS_MDA (execl, intptr_t, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle rpl_execle +# endif +_GL_FUNCDECL_RPL (execle, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execle, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#elif defined GNULIB_POSIXCHECK +# undef execle +# if HAVE_RAW_DECL_EXECLE +_GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - " + "use gnulib module execle for portability"); +# endif +#elif 1 +/* On native Windows, map 'execle' to '_execle', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execle always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle _execle +# endif +_GL_CXXALIAS_MDA (execle, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp rpl_execlp +# endif +_GL_FUNCDECL_RPL (execlp, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execlp, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#elif defined GNULIB_POSIXCHECK +# undef execlp +# if HAVE_RAW_DECL_EXECLP +_GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - " + "use gnulib module execlp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execlp' to '_execlp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execlp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp _execlp +# endif +_GL_CXXALIAS_MDA (execlp, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv rpl_execv +# endif +_GL_FUNCDECL_RPL (execv, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execv, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#elif defined GNULIB_POSIXCHECK +# undef execv +# if HAVE_RAW_DECL_EXECV +_GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - " + "use gnulib module execv for portability"); +# endif +#elif 1 +/* On native Windows, map 'execv' to '_execv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv _execv +# endif +_GL_CXXALIAS_MDA_CAST (execv, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve rpl_execve +# endif +_GL_FUNCDECL_RPL (execve, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execve, int, + (const char *program, char * const *argv, char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#elif defined GNULIB_POSIXCHECK +# undef execve +# if HAVE_RAW_DECL_EXECVE +_GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - " + "use gnulib module execve for portability"); +# endif +#elif 1 +/* On native Windows, map 'execve' to '_execve', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execve always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve _execve +# endif +_GL_CXXALIAS_MDA_CAST (execve, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp rpl_execvp +# endif +_GL_FUNCDECL_RPL (execvp, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvp, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#elif defined GNULIB_POSIXCHECK +# undef execvp +# if HAVE_RAW_DECL_EXECVP +_GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - " + "use gnulib module execvp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvp' to '_execvp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp _execvp +# endif +_GL_CXXALIAS_MDA_CAST (execvp, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe rpl_execvpe +# endif +_GL_FUNCDECL_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# else +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (execvpe); +# endif +#elif defined GNULIB_POSIXCHECK +# undef execvpe +# if HAVE_RAW_DECL_EXECVPE +_GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - " + "use gnulib module execvpe for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvpe' to '_execvpe', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvpe on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe _execvpe +# endif +_GL_CXXALIAS_MDA_CAST (execvpe, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# elif 1 +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (execvpe); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef faccessat +# define faccessat rpl_faccessat +# endif +_GL_FUNCDECL_RPL (faccessat, int, + (int fd, char const *name, int mode, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (faccessat, int, + (int fd, char const *name, int mode, int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (faccessat, int, + (int fd, char const *file, int mode, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (faccessat, int, + (int fd, char const *file, int mode, int flag)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (faccessat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef faccessat +# if HAVE_RAW_DECL_FACCESSAT +_GL_WARN_ON_USE (faccessat, "faccessat is not portable - " + "use gnulib module faccessat for portability"); +# endif +#endif + + +#if 0 +/* Change the process' current working directory to the directory on which + the given file descriptor is open. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchdir +# define fchdir rpl_fchdir +# endif +_GL_FUNCDECL_RPL (fchdir, int, (int /*fd*/)); +_GL_CXXALIAS_RPL (fchdir, int, (int /*fd*/)); +# else +# if !1 || !1 +_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); +# endif +_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); +# endif +_GL_CXXALIASWARN (fchdir); +# if 0 || !1 +/* Gnulib internal hooks needed to maintain the fchdir metadata. */ +_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) + _GL_ARG_NONNULL ((2)); +_GL_EXTERN_C void _gl_unregister_fd (int fd); +_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); +_GL_EXTERN_C const char *_gl_directory_name (int fd); +# endif +#elif defined GNULIB_POSIXCHECK +# undef fchdir +# if HAVE_RAW_DECL_FCHDIR +_GL_WARN_ON_USE (fchdir, "fchdir is unportable - " + "use gnulib module fchdir for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchownat +# define fchownat rpl_fchownat +# endif +_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag)); +# endif +_GL_CXXALIASWARN (fchownat); +#elif defined GNULIB_POSIXCHECK +# undef fchownat +# if HAVE_RAW_DECL_FCHOWNAT +_GL_WARN_ON_USE (fchownat, "fchownat is not portable - " + "use gnulib module fchownat for portability"); +# endif +#endif + + +#if 0 +/* Synchronize changes to a file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdatasync +# define fdatasync rpl_fdatasync +# endif +_GL_FUNCDECL_RPL (fdatasync, int, (int fd)); +_GL_CXXALIAS_RPL (fdatasync, int, (int fd)); +# else +# if !1|| !1 +_GL_FUNCDECL_SYS (fdatasync, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (fdatasync, int, (int fd)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (fdatasync); +# endif +#elif defined GNULIB_POSIXCHECK +# undef fdatasync +# if HAVE_RAW_DECL_FDATASYNC +_GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " + "use gnulib module fdatasync for portability"); +# endif +#endif + + +#if 0 +/* Synchronize changes, including metadata, to a file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if !1 +_GL_FUNCDECL_SYS (fsync, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (fsync, int, (int fd)); +_GL_CXXALIASWARN (fsync); +#elif defined GNULIB_POSIXCHECK +# undef fsync +# if HAVE_RAW_DECL_FSYNC +_GL_WARN_ON_USE (fsync, "fsync is unportable - " + "use gnulib module fsync for portability"); +# endif +#endif + + +#if 0 +/* Change the size of the file to which FD is opened to become equal to LENGTH. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ftruncate +# define ftruncate rpl_ftruncate +# endif +_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length)); +_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length)); +# else +# if !1 +_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); +# endif +_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (ftruncate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef ftruncate +# if HAVE_RAW_DECL_FTRUNCATE +_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " + "use gnulib module ftruncate for portability"); +# endif +#endif + + +#if 0 +/* Get the name of the current working directory, and put it in SIZE bytes + of BUF. + Return BUF if successful, or NULL if the directory couldn't be determined + or SIZE was too small. + See the POSIX:2008 specification + . + Additionally, the gnulib module 'getcwd' or 'getcwd-lgpl' guarantees the + following GNU extension: If BUF is NULL, an array is allocated with + 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case + it is as big as necessary. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getcwd rpl_getcwd +# endif +_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); +_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +_GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size)); +# else +/* Need to cast, because on mingw, the second parameter is + int size. */ +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); +#elif defined GNULIB_POSIXCHECK +# undef getcwd +# if HAVE_RAW_DECL_GETCWD +_GL_WARN_ON_USE (getcwd, "getcwd is unportable - " + "use gnulib module getcwd for portability"); +# endif +#elif 1 +/* On native Windows, map 'getcwd' to '_getcwd', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getcwd always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +/* Need to cast, because on mingw, the second parameter is either + 'int size' or 'size_t size'. */ +_GL_CXXALIAS_MDA_CAST (getcwd, char *, (char *buf, size_t size)); +# else +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); +#endif + + +#if 0 +/* Return the NIS domain name of the machine. + WARNING! The NIS domain name is unrelated to the fully qualified host name + of the machine. It is also unrelated to email addresses. + WARNING! The NIS domain name is usually the empty string or "(none)" when + not using NIS. + + Put up to LEN bytes of the NIS domain name into NAME. + Null terminate it if the name is shorter than LEN. + If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. + Return 0 if successful, otherwise set errno and return -1. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdomainname +# define getdomainname rpl_getdomainname +# endif +_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getdomainname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getdomainname +# if HAVE_RAW_DECL_GETDOMAINNAME +_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " + "use gnulib module getdomainname for portability"); +# endif +#endif + + +#if 0 +/* Return the maximum number of file descriptors in the current process. + In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdtablesize +# define getdtablesize rpl_getdtablesize +# endif +_GL_FUNCDECL_RPL (getdtablesize, int, (void)); +_GL_CXXALIAS_RPL (getdtablesize, int, (void)); +# else +# if !1 +_GL_FUNCDECL_SYS (getdtablesize, int, (void)); +# endif +/* Need to cast, because on AIX, the parameter list is + (...). */ +_GL_CXXALIAS_SYS_CAST (getdtablesize, int, (void)); +# endif +_GL_CXXALIASWARN (getdtablesize); +#elif defined GNULIB_POSIXCHECK +# undef getdtablesize +# if HAVE_RAW_DECL_GETDTABLESIZE +_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " + "use gnulib module getdtablesize for portability"); +# endif +#endif + + +#if 0 +/* Fill a buffer with random bytes. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getentropy +# define getentropy rpl_getentropy +# endif +_GL_FUNCDECL_RPL (getentropy, int, (void *buffer, size_t length)); +_GL_CXXALIAS_RPL (getentropy, int, (void *buffer, size_t length)); +# else +# if !1 +_GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length)); +# endif +_GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getentropy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getentropy +# if HAVE_RAW_DECL_GETENTROPY +_GL_WARN_ON_USE (getentropy, "getentropy is unportable - " + "use gnulib module getentropy for portability"); +# endif +#endif + + +#if 0 +/* Return the supplemental groups that the current process belongs to. + It is unspecified whether the effective group id is in the list. + If N is 0, return the group count; otherwise, N describes how many + entries are available in GROUPS. Return -1 and set errno if N is + not 0 and not large enough. Fails with ENOSYS on some systems. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getgroups +# define getgroups rpl_getgroups +# endif +_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); +_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); +# else +# if !1 +_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); +# endif +_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); +# endif +_GL_CXXALIASWARN (getgroups); +#elif defined GNULIB_POSIXCHECK +# undef getgroups +# if HAVE_RAW_DECL_GETGROUPS +_GL_WARN_ON_USE (getgroups, "getgroups is unportable - " + "use gnulib module getgroups for portability"); +# endif +#endif + + +#if 0 +/* Return the standard host name of the machine. + WARNING! The host name may or may not be fully qualified. + + Put up to LEN bytes of the host name into NAME. + Null terminate it if the name is shorter than LEN. + If the host name is longer than LEN, set errno = EINVAL and return -1. + Return 0 if successful, otherwise set errno and return -1. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gethostname +# define gethostname rpl_gethostname +# endif +_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second + parameter is + int len. */ +_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); +# endif +_GL_CXXALIASWARN (gethostname); +#elif 0 +# undef gethostname +# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname +#elif defined GNULIB_POSIXCHECK +# undef gethostname +# if HAVE_RAW_DECL_GETHOSTNAME +_GL_WARN_ON_USE (gethostname, "gethostname is unportable - " + "use gnulib module gethostname for portability"); +# endif +#endif + + +#if 0 +/* Returns the user's login name, or NULL if it cannot be found. Upon error, + returns NULL with errno set. + + See . + + Most programs don't need to use this function, because the information is + available through environment variables: + ${LOGNAME-$USER} on Unix platforms, + $USERNAME on native Windows platforms. + */ +# if !1 +_GL_FUNCDECL_SYS (getlogin, char *, (void)); +# endif +_GL_CXXALIAS_SYS (getlogin, char *, (void)); +_GL_CXXALIASWARN (getlogin); +#elif defined GNULIB_POSIXCHECK +# undef getlogin +# if HAVE_RAW_DECL_GETLOGIN +_GL_WARN_ON_USE (getlogin, "getlogin is unportable - " + "use gnulib module getlogin for portability"); +# endif +#endif + + +#if 0 +/* Copies the user's login name to NAME. + The array pointed to by NAME has room for SIZE bytes. + + Returns 0 if successful. Upon error, an error number is returned, or -1 in + the case that the login name cannot be found but no specific error is + provided (this case is hopefully rare but is left open by the POSIX spec). + + See . + + Most programs don't need to use this function, because the information is + available through environment variables: + ${LOGNAME-$USER} on Unix platforms, + $USERNAME on native Windows platforms. + */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getlogin_r rpl_getlogin_r +# endif +_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); +# else +# if !1 +_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 10 systems, the second argument is + int size. */ +_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getlogin_r); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getlogin_r +# if HAVE_RAW_DECL_GETLOGIN_R +_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " + "use gnulib module getlogin_r for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getpagesize rpl_getpagesize +# endif +_GL_FUNCDECL_RPL (getpagesize, int, (void)); +_GL_CXXALIAS_RPL (getpagesize, int, (void)); +# else +/* On HP-UX, getpagesize exists, but it is not declared in even if + the compiler options -D_HPUX_SOURCE -D_XOPEN_SOURCE=600 are used. */ +# if defined __hpux +_GL_FUNCDECL_SYS (getpagesize, int, (void)); +# endif +# if !1 +# if !defined getpagesize +/* This is for POSIX systems. */ +# if !defined _gl_getpagesize && defined _SC_PAGESIZE +# if ! (defined __VMS && __VMS_VER < 70000000) +# define _gl_getpagesize() sysconf (_SC_PAGESIZE) +# endif +# endif +/* This is for older VMS. */ +# if !defined _gl_getpagesize && defined __VMS +# ifdef __ALPHA +# define _gl_getpagesize() 8192 +# else +# define _gl_getpagesize() 512 +# endif +# endif +/* This is for BeOS. */ +# if !defined _gl_getpagesize && 0 +# include +# if defined B_PAGE_SIZE +# define _gl_getpagesize() B_PAGE_SIZE +# endif +# endif +/* This is for AmigaOS4.0. */ +# if !defined _gl_getpagesize && defined __amigaos4__ +# define _gl_getpagesize() 2048 +# endif +/* This is for older Unix systems. */ +# if !defined _gl_getpagesize && 0 +# include +# ifdef EXEC_PAGESIZE +# define _gl_getpagesize() EXEC_PAGESIZE +# else +# ifdef NBPG +# ifndef CLSIZE +# define CLSIZE 1 +# endif +# define _gl_getpagesize() (NBPG * CLSIZE) +# else +# ifdef NBPC +# define _gl_getpagesize() NBPC +# endif +# endif +# endif +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getpagesize() _gl_getpagesize () +# else +# if !GNULIB_defined_getpagesize_function +_GL_UNISTD_INLINE int +getpagesize () +{ + return _gl_getpagesize (); +} +# define GNULIB_defined_getpagesize_function 1 +# endif +# endif +# endif +# endif +/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ +_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); +# endif +# if 1 +_GL_CXXALIASWARN (getpagesize); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getpagesize +# if HAVE_RAW_DECL_GETPAGESIZE +_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " + "use gnulib module getpagesize for portability"); +# endif +#endif + + +#if 0 +/* Function getpass() from module 'getpass': + Read a password from /dev/tty or stdin. + Function getpass() from module 'getpass-gnu': + Read a password of arbitrary length from /dev/tty or stdin. */ +# if (0 && 0) \ + || (0 && 0) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpass +# define getpass rpl_getpass +# endif +_GL_FUNCDECL_RPL (getpass, char *, (const char *prompt) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getpass, char *, (const char *prompt)); +# else +# if !1 +_GL_FUNCDECL_SYS (getpass, char *, (const char *prompt) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getpass, char *, (const char *prompt)); +# endif +_GL_CXXALIASWARN (getpass); +#elif defined GNULIB_POSIXCHECK +# undef getpass +# if HAVE_RAW_DECL_GETPASS +_GL_WARN_ON_USE (getpass, "getpass is unportable - " + "use gnulib module getpass or getpass-gnu for portability"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'getpid' to '_getpid', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getpid always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpid +# define getpid _getpid +# endif +_GL_CXXALIAS_MDA (getpid, int, (void)); +# else +_GL_CXXALIAS_SYS (getpid, pid_t, (void)); +# endif +_GL_CXXALIASWARN (getpid); +#endif + + +#if 0 +/* Return the next valid login shell on the system, or NULL when the end of + the list has been reached. */ +# if !1 +_GL_FUNCDECL_SYS (getusershell, char *, (void)); +# endif +_GL_CXXALIAS_SYS (getusershell, char *, (void)); +_GL_CXXALIASWARN (getusershell); +#elif defined GNULIB_POSIXCHECK +# undef getusershell +# if HAVE_RAW_DECL_GETUSERSHELL +_GL_WARN_ON_USE (getusershell, "getusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + +#if 0 +/* Rewind to pointer that is advanced at each getusershell() call. */ +# if !1 +_GL_FUNCDECL_SYS (setusershell, void, (void)); +# endif +_GL_CXXALIAS_SYS (setusershell, void, (void)); +_GL_CXXALIASWARN (setusershell); +#elif defined GNULIB_POSIXCHECK +# undef setusershell +# if HAVE_RAW_DECL_SETUSERSHELL +_GL_WARN_ON_USE (setusershell, "setusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + +#if 0 +/* Free the pointer that is advanced at each getusershell() call and + associated resources. */ +# if !1 +_GL_FUNCDECL_SYS (endusershell, void, (void)); +# endif +_GL_CXXALIAS_SYS (endusershell, void, (void)); +_GL_CXXALIASWARN (endusershell); +#elif defined GNULIB_POSIXCHECK +# undef endusershell +# if HAVE_RAW_DECL_ENDUSERSHELL +_GL_WARN_ON_USE (endusershell, "endusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + + +#if 0 +/* Determine whether group id is in calling user's group list. */ +# if !1 +_GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); +# endif +_GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); +_GL_CXXALIASWARN (group_member); +#elif defined GNULIB_POSIXCHECK +# undef group_member +# if HAVE_RAW_DECL_GROUP_MEMBER +_GL_WARN_ON_USE (group_member, "group_member is unportable - " + "use gnulib module group-member for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty rpl_isatty +# endif +# define GNULIB_defined_isatty 1 +_GL_FUNCDECL_RPL (isatty, int, (int fd)); +_GL_CXXALIAS_RPL (isatty, int, (int fd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); +#elif defined GNULIB_POSIXCHECK +# undef isatty +# if HAVE_RAW_DECL_ISATTY +_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " + "use gnulib module isatty for portability"); +# endif +#elif 1 +/* On native Windows, map 'isatty' to '_isatty', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::isatty always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); +#endif + + +#if 0 +/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE + to GID (if GID is not -1). Do not follow symbolic links. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lchown +# define lchown rpl_lchown +# endif +_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); +# else +# if !1 +_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); +# endif +_GL_CXXALIASWARN (lchown); +#elif defined GNULIB_POSIXCHECK +# undef lchown +# if HAVE_RAW_DECL_LCHOWN +_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " + "use gnulib module lchown for portability"); +# endif +#endif + + +#if 0 +/* Create a new hard link for an existing file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define link rpl_link +# endif +_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); +# else +# if !1 +_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); +# endif +_GL_CXXALIASWARN (link); +#elif defined GNULIB_POSIXCHECK +# undef link +# if HAVE_RAW_DECL_LINK +_GL_WARN_ON_USE (link, "link is unportable - " + "use gnulib module link for portability"); +# endif +#endif + + +#if 0 +/* Create a new hard link for an existing file, relative to two + directories. FLAG controls whether symlinks are followed. + Return 0 if successful, otherwise -1 and errno set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef linkat +# define linkat rpl_linkat +# endif +_GL_FUNCDECL_RPL (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag) + _GL_ARG_NONNULL ((2, 4))); +_GL_CXXALIAS_RPL (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag) + _GL_ARG_NONNULL ((2, 4))); +# endif +_GL_CXXALIAS_SYS (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (linkat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef linkat +# if HAVE_RAW_DECL_LINKAT +_GL_WARN_ON_USE (linkat, "linkat is unportable - " + "use gnulib module linkat for portability"); +# endif +#endif + + +#if 0 +/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. + Return the new offset if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define lseek rpl_lseek +# endif +_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); +#elif defined GNULIB_POSIXCHECK +# undef lseek +# if HAVE_RAW_DECL_LSEEK +_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " + "systems - use gnulib module lseek for portability"); +# endif +#elif 1 +/* On native Windows, map 'lseek' to '_lseek', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::lseek always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, long, (int fd, long offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); +#endif + + +#if 0 +/* Create a pipe, defaulting to O_BINARY mode. + Store the read-end as fd[0] and the write-end as fd[1]. + Return 0 upon success, or -1 with errno set upon failure. */ +# if !1 +_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (pipe, int, (int fd[2])); +_GL_CXXALIASWARN (pipe); +#elif defined GNULIB_POSIXCHECK +# undef pipe +# if HAVE_RAW_DECL_PIPE +_GL_WARN_ON_USE (pipe, "pipe is unportable - " + "use gnulib module pipe-posix for portability"); +# endif +#endif + + +#if 0 +/* Create a pipe, applying the given flags when opening the read-end of the + pipe and the write-end of the pipe. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + Store the read-end as fd[0] and the write-end as fd[1]. + Return 0 upon success, or -1 with errno set upon failure. + See also the Linux man page at + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pipe2 +# define pipe2 rpl_pipe2 +# endif +_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); +# else +_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (pipe2); +# endif +#elif defined GNULIB_POSIXCHECK +# undef pipe2 +# if HAVE_RAW_DECL_PIPE2 +_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " + "use gnulib module pipe2 for portability"); +# endif +#endif + + +#if 0 +/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. + Return the number of bytes placed into BUF if successful, otherwise + set errno and return -1. 0 indicates EOF. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pread +# define pread rpl_pread +# endif +_GL_FUNCDECL_RPL (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset)); +# else +# if !1 +_GL_FUNCDECL_SYS (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (pread); +# endif +#elif defined GNULIB_POSIXCHECK +# undef pread +# if HAVE_RAW_DECL_PREAD +_GL_WARN_ON_USE (pread, "pread is unportable - " + "use gnulib module pread for portability"); +# endif +#endif + + +#if 0 +/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. + Return the number of bytes written if successful, otherwise + set errno and return -1. 0 indicates nothing written. See the + POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pwrite +# define pwrite rpl_pwrite +# endif +_GL_FUNCDECL_RPL (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset)); +# else +# if !1 +_GL_FUNCDECL_SYS (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (pwrite); +# endif +#elif defined GNULIB_POSIXCHECK +# undef pwrite +# if HAVE_RAW_DECL_PWRITE +_GL_WARN_ON_USE (pwrite, "pwrite is unportable - " + "use gnulib module pwrite for portability"); +# endif +#endif + + +#if 0 +/* Read up to COUNT bytes from file descriptor FD into the buffer starting + at BUF. See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read rpl_read +# endif +_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (read); +#elif 1 +/* On native Windows, map 'read' to '_read', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::read always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count)); +# endif +# else +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (read); +#endif + + +#if 0 +/* Read the contents of the symbolic link FILE and place the first BUFSIZE + bytes of it into BUF. Return the number of bytes placed into BUF if + successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define readlink rpl_readlink +# endif +_GL_FUNCDECL_RPL (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize)); +# else +# if !1 +_GL_FUNCDECL_SYS (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize)); +# endif +_GL_CXXALIASWARN (readlink); +#elif defined GNULIB_POSIXCHECK +# undef readlink +# if HAVE_RAW_DECL_READLINK +_GL_WARN_ON_USE (readlink, "readlink is unportable - " + "use gnulib module readlink for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define readlinkat rpl_readlinkat +# endif +_GL_FUNCDECL_RPL (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len) + _GL_ARG_NONNULL ((2, 3))); +# endif +_GL_CXXALIAS_SYS (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (readlinkat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef readlinkat +# if HAVE_RAW_DECL_READLINKAT +_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " + "use gnulib module readlinkat for portability"); +# endif +#endif + + +#if 0 +/* Remove the directory DIR. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define rmdir rpl_rmdir +# endif +_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (rmdir, int, (char const *name)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); +#elif defined GNULIB_POSIXCHECK +# undef rmdir +# if HAVE_RAW_DECL_RMDIR +_GL_WARN_ON_USE (rmdir, "rmdir is unportable - " + "use gnulib module rmdir for portability"); +# endif +#elif 1 +/* On native Windows, map 'rmdir' to '_rmdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::rmdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); +#endif + + +#if 0 +/* Set the host name of the machine. + The host name may or may not be fully qualified. + + Put LEN bytes of NAME into the host name. + Return 0 if successful, otherwise, set errno and return -1. + + Platforms with no ability to set the hostname return -1 and set + errno = ENOSYS. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sethostname +# define sethostname rpl_sethostname +# endif +_GL_FUNCDECL_RPL (sethostname, int, (const char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (sethostname, int, (const char *name, size_t len)); +# else +# if !1 || !1 +_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 + and FreeBSD 6.4 the second parameter is int. On Solaris 11 + 2011-10, the first parameter is not const. */ +_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (sethostname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef sethostname +# if HAVE_RAW_DECL_SETHOSTNAME +_GL_WARN_ON_USE (sethostname, "sethostname is unportable - " + "use gnulib module sethostname for portability"); +# endif +#endif + + +#if 0 +/* Pause the execution of the current thread for N seconds. + Returns the number of seconds left to sleep. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sleep +# define sleep rpl_sleep +# endif +_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); +_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); +# else +# if !1 +_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); +# endif +_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); +# endif +_GL_CXXALIASWARN (sleep); +#elif defined GNULIB_POSIXCHECK +# undef sleep +# if HAVE_RAW_DECL_SLEEP +_GL_WARN_ON_USE (sleep, "sleep is unportable - " + "use gnulib module sleep for portability"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'swab' to '_swab', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::swab always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef swab +# define swab _swab +# endif +/* Need to cast, because in old mingw the arguments are + (const char *from, char *to, size_t n). */ +_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n)); +# else +# if defined __hpux /* HP-UX */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n)); +# elif defined __sun && (defined __SunOS_5_10 || defined __XOPEN_OR_POSIX) && !defined _XPG4 /* Solaris */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n)); +# else +_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n)); +# endif +# endif +_GL_CXXALIASWARN (swab); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef symlink +# define symlink rpl_symlink +# endif +_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); +# else +# if !1 +_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); +# endif +_GL_CXXALIASWARN (symlink); +#elif defined GNULIB_POSIXCHECK +# undef symlink +# if HAVE_RAW_DECL_SYMLINK +_GL_WARN_ON_USE (symlink, "symlink is not portable - " + "use gnulib module symlink for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef symlinkat +# define symlinkat rpl_symlinkat +# endif +_GL_FUNCDECL_RPL (symlinkat, int, + (char const *contents, int fd, char const *file) + _GL_ARG_NONNULL ((1, 3))); +_GL_CXXALIAS_RPL (symlinkat, int, + (char const *contents, int fd, char const *file)); +# else +# if !1 +_GL_FUNCDECL_SYS (symlinkat, int, + (char const *contents, int fd, char const *file) + _GL_ARG_NONNULL ((1, 3))); +# endif +_GL_CXXALIAS_SYS (symlinkat, int, + (char const *contents, int fd, char const *file)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (symlinkat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef symlinkat +# if HAVE_RAW_DECL_SYMLINKAT +_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " + "use gnulib module symlinkat for portability"); +# endif +#endif + + +#if 0 +/* Change the size of the file designated by FILENAME to become equal to LENGTH. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef truncate +# define truncate rpl_truncate +# endif +_GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length)); +# else +# if !1 +_GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (truncate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef truncate +# if HAVE_RAW_DECL_TRUNCATE +_GL_WARN_ON_USE (truncate, "truncate is unportable - " + "use gnulib module truncate for portability"); +# endif +#endif + + +#if 0 +/* Store at most BUFLEN characters of the pathname of the terminal FD is + open on in BUF. Return 0 on success, otherwise an error number. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ttyname_r +# define ttyname_r rpl_ttyname_r +# endif +_GL_FUNCDECL_RPL (ttyname_r, int, + (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (ttyname_r, int, + (int fd, char *buf, size_t buflen)); +# else +# if !1 +_GL_FUNCDECL_SYS (ttyname_r, int, + (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (ttyname_r, int, + (int fd, char *buf, size_t buflen)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (ttyname_r); +# endif +#elif defined GNULIB_POSIXCHECK +# undef ttyname_r +# if HAVE_RAW_DECL_TTYNAME_R +_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " + "use gnulib module ttyname_r for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink rpl_unlink +# endif +_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (unlink, int, (char const *file)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); +#elif defined GNULIB_POSIXCHECK +# undef unlink +# if HAVE_RAW_DECL_UNLINK +_GL_WARN_ON_USE (unlink, "unlink is not portable - " + "use gnulib module unlink for portability"); +# endif +#elif 1 +/* On native Windows, map 'unlink' to '_unlink', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::unlink always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlinkat +# define unlinkat rpl_unlinkat +# endif +_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); +# endif +_GL_CXXALIASWARN (unlinkat); +#elif defined GNULIB_POSIXCHECK +# undef unlinkat +# if HAVE_RAW_DECL_UNLINKAT +_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " + "use gnulib module unlinkat for portability"); +# endif +#endif + + +#if 0 +/* Pause the execution of the current thread for N microseconds. + Returns 0 on completion, or -1 on range error. + See the POSIX:2001 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef usleep +# define usleep rpl_usleep +# endif +_GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); +_GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); +# endif +/* Need to cast, because on Haiku, the first parameter is + unsigned int n. */ +_GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n)); +# endif +_GL_CXXALIASWARN (usleep); +#elif defined GNULIB_POSIXCHECK +# undef usleep +# if HAVE_RAW_DECL_USLEEP +_GL_WARN_ON_USE (usleep, "usleep is unportable - " + "use gnulib module usleep for portability"); +# endif +#endif + + +#if 0 +/* Write up to COUNT bytes starting at BUF to file descriptor FD. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write rpl_write +# endif +_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#elif 1 +/* On native Windows, map 'write' to '_write', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::write always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count)); +# endif +# else +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#endif + +_GL_INLINE_HEADER_END + +#endif /* _GL_UNISTD_H */ +#endif /* _GL_INCLUDING_UNISTD_H */ +#endif /* _GL_UNISTD_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/wchar.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/wchar.h new file mode 100644 index 000000000..64f538ebb --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/gnulib-lib/wchar.h @@ -0,0 +1,2220 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A substitute for ISO C99 , for platforms that have issues. + + Copyright (C) 2007-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake. */ + +/* + * ISO C 99 for platforms that have issues. + * + * + * For now, this just ensures proper prerequisite inclusion order and + * the declaration of wcwidth(). + */ + +#if __GNUC__ >= 3 + +#endif + + +#if (((defined __need_mbstate_t || defined __need_wint_t) \ + && !defined __MINGW32__) \ + || (defined __hpux \ + && ((defined _INTTYPES_INCLUDED \ + && !defined _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H) \ + || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ + || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \ + || defined _GL_ALREADY_INCLUDING_WCHAR_H) +/* Special invocation convention: + - Inside glibc and uClibc header files, but not MinGW. + - On HP-UX 11.00 we have a sequence of nested includes + -> -> , and the latter includes , + once indirectly -> -> -> + and once directly. In both situations 'wint_t' is not yet defined, + therefore we cannot provide the function overrides; instead include only + the system's . + - With MinGW 3.22, when includes , only some part of + is actually processed, and that doesn't include 'mbstate_t'. + - On IRIX 6.5, similarly, we have an include -> , and + the latter includes . But here, we have no way to detect whether + is completely included or is still being included. */ + +#include "../ucrt/wchar.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_WCHAR_H + +#define _GL_ALREADY_INCLUDING_WCHAR_H + +#if 0 +# include /* for __GLIBC__ */ +#endif + +/* In some builds of uClibc, is nonexistent and wchar_t is defined + by . + But avoid namespace pollution on glibc systems. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +#endif + +/* Include the original if it exists. + Some builds of uClibc lack it. */ +/* The include_next requires a split double-inclusion guard. */ +#if 1 +# include "../ucrt/wchar.h" +#endif + +#undef _GL_ALREADY_INCLUDING_WCHAR_H + +#ifndef _GL_WCHAR_H +#define _GL_WCHAR_H + +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +/* Define wint_t and WEOF. (Also done in wctype.in.h.) */ +#if !1 && !defined wint_t +# define wint_t int +# ifndef WEOF +# define WEOF -1 +# endif +#else +/* mingw and MSVC define wint_t as 'unsigned short' in or + . This is too small: ISO C 99 section 7.24.1.(2) says that + wint_t must be "unchanged by default argument promotions". Override it. */ +# if 1 +# if !GNULIB_defined_wint_t +# if 1 +# include +# else +# include +# endif +typedef unsigned int rpl_wint_t; +# undef wint_t +# define wint_t rpl_wint_t +# define GNULIB_defined_wint_t 1 +# endif +# endif +# ifndef WEOF +# define WEOF ((wint_t) -1) +# endif +#endif + + +/* Override mbstate_t if it is too small. + On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for + implementing mbrtowc for encodings like UTF-8. + On AIX and MSVC, mbrtowc needs to be overridden, but mbstate_t exists and is + large enough and overriding it would cause problems in C++ mode. */ +#if !(((defined _WIN32 && !defined __CYGWIN__) || 0) && 1) || 0 +# if !GNULIB_defined_mbstate_t +# if !(defined _AIX || defined _MSC_VER) +typedef int rpl_mbstate_t; +# undef mbstate_t +# define mbstate_t rpl_mbstate_t +# endif +# define GNULIB_defined_mbstate_t 1 +# endif +#endif + +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif + + +#if 1 +/* Get memset(). */ +# include +#endif + + +/* Convert a single-byte character to a wide character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef btowc +# define btowc rpl_btowc +# endif +_GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (btowc, wint_t, (int c)); +# else +# if !1 +_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); +# endif +/* Need to cast, because on mingw, the return type is 'unsigned short'. */ +_GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (btowc); +# endif +#elif defined GNULIB_POSIXCHECK +# undef btowc +# if HAVE_RAW_DECL_BTOWC +_GL_WARN_ON_USE (btowc, "btowc is unportable - " + "use gnulib module btowc for portability"); +# endif +#endif + + +/* Convert a wide character to a single-byte character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctob +# define wctob rpl_wctob +# endif +_GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); +# else +# if !defined wctob && !1 +/* wctob is provided by gnulib, or wctob exists but is not declared. */ +_GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wctob); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wctob +# if HAVE_RAW_DECL_WCTOB +_GL_WARN_ON_USE (wctob, "wctob is unportable - " + "use gnulib module wctob for portability"); +# endif +#endif + + +/* Test whether *PS is in an initial state. */ +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsinit +# define mbsinit rpl_mbsinit +# endif +_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); +# else +# if !0 +_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbsinit); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbsinit +# if HAVE_RAW_DECL_MBSINIT +_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " + "use gnulib module mbsinit for portability"); +# endif +#endif + + +/* Put *PS into an initial state. */ +#if 1 +/* ISO C 23 § 7.31.6.(3) says that zeroing an mbstate_t is a way to put the + mbstate_t into an initial state. However, on many platforms an mbstate_t + is large, and it is possible - as an optimization - to get away with zeroing + only part of it. So, instead of + + mbstate_t state = { 0 }; + + or + + mbstate_t state; + memset (&state, 0, sizeof (mbstate_t)); + + we can write this faster code: + + mbstate_t state; + mbszero (&state); + */ +/* _GL_MBSTATE_INIT_SIZE describes how mbsinit() behaves: It is the number of + bytes at the beginning of an mbstate_t that need to be zero, for mbsinit() + to return true. + _GL_MBSTATE_ZERO_SIZE is the number of bytes at the beginning of an mbstate_t + that need to be zero, + - for mbsinit() to return true, and + - for all other multibyte-aware functions to operate properly. + 0 < _GL_MBSTATE_INIT_SIZE <= _GL_MBSTATE_ZERO_SIZE <= sizeof (mbstate_t). + These values are determined by source code inspection, where possible, and + by running the gnulib unit tests. + We need _GL_MBSTATE_INIT_SIZE because if we define _GL_MBSTATE_ZERO_SIZE + without considering what mbsinit() does, we get test failures such as + assertion "mbsinit (&iter->state)" failed + */ +# if GNULIB_defined_mbstate_t /* AIX, IRIX */ +/* mbstate_t has at least 4 bytes. They are used as coded in + gnulib/lib/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 1 +/* define _GL_MBSTATE_ZERO_SIZE 4 + does not work: it causes test failures. + So, use the safe fallback value, below. */ +# elif __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 /* glibc */ +/* mbstate_t is defined in . + For more details, see glibc/iconv/skeleton.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (((mbstate_t) {0}).__count) */ +# define _GL_MBSTATE_ZERO_SIZE /* 8 */ sizeof (mbstate_t) +# elif defined MUSL_LIBC /* musl libc */ +/* mbstate_t is defined in . + It is an opaque aligned 8-byte struct, of which at most the first + 4 bytes are used. + For more details, see src/multibyte/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (unsigned) */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __APPLE__ && defined __MACH__ /* macOS */ +/* On macOS, mbstate_t is defined in . + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + Libc-/locale/FreeBSD/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8,utf2}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 10 + utf2.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __FreeBSD__ /* FreeBSD */ +/* On FreeBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + src/lib/libc/locale/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __NetBSD__ /* NetBSD */ +/* On NetBSD, mbstate_t is defined in src/sys/sys/ansi.h. + It is an opaque aligned 128-byte struct, of which at most the first + 28 bytes are used. + For more details, see the *State types in + src/lib/libc/citrus/modules/citrus_*.c + (ignoring citrus_{hz,iso2022,utf7,viqr,zw}.c, since these implement + stateful encodings, not usable as locale encodings). */ +/* File ZERO_SIZE + citrus/citrus_none.c 0 + citrus/modules/citrus_euc.c 8 + citrus/modules/citrus_euctw.c 8 + citrus/modules/citrus_mskanji.c 8 + citrus/modules/citrus_big5.c 8 + citrus/modules/citrus_gbk2k.c 8 + citrus/modules/citrus_dechanyu.c 8 + citrus/modules/citrus_johab.c 6 + citrus/modules/citrus_utf8.c 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 28. */ +# define _GL_MBSTATE_ZERO_SIZE 28 +# elif defined __OpenBSD__ /* OpenBSD */ +/* On OpenBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see src/lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 + citrus_utf8.c 12 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __minix /* Minix */ +/* On Minix, mbstate_t is defined in sys/sys/ansi.h. + It is an opaque aligned 128-byte struct. + For more details, see the *State types in + lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 */ +/* But 1 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 4. */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __sun /* Solaris */ +/* On Solaris, mbstate_t is defined in . + It is an opaque aligned 24-byte or 32-byte struct, of which at most the first + 20 or 28 bytes are used. + For more details on OpenSolaris derivatives, see the *State types in + illumos-gate/usr/src/lib/libc/port/locale/ + {none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 12 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures + - in OpenIndiana and OmniOS: for values < 16, + - in Solaris 10 and 11: for values < 20 (in 32-bit mode) + or < 28 (in 64-bit mode). + Since we don't have a good way to distinguish the OpenSolaris derivatives + from the proprietary Solaris versions, and can't inspect the Solaris source + code, use the safe fallback values, below. */ +# elif defined __CYGWIN__ /* Cygwin */ +/* On Cygwin, mbstate_t is defined in . + For more details, see newlib/libc/stdlib/mbtowc_r.c and + winsup/cygwin/strfuncs.cc. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (int) */ +# define _GL_MBSTATE_ZERO_SIZE 8 +# elif defined _WIN32 && !defined __CYGWIN__ /* Native Windows. */ +/* MSVC defines 'mbstate_t' as an aligned 8-byte struct. + On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined + as an aligned 8-byte struct, of which the first 4 bytes matter. + Use the safe values, below. */ +# elif defined __ANDROID__ /* Android */ +/* Android defines 'mbstate_t' in . + It is an opaque 4-byte or 8-byte struct. + For more details, see + bionic/libc/private/bionic_mbstate.h + bionic/libc/bionic/mbrtoc32.cpp + bionic/libc/bionic/mbrtoc16.cpp + */ +# define _GL_MBSTATE_INIT_SIZE 4 +# define _GL_MBSTATE_ZERO_SIZE 4 +# endif +/* Use safe values as defaults. */ +# ifndef _GL_MBSTATE_INIT_SIZE +# define _GL_MBSTATE_INIT_SIZE sizeof (mbstate_t) +# endif +# ifndef _GL_MBSTATE_ZERO_SIZE +# define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t) +# endif +_GL_BEGIN_C_LINKAGE +# if defined IN_MBSZERO +_GL_EXTERN_INLINE +# else +_GL_INLINE +# endif +_GL_ARG_NONNULL ((1)) void +mbszero (mbstate_t *ps) +{ + memset (ps, 0, _GL_MBSTATE_ZERO_SIZE); +} +_GL_END_C_LINKAGE +_GL_CXXALIAS_SYS (mbszero, void, (mbstate_t *ps)); +_GL_CXXALIASWARN (mbszero); +#endif + + +/* Convert a multibyte character to a wide character. */ +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrtowc +# define mbrtowc rpl_mbrtowc +# endif +_GL_FUNCDECL_RPL (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +_GL_CXXALIAS_RPL (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +# endif +_GL_CXXALIAS_SYS (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbrtowc); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrtowc +# if HAVE_RAW_DECL_MBRTOWC +_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " + "use gnulib module mbrtowc for portability"); +# endif +#endif + + +/* Recognize a multibyte character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrlen +# define mbrlen rpl_mbrlen +# endif +_GL_FUNCDECL_RPL (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +_GL_CXXALIAS_RPL (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +# endif +_GL_CXXALIAS_SYS (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbrlen); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrlen +# if HAVE_RAW_DECL_MBRLEN +_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " + "use gnulib module mbrlen for portability"); +# endif +#endif + + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsrtowcs +# define mbsrtowcs rpl_mbsrtowcs +# endif +_GL_FUNCDECL_RPL (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbsrtowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbsrtowcs +# if HAVE_RAW_DECL_MBSRTOWCS +_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " + "use gnulib module mbsrtowcs for portability"); +# endif +#endif + + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsnrtowcs +# define mbsnrtowcs rpl_mbsnrtowcs +# endif +_GL_FUNCDECL_RPL (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbsnrtowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbsnrtowcs +# if HAVE_RAW_DECL_MBSNRTOWCS +_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " + "use gnulib module mbsnrtowcs for portability"); +# endif +#endif + + +/* Convert a wide character to a multibyte character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcrtomb +# define wcrtomb rpl_wcrtomb +# endif +_GL_FUNCDECL_RPL (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +_GL_CXXALIAS_RPL (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +# endif +_GL_CXXALIAS_SYS (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcrtomb); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcrtomb +# if HAVE_RAW_DECL_WCRTOMB +_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " + "use gnulib module wcrtomb for portability"); +# endif +#endif + + +/* Convert a wide string to a string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsrtombs +# define wcsrtombs rpl_wcsrtombs +# endif +_GL_FUNCDECL_RPL (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsrtombs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsrtombs +# if HAVE_RAW_DECL_WCSRTOMBS +_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " + "use gnulib module wcsrtombs for portability"); +# endif +#endif + + +/* Convert a wide string to a string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsnrtombs +# define wcsnrtombs rpl_wcsnrtombs +# endif +_GL_FUNCDECL_RPL (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps)); +# else +# if !1 || (defined __cplusplus && defined __sun) +_GL_FUNCDECL_SYS (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsnrtombs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsnrtombs +# if HAVE_RAW_DECL_WCSNRTOMBS +_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " + "use gnulib module wcsnrtombs for portability"); +# endif +#endif + + +/* Return the number of screen columns needed for WC. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcwidth +# define wcwidth rpl_wcwidth +# endif +_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); +# else +# if !1 +/* wcwidth exists but is not declared. */ +_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcwidth); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcwidth +# if HAVE_RAW_DECL_WCWIDTH +_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " + "use gnulib module wcwidth for portability"); +# endif +#endif + + +/* Search N wide characters of S for C. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t); + wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wmemchr, + wchar_t *, (const wchar_t *, wchar_t, size_t), + const wchar_t *, (const wchar_t *, wchar_t, size_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +_GL_CXXALIASWARN1 (wmemchr, const wchar_t *, + (const wchar_t *s, wchar_t c, size_t n)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemchr +# if HAVE_RAW_DECL_WMEMCHR +_GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " + "use gnulib module wmemchr for portability"); +# endif +#endif + + +/* Compare N wide characters of S1 and S2. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmemcmp +# define wmemcmp rpl_wmemcmp +# endif +_GL_FUNCDECL_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemcmp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemcmp +# if HAVE_RAW_DECL_WMEMCMP +_GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " + "use gnulib module wmemcmp for portability"); +# endif +#endif + + +/* Copy N wide characters of SRC to DEST. */ +#if 1 +# if !1 +_GL_FUNCDECL_SYS (wmemcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemcpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemcpy +# if HAVE_RAW_DECL_WMEMCPY +_GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " + "use gnulib module wmemcpy for portability"); +# endif +#endif + + +/* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for + overlapping memory areas. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wmemmove, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemmove, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemmove); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemmove +# if HAVE_RAW_DECL_WMEMMOVE +_GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " + "use gnulib module wmemmove for portability"); +# endif +#endif + + +/* Copy N wide characters of SRC to DEST. + Return pointer to wide characters after the last written wide character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmempcpy +# define wmempcpy rpl_wmempcpy +# endif +_GL_FUNCDECL_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +_GL_CXXALIAS_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmempcpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmempcpy +# if HAVE_RAW_DECL_WMEMPCPY +_GL_WARN_ON_USE (wmempcpy, "wmempcpy is unportable - " + "use gnulib module wmempcpy for portability"); +# endif +#endif + + +/* Set N wide characters of S to C. */ +#if 1 +# if !1 +_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemset); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemset +# if HAVE_RAW_DECL_WMEMSET +_GL_WARN_ON_USE (wmemset, "wmemset is unportable - " + "use gnulib module wmemset for portability"); +# endif +#endif + + +/* Return the number of wide characters in S. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcslen); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcslen +# if HAVE_RAW_DECL_WCSLEN +_GL_WARN_ON_USE (wcslen, "wcslen is unportable - " + "use gnulib module wcslen for portability"); +# endif +#endif + + +/* Return the number of wide characters in S, but at most MAXLEN. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); +_GL_CXXALIASWARN (wcsnlen); +#elif defined GNULIB_POSIXCHECK +# undef wcsnlen +# if HAVE_RAW_DECL_WCSNLEN +_GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " + "use gnulib module wcsnlen for portability"); +# endif +#endif + + +/* Copy SRC to DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# endif +_GL_CXXALIAS_SYS (wcscpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscpy +# if HAVE_RAW_DECL_WCSCPY +_GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " + "use gnulib module wcscpy for portability"); +# endif +#endif + + +/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcpcpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# endif +_GL_CXXALIAS_SYS (wcpcpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +_GL_CXXALIASWARN (wcpcpy); +#elif defined GNULIB_POSIXCHECK +# undef wcpcpy +# if HAVE_RAW_DECL_WCPCPY +_GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " + "use gnulib module wcpcpy for portability"); +# endif +#endif + + +/* Copy no more than N wide characters of SRC to DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsncpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsncpy +# if HAVE_RAW_DECL_WCSNCPY +_GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " + "use gnulib module wcsncpy for portability"); +# endif +#endif + + +/* Copy no more than N characters of SRC to DEST, returning the address of + the last character written into DEST. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcpncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcpncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +_GL_CXXALIASWARN (wcpncpy); +#elif defined GNULIB_POSIXCHECK +# undef wcpncpy +# if HAVE_RAW_DECL_WCPNCPY +_GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " + "use gnulib module wcpncpy for portability"); +# endif +#endif + + +/* Append SRC onto DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# endif +_GL_CXXALIAS_SYS (wcscat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscat +# if HAVE_RAW_DECL_WCSCAT +_GL_WARN_ON_USE (wcscat, "wcscat is unportable - " + "use gnulib module wcscat for portability"); +# endif +#endif + + +/* Append no more than N wide characters of SRC onto DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsncat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src, + size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsncat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src, + size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsncat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsncat +# if HAVE_RAW_DECL_WCSNCAT +_GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " + "use gnulib module wcsncat for portability"); +# endif +#endif + + +/* Compare S1 and S2. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcscmp +# define wcscmp rpl_wcscmp +# endif +_GL_FUNCDECL_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscmp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscmp +# if HAVE_RAW_DECL_WCSCMP +_GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " + "use gnulib module wcscmp for portability"); +# endif +#endif + + +/* Compare no more than N wide characters of S1 and S2. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsncmp +# define wcsncmp rpl_wcsncmp +# endif +_GL_FUNCDECL_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsncmp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsncmp +# if HAVE_RAW_DECL_WCSNCMP +_GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " + "use gnulib module wcsncmp for portability"); +# endif +#endif + + +/* Compare S1 and S2, ignoring case. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); +_GL_CXXALIASWARN (wcscasecmp); +#elif defined GNULIB_POSIXCHECK +# undef wcscasecmp +# if HAVE_RAW_DECL_WCSCASECMP +_GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " + "use gnulib module wcscasecmp for portability"); +# endif +#endif + + +/* Compare no more than N chars of S1 and S2, ignoring case. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcsncasecmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsncasecmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +_GL_CXXALIASWARN (wcsncasecmp); +#elif defined GNULIB_POSIXCHECK +# undef wcsncasecmp +# if HAVE_RAW_DECL_WCSNCASECMP +_GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " + "use gnulib module wcsncasecmp for portability"); +# endif +#endif + + +/* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE + category of the current locale. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); +# endif +_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscoll); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscoll +# if HAVE_RAW_DECL_WCSCOLL +_GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " + "use gnulib module wcscoll for portability"); +# endif +#endif + + +/* Transform S2 into array pointed to by S1 such that if wcscmp is applied + to two transformed strings the result is the as applying 'wcscoll' to the + original strings. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsxfrm, size_t, + (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsxfrm, size_t, + (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsxfrm); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsxfrm +# if HAVE_RAW_DECL_WCSXFRM +_GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " + "use gnulib module wcsxfrm for portability"); +# endif +#endif + + +/* Duplicate S, returning an identical malloc'd string. */ +#if 0 +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif +_GL_CXXALIASWARN (wcsdup); +#else +# if __GNUC__ >= 11 && !defined wcsdup +/* For -Wmismatched-dealloc: Associate wcsdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef wcsdup +# if HAVE_RAW_DECL_WCSDUP +_GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " + "use gnulib module wcsdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'wcsdup' to '_wcsdup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::wcsdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# if 1 +_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (wcsdup); +# endif +# endif +#endif + + +/* Find the first occurrence of WC in WCS. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcschr (const wchar_t *, wchar_t); + wchar_t * std::wcschr (wchar_t *, wchar_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcschr, + wchar_t *, (const wchar_t *, wchar_t), + const wchar_t *, (const wchar_t *, wchar_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc)); +_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcschr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcschr +# if HAVE_RAW_DECL_WCSCHR +_GL_WARN_ON_USE (wcschr, "wcschr is unportable - " + "use gnulib module wcschr for portability"); +# endif +#endif + + +/* Find the last occurrence of WC in WCS. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcsrchr (const wchar_t *, wchar_t); + wchar_t * std::wcsrchr (wchar_t *, wchar_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcsrchr, + wchar_t *, (const wchar_t *, wchar_t), + const wchar_t *, (const wchar_t *, wchar_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc)); +_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsrchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsrchr +# if HAVE_RAW_DECL_WCSRCHR +_GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " + "use gnulib module wcsrchr for portability"); +# endif +#endif + + +/* Return the length of the initial segment of WCS which consists entirely + of wide characters not in REJECT. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscspn); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscspn +# if HAVE_RAW_DECL_WCSCSPN +_GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " + "use gnulib module wcscspn for portability"); +# endif +#endif + + +/* Return the length of the initial segment of WCS which consists entirely + of wide characters in ACCEPT. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsspn); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsspn +# if HAVE_RAW_DECL_WCSSPN +_GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " + "use gnulib module wcsspn for portability"); +# endif +#endif + + +/* Find the first occurrence in WCS of any character in ACCEPT. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcspbrk, wchar_t *, + (const wchar_t *wcs, const wchar_t *accept) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *); + wchar_t * std::wcspbrk (wchar_t *, const wchar_t *); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcspbrk, + wchar_t *, (const wchar_t *, const wchar_t *), + const wchar_t *, (const wchar_t *, const wchar_t *)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcspbrk, wchar_t *, + (wchar_t *wcs, const wchar_t *accept)); +_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, + (const wchar_t *wcs, const wchar_t *accept)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcspbrk); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcspbrk +# if HAVE_RAW_DECL_WCSPBRK +_GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " + "use gnulib module wcspbrk for portability"); +# endif +#endif + + +/* Find the first occurrence of NEEDLE in HAYSTACK. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsstr +# define wcsstr rpl_wcsstr +# endif +_GL_FUNCDECL_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); + wchar_t * std::wcsstr (wchar_t *, const wchar_t *); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcsstr, + wchar_t *, + (const wchar_t *restrict, const wchar_t *restrict), + const wchar_t *, + (const wchar_t *restrict, const wchar_t *restrict)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcsstr, wchar_t *, + (wchar_t *restrict haystack, + const wchar_t *restrict needle)); +_GL_CXXALIASWARN1 (wcsstr, const wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsstr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsstr +# if HAVE_RAW_DECL_WCSSTR +_GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " + "use gnulib module wcsstr for portability"); +# endif +#endif + + +/* Divide WCS into tokens separated by characters in DELIM. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcstok +# define wcstok rpl_wcstok +# endif +_GL_FUNCDECL_RPL (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +_GL_CXXALIAS_RPL (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +# endif +_GL_CXXALIAS_SYS (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcstok); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcstok +# if HAVE_RAW_DECL_WCSTOK +_GL_WARN_ON_USE (wcstok, "wcstok is unportable - " + "use gnulib module wcstok for portability"); +# endif +#endif + + +/* Determine number of column positions required for first N wide + characters (or fewer if S ends before this) in S. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcswidth +# define wcswidth rpl_wcswidth +# endif +_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcswidth); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcswidth +# if HAVE_RAW_DECL_WCSWIDTH +_GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " + "use gnulib module wcswidth for portability"); +# endif +#endif + + +/* Convert *TP to a date and time wide string. See + . */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsftime +# define wcsftime rpl_wcsftime +# endif +_GL_FUNCDECL_RPL (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp) + _GL_ARG_NONNULL ((1, 3, 4))); +_GL_CXXALIAS_RPL (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp) + _GL_ARG_NONNULL ((1, 3, 4))); +# endif +_GL_CXXALIAS_SYS (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsftime); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsftime +# if HAVE_RAW_DECL_WCSFTIME +_GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " + "use gnulib module wcsftime for portability"); +# endif +#endif + + +#if 0 && (defined _WIN32 && !defined __CYGWIN__) +/* Gets the name of the current working directory. + (a) If BUF is non-NULL, it is assumed to have room for SIZE wide characters. + This function stores the working directory (NUL-terminated) in BUF and + returns BUF. + (b) If BUF is NULL, an array is allocated with 'malloc'. The array is SIZE + wide characters long, unless SIZE == 0, in which case it is as big as + necessary. + If the directory couldn't be determined or SIZE was too small, this function + returns NULL and sets errno. For a directory of length LEN, SIZE should be + >= LEN + 3 in case (a) or >= LEN + 1 in case (b). + Possible errno values include: + - ERANGE if SIZE is too small. + - ENOMEM if the memory could no be allocated. */ +_GL_FUNCDECL_SYS (wgetcwd, wchar_t *, (wchar_t *buf, size_t size)); +#endif + + +#endif /* _GL_WCHAR_H */ +#endif /* _GL_WCHAR_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/libgnuintl.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/libgnuintl.h index 8457e99de..2fb2dfb2f 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/libgnuintl.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/libgnuintl.h @@ -1,5 +1,5 @@ /* Message catalogs for internationalization. - Copyright (C) 1995-1997, 2000-2016, 2018-2020 Free Software Foundation, Inc. + Copyright (C) 1995-1997, 2000-2016, 2018-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -19,8 +19,10 @@ #if 0 && BUILDING_LIBINTL #define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default"))) -#elif defined _MSC_VER && BUILDING_LIBINTL +#elif (defined _WIN32 && !defined __CYGWIN__) && defined WOE32DLL && BUILDING_LIBINTL #define LIBINTL_DLL_EXPORTED __declspec(dllexport) +#elif (defined _WIN32 && !defined __CYGWIN__) && defined WOE32DLL +#define LIBINTL_DLL_EXPORTED __declspec(dllimport) #else #define LIBINTL_DLL_EXPORTED #endif @@ -62,7 +64,7 @@ extern "C" { /* Version number: (major<<16) + (minor<<8) + subminor */ -#define LIBINTL_VERSION 0x001500 +#define LIBINTL_VERSION 0x001603 extern LIBINTL_DLL_EXPORTED int libintl_version; @@ -138,9 +140,9 @@ char *gettext (const char *__msgid) return libintl_gettext (__msgid); } #else -#ifdef _INTL_REDIRECT_MACROS -# define gettext libintl_gettext -#endif +# ifdef _INTL_REDIRECT_MACROS +# define gettext libintl_gettext +# endif extern LIBINTL_DLL_EXPORTED char *gettext (const char *__msgid) _INTL_ASM (libintl_gettext) _INTL_MAY_RETURN_STRING_ARG (1); @@ -158,9 +160,9 @@ char *dgettext (const char *__domainname, const char *__msgid) return libintl_dgettext (__domainname, __msgid); } #else -#ifdef _INTL_REDIRECT_MACROS -# define dgettext libintl_dgettext -#endif +# ifdef _INTL_REDIRECT_MACROS +# define dgettext libintl_dgettext +# endif extern LIBINTL_DLL_EXPORTED char *dgettext (const char *__domainname, const char *__msgid) _INTL_ASM (libintl_dgettext) _INTL_MAY_RETURN_STRING_ARG (2); @@ -179,9 +181,9 @@ char *dcgettext (const char *__domainname, const char *__msgid, int __category) return libintl_dcgettext (__domainname, __msgid, __category); } #else -#ifdef _INTL_REDIRECT_MACROS -# define dcgettext libintl_dcgettext -#endif +# ifdef _INTL_REDIRECT_MACROS +# define dcgettext libintl_dcgettext +# endif extern LIBINTL_DLL_EXPORTED char *dcgettext (const char *__domainname, const char *__msgid, int __category) _INTL_ASM (libintl_dcgettext) @@ -203,9 +205,9 @@ char *ngettext (const char *__msgid1, const char *__msgid2, return libintl_ngettext (__msgid1, __msgid2, __n); } #else -#ifdef _INTL_REDIRECT_MACROS -# define ngettext libintl_ngettext -#endif +# ifdef _INTL_REDIRECT_MACROS +# define ngettext libintl_ngettext +# endif extern LIBINTL_DLL_EXPORTED char *ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_ASM (libintl_ngettext) @@ -226,9 +228,9 @@ char *dngettext (const char *__domainname, const char *__msgid1, return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); } #else -#ifdef _INTL_REDIRECT_MACROS -# define dngettext libintl_dngettext -#endif +# ifdef _INTL_REDIRECT_MACROS +# define dngettext libintl_dngettext +# endif extern LIBINTL_DLL_EXPORTED char *dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) @@ -252,9 +254,9 @@ char *dcngettext (const char *__domainname, return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); } #else -#ifdef _INTL_REDIRECT_MACROS -# define dcngettext libintl_dcngettext -#endif +# ifdef _INTL_REDIRECT_MACROS +# define dcngettext libintl_dcngettext +# endif extern LIBINTL_DLL_EXPORTED char *dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) @@ -267,23 +269,23 @@ extern LIBINTL_DLL_EXPORTED char *dcngettext (const char *__domainname, /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ -#ifdef _INTL_REDIRECT_INLINE +# ifdef _INTL_REDIRECT_INLINE extern LIBINTL_DLL_EXPORTED char *libintl_textdomain (const char *__domainname); static inline char *textdomain (const char *__domainname) { return libintl_textdomain (__domainname); } -#else -#ifdef _INTL_REDIRECT_MACROS -# define textdomain libintl_textdomain -#endif +# else +# ifdef _INTL_REDIRECT_MACROS +# define textdomain libintl_textdomain +# endif extern LIBINTL_DLL_EXPORTED char *textdomain (const char *__domainname) _INTL_ASM (libintl_textdomain); -#endif +# endif /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ -#ifdef _INTL_REDIRECT_INLINE +# ifdef _INTL_REDIRECT_INLINE extern LIBINTL_DLL_EXPORTED char *libintl_bindtextdomain (const char *__domainname, const char *__dirname); static inline char *bindtextdomain (const char *__domainname, @@ -291,18 +293,18 @@ static inline char *bindtextdomain (const char *__domainname, { return libintl_bindtextdomain (__domainname, __dirname); } -#else -#ifdef _INTL_REDIRECT_MACROS -# define bindtextdomain libintl_bindtextdomain -#endif +# else +# ifdef _INTL_REDIRECT_MACROS +# define bindtextdomain libintl_bindtextdomain +# endif extern LIBINTL_DLL_EXPORTED char *bindtextdomain (const char *__domainname, const char *__dirname) _INTL_ASM (libintl_bindtextdomain); -#endif +# endif -#if defined _WIN32 && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* Specify that the DOMAINNAME message catalog will be found in WDIRNAME rather than in the system locale data base. */ -#ifdef _INTL_REDIRECT_INLINE +# ifdef _INTL_REDIRECT_INLINE extern LIBINTL_DLL_EXPORTED wchar_t *libintl_wbindtextdomain (const char *__domainname, const wchar_t *__wdirname); static inline wchar_t *wbindtextdomain (const char *__domainname, @@ -310,19 +312,19 @@ static inline wchar_t *wbindtextdomain (const char *__domainname, { return libintl_wbindtextdomain (__domainname, __wdirname); } -#else -#ifdef _INTL_REDIRECT_MACROS -# define wbindtextdomain libintl_wbindtextdomain -#endif +# else +# ifdef _INTL_REDIRECT_MACROS +# define wbindtextdomain libintl_wbindtextdomain +# endif extern LIBINTL_DLL_EXPORTED wchar_t *wbindtextdomain (const char *__domainname, const wchar_t *__wdirname) _INTL_ASM (libintl_wbindtextdomain); -#endif -#endif +# endif +# endif /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ -#ifdef _INTL_REDIRECT_INLINE +# ifdef _INTL_REDIRECT_INLINE extern LIBINTL_DLL_EXPORTED char *libintl_bind_textdomain_codeset (const char *__domainname, const char *__codeset); static inline char *bind_textdomain_codeset (const char *__domainname, @@ -330,14 +332,14 @@ static inline char *bind_textdomain_codeset (const char *__domainname, { return libintl_bind_textdomain_codeset (__domainname, __codeset); } -#else -#ifdef _INTL_REDIRECT_MACROS -# define bind_textdomain_codeset libintl_bind_textdomain_codeset -#endif +# else +# ifdef _INTL_REDIRECT_MACROS +# define bind_textdomain_codeset libintl_bind_textdomain_codeset +# endif extern LIBINTL_DLL_EXPORTED char *bind_textdomain_codeset (const char *__domainname, const char *__codeset) _INTL_ASM (libintl_bind_textdomain_codeset); -#endif +# endif @@ -349,32 +351,49 @@ extern LIBINTL_DLL_EXPORTED char *bind_textdomain_codeset (const char *__domainn or gettext() but for which the format string could be the return value of _() or gettext() need to add this #include. Oh well. */ +/* Note: In C++ mode, it is not sufficient to redefine a symbol at the + preprocessor macro level, such as + #define sprintf libintl_sprintf + Some programs may reference std::sprintf after including . + Therefore we must make sure that std::libintl_sprintf is defined and + identical to ::libintl_sprintf. + The user can define _INTL_CXX_NO_CLOBBER_STD_NAMESPACE to avoid this. + In such cases, they will not benefit from the overrides when using + the 'std' namespace, and they will need to do the references to the + 'std' namespace *before* including or "gettext.h". */ + #if !0 -#include -#include +# include +# include /* Get va_list. */ -#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER -# include -#else -# include -#endif +# if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER +# include +# else +# include +# endif -#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef fprintf -#define fprintf libintl_fprintf +# if !((defined fprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_fprintf) /* don't override gnulib */ +# undef fprintf +# define fprintf libintl_fprintf extern LIBINTL_DLL_EXPORTED int fprintf (FILE *, const char *, ...); -#endif -#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef vfprintf -#define vfprintf libintl_vfprintf +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_fprintf; } +# endif +# endif +# if !((defined vfprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vfprintf) /* don't override gnulib */ +# undef vfprintf +# define vfprintf libintl_vfprintf extern LIBINTL_DLL_EXPORTED int vfprintf (FILE *, const char *, va_list); -#endif +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vfprintf; } +# endif +# endif -#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef printf -#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ +# if !((defined printf && defined _GL_STDIO_H) || defined GNULIB_overrides_printf) /* don't override gnulib */ +# undef printf +# if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ /* Don't break __attribute__((format(printf,M,N))). This redefinition is only possible because the libc in NetBSD, Cygwin, mingw does not have a function __printf__. @@ -384,82 +403,124 @@ extern LIBINTL_DLL_EXPORTED int vfprintf (FILE *, const char *, va_list); __asm__ (#__USER_LABEL_PREFIX__ "libintl_printf"); But doing it now would introduce a binary incompatibility with already distributed versions of libintl on these systems. */ -# define libintl_printf __printf__ -#endif -#define printf libintl_printf +# define libintl_printf __printf__ +# endif +# define printf libintl_printf extern LIBINTL_DLL_EXPORTED int printf (const char *, ...); -#endif -#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef vprintf -#define vprintf libintl_vprintf +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_printf; } +# endif +# endif +# if !((defined vprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vprintf) /* don't override gnulib */ +# undef vprintf +# define vprintf libintl_vprintf extern LIBINTL_DLL_EXPORTED int vprintf (const char *, va_list); -#endif +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vprintf; } +# endif +# endif -#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef sprintf -#define sprintf libintl_sprintf +# if !((defined sprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_sprintf) /* don't override gnulib */ +# undef sprintf +# define sprintf libintl_sprintf extern LIBINTL_DLL_EXPORTED int sprintf (char *, const char *, ...); -#endif -#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef vsprintf -#define vsprintf libintl_vsprintf +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_sprintf; } +# endif +# endif +# if !((defined vsprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsprintf) /* don't override gnulib */ +# undef vsprintf +# define vsprintf libintl_vsprintf extern LIBINTL_DLL_EXPORTED int vsprintf (char *, const char *, va_list); -#endif +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vsprintf; } +# endif +# endif -#if 0 +# if 0 -#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef snprintf -#define snprintf libintl_snprintf +# if !((defined snprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_snprintf) /* don't override gnulib */ +# undef snprintf +# define snprintf libintl_snprintf extern LIBINTL_DLL_EXPORTED int snprintf (char *, size_t, const char *, ...); -#endif -#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef vsnprintf -#define vsnprintf libintl_vsnprintf +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_snprintf; } +# endif +# endif +# if !((defined vsnprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsnprintf) /* don't override gnulib */ +# undef vsnprintf +# define vsnprintf libintl_vsnprintf extern LIBINTL_DLL_EXPORTED int vsnprintf (char *, size_t, const char *, va_list); -#endif +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vsnprintf; } +# endif +# endif -#endif +# endif -#if 0 +# if 0 -#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef asprintf -#define asprintf libintl_asprintf +# if !((defined asprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_asprintf) /* don't override gnulib */ +# undef asprintf +# define asprintf libintl_asprintf extern LIBINTL_DLL_EXPORTED int asprintf (char **, const char *, ...); -#endif -#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef vasprintf -#define vasprintf libintl_vasprintf +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_asprintf; } +# endif +# endif +# if !((defined vasprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vasprintf) /* don't override gnulib */ +# undef vasprintf +# define vasprintf libintl_vasprintf extern LIBINTL_DLL_EXPORTED int vasprintf (char **, const char *, va_list); -#endif +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vasprintf; } +# endif +# endif -#endif +# endif -#if (_MSC_VER < 1900) +# if 0 -#undef fwprintf -#define fwprintf libintl_fwprintf +# undef fwprintf +# define fwprintf libintl_fwprintf extern LIBINTL_DLL_EXPORTED int fwprintf (FILE *, const wchar_t *, ...); -#undef vfwprintf -#define vfwprintf libintl_vfwprintf +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_fwprintf; } +# endif +# undef vfwprintf +# define vfwprintf libintl_vfwprintf extern LIBINTL_DLL_EXPORTED int vfwprintf (FILE *, const wchar_t *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vfwprintf; } +# endif -#undef wprintf -#define wprintf libintl_wprintf +# undef wprintf +# define wprintf libintl_wprintf extern LIBINTL_DLL_EXPORTED int wprintf (const wchar_t *, ...); -#undef vwprintf -#define vwprintf libintl_vwprintf +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_wprintf; } +# endif +# undef vwprintf +# define vwprintf libintl_vwprintf extern LIBINTL_DLL_EXPORTED int vwprintf (const wchar_t *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vwprintf; } +# endif -#undef swprintf -#define swprintf libintl_swprintf +# undef swprintf +# define swprintf libintl_swprintf extern LIBINTL_DLL_EXPORTED int swprintf (wchar_t *, size_t, const wchar_t *, ...); -#undef vswprintf -#define vswprintf libintl_vswprintf +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_swprintf; } +# endif +# undef vswprintf +# define vswprintf libintl_vswprintf extern LIBINTL_DLL_EXPORTED int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vswprintf; } +# endif -#endif +# endif #endif @@ -467,23 +528,32 @@ extern LIBINTL_DLL_EXPORTED int vswprintf (wchar_t *, size_t, const wchar_t *, v /* Support for retrieving the name of a locale_t object. */ #if 0 -#ifndef GNULIB_defined_newlocale /* don't override gnulib */ -#undef newlocale -#define newlocale libintl_newlocale +# ifndef GNULIB_defined_newlocale /* don't override gnulib */ +# undef newlocale +# define newlocale libintl_newlocale extern LIBINTL_DLL_EXPORTED locale_t newlocale (int, const char *, locale_t); -#endif +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_newlocale; } +# endif +# endif -#ifndef GNULIB_defined_duplocale /* don't override gnulib */ -#undef duplocale -#define duplocale libintl_duplocale +# ifndef GNULIB_defined_duplocale /* don't override gnulib */ +# undef duplocale +# define duplocale libintl_duplocale extern LIBINTL_DLL_EXPORTED locale_t duplocale (locale_t); -#endif +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_duplocale; } +# endif +# endif -#ifndef GNULIB_defined_freelocale /* don't override gnulib */ -#undef freelocale -#define freelocale libintl_freelocale +# ifndef GNULIB_defined_freelocale /* don't override gnulib */ +# undef freelocale +# define freelocale libintl_freelocale extern LIBINTL_DLL_EXPORTED void freelocale (locale_t); -#endif +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_freelocale; } +# endif +# endif #endif @@ -491,22 +561,28 @@ extern LIBINTL_DLL_EXPORTED void freelocale (locale_t); /* Support for the locale chosen by the user. */ #if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__ -#ifndef GNULIB_defined_setlocale /* don't override gnulib */ -#undef setlocale -#define setlocale libintl_setlocale +# ifndef GNULIB_defined_setlocale /* don't override gnulib */ +# undef setlocale +# define setlocale libintl_setlocale extern LIBINTL_DLL_EXPORTED char *setlocale (int, const char *); -#endif +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_setlocale; } +# endif +# endif -#if 0 +# if 0 -#undef newlocale -#define newlocale libintl_newlocale +# undef newlocale +# define newlocale libintl_newlocale /* Declare newlocale() only if the system headers define the 'locale_t' type. */ -#if !(defined __CYGWIN__ && !defined LC_ALL_MASK) +# if !(defined __CYGWIN__ && !defined LC_ALL_MASK) extern LIBINTL_DLL_EXPORTED locale_t newlocale (int, const char *, locale_t); -#endif +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_newlocale; } +# endif +# endif -#endif +# endif #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/libintl.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/libintl.h index 82a0e4b46..0f562cfb0 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/libintl.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/intl/libintl.h @@ -1,5 +1,5 @@ /* Message catalogs for internationalization. - Copyright (C) 1995-1997, 2000-2016, 2018-2020 Free Software Foundation, Inc. + Copyright (C) 1995-1997, 2000-2016, 2018-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -17,21 +17,19 @@ #ifndef _LIBINTL_H #define _LIBINTL_H 1 -#if 0 && BUILDING_LIBINTL -#define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default"))) -#elif defined _MSC_VER && BUILDING_LIBINTL +#include +#if (defined __APPLE__ && defined __MACH__) && 0 +# include +#endif + +#if (defined _WIN32 && !defined __CYGWIN__) && BUILDING_LIBINTL #define LIBINTL_DLL_EXPORTED __declspec(dllexport) -#elif defined _MSC_VER +#elif (defined _WIN32 && !defined __CYGWIN__) #define LIBINTL_DLL_EXPORTED __declspec(dllimport) #else #define LIBINTL_DLL_EXPORTED #endif -#include -#if (defined __APPLE__ && defined __MACH__) && 0 -# include -#endif - /* The LC_MESSAGES locale category is the category used by the functions gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. On systems that don't define it, use an arbitrary value instead. @@ -64,7 +62,7 @@ extern "C" { /* Version number: (major<<16) + (minor<<8) + subminor */ -#define LIBINTL_VERSION 0x001500 +#define LIBINTL_VERSION 0x001603 extern LIBINTL_DLL_EXPORTED int libintl_version; @@ -131,7 +129,7 @@ extern LIBINTL_DLL_EXPORTED int libintl_version; LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ #ifdef _INTL_REDIRECT_INLINE -extern char *libintl_gettext (const char *__msgid) +extern LIBINTL_DLL_EXPORTED char *libintl_gettext (const char *__msgid) _INTL_MAY_RETURN_STRING_ARG (1); static inline _INTL_MAY_RETURN_STRING_ARG (1) @@ -140,10 +138,10 @@ char *gettext (const char *__msgid) return libintl_gettext (__msgid); } #else -#ifdef _INTL_REDIRECT_MACROS -# define gettext libintl_gettext -#endif -extern char *gettext (const char *__msgid) +# ifdef _INTL_REDIRECT_MACROS +# define gettext libintl_gettext +# endif +extern LIBINTL_DLL_EXPORTED char *gettext (const char *__msgid) _INTL_ASM (libintl_gettext) _INTL_MAY_RETURN_STRING_ARG (1); #endif @@ -151,7 +149,7 @@ extern char *gettext (const char *__msgid) /* Look up MSGID in the DOMAINNAME message catalog for the current LC_MESSAGES locale. */ #ifdef _INTL_REDIRECT_INLINE -extern char *libintl_dgettext (const char *__domainname, const char *__msgid) +extern LIBINTL_DLL_EXPORTED char *libintl_dgettext (const char *__domainname, const char *__msgid) _INTL_MAY_RETURN_STRING_ARG (2); static inline _INTL_MAY_RETURN_STRING_ARG (2) @@ -160,10 +158,10 @@ char *dgettext (const char *__domainname, const char *__msgid) return libintl_dgettext (__domainname, __msgid); } #else -#ifdef _INTL_REDIRECT_MACROS -# define dgettext libintl_dgettext -#endif -extern char *dgettext (const char *__domainname, const char *__msgid) +# ifdef _INTL_REDIRECT_MACROS +# define dgettext libintl_dgettext +# endif +extern LIBINTL_DLL_EXPORTED char *dgettext (const char *__domainname, const char *__msgid) _INTL_ASM (libintl_dgettext) _INTL_MAY_RETURN_STRING_ARG (2); #endif @@ -171,7 +169,7 @@ extern char *dgettext (const char *__domainname, const char *__msgid) /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ #ifdef _INTL_REDIRECT_INLINE -extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, +extern LIBINTL_DLL_EXPORTED char *libintl_dcgettext (const char *__domainname, const char *__msgid, int __category) _INTL_MAY_RETURN_STRING_ARG (2); static inline @@ -181,10 +179,10 @@ char *dcgettext (const char *__domainname, const char *__msgid, int __category) return libintl_dcgettext (__domainname, __msgid, __category); } #else -#ifdef _INTL_REDIRECT_MACROS -# define dcgettext libintl_dcgettext -#endif -extern char *dcgettext (const char *__domainname, const char *__msgid, +# ifdef _INTL_REDIRECT_MACROS +# define dcgettext libintl_dcgettext +# endif +extern LIBINTL_DLL_EXPORTED char *dcgettext (const char *__domainname, const char *__msgid, int __category) _INTL_ASM (libintl_dcgettext) _INTL_MAY_RETURN_STRING_ARG (2); @@ -194,7 +192,7 @@ extern char *dcgettext (const char *__domainname, const char *__msgid, /* Similar to 'gettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE -extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, +extern LIBINTL_DLL_EXPORTED char *libintl_ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); static inline @@ -205,10 +203,10 @@ char *ngettext (const char *__msgid1, const char *__msgid2, return libintl_ngettext (__msgid1, __msgid2, __n); } #else -#ifdef _INTL_REDIRECT_MACROS -# define ngettext libintl_ngettext -#endif -extern char *ngettext (const char *__msgid1, const char *__msgid2, +# ifdef _INTL_REDIRECT_MACROS +# define ngettext libintl_ngettext +# endif +extern LIBINTL_DLL_EXPORTED char *ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_ASM (libintl_ngettext) _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); @@ -217,7 +215,7 @@ extern char *ngettext (const char *__msgid1, const char *__msgid2, /* Similar to 'dgettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE -extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, +extern LIBINTL_DLL_EXPORTED char *libintl_dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); static inline @@ -228,10 +226,10 @@ char *dngettext (const char *__domainname, const char *__msgid1, return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); } #else -#ifdef _INTL_REDIRECT_MACROS -# define dngettext libintl_dngettext -#endif -extern char *dngettext (const char *__domainname, +# ifdef _INTL_REDIRECT_MACROS +# define dngettext libintl_dngettext +# endif +extern LIBINTL_DLL_EXPORTED char *dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_ASM (libintl_dngettext) @@ -241,7 +239,7 @@ extern char *dngettext (const char *__domainname, /* Similar to 'dcgettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE -extern char *libintl_dcngettext (const char *__domainname, +extern LIBINTL_DLL_EXPORTED char *libintl_dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); @@ -254,10 +252,10 @@ char *dcngettext (const char *__domainname, return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); } #else -#ifdef _INTL_REDIRECT_MACROS -# define dcngettext libintl_dcngettext -#endif -extern char *dcngettext (const char *__domainname, +# ifdef _INTL_REDIRECT_MACROS +# define dcngettext libintl_dcngettext +# endif +extern LIBINTL_DLL_EXPORTED char *dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) _INTL_ASM (libintl_dcngettext) @@ -269,77 +267,77 @@ extern char *dcngettext (const char *__domainname, /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ -#ifdef _INTL_REDIRECT_INLINE -extern char *libintl_textdomain (const char *__domainname); +# ifdef _INTL_REDIRECT_INLINE +extern LIBINTL_DLL_EXPORTED char *libintl_textdomain (const char *__domainname); static inline char *textdomain (const char *__domainname) { return libintl_textdomain (__domainname); } -#else -#ifdef _INTL_REDIRECT_MACROS -# define textdomain libintl_textdomain -#endif -extern char *textdomain (const char *__domainname) +# else +# ifdef _INTL_REDIRECT_MACROS +# define textdomain libintl_textdomain +# endif +extern LIBINTL_DLL_EXPORTED char *textdomain (const char *__domainname) _INTL_ASM (libintl_textdomain); -#endif +# endif /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ -#ifdef _INTL_REDIRECT_INLINE -extern char *libintl_bindtextdomain (const char *__domainname, +# ifdef _INTL_REDIRECT_INLINE +extern LIBINTL_DLL_EXPORTED char *libintl_bindtextdomain (const char *__domainname, const char *__dirname); static inline char *bindtextdomain (const char *__domainname, const char *__dirname) { return libintl_bindtextdomain (__domainname, __dirname); } -#else -#ifdef _INTL_REDIRECT_MACROS -# define bindtextdomain libintl_bindtextdomain -#endif -extern char *bindtextdomain (const char *__domainname, const char *__dirname) +# else +# ifdef _INTL_REDIRECT_MACROS +# define bindtextdomain libintl_bindtextdomain +# endif +extern LIBINTL_DLL_EXPORTED char *bindtextdomain (const char *__domainname, const char *__dirname) _INTL_ASM (libintl_bindtextdomain); -#endif +# endif -#if defined _WIN32 && !defined __CYGWIN__ +# if defined _WIN32 && !defined __CYGWIN__ /* Specify that the DOMAINNAME message catalog will be found in WDIRNAME rather than in the system locale data base. */ -#ifdef _INTL_REDIRECT_INLINE -extern wchar_t *libintl_wbindtextdomain (const char *__domainname, +# ifdef _INTL_REDIRECT_INLINE +extern LIBINTL_DLL_EXPORTED wchar_t *libintl_wbindtextdomain (const char *__domainname, const wchar_t *__wdirname); static inline wchar_t *wbindtextdomain (const char *__domainname, const wchar_t *__wdirname) { return libintl_wbindtextdomain (__domainname, __wdirname); } -#else -#ifdef _INTL_REDIRECT_MACROS -# define wbindtextdomain libintl_wbindtextdomain -#endif -extern wchar_t *wbindtextdomain (const char *__domainname, +# else +# ifdef _INTL_REDIRECT_MACROS +# define wbindtextdomain libintl_wbindtextdomain +# endif +extern LIBINTL_DLL_EXPORTED wchar_t *wbindtextdomain (const char *__domainname, const wchar_t *__wdirname) _INTL_ASM (libintl_wbindtextdomain); -#endif -#endif +# endif +# endif /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ -#ifdef _INTL_REDIRECT_INLINE -extern char *libintl_bind_textdomain_codeset (const char *__domainname, +# ifdef _INTL_REDIRECT_INLINE +extern LIBINTL_DLL_EXPORTED char *libintl_bind_textdomain_codeset (const char *__domainname, const char *__codeset); static inline char *bind_textdomain_codeset (const char *__domainname, const char *__codeset) { return libintl_bind_textdomain_codeset (__domainname, __codeset); } -#else -#ifdef _INTL_REDIRECT_MACROS -# define bind_textdomain_codeset libintl_bind_textdomain_codeset -#endif -extern char *bind_textdomain_codeset (const char *__domainname, +# else +# ifdef _INTL_REDIRECT_MACROS +# define bind_textdomain_codeset libintl_bind_textdomain_codeset +# endif +extern LIBINTL_DLL_EXPORTED char *bind_textdomain_codeset (const char *__domainname, const char *__codeset) _INTL_ASM (libintl_bind_textdomain_codeset); -#endif +# endif @@ -351,32 +349,49 @@ extern char *bind_textdomain_codeset (const char *__domainname, or gettext() but for which the format string could be the return value of _() or gettext() need to add this #include. Oh well. */ +/* Note: In C++ mode, it is not sufficient to redefine a symbol at the + preprocessor macro level, such as + #define sprintf libintl_sprintf + Some programs may reference std::sprintf after including . + Therefore we must make sure that std::libintl_sprintf is defined and + identical to ::libintl_sprintf. + The user can define _INTL_CXX_NO_CLOBBER_STD_NAMESPACE to avoid this. + In such cases, they will not benefit from the overrides when using + the 'std' namespace, and they will need to do the references to the + 'std' namespace *before* including or "gettext.h". */ + #if !0 -#include -#include +# include +# include /* Get va_list. */ -#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER -# include -#else -# include -#endif +# if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER +# include +# else +# include +# endif -#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef fprintf -#define fprintf libintl_fprintf -extern int fprintf (FILE *, const char *, ...); -#endif -#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef vfprintf -#define vfprintf libintl_vfprintf -extern int vfprintf (FILE *, const char *, va_list); -#endif +# if !((defined fprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_fprintf) /* don't override gnulib */ +# undef fprintf +# define fprintf libintl_fprintf +extern int LIBINTL_DLL_EXPORTED fprintf (FILE *, const char *, ...); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_fprintf; } +# endif +# endif +# if !((defined vfprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vfprintf) /* don't override gnulib */ +# undef vfprintf +# define vfprintf libintl_vfprintf +extern LIBINTL_DLL_EXPORTED int vfprintf (FILE *, const char *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vfprintf; } +# endif +# endif -#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef printf -#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ +# if !((defined printf && defined _GL_STDIO_H) || defined GNULIB_overrides_printf) /* don't override gnulib */ +# undef printf +# if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ /* Don't break __attribute__((format(printf,M,N))). This redefinition is only possible because the libc in NetBSD, Cygwin, mingw does not have a function __printf__. @@ -386,82 +401,124 @@ extern int vfprintf (FILE *, const char *, va_list); __asm__ (#__USER_LABEL_PREFIX__ "libintl_printf"); But doing it now would introduce a binary incompatibility with already distributed versions of libintl on these systems. */ -# define libintl_printf __printf__ -#endif -#define printf libintl_printf -extern int printf (const char *, ...); -#endif -#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef vprintf -#define vprintf libintl_vprintf -extern int vprintf (const char *, va_list); -#endif +# define libintl_printf __printf__ +# endif +# define printf libintl_printf +extern LIBINTL_DLL_EXPORTED int printf (const char *, ...); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_printf; } +# endif +# endif +# if !((defined vprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vprintf) /* don't override gnulib */ +# undef vprintf +# define vprintf libintl_vprintf +extern LIBINTL_DLL_EXPORTED int vprintf (const char *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vprintf; } +# endif +# endif -#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef sprintf -#define sprintf libintl_sprintf -extern int sprintf (char *, const char *, ...); -#endif -#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef vsprintf -#define vsprintf libintl_vsprintf -extern int vsprintf (char *, const char *, va_list); -#endif +# if !((defined sprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_sprintf) /* don't override gnulib */ +# undef sprintf +# define sprintf libintl_sprintf +extern LIBINTL_DLL_EXPORTED int sprintf (char *, const char *, ...); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_sprintf; } +# endif +# endif +# if !((defined vsprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsprintf) /* don't override gnulib */ +# undef vsprintf +# define vsprintf libintl_vsprintf +extern LIBINTL_DLL_EXPORTED int vsprintf (char *, const char *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vsprintf; } +# endif +# endif -#if 0 +# if 0 -#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef snprintf -#define snprintf libintl_snprintf -extern int snprintf (char *, size_t, const char *, ...); -#endif -#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef vsnprintf -#define vsnprintf libintl_vsnprintf -extern int vsnprintf (char *, size_t, const char *, va_list); -#endif +# if !((defined snprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_snprintf) /* don't override gnulib */ +# undef snprintf +# define snprintf libintl_snprintf +extern LIBINTL_DLL_EXPORTED int snprintf (char *, size_t, const char *, ...); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_snprintf; } +# endif +# endif +# if !((defined vsnprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vsnprintf) /* don't override gnulib */ +# undef vsnprintf +# define vsnprintf libintl_vsnprintf +extern LIBINTL_DLL_EXPORTED int vsnprintf (char *, size_t, const char *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vsnprintf; } +# endif +# endif -#endif +# endif -#if 0 +# if 0 -#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef asprintf -#define asprintf libintl_asprintf -extern int asprintf (char **, const char *, ...); -#endif -#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */ -#undef vasprintf -#define vasprintf libintl_vasprintf -extern int vasprintf (char **, const char *, va_list); -#endif +# if !((defined asprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_asprintf) /* don't override gnulib */ +# undef asprintf +# define asprintf libintl_asprintf +extern LIBINTL_DLL_EXPORTED int asprintf (char **, const char *, ...); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_asprintf; } +# endif +# endif +# if !((defined vasprintf && defined _GL_STDIO_H) || defined GNULIB_overrides_vasprintf) /* don't override gnulib */ +# undef vasprintf +# define vasprintf libintl_vasprintf +extern LIBINTL_DLL_EXPORTED int vasprintf (char **, const char *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vasprintf; } +# endif +# endif -#endif +# endif -#if (_MSC_VER < 1900) - -#undef fwprintf -#define fwprintf libintl_fwprintf -extern int fwprintf (FILE *, const wchar_t *, ...); -#undef vfwprintf -#define vfwprintf libintl_vfwprintf -extern int vfwprintf (FILE *, const wchar_t *, va_list); - -#undef wprintf -#define wprintf libintl_wprintf -extern int wprintf (const wchar_t *, ...); -#undef vwprintf -#define vwprintf libintl_vwprintf -extern int vwprintf (const wchar_t *, va_list); - -#undef swprintf -#define swprintf libintl_swprintf -extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); -#undef vswprintf -#define vswprintf libintl_vswprintf -extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); +# if 0 -#endif +# undef fwprintf +# define fwprintf libintl_fwprintf +extern LIBINTL_DLL_EXPORTED int fwprintf (FILE *, const wchar_t *, ...); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_fwprintf; } +# endif +# undef vfwprintf +# define vfwprintf libintl_vfwprintf +extern LIBINTL_DLL_EXPORTED int vfwprintf (FILE *, const wchar_t *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vfwprintf; } +# endif + +# undef wprintf +# define wprintf libintl_wprintf +extern LIBINTL_DLL_EXPORTED int wprintf (const wchar_t *, ...); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_wprintf; } +# endif +# undef vwprintf +# define vwprintf libintl_vwprintf +extern LIBINTL_DLL_EXPORTED int vwprintf (const wchar_t *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vwprintf; } +# endif + +# undef swprintf +# define swprintf libintl_swprintf +extern LIBINTL_DLL_EXPORTED int swprintf (wchar_t *, size_t, const wchar_t *, ...); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_swprintf; } +# endif +# undef vswprintf +# define vswprintf libintl_vswprintf +extern LIBINTL_DLL_EXPORTED int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_vswprintf; } +# endif + +# endif #endif @@ -469,23 +526,32 @@ extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); /* Support for retrieving the name of a locale_t object. */ #if 0 -#ifndef GNULIB_defined_newlocale /* don't override gnulib */ -#undef newlocale -#define newlocale libintl_newlocale -extern locale_t newlocale (int, const char *, locale_t); -#endif +# ifndef GNULIB_defined_newlocale /* don't override gnulib */ +# undef newlocale +# define newlocale libintl_newlocale +extern LIBINTL_DLL_EXPORTED locale_t newlocale (int, const char *, locale_t); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_newlocale; } +# endif +# endif -#ifndef GNULIB_defined_duplocale /* don't override gnulib */ -#undef duplocale -#define duplocale libintl_duplocale -extern locale_t duplocale (locale_t); -#endif +# ifndef GNULIB_defined_duplocale /* don't override gnulib */ +# undef duplocale +# define duplocale libintl_duplocale +extern LIBINTL_DLL_EXPORTED locale_t duplocale (locale_t); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_duplocale; } +# endif +# endif -#ifndef GNULIB_defined_freelocale /* don't override gnulib */ -#undef freelocale -#define freelocale libintl_freelocale -extern void freelocale (locale_t); -#endif +# ifndef GNULIB_defined_freelocale /* don't override gnulib */ +# undef freelocale +# define freelocale libintl_freelocale +extern LIBINTL_DLL_EXPORTED void freelocale (locale_t); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_freelocale; } +# endif +# endif #endif @@ -493,22 +559,28 @@ extern void freelocale (locale_t); /* Support for the locale chosen by the user. */ #if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__ -#ifndef GNULIB_defined_setlocale /* don't override gnulib */ -#undef setlocale -#define setlocale libintl_setlocale -extern char *setlocale (int, const char *); -#endif +# ifndef GNULIB_defined_setlocale /* don't override gnulib */ +# undef setlocale +# define setlocale libintl_setlocale +extern LIBINTL_DLL_EXPORTED char *setlocale (int, const char *); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_setlocale; } +# endif +# endif -#if 0 +# if 0 -#undef newlocale -#define newlocale libintl_newlocale +# undef newlocale +# define newlocale libintl_newlocale /* Declare newlocale() only if the system headers define the 'locale_t' type. */ -#if !(defined __CYGWIN__ && !defined LC_ALL_MASK) -extern locale_t newlocale (int, const char *, locale_t); -#endif +# if !(defined __CYGWIN__ && !defined LC_ALL_MASK) +extern LIBINTL_DLL_EXPORTED locale_t newlocale (int, const char *, locale_t); +# if defined __cplusplus && !defined _INTL_CXX_NO_CLOBBER_STD_NAMESPACE +namespace std { using ::libintl_newlocale; } +# endif +# endif -#endif +# endif #endif @@ -521,7 +593,7 @@ extern locale_t newlocale (int, const char *, locale_t); prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ #define libintl_set_relocation_prefix libintl_set_relocation_prefix -extern void +extern LIBINTL_DLL_EXPORTED void libintl_set_relocation_prefix (const char *orig_prefix, const char *curr_prefix); diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/autosprintf.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/autosprintf.h index 6106efd1a..80b9bb7c1 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/autosprintf.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/autosprintf.h @@ -32,12 +32,14 @@ # endif #endif -#ifdef _MSC_VER -#ifdef IN_LIBASPRINTF -#define LIBASPRINTF_DLL_EXPORTED __declspec(dllexport) -#else defined _MSC_VER -#define LIBASPRINTF_DLL_EXPORTED __declspec(dllimport) -#endif +#if defined (_MSC_VER) && !defined (LIBASPRINTF_STATIC) +# ifdef IN_LIBASPRINTF +# define LIBASPRINTF_DLL_EXPORTED __declspec(dllexport) +# else +# define LIBASPRINTF_DLL_EXPORTED __declspec(dllimport) +# endif +#else +# define LIBASPRINTF_DLL_EXPORTED #endif #include diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/config.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/config.h new file mode 100644 index 000000000..5fb325cc4 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/config.h @@ -0,0 +1,1291 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + + +#define asnprintf libasprintf_asnprintf +#define rpl_asnprintf libasprintf_asnprintf +#define rpl_memchr libasprintf_memchr +#define printf_fetchargs libasprintf_printf_fetchargs +#define printf_parse libasprintf_printf_parse +#define vasnprintf libasprintf_vasnprintf +#define rpl_vasnprintf libasprintf_vasnprintf +#define xmax libasprintf_xmax +#define xsum libasprintf_xsum +#define xsum3 libasprintf_xsum3 +#define xsum4 libasprintf_xsum4 + + +/* Witness that has been included. */ +#define _GL_CONFIG_H_INCLUDED 1 + + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to the number of bits in type 'ptrdiff_t'. */ +/* #undef BITSIZEOF_PTRDIFF_T */ + +/* Define to the number of bits in type 'sig_atomic_t'. */ +/* #undef BITSIZEOF_SIG_ATOMIC_T */ + +/* Define to the number of bits in type 'size_t'. */ +/* #undef BITSIZEOF_SIZE_T */ + +/* Define to the number of bits in type 'wchar_t'. */ +/* #undef BITSIZEOF_WCHAR_T */ + +/* Define to the number of bits in type 'wint_t'. */ +/* #undef BITSIZEOF_WINT_T */ + +/* Define to 1 if using 'alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'double'. */ +#define DBL_EXPBIT0_BIT 20 + +/* Define as the word index where to find the exponent of 'double'. */ +#define DBL_EXPBIT0_WORD 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fscanf shall be considered present. */ +#define GNULIB_FSCANF 1 + +/* Define to 1 if printf and friends should be labeled with attribute + "__gnu_printf__" instead of "__printf__" */ +/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ +#define GNULIB_SCANF 1 + +/* Define to 1 when the gnulib module fgetc should be tested. */ +#define GNULIB_TEST_FGETC 1 + +/* Define to 1 when the gnulib module fgets should be tested. */ +#define GNULIB_TEST_FGETS 1 + +/* Define to 1 when the gnulib module fprintf should be tested. */ +#define GNULIB_TEST_FPRINTF 1 + +/* Define to 1 when the gnulib module fputc should be tested. */ +#define GNULIB_TEST_FPUTC 1 + +/* Define to 1 when the gnulib module fputs should be tested. */ +#define GNULIB_TEST_FPUTS 1 + +/* Define to 1 when the gnulib module fread should be tested. */ +#define GNULIB_TEST_FREAD 1 + +/* Define to 1 when the gnulib module free-posix should be tested. */ +#define GNULIB_TEST_FREE_POSIX 1 + +/* Define to 1 when the gnulib module fscanf should be tested. */ +#define GNULIB_TEST_FSCANF 1 + +/* Define to 1 when the gnulib module fwrite should be tested. */ +#define GNULIB_TEST_FWRITE 1 + +/* Define to 1 when the gnulib module getc should be tested. */ +#define GNULIB_TEST_GETC 1 + +/* Define to 1 when the gnulib module getchar should be tested. */ +#define GNULIB_TEST_GETCHAR 1 + +/* Define to 1 when the gnulib module mbszero should be tested. */ +#define GNULIB_TEST_MBSZERO 1 + +/* Define to 1 when the gnulib module memchr should be tested. */ +#define GNULIB_TEST_MEMCHR 1 + +/* Define to 1 when the gnulib module printf should be tested. */ +#define GNULIB_TEST_PRINTF 1 + +/* Define to 1 when the gnulib module putc should be tested. */ +#define GNULIB_TEST_PUTC 1 + +/* Define to 1 when the gnulib module putchar should be tested. */ +#define GNULIB_TEST_PUTCHAR 1 + +/* Define to 1 when the gnulib module puts should be tested. */ +#define GNULIB_TEST_PUTS 1 + +/* Define to 1 when the gnulib module scanf should be tested. */ +#define GNULIB_TEST_SCANF 1 + +/* Define to 1 when the gnulib module vfprintf should be tested. */ +#define GNULIB_TEST_VFPRINTF 1 + +/* Define to 1 when the gnulib module vprintf should be tested. */ +#define GNULIB_TEST_VPRINTF 1 + +/* Define to 1 if you have 'alloca' after including , a header that + may be supplied by this distribution. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if works. */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BP_SYM_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_CRTDEFS_H 1 + +/* Define to 1 if the static_assert keyword works. */ +#if (_MSC_VER >= 1931) +# define HAVE_C_STATIC_ASSERT 1 +#endif + +/* Define to 1 if you have the declaration of `ecvt', and to 0 if you don't. + */ +#define HAVE_DECL_ECVT 1 + +/* Define to 1 if you have the declaration of `execvpe', and to 0 if you + don't. */ +#define HAVE_DECL_EXECVPE 0 + +/* Define to 1 if you have the declaration of `fcloseall', and to 0 if you + don't. */ +#define HAVE_DECL_FCLOSEALL 1 + +/* Define to 1 if you have the declaration of `fcvt', and to 0 if you don't. + */ +#define HAVE_DECL_FCVT 1 + +/* Define to 1 if you have the declaration of `gcvt', and to 0 if you don't. + */ +#define HAVE_DECL_GCVT 1 + +/* Define to 1 if you have the declaration of `getw', and to 0 if you don't. + */ +#define HAVE_DECL_GETW 1 + +/* Define to 1 if you have the declaration of `putw', and to 0 if you don't. + */ +#define HAVE_DECL_PUTW 1 + +/* Define to 1 if you have the declaration of `wcsdup', and to 0 if you don't. + */ +#define HAVE_DECL_WCSDUP 1 + +/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FEATURES_H */ + +/* Define if the 'free' function is guaranteed to preserve errno. */ +/* #undef HAVE_FREE_POSIX */ + +/* Define if you have the 'intmax_t' type in or . */ +#define HAVE_INTMAX_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if exists, doesn't clash with , and + declares uintmax_t. */ +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 + +/* Define if you have and nl_langinfo(CODESET). */ +/* #undef HAVE_LANGINFO_CODESET */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type 'long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including + config.h and . */ +/* #undef HAVE_MAP_ANONYMOUS */ + +/* Define to 1 if you have the `mbrtowc' function. */ +#define HAVE_MBRTOWC 1 + +/* Define to 1 if you have the `mbsinit' function. */ +/* #undef HAVE_MBSINIT */ + +/* Define to 1 if declares mbstate_t. */ +#define HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the `mprotect' function. */ +/* #undef HAVE_MPROTECT */ + +/* Define if your printf() function supports format strings with positions. */ +/* #undef HAVE_POSIX_PRINTF */ + +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WCHAR_T */ + +/* Define to 1 if 'wint_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WINT_T */ + +/* Define to 1 if you have the `snprintf' function. */ +/* #undef HAVE_SNPRINTF */ + +/* Define if the return value of the snprintf function is the number of of + bytes (excluding the terminating NUL) that would have been produced if the + buffer had been large enough. */ +#define HAVE_SNPRINTF_RETVAL_C99 1 + +/* Define if the string produced by the snprintf function is always NUL + terminated. */ +#define HAVE_SNPRINTF_TRUNCATION_C99 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define if exists, doesn't clash with , and declares + uintmax_t. */ +#define HAVE_STDINT_H_WITH_UINTMAX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRINGS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MMAN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTD_H */ + +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define to 1 if you have the `vasnprintf' function. */ +/* #undef HAVE_VASNPRINTF */ + +/* Define to 1 if you have the `vasprintf' function. */ +/* #undef HAVE_VASPRINTF */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the `wcrtomb' function. */ +#define HAVE_WCRTOMB 1 + +/* Define to 1 if you have the `wcslen' function. */ +#define HAVE_WCSLEN 1 + +/* Define to 1 if you have the `wcsnlen' function. */ +#define HAVE_WCSNLEN 1 + +/* Define if you have the 'wint_t' type. */ +#define HAVE_WINT_T 1 + +/* Define to 1 if ctype.h defines __header_inline. */ +/* #undef HAVE___HEADER_INLINE */ + +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Oracle Developer Studio 12.6 + (Sun C 5.15 SunOS_sparc 2017/05/30). + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: + + OS X 10.8 and earlier; see: + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log + + FreeBSD; see: + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. + + GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. It defines a macro + __GNUC_STDC_INLINE__ to indicate this situation or a macro + __GNUC_GNU_INLINE__ to indicate the opposite situation. + GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline + semantics but warns, unless -fgnu89-inline is used: + warning: C99 inline functions are not supported; using GNU89 + warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute + It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. + */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined HAVE___HEADER_INLINE \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? (defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + && !defined __PCC__) \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined __PCC__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE _GL_UNUSED static +# define _GL_EXTERN_INLINE _GL_UNUSED static +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ +/* #undef MAP_ANONYMOUS */ + +/* Use GNU style printf and scanf. */ +#ifndef __USE_MINGW_ANSI_STDIO +# define __USE_MINGW_ANSI_STDIO 1 +#endif + + +/* Define to 1 on musl libc. */ +/* #undef MUSL_LIBC */ + +/* Name of package */ +#define PACKAGE "libasprintf" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libasprintf" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libasprintf 1.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libasprintf" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.0" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +/* #undef PTRDIFF_T_SUFFIX */ + +/* Define if vasnprintf exists but is overridden by gnulib. */ +/* #undef REPLACE_VASNPRINTF */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +/* #undef SIG_ATOMIC_T_SUFFIX */ + +/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#ifndef SIZE_MAX +/* # undef SIZE_MAX */ +#endif + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +/* #undef SIZE_T_SUFFIX */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# define __STDC_WANT_IEC_60559_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Version number of package */ +#define VERSION "1.0" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +/* #undef WCHAR_T_SUFFIX */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +/* #undef WINT_T_SUFFIX */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ +#if defined __GNUC__ && defined __GNUC_MINOR__ +# define _GL_GNUC_PREREQ(major, minor) \ + ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) +#else +# define _GL_GNUC_PREREQ(major, minor) 0 +#endif + + +/* Define to enable the declarations of ISO C 11 types and functions. */ +/* #undef _ISOC11_SOURCE */ + +/* The _Noreturn keyword of C11. */ +#ifndef _Noreturn +# if (defined __cplusplus \ + && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ + || (defined _MSC_VER && 1900 <= _MSC_VER)) \ + && 0) + /* [[noreturn]] is not practically usable, because with it the syntax + extern _Noreturn void func (...); + would not be valid; such a declaration would only be valid with 'extern' + and '_Noreturn' swapped, or without the 'extern' keyword. However, some + AIX system header files and several gnulib header files use precisely + this syntax with 'extern'. */ +# define _Noreturn [[noreturn]] +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (_GL_GNUC_PREREQ (4, 7) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) + /* _Noreturn works as-is. */ +# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C +# define _Noreturn __attribute__ ((__noreturn__)) +# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + +/* For standard stat data types on VMS. */ +#define _USE_STD_STAT 1 + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_CONSTANT_MACROS */ + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_LIMIT_MACROS */ + +/* The _GL_ASYNC_SAFE marker should be attached to functions that are + signal handlers (for signals other than SIGABRT, SIGPIPE) or can be + invoked from such signal handlers. Such functions have some restrictions: + * All functions that it calls should be marked _GL_ASYNC_SAFE as well, + or should be listed as async-signal-safe in POSIX + + section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in + particular, are NOT async-signal-safe. + * All memory locations (variables and struct fields) that these functions + access must be marked 'volatile'. This holds for both read and write + accesses. Otherwise the compiler might optimize away stores to and + reads from such locations that occur in the program, depending on its + data flow analysis. For example, when the program contains a loop + that is intended to inspect a variable set from within a signal handler + while (!signal_occurred) + ; + the compiler is allowed to transform this into an endless loop if the + variable 'signal_occurred' is not declared 'volatile'. + Additionally, recall that: + * A signal handler should not modify errno (except if it is a handler + for a fatal signal and ends by raising the same signal again, thus + provoking the termination of the process). If it invokes a function + that may clobber errno, it needs to save and restore the value of + errno. */ +#define _GL_ASYNC_SAFE + + +/* Attributes. */ +#if (defined __has_attribute \ + && (!defined __clang_minor__ \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 5 <= __clang_major__))) +# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) +#else +# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr +# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) +# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) +# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) +# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) +# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) +# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) +# define _GL_ATTR_diagnose_if 0 +# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) +# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) +# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) +# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) +# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) +# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) +# ifdef _ICC +# define _GL_ATTR_may_alias 0 +# else +# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) +# endif +# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) +# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) +# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) +# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) +# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) +# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) +# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) +# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) +# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) +# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) +#endif + +/* Use __has_c_attribute if available. However, do not use with + pre-C23 GCC, which can issue false positives if -Wpedantic. */ +#if (defined __has_c_attribute \ + && ! (_GL_GNUC_PREREQ (4, 6) \ + && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710)) +# define _GL_HAVE___HAS_C_ATTRIBUTE 1 +#else +# define _GL_HAVE___HAS_C_ATTRIBUTE 0 +#endif + +/* Define if, in a function declaration, the attributes in bracket syntax + [[...]] must come before the attributes in __attribute__((...)) syntax. + If this is defined, it is best to avoid the bracket syntax, so that the + various _GL_ATTRIBUTE_* can be cumulated on the same declaration in any + order. */ +#ifdef __cplusplus +# if defined __clang__ +# define _GL_BRACKET_BEFORE_ATTRIBUTE 1 +# endif +#else +# if defined __GNUC__ && !defined __clang__ +# define _GL_BRACKET_BEFORE_ATTRIBUTE 1 +# endif +#endif + +/* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function + is the size of the returned memory block. + _GL_ATTRIBUTE_ALLOC_SIZE ((M, N)) declares that the Mth argument multiplied + by the Nth argument of the function is the size of the returned memory block. + */ +/* Applies to: function, pointer to function, function types. */ +#ifndef _GL_ATTRIBUTE_ALLOC_SIZE +# if _GL_HAS_ATTRIBUTE (alloc_size) +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) +# else +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) +# endif +#endif + +/* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the + function and report an error if it cannot do so. */ +/* Applies to: function. */ +#ifndef _GL_ATTRIBUTE_ALWAYS_INLINE +# if _GL_HAS_ATTRIBUTE (always_inline) +# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) +# else +# define _GL_ATTRIBUTE_ALWAYS_INLINE +# endif +#endif + +/* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show + in stack traces when debugging. The compiler should omit the function from + stack traces. */ +/* Applies to: function. */ +#ifndef _GL_ATTRIBUTE_ARTIFICIAL +# if _GL_HAS_ATTRIBUTE (artificial) +# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) +# else +# define _GL_ATTRIBUTE_ARTIFICIAL +# endif +#endif + +/* _GL_ATTRIBUTE_COLD declares that the function is rarely executed. */ +/* Applies to: functions. */ +/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at + . + Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */ +#ifndef _GL_ATTRIBUTE_COLD +# if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ +# ifndef __SUNPRO_C +# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) +# else +# define _GL_ATTRIBUTE_COLD __attribute__ ((cold)) +# endif +# else +# define _GL_ATTRIBUTE_COLD +# endif +#endif + +/* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate + calls to the function with the same arguments. + This attribute is safe for a function that neither depends on nor affects + observable state, and always returns exactly once - e.g., does not loop + forever, and does not call longjmp. + (This attribute is stricter than _GL_ATTRIBUTE_PURE.) */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_CONST +# if _GL_HAS_ATTRIBUTE (const) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _GL_ATTRIBUTE_CONST +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. + _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if _GL_GNUC_PREREQ (11, 0) +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif +/* If gnulib's or has already defined this macro, continue + to use this earlier definition, since may not have been included + yet. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated. + The compiler may warn if the entity is used. */ +/* Applies to: + - function, variable, + - struct, union, struct/union member, + - enumeration, enumeration item, + - typedef, + in C++ also: namespace, class, template specialization. */ +#ifndef _GL_ATTRIBUTE_DEPRECATED +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__deprecated__) +# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] +# endif +# endif +# endif +# if !defined _GL_ATTRIBUTE_DEPRECATED && _GL_HAS_ATTRIBUTE (deprecated) +# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) +# endif +# ifndef _GL_ATTRIBUTE_DEPRECATED +# define _GL_ATTRIBUTE_DEPRECATED +# endif +#endif + +/* _GL_ATTRIBUTE_ERROR(msg) requests an error if a function is called and + the function call is not optimized away. + _GL_ATTRIBUTE_WARNING(msg) requests a warning if a function is called and + the function call is not optimized away. */ +/* Applies to: functions. */ +#if !(defined _GL_ATTRIBUTE_ERROR && defined _GL_ATTRIBUTE_WARNING) +# if _GL_HAS_ATTRIBUTE (error) +# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) +# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) +# elif _GL_HAS_ATTRIBUTE (diagnose_if) +# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error"))) +# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# else +# define _GL_ATTRIBUTE_ERROR(msg) +# define _GL_ATTRIBUTE_WARNING(msg) +# endif +#endif + +/* _GL_ATTRIBUTE_EXTERNALLY_VISIBLE declares that the entity should remain + visible to debuggers etc., even with '-fwhole-program'. */ +/* Applies to: functions, variables. */ +#ifndef _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +# if _GL_HAS_ATTRIBUTE (externally_visible) +# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) +# else +# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +# endif +#endif + +/* _GL_ATTRIBUTE_FALLTHROUGH declares that it is not a programming mistake if + the control flow falls through to the immediately following 'case' or + 'default' label. The compiler should not warn in this case. */ +/* Applies to: Empty statement (;), inside a 'switch' statement. */ +/* Always expands to something. */ +#ifndef _GL_ATTRIBUTE_FALLTHROUGH +# if _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__fallthrough__) +# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] +# endif +# endif +# if !defined _GL_ATTRIBUTE_FALLTHROUGH && _GL_HAS_ATTRIBUTE (fallthrough) +# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) +# endif +# ifndef _GL_ATTRIBUTE_FALLTHROUGH +# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) +# endif +#endif + +/* _GL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK)) + declares that the STRING-INDEXth function argument is a format string of + style ARCHETYPE, which is one of: + printf, gnu_printf + scanf, gnu_scanf, + strftime, gnu_strftime, + strfmon, + or the same thing prefixed and suffixed with '__'. + If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK + are suitable for the format string. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_FORMAT +# if _GL_HAS_ATTRIBUTE (format) +# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +# else +# define _GL_ATTRIBUTE_FORMAT(spec) +# endif +#endif + +/* _GL_ATTRIBUTE_LEAF declares that if the function is called from some other + compilation unit, it executes code from that unit only by return or by + exception handling. This declaration lets the compiler optimize that unit + more aggressively. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_LEAF +# if _GL_HAS_ATTRIBUTE (leaf) +# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) +# else +# define _GL_ATTRIBUTE_LEAF +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if _GL_HAS_ATTRIBUTE (malloc) +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_MAY_ALIAS declares that pointers to the type may point to the + same storage as pointers to other types. Thus this declaration disables + strict aliasing optimization. */ +/* Applies to: types. */ +/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */ +#ifndef _GL_ATTRIBUTE_MAY_ALIAS +# if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C +# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) +# else +# define _GL_ATTRIBUTE_MAY_ALIAS +# endif +#endif + +/* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if + the entity is not used. The compiler should not warn if the entity is not + used. */ +/* Applies to: + - function, variable, + - struct, union, struct/union member, + - enumeration, enumeration item, + - typedef, + in C++ also: class. */ +/* In C++ and C23, this is spelled [[__maybe_unused__]]. + GCC's syntax is __attribute__ ((__unused__)). + clang supports both syntaxes. Except that with clang ≥ 6, < 10, in C++ mode, + __has_c_attribute (__maybe_unused__) yields true but the use of + [[__maybe_unused__]] nevertheless produces a warning. */ +#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if defined __clang__ && defined __cplusplus +# if !defined __apple_build_version__ && __clang_major__ >= 10 +# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# elif _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__maybe_unused__) +# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# endif +# endif +# ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED +# endif +#endif +/* Alternative spelling of this macro, for convenience and for + compatibility with glibc/include/libc-symbols.h. */ +#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED +/* Earlier spellings of this macro. */ +#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED + +/* _GL_ATTRIBUTE_NODISCARD declares that the caller of the function should not + discard the return value. The compiler may warn if the caller does not use + the return value, unless the caller uses something like ignore_value. */ +/* Applies to: function, enumeration, class. */ +#ifndef _GL_ATTRIBUTE_NODISCARD +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if defined __clang__ && defined __cplusplus + /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] produces + a warning. + The 1000 below means a yet unknown threshold. When clang++ version X + starts supporting [[__nodiscard__]] without warning about it, you can + replace the 1000 with X. */ +# if __clang_major__ >= 1000 +# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] +# endif +# elif _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__nodiscard__) +# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] +# endif +# endif +# endif +# if !defined _GL_ATTRIBUTE_NODISCARD && _GL_HAS_ATTRIBUTE (warn_unused_result) +# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) +# endif +# ifndef _GL_ATTRIBUTE_NODISCARD +# define _GL_ATTRIBUTE_NODISCARD +# endif +#endif + +/* _GL_ATTRIBUTE_NOINLINE tells that the compiler should not inline the + function. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_NOINLINE +# if _GL_HAS_ATTRIBUTE (noinline) +# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) +# else +# define _GL_ATTRIBUTE_NOINLINE +# endif +#endif + +/* _GL_ATTRIBUTE_NONNULL ((N1, N2,...)) declares that the arguments N1, N2,... + must not be NULL. + _GL_ATTRIBUTE_NONNULL () declares that all pointer arguments must not be + null. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_NONNULL +# if _GL_HAS_ATTRIBUTE (nonnull) +# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) +# else +# define _GL_ATTRIBUTE_NONNULL(args) +# endif +#endif + +/* _GL_ATTRIBUTE_NONSTRING declares that the contents of a character array is + not meant to be NUL-terminated. */ +/* Applies to: struct/union members and variables that are arrays of element + type '[[un]signed] char'. */ +#ifndef _GL_ATTRIBUTE_NONSTRING +# if _GL_HAS_ATTRIBUTE (nonstring) +# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) +# else +# define _GL_ATTRIBUTE_NONSTRING +# endif +#endif + +/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +/* Applies to: functions. */ +/* After a function's parameter list, this attribute must come first, before + other attributes. */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if _GL_GNUC_PREREQ (2, 8) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if _GL_HAS_ATTRIBUTE (nothrow) +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* _GL_ATTRIBUTE_PACKED declares: + For struct members: The member has the smallest possible alignment. + For struct, union, class: All members have the smallest possible alignment, + minimizing the memory required. */ +/* Applies to: struct members, struct, union, + in C++ also: class. */ +#ifndef _GL_ATTRIBUTE_PACKED +# if _GL_HAS_ATTRIBUTE (packed) +# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) +# else +# define _GL_ATTRIBUTE_PACKED +# endif +#endif + +/* _GL_ATTRIBUTE_PURE declares that It is OK for a compiler to omit duplicate + calls to the function with the same arguments if observable state is not + changed between calls. + This attribute is safe for a function that does not affect + observable state, and always returns exactly once. + (This attribute is looser than _GL_ATTRIBUTE_CONST.) */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_PURE +# if _GL_HAS_ATTRIBUTE (pure) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE +# endif +#endif + +/* _GL_ATTRIBUTE_RETURNS_NONNULL declares that the function's return value is + a non-NULL pointer. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_RETURNS_NONNULL +# if _GL_HAS_ATTRIBUTE (returns_nonnull) +# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) +# else +# define _GL_ATTRIBUTE_RETURNS_NONNULL +# endif +#endif + +/* _GL_ATTRIBUTE_SENTINEL(pos) declares that the variadic function expects a + trailing NULL argument. + _GL_ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99). + _GL_ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_SENTINEL +# if _GL_HAS_ATTRIBUTE (sentinel) +# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) +# else +# define _GL_ATTRIBUTE_SENTINEL(pos) +# endif +#endif + +/* A helper macro. Don't use it directly. */ +#ifndef _GL_ATTRIBUTE_UNUSED +# if _GL_HAS_ATTRIBUTE (unused) +# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define _GL_ATTRIBUTE_UNUSED +# endif +#endif + + +/* _GL_UNUSED_LABEL; declares that it is not a programming mistake if the + immediately preceding label is not used. The compiler should not warn + if the label is not used. */ +/* Applies to: label (both in C and C++). */ +/* Note that g++ < 4.5 does not support the '__attribute__ ((__unused__)) ;' + syntax. But clang does. */ +#ifndef _GL_UNUSED_LABEL +# if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__ +# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED +# else +# define _GL_UNUSED_LABEL +# endif +#endif + + +/* In C++, there is the concept of "language linkage", that encompasses + name mangling and function calling conventions. + The following macros start and end a block of "C" linkage. */ +#ifdef __cplusplus +# define _GL_BEGIN_C_LINKAGE extern "C" { +# define _GL_END_C_LINKAGE } +#else +# define _GL_BEGIN_C_LINKAGE +# define _GL_END_C_LINKAGE +#endif + + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to long or long long if and don't define. */ +/* #undef intmax_t */ + +/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for Mac OS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif + +/* Define to a type if does not define. */ +/* #undef mbstate_t */ + +/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where + n1 and n2 are expressions without side effects, that evaluate to real + numbers (excluding NaN). + It returns + 1 if n1 > n2 + 0 if n1 == n2 + -1 if n1 < n2 + The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional + jump with nearly all GCC versions up to GCC 10. + This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many + GCC versions up to GCC 9. + The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 + avoids conditional jumps in all GCC versions >= 3.4. */ +#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) + + +/* Define to `int' if does not define. */ +#define mode_t int + +/* Define as a signed integer type capable of holding a process identifier. */ +#ifdef _WIN64 +# define pid_t __int64 +#else +# define pid_t int +#endif + +/* Define as the type of the result of subtracting two pointers, if the system + doesn't define it. */ +/* #undef ptrdiff_t */ + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported only directly. */ +#define restrict /**/ +/* Work around a bug in older versions of Sun C++, which did not + #define __restrict__ or support _Restrict or __restrict__ + even though the corresponding Sun C compiler ended up with + "#define restrict _Restrict" or "#define restrict __restrict__" + in the previous line. This workaround can be removed once + we assume Oracle Developer Studio 12.5 (2016) or later. */ +#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ +# define _Restrict +# define __restrict__ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define as a signed type of the same size as size_t. */ +#ifdef _WIN64 +# define ssize_t long long +#else +# define ssize_t long +#endif + +#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6))) + #include + #undef/**/assert + #ifdef __sgi + #undef/**/__ASSERT_H__ + #endif + /* Solaris 11.4 defines static_assert as a macro with 2 arguments. + We need it also to be invocable with a single argument. */ + #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus + #undef/**/static_assert + #define static_assert _Static_assert + #endif +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/alloca.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/alloca.h new file mode 100644 index 000000000..9a7d12625 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/alloca.h @@ -0,0 +1,84 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Memory allocation on the stack. + Copyright (C) 1995, 1999, 2001-2020 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* When this file is included, it may be preceded only by preprocessor + declarations. Thanks to AIX. Therefore we include it right after + "config.h", not later. */ + +/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H + means there is a real alloca function. */ +#ifndef _GL_ALLOCA_H +#define _GL_ALLOCA_H + +/* alloca(N) returns a pointer (void* or char*) to N bytes of memory + allocated on the stack, and which will last until the function returns. + Use of alloca should be avoided: + - inside arguments of function calls - undefined behaviour, + - in inline functions - the allocation may actually last until the + calling function returns, + - for huge N (say, N >= 65536) - you never know how large (or small) + the stack is, and when the stack cannot fulfill the memory allocation + request, the program just crashes. + */ + +#ifndef alloca + /* Some version of mingw have an that causes trouble when + included after 'alloca' gets defined as a macro. As a workaround, + include this first and define 'alloca' as a macro afterwards + if needed. */ +# if defined __GNUC__ && (defined _WIN32 && ! defined __CYGWIN__) && 0 +# include_next +# endif +#endif +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# else +# if defined _AIX + #pragma alloca + /* Alternatively: #define alloca __alloca, works as well. */ +# elif defined _MSC_VER +# include +# define alloca _alloca +# elif defined __DECC && defined __VMS +# define alloca __ALLOCA +# elif defined __TANDEM && defined _TNS_E_TARGET +# ifdef __cplusplus +extern "C" +# endif +void *_alloca (unsigned short); +# pragma intrinsic (_alloca) +# define alloca _alloca +# elif defined __MVS__ +# include +# else +# ifdef __hpux /* This section must match that of bison generated files. */ +# ifdef __cplusplus +extern "C" void *alloca (unsigned int); +# else /* not __cplusplus */ +extern void *alloca (); +# endif /* not __cplusplus */ +# else /* not __hpux */ +# ifndef alloca +extern char *alloca (); +# endif +# endif /* __hpux */ +# endif +# endif +#endif + +#endif /* _GL_ALLOCA_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/assert.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/assert.h new file mode 100644 index 000000000..dec02c738 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/assert.h @@ -0,0 +1,313 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Substitute for and wrapper around + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Do not guard the include, since is supposed to define + the assert macro each time it is included. */ + +#if __GNUC__ >= 3 + +#endif + + +#include "../ucrt/assert.h" + +#if (_MSC_VER < 1931) +/* The definition of static_assert is copied here. */ +/* Compile-time assert-like macros. + + Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ + +#ifndef _GL_STATIC_ASSERT_H +#define _GL_STATIC_ASSERT_H + + +/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC) + works as per C11. This is supported by GCC 4.6.0+ and by clang 4+. + + Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as + per C23. This is supported by GCC 9.1+. + + Support compilers claiming conformance to the relevant standard, + and also support GCC when not pedantic. If we were willing to slow + 'configure' down we could also use it with other compilers, but + since this affects only the quality of diagnostics, why bother? */ +#ifndef __cplusplus +# if (201112 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__))) +# define _GL_HAVE__STATIC_ASSERT 1 +# endif +# if (202311 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ && 9 <= __GNUC__)) +# define _GL_HAVE__STATIC_ASSERT1 1 +# endif +#endif + +/* FreeBSD 9.1 , included by and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE__STATIC_ASSERT +# include +# undef _Static_assert +#endif + +/* Each of these macros verifies that its argument R is nonzero. To + be portable, R should be an integer constant expression. Unlike + assert (R), there is no run-time overhead. + + If _Static_assert works, verify (R) uses it directly. Similarly, + _GL_STATIC_ASSERT_TRUE works by packaging a _Static_assert inside a struct + that is an operand of sizeof. + + The code below uses several ideas for C++ compilers, and for C + compilers that do not support _Static_assert: + + * The first step is ((R) ? 1 : -1). Given an expression R, of + integral or boolean or floating-point type, this yields an + expression of integral type, whose value is later verified to be + constant and nonnegative. + + * Next this expression W is wrapped in a type + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: W; + }. + If W is negative, this yields a compile-time error. No compiler can + deal with a bit-field of negative size. + + One might think that an array size check would have the same + effect, that is, that the type struct { unsigned int dummy[W]; } + would work as well. However, inside a function, some compilers + (such as C++ compilers and GNU C) allow local parameters and + variables inside array size expressions. With these compilers, + an array size check would not properly diagnose this misuse of + the verify macro: + + void function (int n) { verify (n < 0); } + + * For the verify macro, the struct _gl_static_assert_type will need to + somehow be embedded into a declaration. To be portable, this + declaration must declare an object, a constant, a function, or a + typedef name. If the declared entity uses the type directly, + such as in + + struct dummy {...}; + typedef struct {...} dummy; + extern struct {...} *dummy; + extern void dummy (struct {...} *); + extern struct {...} *dummy (void); + + two uses of the verify macro would yield colliding declarations + if the entity names are not disambiguated. A workaround is to + attach the current line number to the entity name: + + #define _GL_CONCAT0(x, y) x##y + #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) + extern struct {...} * _GL_CONCAT (dummy, __LINE__); + + But this has the problem that two invocations of verify from + within the same macro would collide, since the __LINE__ value + would be the same for both invocations. (The GCC __COUNTER__ + macro solves this problem, but is not portable.) + + A solution is to use the sizeof operator. It yields a number, + getting rid of the identity of the type. Declarations like + + extern int dummy [sizeof (struct {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + + can be repeated. + + * Should the implementation use a named struct or an unnamed struct? + Which of the following alternatives can be used? + + extern int dummy [sizeof (struct {...})]; + extern int dummy [sizeof (struct _gl_static_assert_type {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern void dummy (int [sizeof (struct _gl_static_assert_type {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + extern int (*dummy (void)) [sizeof (struct _gl_static_assert_type {...})]; + + In the second and sixth case, the struct type is exported to the + outer scope; two such declarations therefore collide. GCC warns + about the first, third, and fourth cases. So the only remaining + possibility is the fifth case: + + extern int (*dummy (void)) [sizeof (struct {...})]; + + * GCC warns about duplicate declarations of the dummy function if + -Wredundant-decls is used. GCC 4.3 and later have a builtin + __COUNTER__ macro that can let us generate unique identifiers for + each dummy function, to suppress this warning. + + * This implementation exploits the fact that older versions of GCC, + which do not support _Static_assert, also do not warn about the + last declaration mentioned above. + + * GCC warns if -Wnested-externs is enabled and 'verify' is used + within a function body; but inside a function, you can always + arrange to use verify_expr instead. + + * In C++, any struct definition inside sizeof is invalid. + Use a template type to work around the problem. */ + +/* Concatenate two preprocessor tokens. */ +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y + +/* _GL_COUNTER is an integer, preferably one that changes each time we + use it. Use __COUNTER__ if it works, falling back on __LINE__ + otherwise. __LINE__ isn't perfect, but it's better than a + constant. */ +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif + +/* Generate a symbol with the given prefix, making it unique if + possible. */ +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) + +/* Verify requirement R at compile-time, as an integer constant expression + that returns 1. If R is false, fail at compile-time, preferably + with a diagnostic that includes the string-literal DIAGNOSTIC. */ + +#define _GL_STATIC_ASSERT_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_STATIC_ASSERT_TYPE (R, DIAGNOSTIC))) + +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_static_assert_type +template + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: w; + }; +# define GNULIB_defined_struct__gl_static_assert_type 1 +# endif +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + _gl_static_assert_type<(R) ? 1 : -1> +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_static_assert_error_if_negative: (R) ? 1 : -1; } +#endif + +/* Verify requirement R at compile-time, as a declaration without a + trailing ';'. If R is false, fail at compile-time. + + This macro requires three or more arguments but uses at most the first + two, so that the _Static_assert macro optionally defined below supports + both the C11 two-argument syntax and the C23 one-argument syntax. + + Unfortunately, unlike C11, this implementation must appear as an + ordinary declaration, and cannot appear inside struct { ... }. */ + +#if 202311 <= __STDC_VERSION__ || 200410 <= __cpp_static_assert +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) static_assert (R, DIAGNOSTIC) +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC) +#else +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) \ + extern int (*_GL_GENSYM (_gl_static_assert_function) (void)) \ + [_GL_STATIC_ASSERT_TRUE (R, DIAGNOSTIC)] +# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Wnested-externs" +# endif +#endif + +/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ +#ifdef _GL_STATIC_ASSERT_H +/* Define _Static_assert if needed. */ +/* With clang ≥ 3.8.0 in C++ mode, _Static_assert already works and accepts + 1 or 2 arguments. We better don't override it, because clang's standard + C++ library uses static_assert inside classes in several places, and our + replacement via _GL_STATIC_ASSERT does not work in these contexts. */ +# if (defined __cplusplus && defined __clang__ \ + && (4 <= __clang_major__ + (8 <= __clang_minor__))) +# if 5 <= __clang_major__ +/* Avoid "warning: 'static_assert' with no message is a C++17 extension". */ +# pragma clang diagnostic ignored "-Wc++17-extensions" +# else +/* Avoid "warning: static_assert with no message is a C++1z extension". */ +# pragma clang diagnostic ignored "-Wc++1z-extensions" +# endif +# elif !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert +# if !defined _MSC_VER || defined __clang__ +# define _Static_assert(...) \ + _GL_STATIC_ASSERT (__VA_ARGS__, "static assertion failed", -) +# else +# if defined __cplusplus && _MSC_VER >= 1910 + /* In MSVC 14.1 or newer, static_assert accepts one or two arguments, + but _Static_assert is not defined. */ +# define _Static_assert static_assert +# else + /* Work around MSVC preprocessor incompatibility with ISO C; see + . */ +# define _Static_assert(R, ...) \ + _GL_STATIC_ASSERT ((R), "static assertion failed", -) +# endif +# endif +# endif +/* Define static_assert if needed. */ +# if (!defined static_assert \ + && __STDC_VERSION__ < 202311 \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6 && _MSC_VER < 1910))) +# if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__ +/* MSVC 14 in C++ mode supports the two-arguments static_assert but not + the one-argument static_assert, and it does not support _Static_assert. + We have to play preprocessor tricks to distinguish the two cases. + Since the MSVC preprocessor is not ISO C compliant (see above),. + the solution is specific to MSVC. */ +# define _GL_EXPAND(x) x +# define _GL_SA1(a1) static_assert ((a1), "static assertion failed") +# define _GL_SA2 static_assert +# define _GL_SA3 static_assert +# define _GL_SA_PICK(x1,x2,x3,x4,...) x4 +# define static_assert(...) _GL_EXPAND(_GL_SA_PICK(__VA_ARGS__,_GL_SA3,_GL_SA2,_GL_SA1)) (__VA_ARGS__) +/* Avoid "fatal error C1189: #error: The C++ Standard Library forbids macroizing keywords." */ +# define _ALLOW_KEYWORD_MACROS 1 +# else +# define static_assert _Static_assert /* C11 requires this #define. */ +# endif +# endif +#endif + + +#endif +#endif \ No newline at end of file diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/errno.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/errno.h new file mode 100644 index 000000000..fdd118c4d --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/errno.h @@ -0,0 +1,280 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A POSIX-like . + + Copyright (C) 2008-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_ERRNO_H + +#if __GNUC__ >= 3 + +#endif + + +/* The include_next requires a split double-inclusion guard. */ +#include "../ucrt/errno.h" + +#ifndef _GL_ERRNO_H +#define _GL_ERRNO_H + + +/* On native Windows platforms, many macros are not defined. */ +# if defined _WIN32 && ! defined __CYGWIN__ + +/* These are the same values as defined by MSVC 10, for interoperability. */ + +# ifndef ENOMSG +# define ENOMSG 122 +# define GNULIB_defined_ENOMSG 1 +# endif + +# ifndef EIDRM +# define EIDRM 111 +# define GNULIB_defined_EIDRM 1 +# endif + +# ifndef ENOLINK +# define ENOLINK 121 +# define GNULIB_defined_ENOLINK 1 +# endif + +# ifndef EPROTO +# define EPROTO 134 +# define GNULIB_defined_EPROTO 1 +# endif + +# ifndef EBADMSG +# define EBADMSG 104 +# define GNULIB_defined_EBADMSG 1 +# endif + +# ifndef EOVERFLOW +# define EOVERFLOW 132 +# define GNULIB_defined_EOVERFLOW 1 +# endif + +# ifndef ENOTSUP +# define ENOTSUP 129 +# define GNULIB_defined_ENOTSUP 1 +# endif + +# ifndef ENETRESET +# define ENETRESET 117 +# define GNULIB_defined_ENETRESET 1 +# endif + +# ifndef ECONNABORTED +# define ECONNABORTED 106 +# define GNULIB_defined_ECONNABORTED 1 +# endif + +# ifndef ECANCELED +# define ECANCELED 105 +# define GNULIB_defined_ECANCELED 1 +# endif + +# ifndef EOWNERDEAD +# define EOWNERDEAD 133 +# define GNULIB_defined_EOWNERDEAD 1 +# endif + +# ifndef ENOTRECOVERABLE +# define ENOTRECOVERABLE 127 +# define GNULIB_defined_ENOTRECOVERABLE 1 +# endif + +# ifndef EINPROGRESS +# define EINPROGRESS 112 +# define EALREADY 103 +# define ENOTSOCK 128 +# define EDESTADDRREQ 109 +# define EMSGSIZE 115 +# define EPROTOTYPE 136 +# define ENOPROTOOPT 123 +# define EPROTONOSUPPORT 135 +# define EOPNOTSUPP 130 +# define EAFNOSUPPORT 102 +# define EADDRINUSE 100 +# define EADDRNOTAVAIL 101 +# define ENETDOWN 116 +# define ENETUNREACH 118 +# define ECONNRESET 108 +# define ENOBUFS 119 +# define EISCONN 113 +# define ENOTCONN 126 +# define ETIMEDOUT 138 +# define ECONNREFUSED 107 +# define ELOOP 114 +# define EHOSTUNREACH 110 +# define EWOULDBLOCK 140 +# define GNULIB_defined_ESOCK 1 +# endif + +# ifndef ETXTBSY +# define ETXTBSY 139 +# define ENODATA 120 /* not required by POSIX */ +# define ENOSR 124 /* not required by POSIX */ +# define ENOSTR 125 /* not required by POSIX */ +# define ETIME 137 /* not required by POSIX */ +# define EOTHER 131 /* not required by POSIX */ +# define GNULIB_defined_ESTREAMS 1 +# endif + +/* These are intentionally the same values as the WSA* error numbers, defined + in . */ +# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ +# define EPFNOSUPPORT 10046 /* not required by POSIX */ +# define ESHUTDOWN 10058 /* not required by POSIX */ +# define ETOOMANYREFS 10059 /* not required by POSIX */ +# define EHOSTDOWN 10064 /* not required by POSIX */ +# define EPROCLIM 10067 /* not required by POSIX */ +# define EUSERS 10068 /* not required by POSIX */ +# define EDQUOT 10069 +# define ESTALE 10070 +# define EREMOTE 10071 /* not required by POSIX */ +# define GNULIB_defined_EWINSOCK 1 + +# endif + + +/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros + EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ +# if 0 +# define EMULTIHOP +# define GNULIB_defined_EMULTIHOP 1 +# endif +# if 0 +# define ENOLINK +# define GNULIB_defined_ENOLINK 1 +# endif +# if 0 +# define EOVERFLOW +# define GNULIB_defined_EOVERFLOW 1 +# endif + + +/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, + EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. + Likewise, on NonStop Kernel, EDQUOT is not defined. + Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, + HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. + + Note: When one of these systems defines some of these macros some day, + binaries will have to be recompiled so that they recognizes the new + errno values from the system. */ + +# ifndef ENOMSG +# define ENOMSG 2000 +# define GNULIB_defined_ENOMSG 1 +# endif + +# ifndef EIDRM +# define EIDRM 2001 +# define GNULIB_defined_EIDRM 1 +# endif + +# ifndef ENOLINK +# define ENOLINK 2002 +# define GNULIB_defined_ENOLINK 1 +# endif + +# ifndef EPROTO +# define EPROTO 2003 +# define GNULIB_defined_EPROTO 1 +# endif + +# ifndef EMULTIHOP +# define EMULTIHOP 2004 +# define GNULIB_defined_EMULTIHOP 1 +# endif + +# ifndef EBADMSG +# define EBADMSG 2005 +# define GNULIB_defined_EBADMSG 1 +# endif + +# ifndef EOVERFLOW +# define EOVERFLOW 2006 +# define GNULIB_defined_EOVERFLOW 1 +# endif + +# ifndef ENOTSUP +# define ENOTSUP 2007 +# define GNULIB_defined_ENOTSUP 1 +# endif + +# ifndef ENETRESET +# define ENETRESET 2011 +# define GNULIB_defined_ENETRESET 1 +# endif + +# ifndef ECONNABORTED +# define ECONNABORTED 2012 +# define GNULIB_defined_ECONNABORTED 1 +# endif + +# ifndef ESTALE +# define ESTALE 2009 +# define GNULIB_defined_ESTALE 1 +# endif + +# ifndef EDQUOT +# define EDQUOT 2010 +# define GNULIB_defined_EDQUOT 1 +# endif + +# ifndef ECANCELED +# define ECANCELED 2008 +# define GNULIB_defined_ECANCELED 1 +# endif + +/* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not + defined. */ + +# ifndef EOWNERDEAD +# if defined __sun + /* Use the same values as defined for Solaris >= 8, for + interoperability. */ +# define EOWNERDEAD 58 +# define ENOTRECOVERABLE 59 +# elif defined _WIN32 && ! defined __CYGWIN__ + /* We have a conflict here: pthreads-win32 defines these values + differently than MSVC 10. It's hairy to decide which one to use. */ +# if defined __MINGW32__ && !defined USE_WINDOWS_THREADS + /* Use the same values as defined by pthreads-win32, for + interoperability. */ +# define EOWNERDEAD 43 +# define ENOTRECOVERABLE 44 +# else + /* Use the same values as defined by MSVC 10, for + interoperability. */ +# define EOWNERDEAD 133 +# define ENOTRECOVERABLE 127 +# endif +# else +# define EOWNERDEAD 2013 +# define ENOTRECOVERABLE 2014 +# endif +# define GNULIB_defined_EOWNERDEAD 1 +# define GNULIB_defined_ENOTRECOVERABLE 1 +# endif + +# ifndef EILSEQ +# define EILSEQ 2015 +# define GNULIB_defined_EILSEQ 1 +# endif + +#endif /* _GL_ERRNO_H */ +#endif /* _GL_ERRNO_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/inttypes.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/inttypes.h new file mode 100644 index 000000000..00153bfed --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/inttypes.h @@ -0,0 +1,1546 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Copyright (C) 2006-2023 Free Software Foundation, Inc. + Written by Paul Eggert, Bruno Haible, Derek Price. + This file is part of gnulib. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* + * ISO C 99 for platforms that lack it. + * + */ + +#if __GNUC__ >= 3 + +#endif + + +/* Include the original if it exists, and if this file + has not been included yet or if this file includes gnulib stdint.h + which in turn includes this file. + The include_next requires a split double-inclusion guard. */ +#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +# if 1 + + /* Some pre-C++11 implementations need this. */ +# if defined __cplusplus && ! defined __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS 1 +# endif + +# include "../ucrt/inttypes.h" + +# define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H +# endif +#endif + +#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +#define INTTYPES_H + +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* Include or the gnulib replacement. + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif +/* Get CHAR_BIT, INT_MAX, LONG_MAX, etc. */ +#include +/* On mingw, __USE_MINGW_ANSI_STDIO only works if is also included */ +#if defined _WIN32 && ! defined __CYGWIN__ +# include +#endif + +#if !(INT_MAX == 0x7fffffff && INT_MIN + INT_MAX == -1) +# error "This file assumes that 'int' is 32-bit two's complement. Please report your platform and compiler to ." +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + +/* 7.8.1 Macros for format specifiers */ + +#if defined _TNS_R_TARGET + /* Tandem NonStop R series and compatible platforms released before + July 2005 support %Ld but not %lld. */ +# define _LONG_LONG_FORMAT_PREFIX "L" +#else +# define _LONG_LONG_FORMAT_PREFIX "ll" +#endif + +#if !defined PRId8 +# ifdef INT8_MAX +# define PRId8 "d" +# endif +#endif +#if !defined PRIi8 +# ifdef INT8_MAX +# define PRIi8 "i" +# endif +#endif +#if !defined PRIo8 +# ifdef UINT8_MAX +# define PRIo8 "o" +# endif +#endif +#if !defined PRIu8 +# ifdef UINT8_MAX +# define PRIu8 "u" +# endif +#endif +#if !defined PRIx8 +# ifdef UINT8_MAX +# define PRIx8 "x" +# endif +#endif +#if !defined PRIX8 +# ifdef UINT8_MAX +# define PRIX8 "X" +# endif +#endif +#if !defined PRId16 +# ifdef INT16_MAX +# define PRId16 "d" +# endif +#endif +#if !defined PRIi16 +# ifdef INT16_MAX +# define PRIi16 "i" +# endif +#endif +#if !defined PRIo16 +# ifdef UINT16_MAX +# define PRIo16 "o" +# endif +#endif +#if !defined PRIu16 +# ifdef UINT16_MAX +# define PRIu16 "u" +# endif +#endif +#if !defined PRIx16 +# ifdef UINT16_MAX +# define PRIx16 "x" +# endif +#endif +#if !defined PRIX16 +# ifdef UINT16_MAX +# define PRIX16 "X" +# endif +#endif +#if !defined PRId32 +# ifdef INT32_MAX +# define PRId32 "d" +# endif +#endif +#if !defined PRIi32 +# ifdef INT32_MAX +# define PRIi32 "i" +# endif +#endif +#if !defined PRIo32 +# ifdef UINT32_MAX +# define PRIo32 "o" +# endif +#endif +#if !defined PRIu32 +# ifdef UINT32_MAX +# define PRIu32 "u" +# endif +#endif +#if !defined PRIx32 +# ifdef UINT32_MAX +# define PRIx32 "x" +# endif +#endif +#if !defined PRIX32 +# ifdef UINT32_MAX +# define PRIX32 "X" +# endif +#endif +#ifdef INT64_MAX +# if (0 ? defined _LP64 : defined _LP64) +# define _PRI64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRI64_PREFIX "I64" +# elif LONG_MAX >> 30 == 1 +# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRId64 +# define PRId64 _PRI64_PREFIX "d" +# endif +# if !defined PRIi64 +# define PRIi64 _PRI64_PREFIX "i" +# endif +#endif +#ifdef UINT64_MAX +# if (0 ? defined _LP64 : defined _LP64) +# define _PRIu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRIu64_PREFIX "I64" +# elif ULONG_MAX >> 31 == 1 +# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRIo64 +# define PRIo64 _PRIu64_PREFIX "o" +# endif +# if !defined PRIu64 +# define PRIu64 _PRIu64_PREFIX "u" +# endif +# if !defined PRIx64 +# define PRIx64 _PRIu64_PREFIX "x" +# endif +# if !defined PRIX64 +# define PRIX64 _PRIu64_PREFIX "X" +# endif +#endif + +#if !defined PRIdLEAST8 +# define PRIdLEAST8 "d" +#endif +#if !defined PRIiLEAST8 +# define PRIiLEAST8 "i" +#endif +#if !defined PRIoLEAST8 +# define PRIoLEAST8 "o" +#endif +#if !defined PRIuLEAST8 +# define PRIuLEAST8 "u" +#endif +#if !defined PRIxLEAST8 +# define PRIxLEAST8 "x" +#endif +#if !defined PRIXLEAST8 +# define PRIXLEAST8 "X" +#endif +#if !defined PRIdLEAST16 +# define PRIdLEAST16 "d" +#endif +#if !defined PRIiLEAST16 +# define PRIiLEAST16 "i" +#endif +#if !defined PRIoLEAST16 +# define PRIoLEAST16 "o" +#endif +#if !defined PRIuLEAST16 +# define PRIuLEAST16 "u" +#endif +#if !defined PRIxLEAST16 +# define PRIxLEAST16 "x" +#endif +#if !defined PRIXLEAST16 +# define PRIXLEAST16 "X" +#endif +#if !defined PRIdLEAST32 +# define PRIdLEAST32 "d" +#endif +#if !defined PRIiLEAST32 +# define PRIiLEAST32 "i" +#endif +#if !defined PRIoLEAST32 +# define PRIoLEAST32 "o" +#endif +#if !defined PRIuLEAST32 +# define PRIuLEAST32 "u" +#endif +#if !defined PRIxLEAST32 +# define PRIxLEAST32 "x" +#endif +#if !defined PRIXLEAST32 +# define PRIXLEAST32 "X" +#endif +#ifdef INT64_MAX +# if !defined PRIdLEAST64 +# define PRIdLEAST64 PRId64 +# endif +# if !defined PRIiLEAST64 +# define PRIiLEAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoLEAST64 +# define PRIoLEAST64 PRIo64 +# endif +# if !defined PRIuLEAST64 +# define PRIuLEAST64 PRIu64 +# endif +# if !defined PRIxLEAST64 +# define PRIxLEAST64 PRIx64 +# endif +# if !defined PRIXLEAST64 +# define PRIXLEAST64 PRIX64 +# endif +#endif + +#if !defined PRIdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIdFAST8 PRId64 +# else +# define PRIdFAST8 "d" +# endif +#endif +#if !defined PRIiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIiFAST8 PRIi64 +# else +# define PRIiFAST8 "i" +# endif +#endif +#if !defined PRIoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIoFAST8 PRIo64 +# else +# define PRIoFAST8 "o" +# endif +#endif +#if !defined PRIuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIuFAST8 PRIu64 +# else +# define PRIuFAST8 "u" +# endif +#endif +#if !defined PRIxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIxFAST8 PRIx64 +# else +# define PRIxFAST8 "x" +# endif +#endif +#if !defined PRIXFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIXFAST8 PRIX64 +# else +# define PRIXFAST8 "X" +# endif +#endif +#if !defined PRIdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIdFAST16 PRId64 +# else +# define PRIdFAST16 "d" +# endif +#endif +#if !defined PRIiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIiFAST16 PRIi64 +# else +# define PRIiFAST16 "i" +# endif +#endif +#if !defined PRIoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIoFAST16 PRIo64 +# else +# define PRIoFAST16 "o" +# endif +#endif +#if !defined PRIuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIuFAST16 PRIu64 +# else +# define PRIuFAST16 "u" +# endif +#endif +#if !defined PRIxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIxFAST16 PRIx64 +# else +# define PRIxFAST16 "x" +# endif +#endif +#if !defined PRIXFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIXFAST16 PRIX64 +# else +# define PRIXFAST16 "X" +# endif +#endif +#if !defined PRIdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIdFAST32 PRId64 +# else +# define PRIdFAST32 "d" +# endif +#endif +#if !defined PRIiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIiFAST32 PRIi64 +# else +# define PRIiFAST32 "i" +# endif +#endif +#if !defined PRIoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIoFAST32 PRIo64 +# else +# define PRIoFAST32 "o" +# endif +#endif +#if !defined PRIuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIuFAST32 PRIu64 +# else +# define PRIuFAST32 "u" +# endif +#endif +#if !defined PRIxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIxFAST32 PRIx64 +# else +# define PRIxFAST32 "x" +# endif +#endif +#if !defined PRIXFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIXFAST32 PRIX64 +# else +# define PRIXFAST32 "X" +# endif +#endif +#ifdef INT64_MAX +# if !defined PRIdFAST64 +# define PRIdFAST64 PRId64 +# endif +# if !defined PRIiFAST64 +# define PRIiFAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoFAST64 +# define PRIoFAST64 PRIo64 +# endif +# if !defined PRIuFAST64 +# define PRIuFAST64 PRIu64 +# endif +# if !defined PRIxFAST64 +# define PRIxFAST64 PRIx64 +# endif +# if !defined PRIXFAST64 +# define PRIXFAST64 PRIX64 +# endif +#endif + +#if !defined PRIdMAX +# if 1 +# define PRIdMAX PRId64 +# else +# define PRIdMAX "ld" +# endif +#endif +#if !defined PRIiMAX +# if 1 +# define PRIiMAX PRIi64 +# else +# define PRIiMAX "li" +# endif +#endif +#if !defined PRIoMAX +# if 1 +# define PRIoMAX PRIo64 +# else +# define PRIoMAX "lo" +# endif +#endif +#if !defined PRIuMAX +# if 1 +# define PRIuMAX PRIu64 +# else +# define PRIuMAX "lu" +# endif +#endif +#if !defined PRIxMAX +# if 1 +# define PRIxMAX PRIx64 +# else +# define PRIxMAX "lx" +# endif +#endif +#if !defined PRIXMAX +# if 1 +# define PRIXMAX PRIX64 +# else +# define PRIXMAX "lX" +# endif +#endif + +#if !defined PRIdPTR +# ifdef INTPTR_MAX +# define PRIdPTR __PRIPTR_PREFIX "d" +# endif +#endif +#if !defined PRIiPTR +# ifdef INTPTR_MAX +# define PRIiPTR __PRIPTR_PREFIX "i" +# endif +#endif +#if !defined PRIoPTR +# ifdef UINTPTR_MAX +# define PRIoPTR __PRIPTR_PREFIX "o" +# endif +#endif +#if !defined PRIuPTR +# ifdef UINTPTR_MAX +# define PRIuPTR __PRIPTR_PREFIX "u" +# endif +#endif +#if !defined PRIxPTR +# ifdef UINTPTR_MAX +# define PRIxPTR __PRIPTR_PREFIX "x" +# endif +#endif +#if !defined PRIXPTR +# ifdef UINTPTR_MAX +# define PRIXPTR __PRIPTR_PREFIX "X" +# endif +#endif + +#if !defined SCNd8 +# ifdef INT8_MAX +# define SCNd8 "hhd" +# endif +#endif +#if !defined SCNi8 +# ifdef INT8_MAX +# define SCNi8 "hhi" +# endif +#endif +#if !defined SCNo8 +# ifdef UINT8_MAX +# define SCNo8 "hho" +# endif +#endif +#if !defined SCNu8 +# ifdef UINT8_MAX +# define SCNu8 "hhu" +# endif +#endif +#if !defined SCNx8 +# ifdef UINT8_MAX +# define SCNx8 "hhx" +# endif +#endif +#if !defined SCNd16 +# ifdef INT16_MAX +# define SCNd16 "hd" +# endif +#endif +#if !defined SCNi16 +# ifdef INT16_MAX +# define SCNi16 "hi" +# endif +#endif +#if !defined SCNo16 +# ifdef UINT16_MAX +# define SCNo16 "ho" +# endif +#endif +#if !defined SCNu16 +# ifdef UINT16_MAX +# define SCNu16 "hu" +# endif +#endif +#if !defined SCNx16 +# ifdef UINT16_MAX +# define SCNx16 "hx" +# endif +#endif +#if !defined SCNd32 +# ifdef INT32_MAX +# define SCNd32 "d" +# endif +#endif +#if !defined SCNi32 +# ifdef INT32_MAX +# define SCNi32 "i" +# endif +#endif +#if !defined SCNo32 +# ifdef UINT32_MAX +# define SCNo32 "o" +# endif +#endif +#if !defined SCNu32 +# ifdef UINT32_MAX +# define SCNu32 "u" +# endif +#endif +#if !defined SCNx32 +# ifdef UINT32_MAX +# define SCNx32 "x" +# endif +#endif +#ifdef INT64_MAX +# if (0 ? defined _LP64 : defined _LP64) +# define _SCN64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCN64_PREFIX "I64" +# elif LONG_MAX >> 30 == 1 +# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNd64 +# define SCNd64 _SCN64_PREFIX "d" +# endif +# if !defined SCNi64 +# define SCNi64 _SCN64_PREFIX "i" +# endif +#endif +#ifdef UINT64_MAX +# if (0 ? defined _LP64 : defined _LP64) +# define _SCNu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCNu64_PREFIX "I64" +# elif ULONG_MAX >> 31 == 1 +# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNo64 +# define SCNo64 _SCNu64_PREFIX "o" +# endif +# if !defined SCNu64 +# define SCNu64 _SCNu64_PREFIX "u" +# endif +# if !defined SCNx64 +# define SCNx64 _SCNu64_PREFIX "x" +# endif +#endif + +#if !defined SCNdLEAST8 +# define SCNdLEAST8 "hhd" +#endif +#if !defined SCNiLEAST8 +# define SCNiLEAST8 "hhi" +#endif +#if !defined SCNoLEAST8 +# define SCNoLEAST8 "hho" +#endif +#if !defined SCNuLEAST8 +# define SCNuLEAST8 "hhu" +#endif +#if !defined SCNxLEAST8 +# define SCNxLEAST8 "hhx" +#endif +#if !defined SCNdLEAST16 +# define SCNdLEAST16 "hd" +#endif +#if !defined SCNiLEAST16 +# define SCNiLEAST16 "hi" +#endif +#if !defined SCNoLEAST16 +# define SCNoLEAST16 "ho" +#endif +#if !defined SCNuLEAST16 +# define SCNuLEAST16 "hu" +#endif +#if !defined SCNxLEAST16 +# define SCNxLEAST16 "hx" +#endif +#if !defined SCNdLEAST32 +# define SCNdLEAST32 "d" +#endif +#if !defined SCNiLEAST32 +# define SCNiLEAST32 "i" +#endif +#if !defined SCNoLEAST32 +# define SCNoLEAST32 "o" +#endif +#if !defined SCNuLEAST32 +# define SCNuLEAST32 "u" +#endif +#if !defined SCNxLEAST32 +# define SCNxLEAST32 "x" +#endif +#ifdef INT64_MAX +# if !defined SCNdLEAST64 +# define SCNdLEAST64 SCNd64 +# endif +# if !defined SCNiLEAST64 +# define SCNiLEAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoLEAST64 +# define SCNoLEAST64 SCNo64 +# endif +# if !defined SCNuLEAST64 +# define SCNuLEAST64 SCNu64 +# endif +# if !defined SCNxLEAST64 +# define SCNxLEAST64 SCNx64 +# endif +#endif + +#if !defined SCNdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNdFAST8 SCNd64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNdFAST8 "hd" +# elif INT_FAST8_MAX == 0x7f +# define SCNdFAST8 "hhd" +# else +# define SCNdFAST8 "d" +# endif +#endif +#if !defined SCNiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNiFAST8 SCNi64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNiFAST8 "hi" +# elif INT_FAST8_MAX == 0x7f +# define SCNiFAST8 "hhi" +# else +# define SCNiFAST8 "i" +# endif +#endif +#if !defined SCNoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNoFAST8 SCNo64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNoFAST8 "ho" +# elif UINT_FAST8_MAX == 0xff +# define SCNoFAST8 "hho" +# else +# define SCNoFAST8 "o" +# endif +#endif +#if !defined SCNuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNuFAST8 SCNu64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNuFAST8 "hu" +# elif UINT_FAST8_MAX == 0xff +# define SCNuFAST8 "hhu" +# else +# define SCNuFAST8 "u" +# endif +#endif +#if !defined SCNxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNxFAST8 SCNx64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNxFAST8 "hx" +# elif UINT_FAST8_MAX == 0xff +# define SCNxFAST8 "hhx" +# else +# define SCNxFAST8 "x" +# endif +#endif +#if !defined SCNdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNdFAST16 SCNd64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNdFAST16 "hd" +# else +# define SCNdFAST16 "d" +# endif +#endif +#if !defined SCNiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNiFAST16 SCNi64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNiFAST16 "hi" +# else +# define SCNiFAST16 "i" +# endif +#endif +#if !defined SCNoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNoFAST16 SCNo64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNoFAST16 "ho" +# else +# define SCNoFAST16 "o" +# endif +#endif +#if !defined SCNuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNuFAST16 SCNu64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNuFAST16 "hu" +# else +# define SCNuFAST16 "u" +# endif +#endif +#if !defined SCNxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNxFAST16 SCNx64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNxFAST16 "hx" +# else +# define SCNxFAST16 "x" +# endif +#endif +#if !defined SCNdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNdFAST32 SCNd64 +# else +# define SCNdFAST32 "d" +# endif +#endif +#if !defined SCNiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNiFAST32 SCNi64 +# else +# define SCNiFAST32 "i" +# endif +#endif +#if !defined SCNoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNoFAST32 SCNo64 +# else +# define SCNoFAST32 "o" +# endif +#endif +#if !defined SCNuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNuFAST32 SCNu64 +# else +# define SCNuFAST32 "u" +# endif +#endif +#if !defined SCNxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNxFAST32 SCNx64 +# else +# define SCNxFAST32 "x" +# endif +#endif +#ifdef INT64_MAX +# if !defined SCNdFAST64 +# define SCNdFAST64 SCNd64 +# endif +# if !defined SCNiFAST64 +# define SCNiFAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoFAST64 +# define SCNoFAST64 SCNo64 +# endif +# if !defined SCNuFAST64 +# define SCNuFAST64 SCNu64 +# endif +# if !defined SCNxFAST64 +# define SCNxFAST64 SCNx64 +# endif +#endif + +#if !defined SCNdMAX +# if 1 +# define SCNdMAX SCNd64 +# else +# define SCNdMAX "ld" +# endif +#endif +#if !defined SCNiMAX +# if 1 +# define SCNiMAX SCNi64 +# else +# define SCNiMAX "li" +# endif +#endif +#if !defined SCNoMAX +# if 1 +# define SCNoMAX SCNo64 +# else +# define SCNoMAX "lo" +# endif +#endif +#if !defined SCNuMAX +# if 1 +# define SCNuMAX SCNu64 +# else +# define SCNuMAX "lu" +# endif +#endif +#if !defined SCNxMAX +# if 1 +# define SCNxMAX SCNx64 +# else +# define SCNxMAX "lx" +# endif +#endif + +#if !defined SCNdPTR +# ifdef INTPTR_MAX +# define SCNdPTR __PRIPTR_PREFIX "d" +# endif +#endif +#if !defined SCNiPTR +# ifdef INTPTR_MAX +# define SCNiPTR __PRIPTR_PREFIX "i" +# endif +#endif +#if !defined SCNoPTR +# ifdef UINTPTR_MAX +# define SCNoPTR __PRIPTR_PREFIX "o" +# endif +#endif +#if !defined SCNuPTR +# ifdef UINTPTR_MAX +# define SCNuPTR __PRIPTR_PREFIX "u" +# endif +#endif +#if !defined SCNxPTR +# ifdef UINTPTR_MAX +# define SCNxPTR __PRIPTR_PREFIX "x" +# endif +#endif + +/* 7.8.2 Functions for greatest-width integer types */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxabs +# define imaxabs rpl_imaxabs +# endif +_GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x)); +_GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +_GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxabs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef imaxabs +# if HAVE_RAW_DECL_IMAXABS +_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " + "use gnulib module imaxabs for portability"); +# endif +#endif + +#if 0 +# if !1 +# if !GNULIB_defined_imaxdiv_t +typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; +# define GNULIB_defined_imaxdiv_t 1 +# endif +# endif +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxdiv +# define imaxdiv rpl_imaxdiv +# endif +_GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +_GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +_GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxdiv); +# endif +#elif defined GNULIB_POSIXCHECK +# undef imaxdiv +# if HAVE_RAW_DECL_IMAXDIV +_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " + "use gnulib module imaxdiv for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoimax +# define strtoimax rpl_strtoimax +# endif +_GL_FUNCDECL_RPL (strtoimax, intmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoimax, intmax_t, + (const char *restrict, char **restrict, int)); +# else +# if !1 +# undef strtoimax +_GL_FUNCDECL_SYS (strtoimax, intmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoimax, intmax_t, + (const char *restrict, char **restrict, int)); +# endif +_GL_CXXALIASWARN (strtoimax); +#elif defined GNULIB_POSIXCHECK +# undef strtoimax +# if HAVE_RAW_DECL_STRTOIMAX +_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " + "use gnulib module strtoimax for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoumax +# define strtoumax rpl_strtoumax +# endif +_GL_FUNCDECL_RPL (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int)); +# else +# if !1 +# undef strtoumax +_GL_FUNCDECL_SYS (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int)); +# endif +_GL_CXXALIASWARN (strtoumax); +#elif defined GNULIB_POSIXCHECK +# undef strtoumax +# if HAVE_RAW_DECL_STRTOUMAX +_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " + "use gnulib module strtoumax for portability"); +# endif +#endif + +/* Don't bother defining or declaring wcstoimax and wcstoumax, since + wide-character functions like this are hardly ever useful. */ + +#ifdef __cplusplus +} +#endif + +#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/limits.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/limits.h new file mode 100644 index 000000000..b2b002ffe --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/limits.h @@ -0,0 +1,152 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A GNU-like . + + Copyright 2016-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +#if defined _GL_ALREADY_INCLUDING_LIMITS_H +/* Special invocation convention: + On Haiku/x86_64, we have a sequence of nested includes + -> -> . + In this situation, LONG_MAX and INT_MAX are not yet defined, + therefore we should not attempt to define LONG_BIT. */ + +#include "../include/limits.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_LIMITS_H + +# define _GL_ALREADY_INCLUDING_LIMITS_H + +/* The include_next requires a split double-inclusion guard. */ +# include "../include/limits.h" + +# undef _GL_ALREADY_INCLUDING_LIMITS_H + +#ifndef _GL_LIMITS_H +#define _GL_LIMITS_H + +#ifndef LLONG_MIN +# if defined LONG_LONG_MIN /* HP-UX 11.31 */ +# define LLONG_MIN LONG_LONG_MIN +# elif defined LONGLONG_MIN /* IRIX 6.5 */ +# define LLONG_MIN LONGLONG_MIN +# elif defined __GNUC__ +# define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL) +# endif +#endif +#ifndef LLONG_MAX +# if defined LONG_LONG_MAX /* HP-UX 11.31 */ +# define LLONG_MAX LONG_LONG_MAX +# elif defined LONGLONG_MAX /* IRIX 6.5 */ +# define LLONG_MAX LONGLONG_MAX +# elif defined __GNUC__ +# define LLONG_MAX __LONG_LONG_MAX__ +# endif +#endif +#ifndef ULLONG_MAX +# if defined ULONG_LONG_MAX /* HP-UX 11.31 */ +# define ULLONG_MAX ULONG_LONG_MAX +# elif defined ULONGLONG_MAX /* IRIX 6.5 */ +# define ULLONG_MAX ULONGLONG_MAX +# elif defined __GNUC__ +# define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL) +# endif +#endif + +/* The number of usable bits in an unsigned or signed integer type + with minimum value MIN and maximum value MAX, as an int expression + suitable in #if. Cover all known practical hosts. This + implementation exploits the fact that MAX is 1 less than a power of + 2, and merely counts the number of 1 bits in MAX; "COBn" means + "count the number of 1 bits in the low-order n bits"). */ +#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max)) +#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n)) +#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n)) +#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n)) +#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n)) +#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n)) +#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1)) + +#ifndef WORD_BIT +/* Assume 'int' is 32 bits wide. */ +# define WORD_BIT 32 +#endif +#ifndef LONG_BIT +/* Assume 'long' is 32 or 64 bits wide. */ +# if LONG_MAX == INT_MAX +# define LONG_BIT 32 +# else +# define LONG_BIT 64 +# endif +#endif + +/* Assume no multibyte character is longer than 16 bytes. */ +#ifndef MB_LEN_MAX +# define MB_LEN_MAX 16 +#endif + +/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */ + +#if (! defined ULLONG_WIDTH \ + && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) +# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) +# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) +# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) +# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX) +# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX) +# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX) +# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX) +# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX) +# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) +# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) +# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) +#endif + +/* Macros specified by C23. */ + +#if (defined _GNU_SOURCE \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)) +# if ! defined BOOL_WIDTH +# define BOOL_WIDTH 1 +# define BOOL_MAX 1 +# elif ! defined BOOL_MAX +# define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1) +# endif +#endif + +/* Macro specified by POSIX. */ + +/* The maximum ssize_t value. Although it might not be of ssize_t type + as it should be, it's too much trouble to fix this minor detail. */ +#ifndef SSIZE_MAX +# ifdef _WIN64 +# define SSIZE_MAX LLONG_MAX +# else +# define SSIZE_MAX LONG_MAX +# endif +#endif + +#endif /* _GL_LIMITS_H */ +#endif /* _GL_LIMITS_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stddef.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stddef.h new file mode 100644 index 000000000..40a21db6f --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stddef.h @@ -0,0 +1,214 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A substitute for POSIX 2008 , for platforms that have issues. + + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake. */ + +/* + * POSIX 2008 and ISO C 23 for platforms that have issues. + * + */ + +#if __GNUC__ >= 3 + +#endif + + +#if defined __need_wchar_t || defined __need_size_t \ + || defined __need_ptrdiff_t || defined __need_NULL \ + || defined __need_wint_t +/* Special invocation convention inside gcc header files. In + particular, gcc provides a version of that blindly + redefines NULL even when __need_wint_t was defined, even though + wint_t is not normally provided by . Hence, we must + remember if special invocation has ever been used to obtain wint_t, + in which case we need to clean up NULL yet again. */ + +# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) +# ifdef __need_wint_t +# define _GL_STDDEF_WINT_T +# endif +# include "../ucrt/stddef.h" + /* On TinyCC, make sure that the macros that indicate the special invocation + convention get undefined. */ +# undef __need_wchar_t +# undef __need_size_t +# undef __need_ptrdiff_t +# undef __need_NULL +# undef __need_wint_t +# endif + +#else +/* Normal invocation convention. */ + +# ifndef _GL_STDDEF_H + +/* On AIX 7.2, with xlc in 64-bit mode, defines max_align_t to a + type with alignment 4, but 'long' has alignment 8. */ +# if defined _AIX && defined __LP64__ && !0 +# if !GNULIB_defined_max_align_t +# ifdef _MAX_ALIGN_T +/* /usr/include/stddef.h has already defined max_align_t. Override it. */ +typedef long rpl_max_align_t; +# define max_align_t rpl_max_align_t +# else +/* Prevent /usr/include/stddef.h from defining max_align_t. */ +typedef long max_align_t; +# define _MAX_ALIGN_T +# endif +# define __CLANG_MAX_ALIGN_T_DEFINED +# define GNULIB_defined_max_align_t 1 +# endif +# endif + +/* The include_next requires a split double-inclusion guard. */ + +# include "../ucrt/stddef.h" + +/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ +# if (0 \ + && (!defined _GL_STDDEF_H || defined _GL_STDDEF_WINT_T)) +# undef NULL +# ifdef __cplusplus + /* ISO C++ says that the macro NULL must expand to an integer constant + expression, hence '((void *) 0)' is not allowed in C++. */ +# if __GNUG__ >= 3 + /* GNU C++ has a __null macro that behaves like an integer ('int' or + 'long') but has the same size as a pointer. Use that, to avoid + warnings. */ +# define NULL __null +# else +# define NULL 0L +# endif +# else +# define NULL ((void *) 0) +# endif +# endif + +# ifndef _GL_STDDEF_H +# define _GL_STDDEF_H + +/* This file uses _Noreturn, _GL_ATTRIBUTE_NOTHROW. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* Some platforms lack wchar_t. */ +#if !1 +# define wchar_t int +#endif + +/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is + a hack in case the configure-time test was done with g++ even though + we are currently compiling with gcc. + On MSVC, max_align_t is defined only in C++ mode, after was + included. Its definition is good since it has an alignment of 8 (on x86 + and x86_64). + Similarly on OS/2 kLIBC. */ +#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \ + && defined __cplusplus +# include +#else +# if ! (0 || (defined _GCC_MAX_ALIGN_T && !defined __clang__)) +# if !GNULIB_defined_max_align_t +/* On the x86, the maximum storage alignment of double, long, etc. is 4, + but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, + and the C11 standard allows this. Work around this problem by + using __alignof__ (which returns 8 for double) rather than _Alignof + (which returns 4), and align each union member accordingly. */ +# if defined __GNUC__ || (__clang_major__ >= 4) +# define _GL_STDDEF_ALIGNAS(type) \ + __attribute__ ((__aligned__ (__alignof__ (type)))) +# else +# define _GL_STDDEF_ALIGNAS(type) /* */ +# endif +typedef union +{ + char *__p _GL_STDDEF_ALIGNAS (char *); + double __d _GL_STDDEF_ALIGNAS (double); + long double __ld _GL_STDDEF_ALIGNAS (long double); + long int __i _GL_STDDEF_ALIGNAS (long int); +} rpl_max_align_t; +# define max_align_t rpl_max_align_t +# define __CLANG_MAX_ALIGN_T_DEFINED +# define GNULIB_defined_max_align_t 1 +# endif +# endif +#endif + +/* ISO C 23 § 7.21.1 The unreachable macro */ +#ifndef unreachable + +/* Code borrowed from verify.h. */ +# ifndef _GL_HAS_BUILTIN_UNREACHABLE +# if defined __clang_major__ && __clang_major__ < 5 +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__) +# define _GL_HAS_BUILTIN_UNREACHABLE 1 +# elif defined __has_builtin +# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable) +# else +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# endif +# endif + +# if _GL_HAS_BUILTIN_UNREACHABLE +# define unreachable() __builtin_unreachable () +# elif 1200 <= _MSC_VER +# define unreachable() __assume (0) +# else +/* Declare abort(), without including . */ +extern +# if defined __cplusplus +"C" +# endif +_Noreturn +void abort (void) +# if defined __cplusplus && (__GLIBC__ >= 2) +_GL_ATTRIBUTE_NOTHROW +# endif +; +# define unreachable() abort () +# endif + +#endif + +# endif /* _GL_STDDEF_H */ +# endif /* _GL_STDDEF_H */ +#endif /* __need_XXX */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/stdint.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stdint.h similarity index 95% rename from gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/stdint.h rename to gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stdint.h index 851128d88..5d5a53428 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/stdint.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stdint.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2023 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* * ISO C 99 for platforms that lack it. @@ -303,12 +303,11 @@ typedef gl_uint_fast32_t gl_uint_fast16_t; /* kLIBC's defines _INTPTR_T_DECLARED and needs its own definitions of intptr_t and uintptr_t (which use int and unsigned) to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and + Similarly, MinGW WSL-5.4.1 needs its own intptr_t and uintptr_t to avoid conflicting declarations of system functions like _findclose in . */ # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) + || defined __MINGW32__) # undef intptr_t # undef uintptr_t # ifdef _WIN64 @@ -581,11 +580,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) -> -> -> , and the latter includes and assumes its types are already defined. */ # if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/lib/stdio.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stdio.h similarity index 77% rename from gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/lib/stdio.h rename to gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stdio.h index ae58831aa..e5e003b3c 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/lib/stdio.h +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stdio.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -35,7 +35,13 @@ #else /* Normal invocation convention. */ -#ifndef _GL_LTS_STDIO_H +#ifndef _GL_STDIO_H + +/* Suppress macOS deprecation warnings for sprintf and vsprintf. */ +#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200809L +# define _GL_DEFINED__POSIX_C_SOURCE +#endif #define _GL_ALREADY_INCLUDING_STDIO_H @@ -44,8 +50,20 @@ #undef _GL_ALREADY_INCLUDING_STDIO_H -#ifndef _GL_LTS_STDIO_H -#define _GL_LTS_STDIO_H +#ifdef _GL_DEFINED__POSIX_C_SOURCE +# undef _GL_DEFINED__POSIX_C_SOURCE +# undef _POSIX_C_SOURCE +#endif + +#ifndef _GL_STDIO_H +#define _GL_STDIO_H + +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_FORMAT, + _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif /* Get va_list. Needed on many systems, including glibc 2.8. */ #include @@ -57,6 +75,52 @@ May also define off_t to a 64-bit type on native Windows. */ #include +/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ + && ! defined __GLIBC__ +# include +#endif + +/* Android 4.3 declares renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'perror' in , not in . We must include + it before we #define perror rpl_perror. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'remove' in , not in . We must include + it before we #define remove rpl_remove. */ +/* MSVC declares 'rename' in , not in . We must include + it before we #define rename rpl_rename. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. @@ -64,37 +128,83 @@ gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__ # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) # else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ # endif #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones + standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD */ +/* __gnu_printf__ is supported in GCC >= 4.4. */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__ #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__ #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones of the + system printf(), rather than the ones standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM */ +/* On mingw, Gnulib sets __USE_MINGW_ANSI_STDIO in order to get closer to + the standards. The macro GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU indicates + whether this change is effective. On older mingw, it is not. */ #if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM __printf__ #endif +/* _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD + indicates to GCC that the function takes a format string and arguments, + where the format string directives are the ones standardized by ISO C99 + and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument)) + +/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD, + except that it indicates to GCC that the supported format string directives + are the ones of the system printf(), rather than the ones standardized by + ISO C99 and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, formatstring_parameter, first_argument)) + /* _GL_ATTRIBUTE_FORMAT_SCANF indicates to GCC that the function takes a format string and arguments, where the format string directives are the ones standardized by ISO C99 @@ -114,56 +224,21 @@ #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -251,6 +326,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -298,6 +379,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -323,6 +414,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -420,7 +519,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -448,9 +547,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -466,26 +565,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -494,19 +593,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -579,13 +678,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -594,27 +700,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -644,24 +756,56 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # undef putc_unlocked #endif + +/* Maximum number of characters produced by printing a NaN value. */ +#ifndef _PRINTF_NAN_LEN_MAX +# if defined __FreeBSD__ || defined __DragonFly__ \ + || defined __NetBSD__ \ + || (defined __APPLE__ && defined __MACH__) +/* On BSD systems, a NaN value prints as just "nan", without a sign. */ +# define _PRINTF_NAN_LEN_MAX 3 +# elif (__GLIBC__ >= 2) || MUSL_LIBC || defined __OpenBSD__ || defined __sun || defined __CYGWIN__ +/* glibc, musl libc, OpenBSD, Solaris libc, and Cygwin produce "[-]nan". */ +# define _PRINTF_NAN_LEN_MAX 4 +# elif defined _AIX +/* AIX produces "[-]NaNQ". */ +# define _PRINTF_NAN_LEN_MAX 5 +# elif defined _WIN32 && !defined __CYGWIN__ +/* On native Windows, the output can be: + - with MSVC ucrt: "[-]nan" or "[-]nan(ind)" or "[-]nan(snan)", + - with mingw: "[-]1.#IND" or "[-]1.#QNAN". */ +# define _PRINTF_NAN_LEN_MAX 10 +# elif defined __sgi +/* On IRIX, the output typically is "[-]nan0xNNNNNNNN" with 8 hexadecimal + digits. */ +# define _PRINTF_NAN_LEN_MAX 14 +# else +/* We don't know, but 32 should be a safe maximum. */ +# define _PRINTF_NAN_LEN_MAX 32 +# endif +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dprintf rpl_dprintf # endif _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); # else # if !1 _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (dprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF @@ -691,24 +835,103 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " "use gnulib module fclose for portable POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'fcloseall' to '_fcloseall', so that -loldnames is + not required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcloseall on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcloseall +# define fcloseall _fcloseall +# endif +_GL_CXXALIAS_MDA (fcloseall, int, (void)); +# else +# if 1 +# if defined __FreeBSD__ || defined __DragonFly__ +_GL_CXXALIAS_SYS (fcloseall, void, (void)); +# else +_GL_CXXALIAS_SYS (fcloseall, int, (void)); +# endif +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcloseall); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fdopen # define fdopen rpl_fdopen # endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); +_GL_FUNCDECL_RPL (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); # endif _GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen +#else +# if 0 && __GNUC__ >= 11 && !defined fdopen +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef fdopen /* Assume fdopen is always declared. */ _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " "use gnulib module fdopen for portability"); +# elif 1 +/* On native Windows, map 'fdopen' to '_fdopen', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fdopen always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); +# else +_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); +# endif +_GL_CXXALIASWARN (fdopen); +# endif #endif #if 0 @@ -773,29 +996,61 @@ _GL_CXXALIASWARN (fgets); # endif #endif +#if 1 +/* On native Windows, map 'fileno' to '_fileno', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fileno always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fileno +# define fileno _fileno +# endif +_GL_CXXALIAS_MDA (fileno, int, (FILE *restrict stream)); +# else +_GL_CXXALIAS_SYS (fileno, int, (FILE *restrict stream)); +# endif +_GL_CXXALIASWARN (fileno); +#endif + #if 0 -# if 0 +# if (0 && 0) \ + || (0 && 0) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fopen # define fopen rpl_fopen # endif _GL_FUNCDECL_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif _GL_CXXALIAS_SYS (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (fopen); # endif -#elif defined GNULIB_POSIXCHECK -# undef fopen +#else +# if 0 && __GNUC__ >= 11 && !defined fopen +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif +# if defined GNULIB_POSIXCHECK +# undef fopen /* Assume fopen is always declared. */ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " "use gnulib module fopen for portability"); +# endif #endif #if 0 || 1 @@ -808,7 +1063,7 @@ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX complian # if 0 || 0 _GL_FUNCDECL_RPL (fprintf, int, (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (fprintf, int, @@ -1242,7 +1497,9 @@ _GL_CXXALIAS_SYS (getdelim, ssize_t, int delimiter, FILE *restrict stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getdelim); +# endif #elif defined GNULIB_POSIXCHECK # undef getdelim # if HAVE_RAW_DECL_GETDELIM @@ -1281,7 +1538,7 @@ _GL_CXXALIAS_SYS (getline, ssize_t, (char **restrict lineptr, size_t *restrict linesize, FILE *restrict stream)); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (getline); # endif #elif defined GNULIB_POSIXCHECK @@ -1300,6 +1557,30 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif +#if 1 +/* On native Windows, map 'getw' to '_getw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getw +# define getw _getw +# endif +_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getw); +# endif +#endif + #if 0 || 0 struct obstack; /* Grow an obstack with formatted output. Return the number of @@ -1313,7 +1594,7 @@ struct obstack; # endif _GL_FUNCDECL_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...)); @@ -1321,7 +1602,7 @@ _GL_CXXALIAS_RPL (obstack_printf, int, # if !1 _GL_FUNCDECL_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_printf, int, @@ -1334,7 +1615,7 @@ _GL_CXXALIASWARN (obstack_printf); # endif _GL_FUNCDECL_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); @@ -1342,7 +1623,7 @@ _GL_CXXALIAS_RPL (obstack_vprintf, int, # if !1 _GL_FUNCDECL_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_vprintf, int, @@ -1394,29 +1675,42 @@ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " # undef popen # define popen rpl_popen # endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +_GL_FUNCDECL_RPL (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); # else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +# if !1 || __GNUC__ >= 11 +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); # endif _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); # endif _GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN +#else +# if 0 && __GNUC__ >= 11 && !defined popen +/* For -Wmismatched-dealloc: Associate popen with pclose or rpl_pclose. */ +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef popen +# if HAVE_RAW_DECL_POPEN _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " "use gnulib module popen or pipe for more portability"); +# endif # endif #endif #if 0 || 1 # if (0 && 0) \ || (1 && 0 && (0 || 0)) -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ @@ -1426,7 +1720,7 @@ _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *restrict format, ...) __asm__ ( _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL_1 (__printf__, int, @@ -1443,7 +1737,7 @@ _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); # endif _GL_FUNCDECL_RPL (printf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); # endif @@ -1513,6 +1807,30 @@ _GL_CXXALIASWARN (puts); # endif #endif +#if 1 +/* On native Windows, map 'putw' to '_putw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putw +# define putw _putw +# endif +_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (putw); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1590,7 +1908,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - " #if 1 # if 0 && 0 -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef scanf /* Don't break __attribute__((format(scanf,M,N))). */ @@ -1621,15 +1939,16 @@ _GL_CXXALIASWARN (scanf); # endif #endif -#if 1 -# if 1 +#if 0 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif +# define GNULIB_overrides_snprintf 1 _GL_FUNCDECL_RPL (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (snprintf, int, (char *restrict str, size_t size, @@ -1639,14 +1958,16 @@ _GL_CXXALIAS_RPL (snprintf, int, _GL_FUNCDECL_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (snprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef snprintf # if HAVE_RAW_DECL_SNPRINTF @@ -1669,9 +1990,10 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif +# define GNULIB_overrides_sprintf 1 _GL_FUNCDECL_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...)); @@ -1690,28 +2012,60 @@ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " "POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'tempnam' to '_tempnam', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::tempnam always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tempnam +# define tempnam _tempnam +# endif +_GL_CXXALIAS_MDA (tempnam, char *, (const char *dir, const char *prefix)); +# else +_GL_CXXALIAS_SYS (tempnam, char *, (const char *dir, const char *prefix)); +# endif +_GL_CXXALIASWARN (tempnam); +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define tmpfile rpl_tmpfile # endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); +_GL_FUNCDECL_RPL (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (tmpfile); # endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE +#else +# if 0 && __GNUC__ >= 11 && !defined tmpfile +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef tmpfile +# if HAVE_RAW_DECL_TMPFILE _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " "use gnulib module tmpfile for portability"); +# endif # endif #endif -#if 1 +#if 0 /* Write formatted output to a string dynamically allocated with malloc(). If the memory allocation succeeds, store the address of the string in *RESULT and return the number of resulting bytes, excluding the trailing @@ -1720,17 +2074,18 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif +# define GNULIB_overrides_asprintf _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (asprintf, int, (char **result, const char *format, ...)); # else -# if !0 +# if !1 _GL_FUNCDECL_SYS (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (asprintf, int, @@ -1741,17 +2096,18 @@ _GL_CXXALIASWARN (asprintf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif +# define GNULIB_overrides_vasprintf 1 _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vasprintf, int, (char **result, const char *format, va_list args)); # else -# if !0 +# if !1 _GL_FUNCDECL_SYS (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (vasprintf, int, @@ -1767,7 +2123,7 @@ _GL_CXXALIASWARN (vasprintf); # endif _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args)); @@ -1775,7 +2131,7 @@ _GL_CXXALIAS_RPL (vdprintf, int, # if !1 _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); # endif /* Need to cast, because on Solaris, the third parameter will likely be @@ -1805,7 +2161,7 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " _GL_FUNCDECL_RPL (vfprintf, int, (FILE *restrict fp, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (vfprintf, int, @@ -1858,7 +2214,9 @@ _GL_CXXALIAS_SYS (vfscanf, int, (FILE *restrict stream, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vfscanf); +# endif #endif #if 0 || 1 @@ -1870,7 +2228,7 @@ _GL_CXXALIASWARN (vfscanf); # define GNULIB_overrides_vprintf 1 # if 0 || 0 _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) @@ -1912,18 +2270,21 @@ _GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); # else _GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vscanf); +# endif #endif -#if 1 -# if 1 +#if 0 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif +# define GNULIB_overrides_vsnprintf 1 _GL_FUNCDECL_RPL (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (vsnprintf, int, (char *restrict str, size_t size, @@ -1933,14 +2294,16 @@ _GL_CXXALIAS_RPL (vsnprintf, int, _GL_FUNCDECL_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vsnprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef vsnprintf # if HAVE_RAW_DECL_VSNPRINTF @@ -1954,10 +2317,11 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif +# define GNULIB_overrides_vsprintf 1 _GL_FUNCDECL_RPL (vsprintf, int, (char *restrict str, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vsprintf, int, (char *restrict str, @@ -1981,6 +2345,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " "POSIX compliance"); #endif -#endif /* _GL_LTS_STDIO_H */ -#endif /* _GL_LTS_STDIO_H */ +#endif /* _GL_STDIO_H */ +#endif /* _GL_STDIO_H */ #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stdlib.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stdlib.h new file mode 100644 index 000000000..9bc5ae6ff --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/stdlib.h @@ -0,0 +1,2399 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A GNU-like . + + Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc +/* Special invocation conventions inside some gnulib header files, + and inside some glibc header files, respectively. */ + +#include "../ucrt/stdlib.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_STDLIB_H + +/* The include_next requires a split double-inclusion guard. */ +#include "../ucrt/stdlib.h" + +#ifndef _GL_STDLIB_H +#define _GL_STDLIB_H + +/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* NetBSD 5.0 mis-defines NULL. */ +#include + +/* MirBSD 10 defines WEXITSTATUS in , not in . */ +#if 0 && !defined WEXITSTATUS +# include +#endif + +/* Solaris declares getloadavg() in . */ +#if (0 || defined GNULIB_POSIXCHECK) && 0 +/* OpenIndiana has a bug: must be included before + . */ +# include +# include +#endif + +/* Native Windows platforms declare _mktemp() in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include +#endif + +#if 0 + +/* OSF/1 5.1 declares 'struct random_data' in , which is included + from if _REENTRANT is defined. Include it whenever we need + 'struct random_data'. */ +# if 1 +# include +# endif + +# include + +# if !1 +/* Define 'struct random_data'. + But allow multiple gnulib generated replacements to coexist. */ +# if !GNULIB_defined_struct_random_data +struct random_data +{ + int32_t *fptr; /* Front pointer. */ + int32_t *rptr; /* Rear pointer. */ + int32_t *state; /* Array of state values. */ + int rand_type; /* Type of random number generator. */ + int rand_deg; /* Degree of random number generator. */ + int rand_sep; /* Distance between front and rear. */ + int32_t *end_ptr; /* Pointer behind state table. */ +}; +# define GNULIB_defined_struct_random_data 1 +# endif +# endif +#endif + +#if (0 || 0 || 0 || 0 || 0 || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__) +/* On Mac OS X 10.3, only declares mkstemp. */ +/* On Mac OS X 10.5, only declares mkstemps. */ +/* On Mac OS X 10.13, only declares mkostemp and mkostemps. */ +/* On Cygwin 1.7.1, only declares getsubopt. */ +/* But avoid namespace pollution on glibc systems and native Windows. */ +# include +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + +/* The definition of _Noreturn is copied here. */ +/* A C macro for declaring that a function does not return. + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _Noreturn +# if (defined __cplusplus \ + && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ + || (defined _MSC_VER && 1900 <= _MSC_VER)) \ + && 0) + /* [[noreturn]] is not practically usable, because with it the syntax + extern _Noreturn void func (...); + would not be valid; such a declaration would only be valid with 'extern' + and '_Noreturn' swapped, or without the 'extern' keyword. However, some + AIX system header files and several gnulib header files use precisely + this syntax with 'extern'. */ +# define _Noreturn [[noreturn]] +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) + /* _Noreturn works as-is. */ +# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ +#ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +#endif +/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere + with proper operation of xargs. */ +#ifndef EXIT_FAILURE +# define EXIT_FAILURE 1 +#elif EXIT_FAILURE != 1 +# undef EXIT_FAILURE +# define EXIT_FAILURE 1 +#endif + + +#if 0 +/* Terminate the current process with the given return code, without running + the 'atexit' handlers. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef _Exit +# define _Exit rpl__Exit +# endif +_GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status)); +_GL_CXXALIAS_RPL (_Exit, void, (int status)); +# else +# if !1 +_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); +# endif +_GL_CXXALIAS_SYS (_Exit, void, (int status)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (_Exit); +# endif +#elif defined GNULIB_POSIXCHECK +# undef _Exit +# if HAVE_RAW_DECL__EXIT +_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " + "use gnulib module _Exit for portability"); +# endif +#endif + + +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef free +# define free rpl_free +# endif +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_FUNCDECL_RPL (free, void, (void *ptr) _GL_ATTRIBUTE_NOTHROW); +# else +_GL_FUNCDECL_RPL (free, void, (void *ptr)); +# endif +_GL_CXXALIAS_RPL (free, void, (void *ptr)); +# else +_GL_CXXALIAS_SYS (free, void, (void *ptr)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (free); +# endif +#elif defined GNULIB_POSIXCHECK +# undef free +/* Assume free is always declared. */ +_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - " + "use gnulib module free for portability"); +#endif + + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef aligned_alloc +# define aligned_alloc rpl_aligned_alloc +# endif +_GL_FUNCDECL_RPL (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); +# else +# if 1 +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size)); +# endif +# endif +# if (__GLIBC__ >= 2) && 1 +_GL_CXXALIASWARN (aligned_alloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined aligned_alloc +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef aligned_alloc +# if HAVE_RAW_DECL_ALIGNED_ALLOC +_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " + "use gnulib module aligned_alloc for portability"); +# endif +# endif +#endif + +#if 0 +/* Parse a signed decimal integer. + Returns the value of the integer. Errors are not detected. */ +# if !1 +_GL_FUNCDECL_SYS (atoll, long long, (const char *string) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (atoll, long long, (const char *string)); +_GL_CXXALIASWARN (atoll); +#elif defined GNULIB_POSIXCHECK +# undef atoll +# if HAVE_RAW_DECL_ATOLL +_GL_WARN_ON_USE (atoll, "atoll is unportable - " + "use gnulib module atoll for portability"); +# endif +#endif + +#if 0 +# if (0 && 0) \ + || (0 && 0) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef calloc +# define calloc rpl_calloc +# endif +_GL_FUNCDECL_RPL (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); +# else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (calloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined calloc +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef calloc +/* Assume calloc is always declared. */ +_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " + "use gnulib module calloc-posix for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define canonicalize_file_name rpl_canonicalize_file_name +# endif +_GL_FUNCDECL_RPL (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); +# else +# if !1 || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); +# endif +# ifndef GNULIB_defined_canonicalize_file_name +# define GNULIB_defined_canonicalize_file_name \ + (!1 || 0) +# endif +_GL_CXXALIASWARN (canonicalize_file_name); +#else +# if 1 && __GNUC__ >= 11 && !defined canonicalize_file_name +/* For -Wmismatched-dealloc: Associate canonicalize_file_name with free or + rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef canonicalize_file_name +# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME +_GL_WARN_ON_USE (canonicalize_file_name, + "canonicalize_file_name is unportable - " + "use gnulib module canonicalize-lgpl for portability"); +# endif +# endif +#endif + +#if 1 +/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ecvt +# define ecvt _ecvt +# endif +_GL_CXXALIAS_MDA (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (ecvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcvt +# define fcvt _fcvt +# endif +_GL_CXXALIAS_MDA (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gcvt +# define gcvt _gcvt +# endif +_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf)); +# else +# if 1 +_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (gcvt); +# endif +#endif + +#if 0 +/* Store max(NELEM,3) load average numbers in LOADAVG[]. + The three numbers are the load average of the last 1 minute, the last 5 + minutes, and the last 15 minutes, respectively. + LOADAVG is an array of NELEM numbers. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getloadavg +# define getloadavg rpl_getloadavg +# endif +_GL_FUNCDECL_RPL (getloadavg, int, (double loadavg[], int nelem) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getloadavg, int, (double loadavg[], int nelem)); +# else +# if !1 +_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getloadavg); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getloadavg +# if HAVE_RAW_DECL_GETLOADAVG +_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " + "use gnulib module getloadavg for portability"); +# endif +#endif + +#if 0 +/* Return the base name of the executing program. + On native Windows this will usually end in ".exe" or ".EXE". */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getprogname +# define getprogname rpl_getprogname +# endif +# if 1 +_GL_FUNCDECL_RPL (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_RPL (getprogname, const char *, (void)); +# endif +_GL_CXXALIAS_RPL (getprogname, const char *, (void)); +# else +# if !1 +# if 1 +_GL_FUNCDECL_SYS (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_SYS (getprogname, const char *, (void)); +# endif +# endif +_GL_CXXALIAS_SYS (getprogname, const char *, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getprogname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getprogname +# if HAVE_RAW_DECL_GETPROGNAME +_GL_WARN_ON_USE (getprogname, "getprogname is unportable - " + "use gnulib module getprogname for portability"); +# endif +#endif + +#if 0 +/* Assuming *OPTIONP is a comma separated list of elements of the form + "token" or "token=value", getsubopt parses the first of these elements. + If the first element refers to a "token" that is member of the given + NULL-terminated array of tokens: + - It replaces the comma with a NUL byte, updates *OPTIONP to point past + the first option and the comma, sets *VALUEP to the value of the + element (or NULL if it doesn't contain an "=" sign), + - It returns the index of the "token" in the given array of tokens. + Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. + For more details see the POSIX specification. + https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getsubopt +# define getsubopt rpl_getsubopt +# endif +_GL_FUNCDECL_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep)); +# else +# if !1 +_GL_FUNCDECL_SYS (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep) + _GL_ARG_NONNULL ((1, 2, 3))); +# endif +_GL_CXXALIAS_SYS (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getsubopt); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getsubopt +# if HAVE_RAW_DECL_GETSUBOPT +_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " + "use gnulib module getsubopt for portability"); +# endif +#endif + +#if 0 +/* Change the ownership and access permission of the slave side of the + pseudo-terminal whose master side is specified by FD. */ +# if !1 +_GL_FUNCDECL_SYS (grantpt, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (grantpt, int, (int fd)); +_GL_CXXALIASWARN (grantpt); +#elif defined GNULIB_POSIXCHECK +# undef grantpt +# if HAVE_RAW_DECL_GRANTPT +_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " + "use gnulib module grantpt for portability"); +# endif +#endif + +/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not + rely on GNU or POSIX semantics for malloc and realloc (for example, + by never specifying a zero size), so it does not need malloc or + realloc to be redefined. */ +#if 0 +# if (0 && 0) \ + || (0 && 0) +# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ + || _GL_USE_STDLIB_ALLOC) +# undef malloc +# define malloc rpl_malloc +# endif +_GL_FUNCDECL_RPL (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (malloc, void *, (size_t size)); +# else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (malloc, void *, (size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (malloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined malloc +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef malloc +/* Assume malloc is always declared. */ +_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " + "use gnulib module malloc-posix for portability"); +# endif +#endif + +/* Return maximum number of bytes of a multibyte character. */ +#if 0 +# if !GNULIB_defined_MB_CUR_MAX +static inline +int gl_MB_CUR_MAX (void) +{ + /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ + return MB_CUR_MAX + (MB_CUR_MAX == 3); +} +# undef MB_CUR_MAX +# define MB_CUR_MAX gl_MB_CUR_MAX () +# define GNULIB_defined_MB_CUR_MAX 1 +# endif +#endif + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbstowcs +# define mbstowcs rpl_mbstowcs +# endif +_GL_FUNCDECL_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# else +_GL_CXXALIAS_SYS (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbstowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbstowcs +# if HAVE_RAW_DECL_MBSTOWCS +_GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - " + "use gnulib module mbstowcs for portability"); +# endif +#endif + +/* Convert a multibyte character to a wide character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbtowc +# define mbtowc rpl_mbtowc +# endif +_GL_FUNCDECL_RPL (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +_GL_CXXALIAS_RPL (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +# endif +_GL_CXXALIAS_SYS (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbtowc); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbtowc +# if HAVE_RAW_DECL_MBTOWC +_GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " + "use gnulib module mbtowc for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary directory from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the directory name unique. + Returns TEMPLATE, or a null pointer if it cannot get a unique name. + The directory is created mode 700. */ +# if !1 +_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); +_GL_CXXALIASWARN (mkdtemp); +#elif defined GNULIB_POSIXCHECK +# undef mkdtemp +# if HAVE_RAW_DECL_MKDTEMP +_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " + "use gnulib module mkdtemp for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + The file is then created, with the specified flags, ensuring it didn't exist + before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemp +# define mkostemp rpl_mkostemp +# endif +_GL_FUNCDECL_RPL (mkostemp, int, (char * /*template*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemp, int, (char * /*template*/, int /*flags*/)); +# else +# if !1 +_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mkostemp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mkostemp +# if HAVE_RAW_DECL_MKOSTEMP +_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " + "use gnulib module mkostemp for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE before a suffix of length + SUFFIXLEN must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + The file is then created, with the specified flags, ensuring it didn't exist + before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemps +# define mkostemps rpl_mkostemps +# endif +_GL_FUNCDECL_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# else +# if !1 +_GL_FUNCDECL_SYS (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mkostemps); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mkostemps +# if HAVE_RAW_DECL_MKOSTEMPS +_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " + "use gnulib module mkostemps for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The file is then created, ensuring it didn't exist before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mkstemp rpl_mkstemp +# endif +_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); +# endif +_GL_CXXALIASWARN (mkstemp); +#elif defined GNULIB_POSIXCHECK +# undef mkstemp +# if HAVE_RAW_DECL_MKSTEMP +_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " + "use gnulib module mkstemp for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE prior to a suffix of length + SUFFIXLEN must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The file is then created, ensuring it didn't exist before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if !1 +_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); +_GL_CXXALIASWARN (mkstemps); +#elif defined GNULIB_POSIXCHECK +# undef mkstemps +# if HAVE_RAW_DECL_MKSTEMPS +_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " + "use gnulib module mkstemps for portability"); +# endif +#endif + +#if 1 +/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::mktemp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mktemp +# define mktemp _mktemp +# endif +_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/)); +# else +_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/)); +# endif +_GL_CXXALIASWARN (mktemp); +#endif + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_memalign +# define posix_memalign rpl_posix_memalign +# endif +_GL_FUNCDECL_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# else +# if 1 +_GL_CXXALIAS_SYS (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# endif +# endif +# if __GLIBC__ >= 2 && 1 +_GL_CXXALIASWARN (posix_memalign); +# endif +#elif defined GNULIB_POSIXCHECK +# undef posix_memalign +# if HAVE_RAW_DECL_POSIX_MEMALIGN +_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " + "use gnulib module posix_memalign for portability"); +# endif +#endif + +#if 0 +/* Return an FD open to the master side of a pseudo-terminal. Flags should + include O_RDWR, and may also include O_NOCTTY. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_openpt +# define posix_openpt rpl_posix_openpt +# endif +_GL_FUNCDECL_RPL (posix_openpt, int, (int flags)); +_GL_CXXALIAS_RPL (posix_openpt, int, (int flags)); +# else +# if !1 +_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); +# endif +_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (posix_openpt); +# endif +#elif defined GNULIB_POSIXCHECK +# undef posix_openpt +# if HAVE_RAW_DECL_POSIX_OPENPT +_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " + "use gnulib module posix_openpt for portability"); +# endif +#endif + +#if 0 +/* Return the pathname of the pseudo-terminal slave associated with + the master FD is open on, or NULL on errors. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ptsname +# define ptsname rpl_ptsname +# endif +_GL_FUNCDECL_RPL (ptsname, char *, (int fd)); +_GL_CXXALIAS_RPL (ptsname, char *, (int fd)); +# else +# if !1 +_GL_FUNCDECL_SYS (ptsname, char *, (int fd)); +# endif +_GL_CXXALIAS_SYS (ptsname, char *, (int fd)); +# endif +_GL_CXXALIASWARN (ptsname); +#elif defined GNULIB_POSIXCHECK +# undef ptsname +# if HAVE_RAW_DECL_PTSNAME +_GL_WARN_ON_USE (ptsname, "ptsname is not portable - " + "use gnulib module ptsname for portability"); +# endif +#endif + +#if 0 +/* Set the pathname of the pseudo-terminal slave associated with + the master FD is open on and return 0, or set errno and return + non-zero on errors. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ptsname_r +# define ptsname_r rpl_ptsname_r +# endif +_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +# ifndef GNULIB_defined_ptsname_r +# define GNULIB_defined_ptsname_r (!1 || 0) +# endif +_GL_CXXALIASWARN (ptsname_r); +#elif defined GNULIB_POSIXCHECK +# undef ptsname_r +# if HAVE_RAW_DECL_PTSNAME_R +_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " + "use gnulib module ptsname_r for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv rpl_putenv +# endif +_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (putenv, int, (char *string)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +_GL_CXXALIAS_MDA (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); +# else +_GL_CXXALIAS_SYS (putenv, int, (char *string)); +# endif +_GL_CXXALIASWARN (putenv); +#elif 1 +/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putenv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +/* Need to cast, because on mingw, the parameter is either + 'const char *string' or 'char *string'. */ +_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); +# else +_GL_CXXALIAS_SYS (putenv, int, (char *string)); +# endif +_GL_CXXALIASWARN (putenv); +#endif + +#if 0 +/* Sort an array of NMEMB elements, starting at address BASE, each element + occupying SIZE bytes, in ascending order according to the comparison + function COMPARE. */ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_qsort_r_fn_types +typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *); +# define GNULIB_defined_qsort_r_fn_types 1 +# endif +# ifdef __cplusplus +} +# endif +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef qsort_r +# define qsort_r rpl_qsort_r +# endif +_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg) _GL_ARG_NONNULL ((1, 4))); +_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg)); +# else +# if !1 +_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg) _GL_ARG_NONNULL ((1, 4))); +# endif +_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg)); +# endif +_GL_CXXALIASWARN (qsort_r); +#elif defined GNULIB_POSIXCHECK +# undef qsort_r +# if HAVE_RAW_DECL_QSORT_R +_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " + "use gnulib module qsort_r for portability"); +# endif +#endif + + +#if 0 +# if !1 +# ifndef RAND_MAX +# define RAND_MAX 2147483647 +# endif +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef random +# define random rpl_random +# endif +_GL_FUNCDECL_RPL (random, long, (void)); +_GL_CXXALIAS_RPL (random, long, (void)); +# else +# if !1 +_GL_FUNCDECL_SYS (random, long, (void)); +# endif +/* Need to cast, because on Haiku, the return type is + int. */ +_GL_CXXALIAS_SYS_CAST (random, long, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (random); +# endif +#elif defined GNULIB_POSIXCHECK +# undef random +# if HAVE_RAW_DECL_RANDOM +_GL_WARN_ON_USE (random, "random is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef srandom +# define srandom rpl_srandom +# endif +_GL_FUNCDECL_RPL (srandom, void, (unsigned int seed)); +_GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); +# else +# if !1 +_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); +# endif +/* Need to cast, because on FreeBSD, the first parameter is + unsigned long seed. */ +_GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (srandom); +# endif +#elif defined GNULIB_POSIXCHECK +# undef srandom +# if HAVE_RAW_DECL_SRANDOM +_GL_WARN_ON_USE (srandom, "srandom is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef initstate +# define initstate rpl_initstate +# endif +_GL_FUNCDECL_RPL (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size)); +# else +# if !1 || !1 +_GL_FUNCDECL_SYS (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size) + _GL_ARG_NONNULL ((2))); +# endif +/* Need to cast, because on FreeBSD, the first parameter is + unsigned long seed. */ +_GL_CXXALIAS_SYS_CAST (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (initstate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef initstate +# if HAVE_RAW_DECL_INITSTATE +_GL_WARN_ON_USE (initstate, "initstate is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setstate +# define setstate rpl_setstate +# endif +_GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (setstate, char *, (char *arg_state)); +# else +# if !1 || !1 +_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Mac OS X 10.13, HP-UX, Solaris the first parameter + is const char *arg_state. */ +_GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (setstate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef setstate +# if HAVE_RAW_DECL_SETSTATE +_GL_WARN_ON_USE (setstate, "setstate is unportable - " + "use gnulib module random for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef random_r +# define random_r rpl_random_r +# endif +_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result)); +# else +# if !1 +_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); +# endif +_GL_CXXALIASWARN (random_r); +#elif defined GNULIB_POSIXCHECK +# undef random_r +# if HAVE_RAW_DECL_RANDOM_R +_GL_WARN_ON_USE (random_r, "random_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef srandom_r +# define srandom_r rpl_srandom_r +# endif +_GL_FUNCDECL_RPL (srandom_r, int, + (unsigned int seed, struct random_data *rand_state) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (srandom_r, int, + (unsigned int seed, struct random_data *rand_state)); +# else +# if !1 +_GL_FUNCDECL_SYS (srandom_r, int, + (unsigned int seed, struct random_data *rand_state) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (srandom_r, int, + (unsigned int seed, struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (srandom_r); +#elif defined GNULIB_POSIXCHECK +# undef srandom_r +# if HAVE_RAW_DECL_SRANDOM_R +_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef initstate_r +# define initstate_r rpl_initstate_r +# endif +_GL_FUNCDECL_RPL (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state) + _GL_ARG_NONNULL ((2, 4))); +_GL_CXXALIAS_RPL (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state)); +# else +# if !1 +_GL_FUNCDECL_SYS (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state) + _GL_ARG_NONNULL ((2, 4))); +# endif +/* Need to cast, because on Haiku, the third parameter is + unsigned long buf_size. */ +_GL_CXXALIAS_SYS_CAST (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (initstate_r); +#elif defined GNULIB_POSIXCHECK +# undef initstate_r +# if HAVE_RAW_DECL_INITSTATE_R +_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setstate_r +# define setstate_r rpl_setstate_r +# endif +_GL_FUNCDECL_RPL (setstate_r, int, + (char *arg_state, struct random_data *rand_state) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (setstate_r, int, + (char *arg_state, struct random_data *rand_state)); +# else +# if !1 +_GL_FUNCDECL_SYS (setstate_r, int, + (char *arg_state, struct random_data *rand_state) + _GL_ARG_NONNULL ((1, 2))); +# endif +/* Need to cast, because on Haiku, the first parameter is + void *arg_state. */ +_GL_CXXALIAS_SYS_CAST (setstate_r, int, + (char *arg_state, struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (setstate_r); +#elif defined GNULIB_POSIXCHECK +# undef setstate_r +# if HAVE_RAW_DECL_SETSTATE_R +_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + + +#if 0 +# if (0 && 0) \ + || (0 && 0) +# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ + || _GL_USE_STDLIB_ALLOC) +# undef realloc +# define realloc rpl_realloc +# endif +_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); +# else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (realloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined realloc +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef realloc +/* Assume realloc is always declared. */ +_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " + "use gnulib module realloc-posix for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef reallocarray +# define reallocarray rpl_reallocarray +# endif +_GL_FUNCDECL_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +_GL_CXXALIAS_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# endif +_GL_CXXALIAS_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (reallocarray); +# endif +#elif defined GNULIB_POSIXCHECK +# undef reallocarray +# if HAVE_RAW_DECL_REALLOCARRAY +_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " + "use gnulib module reallocarray for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define realpath rpl_realpath +# endif +_GL_FUNCDECL_RPL (realpath, char *, + (const char *restrict name, char *restrict resolved) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (realpath, char *, + (const char *restrict name, char *restrict resolved)); +# else +# if !1 +_GL_FUNCDECL_SYS (realpath, char *, + (const char *restrict name, char *restrict resolved) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (realpath, char *, + (const char *restrict name, char *restrict resolved)); +# endif +_GL_CXXALIASWARN (realpath); +#elif defined GNULIB_POSIXCHECK +# undef realpath +# if HAVE_RAW_DECL_REALPATH +_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " + "canonicalize or canonicalize-lgpl for portability"); +# endif +#endif + +#if 0 +/* Test a user response to a question. + Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ +# if !1 +_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); +_GL_CXXALIASWARN (rpmatch); +#elif defined GNULIB_POSIXCHECK +# undef rpmatch +# if HAVE_RAW_DECL_RPMATCH +_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " + "use gnulib module rpmatch for portability"); +# endif +#endif + +#if 0 +/* Look up NAME in the environment, returning 0 in insecure situations. */ +# if !1 +_GL_FUNCDECL_SYS (secure_getenv, char *, + (char const *name) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); +_GL_CXXALIASWARN (secure_getenv); +#elif defined GNULIB_POSIXCHECK +# undef secure_getenv +# if HAVE_RAW_DECL_SECURE_GETENV +_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " + "use gnulib module secure_getenv for portability"); +# endif +#endif + +#if 0 +/* Set NAME to VALUE in the environment. + If REPLACE is nonzero, overwrite an existing value. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setenv +# define setenv rpl_setenv +# endif +_GL_FUNCDECL_RPL (setenv, int, + (const char *name, const char *value, int replace) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (setenv, int, + (const char *name, const char *value, int replace)); +# else +# if !1 +_GL_FUNCDECL_SYS (setenv, int, + (const char *name, const char *value, int replace) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (setenv, int, + (const char *name, const char *value, int replace)); +# endif +# if !(0 && !1) +_GL_CXXALIASWARN (setenv); +# endif +#elif defined GNULIB_POSIXCHECK +# undef setenv +# if HAVE_RAW_DECL_SETENV +_GL_WARN_ON_USE (setenv, "setenv is unportable - " + "use gnulib module setenv for portability"); +# endif +#endif + +#if 0 + /* Parse a double from STRING, updating ENDP if appropriate. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtod rpl_strtod +# endif +# define GNULIB_defined_strtod_function 1 +_GL_FUNCDECL_RPL (strtod, double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtod, double, + (const char *restrict str, char **restrict endp)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtod, double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtod, double, + (const char *restrict str, char **restrict endp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtod); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtod +# if HAVE_RAW_DECL_STRTOD +_GL_WARN_ON_USE (strtod, "strtod is unportable - " + "use gnulib module strtod for portability"); +# endif +#endif + +#if 0 + /* Parse a 'long double' from STRING, updating ENDP if appropriate. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtold rpl_strtold +# endif +# define GNULIB_defined_strtold_function 1 +_GL_FUNCDECL_RPL (strtold, long double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtold, long double, + (const char *restrict str, char **restrict endp)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtold, long double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtold, long double, + (const char *restrict str, char **restrict endp)); +# endif +_GL_CXXALIASWARN (strtold); +#elif defined GNULIB_POSIXCHECK +# undef strtold +# if HAVE_RAW_DECL_STRTOLD +_GL_WARN_ON_USE (strtold, "strtold is unportable - " + "use gnulib module strtold for portability"); +# endif +#endif + +#if 0 +/* Parse a signed integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is set + to ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtol rpl_strtol +# endif +# define GNULIB_defined_strtol_function 1 +_GL_FUNCDECL_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtol); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtol +# if HAVE_RAW_DECL_STRTOL +_GL_WARN_ON_USE (strtol, "strtol is unportable - " + "use gnulib module strtol for portability"); +# endif +#endif + +#if 0 +/* Parse a signed integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set + to ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoll rpl_strtoll +# endif +# define GNULIB_defined_strtoll_function 1 +_GL_FUNCDECL_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +_GL_CXXALIASWARN (strtoll); +#elif defined GNULIB_POSIXCHECK +# undef strtoll +# if HAVE_RAW_DECL_STRTOLL +_GL_WARN_ON_USE (strtoll, "strtoll is unportable - " + "use gnulib module strtoll for portability"); +# endif +#endif + +#if 0 +/* Parse an unsigned integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is ULONG_MAX, and errno is set to ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoul rpl_strtoul +# endif +# define GNULIB_defined_strtoul_function 1 +_GL_FUNCDECL_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtoul); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtoul +# if HAVE_RAW_DECL_STRTOUL +_GL_WARN_ON_USE (strtoul, "strtoul is unportable - " + "use gnulib module strtoul for portability"); +# endif +#endif + +#if 0 +/* Parse an unsigned integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is ULLONG_MAX, and errno is set to + ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoull rpl_strtoull +# endif +# define GNULIB_defined_strtoull_function 1 +_GL_FUNCDECL_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +_GL_CXXALIASWARN (strtoull); +#elif defined GNULIB_POSIXCHECK +# undef strtoull +# if HAVE_RAW_DECL_STRTOULL +_GL_WARN_ON_USE (strtoull, "strtoull is unportable - " + "use gnulib module strtoull for portability"); +# endif +#endif + +#if 0 +/* Unlock the slave side of the pseudo-terminal whose master side is specified + by FD, so that it can be opened. */ +# if !1 +_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); +_GL_CXXALIASWARN (unlockpt); +#elif defined GNULIB_POSIXCHECK +# undef unlockpt +# if HAVE_RAW_DECL_UNLOCKPT +_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " + "use gnulib module unlockpt for portability"); +# endif +#endif + +#if 0 +/* Remove the variable NAME from the environment. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unsetenv +# define unsetenv rpl_unsetenv +# endif +_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); +# else +# if !1 +_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); +# endif +# if !(0 && !1) +_GL_CXXALIASWARN (unsetenv); +# endif +#elif defined GNULIB_POSIXCHECK +# undef unsetenv +# if HAVE_RAW_DECL_UNSETENV +_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " + "use gnulib module unsetenv for portability"); +# endif +#endif + +/* Convert a wide character to a multibyte character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctomb +# define wctomb rpl_wctomb +# endif +_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); +_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); +# else +_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wctomb); +# endif +#endif + + +#endif /* _GL_STDLIB_H */ +#endif /* _GL_STDLIB_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/string.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/string.h new file mode 100644 index 000000000..a7a268dd3 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/string.h @@ -0,0 +1,1953 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A GNU-like . + + Copyright (C) 1995-1996, 2001-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +#if defined _GL_ALREADY_INCLUDING_STRING_H +/* Special invocation convention: + - On OS X/NetBSD we have a sequence of nested includes + -> -> "string.h" + In this situation system _chk variants due to -D_FORTIFY_SOURCE + might be used after any replacements defined here. */ + +#include "../ucrt/string.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_STRING_H + +#define _GL_ALREADY_INCLUDING_STRING_H + +/* The include_next requires a split double-inclusion guard. */ +#include "../ucrt/string.h" + +#undef _GL_ALREADY_INCLUDING_STRING_H + +#ifndef _GL_STRING_H +#define _GL_STRING_H + +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* NetBSD 5.0 mis-defines NULL. */ +#include + +/* MirBSD defines mbslen as a macro. */ +#if 0 && defined __MirBSD__ +# include +#endif + +/* NetBSD 5.0 declares strsignal in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ + && ! defined __GLIBC__ +# include +#endif + +/* AIX 7.2 and Android 13 declare ffsl and ffsll in , not in + . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if ((0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _AIX || defined __ANDROID__)) \ + && ! defined __GLIBC__ +# include +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif + +/* Clear a block of memory. The compiler will not delete a call to + this function, even if the block is dead after the call. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (explicit_bzero, void, + (void *__dest, size_t __n) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n)); +_GL_CXXALIASWARN (explicit_bzero); +#elif defined GNULIB_POSIXCHECK +# undef explicit_bzero +# if HAVE_RAW_DECL_EXPLICIT_BZERO +_GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - " + "use gnulib module explicit_bzero for portability"); +# endif +#endif + +/* Find the index of the least-significant set bit. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (ffsl, int, (long int i)); +# endif +_GL_CXXALIAS_SYS (ffsl, int, (long int i)); +_GL_CXXALIASWARN (ffsl); +#elif defined GNULIB_POSIXCHECK +# undef ffsl +# if HAVE_RAW_DECL_FFSL +_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); +# endif +#endif + + +/* Find the index of the least-significant set bit. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define ffsll rpl_ffsll +# endif +_GL_FUNCDECL_RPL (ffsll, int, (long long int i)); +_GL_CXXALIAS_RPL (ffsll, int, (long long int i)); +# else +# if !1 +_GL_FUNCDECL_SYS (ffsll, int, (long long int i)); +# endif +_GL_CXXALIAS_SYS (ffsll, int, (long long int i)); +# endif +_GL_CXXALIASWARN (ffsll); +#elif defined GNULIB_POSIXCHECK +# undef ffsll +# if HAVE_RAW_DECL_FFSLL +_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'memccpy' to '_memccpy', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::memccpy always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memccpy +# define memccpy _memccpy +# endif +_GL_CXXALIAS_MDA (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# else +_GL_CXXALIAS_SYS (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# endif +_GL_CXXALIASWARN (memccpy); +#endif + + +/* Return the first instance of C within N bytes of S, or NULL. */ +#if 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memchr +# define memchr rpl_memchr +# endif +_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); +# else + /* On some systems, this function is defined as an overloaded function: + extern "C" { const void * std::memchr (const void *, int, size_t); } + extern "C++" { void * std::memchr (void *, int, size_t); } */ +_GL_CXXALIAS_SYS_CAST2 (memchr, + void *, (void const *__s, int __c, size_t __n), + void const *, (void const *__s, int __c, size_t __n)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memchr, void *, + (void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (memchr, void const *, + (void const *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (memchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef memchr +/* Assume memchr is always declared. */ +_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +#endif + +/* Return the first occurrence of NEEDLE in HAYSTACK. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define memmem rpl_memmem +# endif +_GL_FUNCDECL_RPL (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 3))); +_GL_CXXALIAS_RPL (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 3))); +# endif +_GL_CXXALIAS_SYS (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len)); +# endif +_GL_CXXALIASWARN (memmem); +#elif defined GNULIB_POSIXCHECK +# undef memmem +# if HAVE_RAW_DECL_MEMMEM +_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " + "use gnulib module memmem-simple for portability, " + "and module memmem for speed" ); +# endif +#endif + +/* Copy N bytes of SRC to DEST, return pointer to bytes after the + last written byte. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mempcpy +# define mempcpy rpl_mempcpy +# endif +_GL_FUNCDECL_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n)); +# else +# if !1 +_GL_FUNCDECL_SYS (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mempcpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mempcpy +# if HAVE_RAW_DECL_MEMPCPY +_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " + "use gnulib module mempcpy for portability"); +# endif +#endif + +/* Search backwards through a block for a byte (specified as an int). */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const void * std::memrchr (const void *, int, size_t); } + extern "C++" { void * std::memrchr (void *, int, size_t); } */ +_GL_CXXALIAS_SYS_CAST2 (memrchr, + void *, (void const *, int, size_t), + void const *, (void const *, int, size_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memrchr, void *, + (void *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (memrchr, void const *, + (void const *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (memrchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef memrchr +# if HAVE_RAW_DECL_MEMRCHR +_GL_WARN_ON_USE (memrchr, "memrchr is unportable - " + "use gnulib module memrchr for portability"); +# endif +#endif + +/* Overwrite a block of memory. The compiler will not optimize + effects away, even if the block is dead after the call. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (memset_explicit, void *, + (void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n)); +_GL_CXXALIASWARN (memset_explicit); +#elif defined GNULIB_POSIXCHECK +# undef memset_explicit +# if HAVE_RAW_DECL_MEMSET_EXPLICIT +_GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - " + "use gnulib module memset_explicit for portability"); +# endif +#endif + +/* Find the first occurrence of C in S. More efficient than + memchr(S,C,N), at the expense of undefined behavior if C does not + occur within N bytes. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const void * std::rawmemchr (const void *, int); } + extern "C++" { void * std::rawmemchr (void *, int); } */ +_GL_CXXALIAS_SYS_CAST2 (rawmemchr, + void *, (void const *__s, int __c_in), + void const *, (void const *__s, int __c_in)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (rawmemchr, void *, + (void *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (rawmemchr, void const *, + (void const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +# else +_GL_CXXALIASWARN (rawmemchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef rawmemchr +# if HAVE_RAW_DECL_RAWMEMCHR +_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " + "use gnulib module rawmemchr for portability"); +# endif +#endif + +/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef stpcpy +# define stpcpy rpl_stpcpy +# endif +_GL_FUNCDECL_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src)); +# else +# if !1 +_GL_FUNCDECL_SYS (stpcpy, char *, + (char *restrict __dst, char const *restrict __src) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (stpcpy, char *, + (char *restrict __dst, char const *restrict __src)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (stpcpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef stpcpy +# if HAVE_RAW_DECL_STPCPY +_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " + "use gnulib module stpcpy for portability"); +# endif +#endif + +/* Copy no more than N bytes of SRC to DST, returning a pointer past the + last non-NUL byte written into DST. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef stpncpy +# define stpncpy rpl_stpncpy +# endif +_GL_FUNCDECL_RPL (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (stpncpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef stpncpy +# if HAVE_RAW_DECL_STPNCPY +_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + "use gnulib module stpncpy for portability"); +# endif +#endif + +#if defined GNULIB_POSIXCHECK +/* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +# undef strchr +/* Assume strchr is always declared. */ +_GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), + "strchr cannot work correctly on character strings " + "in some multibyte locales - " + "use mbschr if you care about internationalization"); +#endif + +/* Find the first occurrence of C in S or the final NUL byte. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strchrnul rpl_strchrnul +# endif +_GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strchrnul, char *, + (const char *str, int ch)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const char * std::strchrnul (const char *, int); } + extern "C++" { char * std::strchrnul (char *, int); } */ +_GL_CXXALIAS_SYS_CAST2 (strchrnul, + char *, (char const *__s, int __c_in), + char const *, (char const *__s, int __c_in)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strchrnul, char *, + (char *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strchrnul, char const *, + (char const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (strchrnul); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strchrnul +# if HAVE_RAW_DECL_STRCHRNUL +_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " + "use gnulib module strchrnul for portability"); +# endif +#endif + +/* Duplicate S, returning an identical malloc'd string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup rpl_strdup +# endif +_GL_FUNCDECL_RPL (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); +# else +# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup + /* strdup exists as a function and as a macro. Get rid of the macro. */ +# undef strdup +# endif +# if (!1 || __GNUC__ >= 11) && !defined strdup +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); +# endif +_GL_CXXALIASWARN (strdup); +#else +# if __GNUC__ >= 11 && !defined strdup +/* For -Wmismatched-dealloc: Associate strdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strdup +# if HAVE_RAW_DECL_STRDUP +_GL_WARN_ON_USE (strdup, "strdup is unportable - " + "use gnulib module strdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'creat' to '_creat', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::strdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); +# else +# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup +# undef strdup +# endif +_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); +# endif +_GL_CXXALIASWARN (strdup); +# endif +#endif + +/* Append no more than N characters from SRC onto DEST. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strncat +# define strncat rpl_strncat +# endif +_GL_FUNCDECL_RPL (strncat, char *, + (char *restrict dest, const char *restrict src, size_t n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (strncat, char *, + (char *restrict dest, const char *restrict src, size_t n)); +# else +_GL_CXXALIAS_SYS (strncat, char *, + (char *restrict dest, const char *restrict src, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strncat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strncat +# if HAVE_RAW_DECL_STRNCAT +_GL_WARN_ON_USE (strncat, "strncat is unportable - " + "use gnulib module strncat for portability"); +# endif +#endif + +/* Return a newly allocated copy of at most N bytes of STRING. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strndup +# define strndup rpl_strndup +# endif +_GL_FUNCDECL_RPL (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); +# else +# if !1 || (__GNUC__ >= 11 && !defined strndup) +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); +# endif +_GL_CXXALIASWARN (strndup); +#else +# if __GNUC__ >= 11 && !defined strndup +/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strndup +# if HAVE_RAW_DECL_STRNDUP +_GL_WARN_ON_USE (strndup, "strndup is unportable - " + "use gnulib module strndup for portability"); +# endif +# endif +#endif + +/* Find the length (number of bytes) of STRING, but scan at most + MAXLEN bytes. If no '\0' terminator is found in that many bytes, + return MAXLEN. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strnlen +# define strnlen rpl_strnlen +# endif +_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)); +# endif +_GL_CXXALIASWARN (strnlen); +#elif defined GNULIB_POSIXCHECK +# undef strnlen +# if HAVE_RAW_DECL_STRNLEN +_GL_WARN_ON_USE (strnlen, "strnlen is unportable - " + "use gnulib module strnlen for portability"); +# endif +#endif + +#if defined GNULIB_POSIXCHECK +/* strcspn() assumes the second argument is a list of single-byte characters. + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +# undef strcspn +/* Assume strcspn is always declared. */ +_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " + "in multibyte locales - " + "use mbscspn if you care about internationalization"); +#endif + +/* Find the first occurrence in S of any character in ACCEPT. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C" { const char * strpbrk (const char *, const char *); } + extern "C++" { char * strpbrk (char *, const char *); } */ +_GL_CXXALIAS_SYS_CAST2 (strpbrk, + char *, (char const *__s, char const *__accept), + const char *, (char const *__s, char const *__accept)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strpbrk, char *, + (char *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strpbrk, char const *, + (char const *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (strpbrk); +# endif +# if defined GNULIB_POSIXCHECK +/* strpbrk() assumes the second argument is a list of single-byte characters. + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +# undef strpbrk +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " + "in multibyte locales - " + "use mbspbrk if you care about internationalization"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strpbrk +# if HAVE_RAW_DECL_STRPBRK +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk is unportable - " + "use gnulib module strpbrk for portability"); +# endif +#endif + +#if defined GNULIB_POSIXCHECK +/* strspn() assumes the second argument is a list of single-byte characters. + Even in this simple case, it cannot work with multibyte strings. */ +# undef strspn +/* Assume strspn is always declared. */ +_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + "in multibyte locales - " + "use mbsspn if you care about internationalization"); +#endif + +#if defined GNULIB_POSIXCHECK +/* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +# undef strrchr +/* Assume strrchr is always declared. */ +_GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), + "strrchr cannot work correctly on character strings " + "in some multibyte locales - " + "use mbsrchr if you care about internationalization"); +#endif + +/* Search the next delimiter (char listed in DELIM) starting at *STRINGP. + If one is found, overwrite it with a NUL, and advance *STRINGP + to point to the next char after it. Otherwise, set *STRINGP to NULL. + If *STRINGP was already NULL, nothing happens. + Return the old value of *STRINGP. + + This is a variant of strtok() that is multithread-safe and supports + empty fields. + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + Caveat: It doesn't work with multibyte strings unless all of the delimiter + characters are ASCII characters < 0x30. + + See also strtok_r(). */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (strsep, char *, + (char **restrict __stringp, char const *restrict __delim) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (strsep, char *, + (char **restrict __stringp, char const *restrict __delim)); +_GL_CXXALIASWARN (strsep); +# if defined GNULIB_POSIXCHECK +# undef strsep +_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " + "in multibyte locales - " + "use mbssep if you care about internationalization"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strsep +# if HAVE_RAW_DECL_STRSEP +_GL_WARN_ON_USE (strsep, "strsep is unportable - " + "use gnulib module strsep for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strstr rpl_strstr +# endif +_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); +# else + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const char * strstr (const char *, const char *); } + extern "C++" { char * strstr (char *, const char *); } */ +_GL_CXXALIAS_SYS_CAST2 (strstr, + char *, (const char *haystack, const char *needle), + const char *, (const char *haystack, const char *needle)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strstr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strstr, const char *, + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (strstr); +# endif +#elif defined GNULIB_POSIXCHECK +/* strstr() does not work with multibyte strings if the locale encoding is + different from UTF-8: + POSIX says that it operates on "strings", and "string" in POSIX is defined + as a sequence of bytes, not of characters. */ +# undef strstr +/* Assume strstr is always declared. */ +_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " + "work correctly on character strings in most " + "multibyte locales - " + "use mbsstr if you care about internationalization, " + "or use strstr if you care about speed"); +#endif + +/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive + comparison. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strcasestr rpl_strcasestr +# endif +_GL_FUNCDECL_RPL (strcasestr, char *, + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (strcasestr, char *, + (const char *haystack, const char *needle)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (strcasestr, char *, + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const char * strcasestr (const char *, const char *); } + extern "C++" { char * strcasestr (char *, const char *); } */ +_GL_CXXALIAS_SYS_CAST2 (strcasestr, + char *, (const char *haystack, const char *needle), + const char *, (const char *haystack, const char *needle)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strcasestr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strcasestr, const char *, + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (strcasestr); +# endif +#elif defined GNULIB_POSIXCHECK +/* strcasestr() does not work with multibyte strings: + It is a glibc extension, and glibc implements it only for unibyte + locales. */ +# undef strcasestr +# if HAVE_RAW_DECL_STRCASESTR +_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " + "strings in multibyte locales - " + "use mbscasestr if you care about " + "internationalization, or use c-strcasestr if you want " + "a locale independent function"); +# endif +#endif + +/* Parse S into tokens separated by characters in DELIM. + If S is NULL, the saved pointer in SAVE_PTR is used as + the next starting point. For example: + char s[] = "-abc-=-def"; + char *sp; + x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" + x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL + x = strtok_r(NULL, "=", &sp); // x = NULL + // s = "abc\0-def\0" + + This is a variant of strtok() that is multithread-safe. + + For the POSIX documentation for this function, see: + https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtok.html + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + Caveat: It doesn't work with multibyte strings unless all of the delimiter + characters are ASCII characters < 0x30. + + See also strsep(). */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtok_r +# define strtok_r rpl_strtok_r +# endif +_GL_FUNCDECL_RPL (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr)); +# else +# if 0 || defined GNULIB_POSIXCHECK +# undef strtok_r +# endif +# if ! 1 +_GL_FUNCDECL_SYS (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr) + _GL_ARG_NONNULL ((2, 3))); +# endif +_GL_CXXALIAS_SYS (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr)); +# endif +_GL_CXXALIASWARN (strtok_r); +# if defined GNULIB_POSIXCHECK +_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " + "strings in multibyte locales - " + "use mbstok_r if you care about internationalization"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtok_r +# if HAVE_RAW_DECL_STRTOK_R +_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " + "use gnulib module strtok_r for portability"); +# endif +#endif + + +/* The following functions are not specified by POSIX. They are gnulib + extensions. */ + +#if 0 +/* Return the number of multibyte characters in the character string STRING. + This considers multibyte characters, unlike strlen, which counts bytes. */ +# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ +# undef mbslen +# endif +# if 0 /* AIX, OSF/1, MirBSD define mbslen already in libc. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbslen rpl_mbslen +# endif +_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); +# else +_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbslen); +# endif +#endif + +#if 0 +/* Return the number of multibyte characters in the character string starting + at STRING and ending at STRING + LEN. */ +_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1)); +#endif + +#if 0 +/* Locate the first single-byte character C in the character string STRING, + and return a pointer to it. Return NULL if C is not found in STRING. + Unlike strchr(), this function works correctly in multibyte locales with + encodings such as GB18030. */ +# if defined __hpux +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbschr rpl_mbschr /* avoid collision with HP-UX function */ +# endif +_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); +# else +_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); +# endif +_GL_CXXALIASWARN (mbschr); +#endif + +#if 0 +/* Locate the last single-byte character C in the character string STRING, + and return a pointer to it. Return NULL if C is not found in STRING. + Unlike strrchr(), this function works correctly in multibyte locales with + encodings such as GB18030. */ +# if defined __hpux || defined __INTERIX +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbsrchr rpl_mbsrchr /* avoid collision with system function */ +# endif +_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); +# else +_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); +# endif +_GL_CXXALIASWARN (mbsrchr); +#endif + +#if 0 +/* Find the first occurrence of the character string NEEDLE in the character + string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. + Unlike strstr(), this function works correctly in multibyte locales with + encodings different from UTF-8. */ +_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Compare the character strings S1 and S2, ignoring case, returning less than, + equal to or greater than zero if S1 is lexicographically less than, equal to + or greater than S2. + Note: This function may, in multibyte locales, return 0 for strings of + different lengths! + Unlike strcasecmp(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Compare the initial segment of the character string S1 consisting of at most + N characters with the initial segment of the character string S2 consisting + of at most N characters, ignoring case, returning less than, equal to or + greater than zero if the initial segment of S1 is lexicographically less + than, equal to or greater than the initial segment of S2. + Note: This function may, in multibyte locales, return 0 for initial segments + of different lengths! + Unlike strncasecmp(), this function works correctly in multibyte locales. + But beware that N is not a byte count but a character count! */ +_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Compare the initial segment of the character string STRING consisting of + at most mbslen (PREFIX) characters with the character string PREFIX, + ignoring case. If the two match, return a pointer to the first byte + after this prefix in STRING. Otherwise, return NULL. + Note: This function may, in multibyte locales, return non-NULL if STRING + is of smaller length than PREFIX! + Unlike strncasecmp(), this function works correctly in multibyte + locales. */ +_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Find the first occurrence of the character string NEEDLE in the character + string HAYSTACK, using case-insensitive comparison. + Note: This function may, in multibyte locales, return success even if + strlen (haystack) < strlen (needle) ! + Unlike strcasestr(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Find the first occurrence in the character string STRING of any character + in the character string ACCEPT. Return the number of bytes from the + beginning of the string to this occurrence, or to the end of the string + if none exists. + Unlike strcspn(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Find the first occurrence in the character string STRING of any character + in the character string ACCEPT. Return the pointer to it, or NULL if none + exists. + Unlike strpbrk(), this function works correctly in multibyte locales. */ +# if defined __hpux +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ +# endif +_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); +# else +_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); +# endif +_GL_CXXALIASWARN (mbspbrk); +#endif + +#if 0 +/* Find the first occurrence in the character string STRING of any character + not in the character string REJECT. Return the number of bytes from the + beginning of the string to this occurrence, or to the end of the string + if none exists. + Unlike strspn(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Search the next delimiter (multibyte character listed in the character + string DELIM) starting at the character string *STRINGP. + If one is found, overwrite it with a NUL, and advance *STRINGP to point + to the next multibyte character after it. Otherwise, set *STRINGP to NULL. + If *STRINGP was already NULL, nothing happens. + Return the old value of *STRINGP. + + This is a variant of mbstok_r() that supports empty fields. + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + + See also mbstok_r(). */ +_GL_EXTERN_C char * mbssep (char **stringp, const char *delim) + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if 0 +/* Parse the character string STRING into tokens separated by characters in + the character string DELIM. + If STRING is NULL, the saved pointer in SAVE_PTR is used as + the next starting point. For example: + char s[] = "-abc-=-def"; + char *sp; + x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" + x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL + x = mbstok_r(NULL, "=", &sp); // x = NULL + // s = "abc\0-def\0" + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + + See also mbssep(). */ +_GL_EXTERN_C char * mbstok_r (char *restrict string, const char *delim, + char **save_ptr) + _GL_ARG_NONNULL ((2, 3)); +#endif + +/* Map any int, typically from errno, into an error message. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerror +# define strerror rpl_strerror +# endif +_GL_FUNCDECL_RPL (strerror, char *, (int)); +_GL_CXXALIAS_RPL (strerror, char *, (int)); +# else +_GL_CXXALIAS_SYS (strerror, char *, (int)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strerror); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strerror +/* Assume strerror is always declared. */ +_GL_WARN_ON_USE (strerror, "strerror is unportable - " + "use gnulib module strerror to guarantee non-NULL result"); +#endif + +/* Map any int, typically from errno, into an error message. Multithread-safe. + Uses the POSIX declaration, not the glibc declaration. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerror_r +# define strerror_r rpl_strerror_r +# endif +_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); +# else +# if !1 +_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); +# endif +# if __GLIBC__ >= 2 && 1 +_GL_CXXALIASWARN (strerror_r); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strerror_r +# if HAVE_RAW_DECL_STRERROR_R +_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " + "use gnulib module strerror_r-posix for portability"); +# endif +#endif + +/* Return the name of the system error code ERRNUM. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerrorname_np +# define strerrorname_np rpl_strerrorname_np +# endif +_GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum)); +_GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum)); +# else +# if !1 +_GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIASWARN (strerrorname_np); +#elif defined GNULIB_POSIXCHECK +# undef strerrorname_np +# if HAVE_RAW_DECL_STRERRORNAME_NP +_GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - " + "use gnulib module strerrorname_np for portability"); +# endif +#endif + +/* Return an abbreviation string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigabbrev_np); +#elif defined GNULIB_POSIXCHECK +# undef sigabbrev_np +# if HAVE_RAW_DECL_SIGABBREV_NP +_GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - " + "use gnulib module sigabbrev_np for portability"); +# endif +#endif + +/* Return an English description string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigdescr_np); +#elif defined GNULIB_POSIXCHECK +# undef sigdescr_np +# if HAVE_RAW_DECL_SIGDESCR_NP +_GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - " + "use gnulib module sigdescr_np for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strsignal rpl_strsignal +# endif +_GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); +_GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); +# endif +/* Need to cast, because on Cygwin 1.5.x systems, the return type is + 'const char *'. */ +_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); +# endif +_GL_CXXALIASWARN (strsignal); +#elif defined GNULIB_POSIXCHECK +# undef strsignal +# if HAVE_RAW_DECL_STRSIGNAL +_GL_WARN_ON_USE (strsignal, "strsignal is unportable - " + "use gnulib module strsignal for portability"); +# endif +#endif + +#if 0 +# if !1 +_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); +_GL_CXXALIASWARN (strverscmp); +#elif defined GNULIB_POSIXCHECK +# undef strverscmp +# if HAVE_RAW_DECL_STRVERSCMP +_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " + "use gnulib module strverscmp for portability"); +# endif +#endif + + +#endif /* _GL_STRING_H */ +#endif /* _GL_STRING_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/sys/types.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/sys/types.h new file mode 100644 index 000000000..1bd6dc076 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/sys/types.h @@ -0,0 +1,114 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Provide a more complete sys/types.h. + + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +#if defined _WIN32 && !defined __CYGWIN__ \ + && (defined __need_off_t || defined __need___off64_t \ + || defined __need_ssize_t || defined __need_time_t) + +/* Special invocation convention inside mingw header files. */ + +#include "../ucrt/sys/types.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_SYS_TYPES_H + +/* The include_next requires a split double-inclusion guard. */ +# define _GL_INCLUDING_SYS_TYPES_H +#include "../ucrt/sys/types.h" +# undef _GL_INCLUDING_SYS_TYPES_H + +#ifndef _GL_SYS_TYPES_H +#define _GL_SYS_TYPES_H + +/* Override off_t if Large File Support is requested on native Windows. */ +#if 0 +/* Same as int64_t in . */ +# if defined _MSC_VER +# define off_t __int64 +# else +# define off_t long long int +# endif +/* Indicator, for gnulib internal purposes. */ +# define _GL_WINDOWS_64_BIT_OFF_T 1 +#endif + +/* Override dev_t and ino_t if distinguishable inodes support is requested + on native Windows. */ +#if 0 + +# if 0 == 2 +/* Experimental, not useful in Windows 10. */ + +/* Define dev_t to a 64-bit type. */ +# if !defined GNULIB_defined_dev_t +typedef unsigned long long int rpl_dev_t; +# undef dev_t +# define dev_t rpl_dev_t +# define GNULIB_defined_dev_t 1 +# endif + +/* Define ino_t to a 128-bit type. */ +# if !defined GNULIB_defined_ino_t +/* MSVC does not have a 128-bit integer type. + GCC has a 128-bit integer type __int128, but only on 64-bit targets. */ +typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t; +# undef ino_t +# define ino_t rpl_ino_t +# define GNULIB_defined_ino_t 1 +# endif + +# else /* 0 == 1 */ + +/* Define ino_t to a 64-bit type. */ +# if !defined GNULIB_defined_ino_t +typedef unsigned long long int rpl_ino_t; +# undef ino_t +# define ino_t rpl_ino_t +# define GNULIB_defined_ino_t 1 +# endif + +# endif + +/* Indicator, for gnulib internal purposes. */ +# define _GL_WINDOWS_STAT_INODES 0 + +#endif + +/* MSVC 9 defines size_t in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (defined _WIN32 && ! defined __CYGWIN__) && ! defined __GLIBC__ +# include +#endif + +#endif /* _GL_SYS_TYPES_H */ +#endif /* _GL_SYS_TYPES_H */ +#endif /* __need_XXX */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/unistd.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/unistd.h new file mode 100644 index 000000000..7f38a2f42 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/unistd.h @@ -0,0 +1,2936 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Substitute for and wrapper around . + Copyright (C) 2003-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_UNISTD_H + +#if __GNUC__ >= 3 + +#endif + + +#if 0 && defined _GL_INCLUDING_UNISTD_H +/* Special invocation convention: + - On Mac OS X 10.3.9 we have a sequence of nested includes + -> -> -> + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. */ + +#include + +#else +/* Normal invocation convention. */ + +/* The include_next requires a split double-inclusion guard. */ +#if 0 +# define _GL_INCLUDING_UNISTD_H +# include +# undef _GL_INCLUDING_UNISTD_H +#endif + +/* Avoid lseek bugs in FreeBSD, macOS . + This bug is fixed after FreeBSD 13; see . + Use macOS "9999" to stand for a future fixed macOS version. */ +#if defined __FreeBSD__ && __FreeBSD__ < 14 +# undef SEEK_DATA +# undef SEEK_HOLE +#elif defined __APPLE__ && defined __MACH__ && defined SEEK_DATA +# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ +# include +# endif +# if (!defined MAC_OS_X_VERSION_MIN_REQUIRED \ + || MAC_OS_X_VERSION_MIN_REQUIRED < 99990000) +# include /* It also defines the two macros. */ +# undef SEEK_DATA +# undef SEEK_HOLE +# endif +#endif + +/* Get all possible declarations of gethostname(). */ +#if 0 && 0 \ + && !defined _GL_INCLUDING_WINSOCK2_H +# define _GL_INCLUDING_WINSOCK2_H +# include +# undef _GL_INCLUDING_WINSOCK2_H +#endif + +#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H +#define _GL_UNISTD_H + +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* NetBSD 5.0 mis-defines NULL. Also get size_t. */ +/* But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif + +/* mingw doesn't define the SEEK_* or *_FILENO macros in . */ +/* MSVC declares 'unlink' in , not in . We must include + it before we #define unlink rpl_unlink. */ +/* Cygwin 1.7.1 declares symlinkat in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ + || ((0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__)) \ + || ((0 || defined GNULIB_POSIXCHECK) \ + && defined __CYGWIN__)) \ + && ! defined __GLIBC__ +# include +#endif + +/* Cygwin 1.7.1 and Android 4.3 declare unlinkat in , not in + . */ +/* But avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && (defined __CYGWIN__ || defined __ANDROID__) \ + && ! defined __GLIBC__ +# include +#endif + +/* mingw fails to declare _exit in . */ +/* mingw, MSVC, BeOS, Haiku declare environ in , not in + . */ +/* Solaris declares getcwd not only in but also in . */ +/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system is + included here. */ +/* But avoid namespace pollution on glibc systems. */ +#if !defined __GLIBC__ && !defined __osf__ +# define __need_system_stdlib_h +# include +# undef __need_system_stdlib_h +#endif + +/* Native Windows platforms declare _chdir, _getcwd, _rmdir in + and/or , not in . + They also declare _access(), _chmod(), _close(), _dup(), _dup2(), _isatty(), + _lseek(), _read(), _unlink(), _write() in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include +# include +#endif + +/* Native Windows platforms declare _execl*, _execv* in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include +#endif + +/* AIX and OSF/1 5.1 declare getdomainname in , not in . + NonStop Kernel declares gethostname in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if ((0 && (defined _AIX || defined __osf__)) \ + || (0 && defined __TANDEM)) \ + && !defined __GLIBC__ +# include +#endif + +/* Mac OS X 10.13, Solaris 11.4, and Android 9.0 declare getentropy in + , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && ((defined __APPLE__ && defined __MACH__) || defined __sun \ + || defined __ANDROID__) \ + && 0 \ + && !defined __GLIBC__ +# include +#endif + +/* Android 4.3 declares fchownat in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ + && !defined __GLIBC__ +# include +#endif + +/* MSVC defines off_t in . + May also define off_t to a 64-bit type on native Windows. */ +/* Get off_t, ssize_t, mode_t. */ +#include + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +/* Get getopt(), optarg, optind, opterr, optopt. */ +/* Also, don't include inside libgettextpo, because we use + the getopt module only in gettext-tools/gnulib-lib/, not in + gettext-tools/libgettextpo/, but there is only a single + GNULIB_UNISTD_H_GETOPT variable for both. */ +#if 0 && 00 && !defined GTPO_CONFIG_H && !defined _GL_SYSTEM_GETOPT +# include +# include +#endif + +_GL_INLINE_HEADER_BEGIN +#ifndef _GL_UNISTD_INLINE +# define _GL_UNISTD_INLINE _GL_INLINE +#endif + +/* Hide some function declarations from . */ + +#if 0 && 0 +# if !defined _GL_SYS_SOCKET_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef socket +# define socket socket_used_without_including_sys_socket_h +# undef connect +# define connect connect_used_without_including_sys_socket_h +# undef accept +# define accept accept_used_without_including_sys_socket_h +# undef bind +# define bind bind_used_without_including_sys_socket_h +# undef getpeername +# define getpeername getpeername_used_without_including_sys_socket_h +# undef getsockname +# define getsockname getsockname_used_without_including_sys_socket_h +# undef getsockopt +# define getsockopt getsockopt_used_without_including_sys_socket_h +# undef listen +# define listen listen_used_without_including_sys_socket_h +# undef recv +# define recv recv_used_without_including_sys_socket_h +# undef send +# define send send_used_without_including_sys_socket_h +# undef recvfrom +# define recvfrom recvfrom_used_without_including_sys_socket_h +# undef sendto +# define sendto sendto_used_without_including_sys_socket_h +# undef setsockopt +# define setsockopt setsockopt_used_without_including_sys_socket_h +# undef shutdown +# define shutdown shutdown_used_without_including_sys_socket_h +# else + _GL_WARN_ON_USE (socket, + "socket() used without including "); + _GL_WARN_ON_USE (connect, + "connect() used without including "); + _GL_WARN_ON_USE (accept, + "accept() used without including "); + _GL_WARN_ON_USE (bind, + "bind() used without including "); + _GL_WARN_ON_USE (getpeername, + "getpeername() used without including "); + _GL_WARN_ON_USE (getsockname, + "getsockname() used without including "); + _GL_WARN_ON_USE (getsockopt, + "getsockopt() used without including "); + _GL_WARN_ON_USE (listen, + "listen() used without including "); + _GL_WARN_ON_USE (recv, + "recv() used without including "); + _GL_WARN_ON_USE (send, + "send() used without including "); + _GL_WARN_ON_USE (recvfrom, + "recvfrom() used without including "); + _GL_WARN_ON_USE (sendto, + "sendto() used without including "); + _GL_WARN_ON_USE (setsockopt, + "setsockopt() used without including "); + _GL_WARN_ON_USE (shutdown, + "shutdown() used without including "); +# endif +# endif +# if !defined _GL_SYS_SELECT_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef select +# define select select_used_without_including_sys_select_h +# else + _GL_WARN_ON_USE (select, + "select() used without including "); +# endif +# endif +#endif + + +/* OS/2 EMX lacks these macros. */ +#ifndef STDIN_FILENO +# define STDIN_FILENO 0 +#endif +#ifndef STDOUT_FILENO +# define STDOUT_FILENO 1 +#endif +#ifndef STDERR_FILENO +# define STDERR_FILENO 2 +#endif + +/* Ensure *_OK macros exist. */ +#ifndef F_OK +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 +#endif + + +/* Declare overridden functions. */ + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access rpl_access +# endif +_GL_FUNCDECL_RPL (access, int, (const char *file, int mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); +#elif defined GNULIB_POSIXCHECK +# undef access +# if HAVE_RAW_DECL_ACCESS +/* The access() function is a security risk. */ +_GL_WARN_ON_USE (access, "access does not always support X_OK - " + "use gnulib module access for portability; " + "also, this function is a security risk - " + "use the gnulib module faccessat instead"); +# endif +#elif 1 +/* On native Windows, map 'access' to '_access', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::access always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); +#endif + + +#if 0 +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIASWARN (chdir); +#elif defined GNULIB_POSIXCHECK +# undef chdir +# if HAVE_RAW_DECL_CHDIR +_GL_WARN_ON_USE (chown, "chdir is not always in - " + "use gnulib module chdir for portability"); +# endif +#elif 1 +/* On native Windows, map 'chdir' to '_chdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIASWARN (chdir); +#endif + + +#if 0 +/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE + to GID (if GID is not -1). Follow symbolic links. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define dup2 rpl_dup2 +# endif +_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); +_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); +# else +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); +#elif defined GNULIB_POSIXCHECK +# undef dup2 +# if HAVE_RAW_DECL_DUP2 +_GL_WARN_ON_USE (dup2, "dup2 is unportable - " + "use gnulib module dup2 for portability"); +# endif +#elif 1 +/* On native Windows, map 'dup2' to '_dup2', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup2 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); +# else +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); +#endif + + +#if 0 +/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the + specified flags. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + Close NEWFD first if it is open. + Return newfd if successful, otherwise -1 and errno set. + See the Linux man page at + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup3 +# define dup3 rpl_dup3 +# endif +_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); +_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); +# else +# if !1 +_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif +_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (dup3); +# endif +#elif defined GNULIB_POSIXCHECK +# undef dup3 +# if HAVE_RAW_DECL_DUP3 +_GL_WARN_ON_USE (dup3, "dup3 is unportable - " + "use gnulib module dup3 for portability"); +# endif +#endif + + +#if 0 +# if defined __CYGWIN__ && !defined __i386__ +/* The 'environ' variable is defined in a DLL. Therefore its declaration needs + the '__declspec(dllimport)' attribute, but the system's lacks it. + This leads to a link error on 64-bit Cygwin when the option + -Wl,--disable-auto-import is in use. */ +_GL_EXTERN_C __declspec(dllimport) char **environ; +# endif +# if !1 +/* Set of environment variables and values. An array of strings of the form + "VARIABLE=VALUE", terminated with a NULL. */ +# if defined __APPLE__ && defined __MACH__ +# include +# if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR +# define _GL_USE_CRT_EXTERNS +# endif +# endif +# ifdef _GL_USE_CRT_EXTERNS +# include +# define environ (*_NSGetEnviron ()) +# else +# ifdef __cplusplus +extern "C" { +# endif +extern char **environ; +# ifdef __cplusplus +} +# endif +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# if HAVE_RAW_DECL_ENVIRON +_GL_UNISTD_INLINE char *** +_GL_WARN_ON_USE_ATTRIBUTE ("environ is unportable - " + "use gnulib module environ for portability") +rpl_environ (void) +{ + return &environ; +} +# undef environ +# define environ (*rpl_environ ()) +# endif +#endif + + +#if 0 +/* Like access(), except that it uses the effective user id and group id of + the current process. */ +# if !1 +_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); +_GL_CXXALIASWARN (euidaccess); +# if defined GNULIB_POSIXCHECK +/* Like access(), this function is a security risk. */ +_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " + "use the gnulib module faccessat instead"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef euidaccess +# if HAVE_RAW_DECL_EUIDACCESS +_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " + "use gnulib module euidaccess for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl rpl_execl +# endif +_GL_FUNCDECL_RPL (execl, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execl, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#elif defined GNULIB_POSIXCHECK +# undef execl +# if HAVE_RAW_DECL_EXECL +_GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - " + "use gnulib module execl for portability"); +# endif +#elif 1 +/* On native Windows, map 'execl' to '_execl', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execl always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl _execl +# endif +_GL_CXXALIAS_MDA (execl, intptr_t, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle rpl_execle +# endif +_GL_FUNCDECL_RPL (execle, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execle, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#elif defined GNULIB_POSIXCHECK +# undef execle +# if HAVE_RAW_DECL_EXECLE +_GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - " + "use gnulib module execle for portability"); +# endif +#elif 1 +/* On native Windows, map 'execle' to '_execle', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execle always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle _execle +# endif +_GL_CXXALIAS_MDA (execle, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp rpl_execlp +# endif +_GL_FUNCDECL_RPL (execlp, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execlp, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#elif defined GNULIB_POSIXCHECK +# undef execlp +# if HAVE_RAW_DECL_EXECLP +_GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - " + "use gnulib module execlp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execlp' to '_execlp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execlp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp _execlp +# endif +_GL_CXXALIAS_MDA (execlp, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv rpl_execv +# endif +_GL_FUNCDECL_RPL (execv, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execv, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#elif defined GNULIB_POSIXCHECK +# undef execv +# if HAVE_RAW_DECL_EXECV +_GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - " + "use gnulib module execv for portability"); +# endif +#elif 1 +/* On native Windows, map 'execv' to '_execv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv _execv +# endif +_GL_CXXALIAS_MDA_CAST (execv, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve rpl_execve +# endif +_GL_FUNCDECL_RPL (execve, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execve, int, + (const char *program, char * const *argv, char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#elif defined GNULIB_POSIXCHECK +# undef execve +# if HAVE_RAW_DECL_EXECVE +_GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - " + "use gnulib module execve for portability"); +# endif +#elif 1 +/* On native Windows, map 'execve' to '_execve', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execve always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve _execve +# endif +_GL_CXXALIAS_MDA_CAST (execve, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp rpl_execvp +# endif +_GL_FUNCDECL_RPL (execvp, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvp, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#elif defined GNULIB_POSIXCHECK +# undef execvp +# if HAVE_RAW_DECL_EXECVP +_GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - " + "use gnulib module execvp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvp' to '_execvp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp _execvp +# endif +_GL_CXXALIAS_MDA_CAST (execvp, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe rpl_execvpe +# endif +_GL_FUNCDECL_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# else +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (execvpe); +# endif +#elif defined GNULIB_POSIXCHECK +# undef execvpe +# if HAVE_RAW_DECL_EXECVPE +_GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - " + "use gnulib module execvpe for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvpe' to '_execvpe', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvpe on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe _execvpe +# endif +_GL_CXXALIAS_MDA_CAST (execvpe, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# elif 1 +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (execvpe); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef faccessat +# define faccessat rpl_faccessat +# endif +_GL_FUNCDECL_RPL (faccessat, int, + (int fd, char const *name, int mode, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (faccessat, int, + (int fd, char const *name, int mode, int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (faccessat, int, + (int fd, char const *file, int mode, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (faccessat, int, + (int fd, char const *file, int mode, int flag)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (faccessat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef faccessat +# if HAVE_RAW_DECL_FACCESSAT +_GL_WARN_ON_USE (faccessat, "faccessat is not portable - " + "use gnulib module faccessat for portability"); +# endif +#endif + + +#if 0 +/* Change the process' current working directory to the directory on which + the given file descriptor is open. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchdir +# define fchdir rpl_fchdir +# endif +_GL_FUNCDECL_RPL (fchdir, int, (int /*fd*/)); +_GL_CXXALIAS_RPL (fchdir, int, (int /*fd*/)); +# else +# if !1 || !1 +_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); +# endif +_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); +# endif +_GL_CXXALIASWARN (fchdir); +# if 0 || !1 +/* Gnulib internal hooks needed to maintain the fchdir metadata. */ +_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) + _GL_ARG_NONNULL ((2)); +_GL_EXTERN_C void _gl_unregister_fd (int fd); +_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); +_GL_EXTERN_C const char *_gl_directory_name (int fd); +# endif +#elif defined GNULIB_POSIXCHECK +# undef fchdir +# if HAVE_RAW_DECL_FCHDIR +_GL_WARN_ON_USE (fchdir, "fchdir is unportable - " + "use gnulib module fchdir for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchownat +# define fchownat rpl_fchownat +# endif +_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag)); +# endif +_GL_CXXALIASWARN (fchownat); +#elif defined GNULIB_POSIXCHECK +# undef fchownat +# if HAVE_RAW_DECL_FCHOWNAT +_GL_WARN_ON_USE (fchownat, "fchownat is not portable - " + "use gnulib module fchownat for portability"); +# endif +#endif + + +#if 0 +/* Synchronize changes to a file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdatasync +# define fdatasync rpl_fdatasync +# endif +_GL_FUNCDECL_RPL (fdatasync, int, (int fd)); +_GL_CXXALIAS_RPL (fdatasync, int, (int fd)); +# else +# if !1|| !1 +_GL_FUNCDECL_SYS (fdatasync, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (fdatasync, int, (int fd)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (fdatasync); +# endif +#elif defined GNULIB_POSIXCHECK +# undef fdatasync +# if HAVE_RAW_DECL_FDATASYNC +_GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " + "use gnulib module fdatasync for portability"); +# endif +#endif + + +#if 0 +/* Synchronize changes, including metadata, to a file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if !1 +_GL_FUNCDECL_SYS (fsync, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (fsync, int, (int fd)); +_GL_CXXALIASWARN (fsync); +#elif defined GNULIB_POSIXCHECK +# undef fsync +# if HAVE_RAW_DECL_FSYNC +_GL_WARN_ON_USE (fsync, "fsync is unportable - " + "use gnulib module fsync for portability"); +# endif +#endif + + +#if 0 +/* Change the size of the file to which FD is opened to become equal to LENGTH. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ftruncate +# define ftruncate rpl_ftruncate +# endif +_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length)); +_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length)); +# else +# if !1 +_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); +# endif +_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (ftruncate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef ftruncate +# if HAVE_RAW_DECL_FTRUNCATE +_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " + "use gnulib module ftruncate for portability"); +# endif +#endif + + +#if 0 +/* Get the name of the current working directory, and put it in SIZE bytes + of BUF. + Return BUF if successful, or NULL if the directory couldn't be determined + or SIZE was too small. + See the POSIX:2008 specification + . + Additionally, the gnulib module 'getcwd' or 'getcwd-lgpl' guarantees the + following GNU extension: If BUF is NULL, an array is allocated with + 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case + it is as big as necessary. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getcwd rpl_getcwd +# endif +_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); +_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +_GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size)); +# else +/* Need to cast, because on mingw, the second parameter is + int size. */ +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); +#elif defined GNULIB_POSIXCHECK +# undef getcwd +# if HAVE_RAW_DECL_GETCWD +_GL_WARN_ON_USE (getcwd, "getcwd is unportable - " + "use gnulib module getcwd for portability"); +# endif +#elif 1 +/* On native Windows, map 'getcwd' to '_getcwd', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getcwd always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +/* Need to cast, because on mingw, the second parameter is either + 'int size' or 'size_t size'. */ +_GL_CXXALIAS_MDA_CAST (getcwd, char *, (char *buf, size_t size)); +# else +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); +#endif + + +#if 0 +/* Return the NIS domain name of the machine. + WARNING! The NIS domain name is unrelated to the fully qualified host name + of the machine. It is also unrelated to email addresses. + WARNING! The NIS domain name is usually the empty string or "(none)" when + not using NIS. + + Put up to LEN bytes of the NIS domain name into NAME. + Null terminate it if the name is shorter than LEN. + If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. + Return 0 if successful, otherwise set errno and return -1. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdomainname +# define getdomainname rpl_getdomainname +# endif +_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getdomainname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getdomainname +# if HAVE_RAW_DECL_GETDOMAINNAME +_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " + "use gnulib module getdomainname for portability"); +# endif +#endif + + +#if 0 +/* Return the maximum number of file descriptors in the current process. + In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdtablesize +# define getdtablesize rpl_getdtablesize +# endif +_GL_FUNCDECL_RPL (getdtablesize, int, (void)); +_GL_CXXALIAS_RPL (getdtablesize, int, (void)); +# else +# if !1 +_GL_FUNCDECL_SYS (getdtablesize, int, (void)); +# endif +/* Need to cast, because on AIX, the parameter list is + (...). */ +_GL_CXXALIAS_SYS_CAST (getdtablesize, int, (void)); +# endif +_GL_CXXALIASWARN (getdtablesize); +#elif defined GNULIB_POSIXCHECK +# undef getdtablesize +# if HAVE_RAW_DECL_GETDTABLESIZE +_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " + "use gnulib module getdtablesize for portability"); +# endif +#endif + + +#if 0 +/* Fill a buffer with random bytes. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getentropy +# define getentropy rpl_getentropy +# endif +_GL_FUNCDECL_RPL (getentropy, int, (void *buffer, size_t length)); +_GL_CXXALIAS_RPL (getentropy, int, (void *buffer, size_t length)); +# else +# if !1 +_GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length)); +# endif +_GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getentropy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getentropy +# if HAVE_RAW_DECL_GETENTROPY +_GL_WARN_ON_USE (getentropy, "getentropy is unportable - " + "use gnulib module getentropy for portability"); +# endif +#endif + + +#if 0 +/* Return the supplemental groups that the current process belongs to. + It is unspecified whether the effective group id is in the list. + If N is 0, return the group count; otherwise, N describes how many + entries are available in GROUPS. Return -1 and set errno if N is + not 0 and not large enough. Fails with ENOSYS on some systems. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getgroups +# define getgroups rpl_getgroups +# endif +_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); +_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); +# else +# if !1 +_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); +# endif +_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); +# endif +_GL_CXXALIASWARN (getgroups); +#elif defined GNULIB_POSIXCHECK +# undef getgroups +# if HAVE_RAW_DECL_GETGROUPS +_GL_WARN_ON_USE (getgroups, "getgroups is unportable - " + "use gnulib module getgroups for portability"); +# endif +#endif + + +#if 0 +/* Return the standard host name of the machine. + WARNING! The host name may or may not be fully qualified. + + Put up to LEN bytes of the host name into NAME. + Null terminate it if the name is shorter than LEN. + If the host name is longer than LEN, set errno = EINVAL and return -1. + Return 0 if successful, otherwise set errno and return -1. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gethostname +# define gethostname rpl_gethostname +# endif +_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second + parameter is + int len. */ +_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); +# endif +_GL_CXXALIASWARN (gethostname); +#elif 0 +# undef gethostname +# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname +#elif defined GNULIB_POSIXCHECK +# undef gethostname +# if HAVE_RAW_DECL_GETHOSTNAME +_GL_WARN_ON_USE (gethostname, "gethostname is unportable - " + "use gnulib module gethostname for portability"); +# endif +#endif + + +#if 0 +/* Returns the user's login name, or NULL if it cannot be found. Upon error, + returns NULL with errno set. + + See . + + Most programs don't need to use this function, because the information is + available through environment variables: + ${LOGNAME-$USER} on Unix platforms, + $USERNAME on native Windows platforms. + */ +# if !1 +_GL_FUNCDECL_SYS (getlogin, char *, (void)); +# endif +_GL_CXXALIAS_SYS (getlogin, char *, (void)); +_GL_CXXALIASWARN (getlogin); +#elif defined GNULIB_POSIXCHECK +# undef getlogin +# if HAVE_RAW_DECL_GETLOGIN +_GL_WARN_ON_USE (getlogin, "getlogin is unportable - " + "use gnulib module getlogin for portability"); +# endif +#endif + + +#if 0 +/* Copies the user's login name to NAME. + The array pointed to by NAME has room for SIZE bytes. + + Returns 0 if successful. Upon error, an error number is returned, or -1 in + the case that the login name cannot be found but no specific error is + provided (this case is hopefully rare but is left open by the POSIX spec). + + See . + + Most programs don't need to use this function, because the information is + available through environment variables: + ${LOGNAME-$USER} on Unix platforms, + $USERNAME on native Windows platforms. + */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getlogin_r rpl_getlogin_r +# endif +_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); +# else +# if !1 +_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 10 systems, the second argument is + int size. */ +_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getlogin_r); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getlogin_r +# if HAVE_RAW_DECL_GETLOGIN_R +_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " + "use gnulib module getlogin_r for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getpagesize rpl_getpagesize +# endif +_GL_FUNCDECL_RPL (getpagesize, int, (void)); +_GL_CXXALIAS_RPL (getpagesize, int, (void)); +# else +/* On HP-UX, getpagesize exists, but it is not declared in even if + the compiler options -D_HPUX_SOURCE -D_XOPEN_SOURCE=600 are used. */ +# if defined __hpux +_GL_FUNCDECL_SYS (getpagesize, int, (void)); +# endif +# if !1 +# if !defined getpagesize +/* This is for POSIX systems. */ +# if !defined _gl_getpagesize && defined _SC_PAGESIZE +# if ! (defined __VMS && __VMS_VER < 70000000) +# define _gl_getpagesize() sysconf (_SC_PAGESIZE) +# endif +# endif +/* This is for older VMS. */ +# if !defined _gl_getpagesize && defined __VMS +# ifdef __ALPHA +# define _gl_getpagesize() 8192 +# else +# define _gl_getpagesize() 512 +# endif +# endif +/* This is for BeOS. */ +# if !defined _gl_getpagesize && 0 +# include +# if defined B_PAGE_SIZE +# define _gl_getpagesize() B_PAGE_SIZE +# endif +# endif +/* This is for AmigaOS4.0. */ +# if !defined _gl_getpagesize && defined __amigaos4__ +# define _gl_getpagesize() 2048 +# endif +/* This is for older Unix systems. */ +# if !defined _gl_getpagesize && 0 +# include +# ifdef EXEC_PAGESIZE +# define _gl_getpagesize() EXEC_PAGESIZE +# else +# ifdef NBPG +# ifndef CLSIZE +# define CLSIZE 1 +# endif +# define _gl_getpagesize() (NBPG * CLSIZE) +# else +# ifdef NBPC +# define _gl_getpagesize() NBPC +# endif +# endif +# endif +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getpagesize() _gl_getpagesize () +# else +# if !GNULIB_defined_getpagesize_function +_GL_UNISTD_INLINE int +getpagesize () +{ + return _gl_getpagesize (); +} +# define GNULIB_defined_getpagesize_function 1 +# endif +# endif +# endif +# endif +/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ +_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); +# endif +# if 1 +_GL_CXXALIASWARN (getpagesize); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getpagesize +# if HAVE_RAW_DECL_GETPAGESIZE +_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " + "use gnulib module getpagesize for portability"); +# endif +#endif + + +#if 0 +/* Function getpass() from module 'getpass': + Read a password from /dev/tty or stdin. + Function getpass() from module 'getpass-gnu': + Read a password of arbitrary length from /dev/tty or stdin. */ +# if (0 && 0) \ + || (0 && 0) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpass +# define getpass rpl_getpass +# endif +_GL_FUNCDECL_RPL (getpass, char *, (const char *prompt) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getpass, char *, (const char *prompt)); +# else +# if !1 +_GL_FUNCDECL_SYS (getpass, char *, (const char *prompt) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getpass, char *, (const char *prompt)); +# endif +_GL_CXXALIASWARN (getpass); +#elif defined GNULIB_POSIXCHECK +# undef getpass +# if HAVE_RAW_DECL_GETPASS +_GL_WARN_ON_USE (getpass, "getpass is unportable - " + "use gnulib module getpass or getpass-gnu for portability"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'getpid' to '_getpid', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getpid always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpid +# define getpid _getpid +# endif +_GL_CXXALIAS_MDA (getpid, int, (void)); +# else +_GL_CXXALIAS_SYS (getpid, pid_t, (void)); +# endif +_GL_CXXALIASWARN (getpid); +#endif + + +#if 0 +/* Return the next valid login shell on the system, or NULL when the end of + the list has been reached. */ +# if !1 +_GL_FUNCDECL_SYS (getusershell, char *, (void)); +# endif +_GL_CXXALIAS_SYS (getusershell, char *, (void)); +_GL_CXXALIASWARN (getusershell); +#elif defined GNULIB_POSIXCHECK +# undef getusershell +# if HAVE_RAW_DECL_GETUSERSHELL +_GL_WARN_ON_USE (getusershell, "getusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + +#if 0 +/* Rewind to pointer that is advanced at each getusershell() call. */ +# if !1 +_GL_FUNCDECL_SYS (setusershell, void, (void)); +# endif +_GL_CXXALIAS_SYS (setusershell, void, (void)); +_GL_CXXALIASWARN (setusershell); +#elif defined GNULIB_POSIXCHECK +# undef setusershell +# if HAVE_RAW_DECL_SETUSERSHELL +_GL_WARN_ON_USE (setusershell, "setusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + +#if 0 +/* Free the pointer that is advanced at each getusershell() call and + associated resources. */ +# if !1 +_GL_FUNCDECL_SYS (endusershell, void, (void)); +# endif +_GL_CXXALIAS_SYS (endusershell, void, (void)); +_GL_CXXALIASWARN (endusershell); +#elif defined GNULIB_POSIXCHECK +# undef endusershell +# if HAVE_RAW_DECL_ENDUSERSHELL +_GL_WARN_ON_USE (endusershell, "endusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + + +#if 0 +/* Determine whether group id is in calling user's group list. */ +# if !1 +_GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); +# endif +_GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); +_GL_CXXALIASWARN (group_member); +#elif defined GNULIB_POSIXCHECK +# undef group_member +# if HAVE_RAW_DECL_GROUP_MEMBER +_GL_WARN_ON_USE (group_member, "group_member is unportable - " + "use gnulib module group-member for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty rpl_isatty +# endif +# define GNULIB_defined_isatty 1 +_GL_FUNCDECL_RPL (isatty, int, (int fd)); +_GL_CXXALIAS_RPL (isatty, int, (int fd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); +#elif defined GNULIB_POSIXCHECK +# undef isatty +# if HAVE_RAW_DECL_ISATTY +_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " + "use gnulib module isatty for portability"); +# endif +#elif 1 +/* On native Windows, map 'isatty' to '_isatty', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::isatty always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); +#endif + + +#if 0 +/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE + to GID (if GID is not -1). Do not follow symbolic links. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lchown +# define lchown rpl_lchown +# endif +_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); +# else +# if !1 +_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); +# endif +_GL_CXXALIASWARN (lchown); +#elif defined GNULIB_POSIXCHECK +# undef lchown +# if HAVE_RAW_DECL_LCHOWN +_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " + "use gnulib module lchown for portability"); +# endif +#endif + + +#if 0 +/* Create a new hard link for an existing file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define link rpl_link +# endif +_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); +# else +# if !1 +_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); +# endif +_GL_CXXALIASWARN (link); +#elif defined GNULIB_POSIXCHECK +# undef link +# if HAVE_RAW_DECL_LINK +_GL_WARN_ON_USE (link, "link is unportable - " + "use gnulib module link for portability"); +# endif +#endif + + +#if 0 +/* Create a new hard link for an existing file, relative to two + directories. FLAG controls whether symlinks are followed. + Return 0 if successful, otherwise -1 and errno set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef linkat +# define linkat rpl_linkat +# endif +_GL_FUNCDECL_RPL (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag) + _GL_ARG_NONNULL ((2, 4))); +_GL_CXXALIAS_RPL (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag) + _GL_ARG_NONNULL ((2, 4))); +# endif +_GL_CXXALIAS_SYS (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (linkat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef linkat +# if HAVE_RAW_DECL_LINKAT +_GL_WARN_ON_USE (linkat, "linkat is unportable - " + "use gnulib module linkat for portability"); +# endif +#endif + + +#if 0 +/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. + Return the new offset if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define lseek rpl_lseek +# endif +_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); +#elif defined GNULIB_POSIXCHECK +# undef lseek +# if HAVE_RAW_DECL_LSEEK +_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " + "systems - use gnulib module lseek for portability"); +# endif +#elif 1 +/* On native Windows, map 'lseek' to '_lseek', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::lseek always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, long, (int fd, long offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); +#endif + + +#if 0 +/* Create a pipe, defaulting to O_BINARY mode. + Store the read-end as fd[0] and the write-end as fd[1]. + Return 0 upon success, or -1 with errno set upon failure. */ +# if !1 +_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (pipe, int, (int fd[2])); +_GL_CXXALIASWARN (pipe); +#elif defined GNULIB_POSIXCHECK +# undef pipe +# if HAVE_RAW_DECL_PIPE +_GL_WARN_ON_USE (pipe, "pipe is unportable - " + "use gnulib module pipe-posix for portability"); +# endif +#endif + + +#if 0 +/* Create a pipe, applying the given flags when opening the read-end of the + pipe and the write-end of the pipe. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + Store the read-end as fd[0] and the write-end as fd[1]. + Return 0 upon success, or -1 with errno set upon failure. + See also the Linux man page at + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pipe2 +# define pipe2 rpl_pipe2 +# endif +_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); +# else +_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (pipe2); +# endif +#elif defined GNULIB_POSIXCHECK +# undef pipe2 +# if HAVE_RAW_DECL_PIPE2 +_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " + "use gnulib module pipe2 for portability"); +# endif +#endif + + +#if 0 +/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. + Return the number of bytes placed into BUF if successful, otherwise + set errno and return -1. 0 indicates EOF. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pread +# define pread rpl_pread +# endif +_GL_FUNCDECL_RPL (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset)); +# else +# if !1 +_GL_FUNCDECL_SYS (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (pread); +# endif +#elif defined GNULIB_POSIXCHECK +# undef pread +# if HAVE_RAW_DECL_PREAD +_GL_WARN_ON_USE (pread, "pread is unportable - " + "use gnulib module pread for portability"); +# endif +#endif + + +#if 0 +/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. + Return the number of bytes written if successful, otherwise + set errno and return -1. 0 indicates nothing written. See the + POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pwrite +# define pwrite rpl_pwrite +# endif +_GL_FUNCDECL_RPL (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset)); +# else +# if !1 +_GL_FUNCDECL_SYS (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (pwrite); +# endif +#elif defined GNULIB_POSIXCHECK +# undef pwrite +# if HAVE_RAW_DECL_PWRITE +_GL_WARN_ON_USE (pwrite, "pwrite is unportable - " + "use gnulib module pwrite for portability"); +# endif +#endif + + +#if 0 +/* Read up to COUNT bytes from file descriptor FD into the buffer starting + at BUF. See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read rpl_read +# endif +_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (read); +#elif 1 +/* On native Windows, map 'read' to '_read', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::read always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count)); +# endif +# else +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (read); +#endif + + +#if 0 +/* Read the contents of the symbolic link FILE and place the first BUFSIZE + bytes of it into BUF. Return the number of bytes placed into BUF if + successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define readlink rpl_readlink +# endif +_GL_FUNCDECL_RPL (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize)); +# else +# if !1 +_GL_FUNCDECL_SYS (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize)); +# endif +_GL_CXXALIASWARN (readlink); +#elif defined GNULIB_POSIXCHECK +# undef readlink +# if HAVE_RAW_DECL_READLINK +_GL_WARN_ON_USE (readlink, "readlink is unportable - " + "use gnulib module readlink for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define readlinkat rpl_readlinkat +# endif +_GL_FUNCDECL_RPL (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len) + _GL_ARG_NONNULL ((2, 3))); +# endif +_GL_CXXALIAS_SYS (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (readlinkat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef readlinkat +# if HAVE_RAW_DECL_READLINKAT +_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " + "use gnulib module readlinkat for portability"); +# endif +#endif + + +#if 0 +/* Remove the directory DIR. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define rmdir rpl_rmdir +# endif +_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (rmdir, int, (char const *name)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); +#elif defined GNULIB_POSIXCHECK +# undef rmdir +# if HAVE_RAW_DECL_RMDIR +_GL_WARN_ON_USE (rmdir, "rmdir is unportable - " + "use gnulib module rmdir for portability"); +# endif +#elif 1 +/* On native Windows, map 'rmdir' to '_rmdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::rmdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); +#endif + + +#if 0 +/* Set the host name of the machine. + The host name may or may not be fully qualified. + + Put LEN bytes of NAME into the host name. + Return 0 if successful, otherwise, set errno and return -1. + + Platforms with no ability to set the hostname return -1 and set + errno = ENOSYS. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sethostname +# define sethostname rpl_sethostname +# endif +_GL_FUNCDECL_RPL (sethostname, int, (const char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (sethostname, int, (const char *name, size_t len)); +# else +# if !1 || !1 +_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 + and FreeBSD 6.4 the second parameter is int. On Solaris 11 + 2011-10, the first parameter is not const. */ +_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (sethostname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef sethostname +# if HAVE_RAW_DECL_SETHOSTNAME +_GL_WARN_ON_USE (sethostname, "sethostname is unportable - " + "use gnulib module sethostname for portability"); +# endif +#endif + + +#if 0 +/* Pause the execution of the current thread for N seconds. + Returns the number of seconds left to sleep. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sleep +# define sleep rpl_sleep +# endif +_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); +_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); +# else +# if !1 +_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); +# endif +_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); +# endif +_GL_CXXALIASWARN (sleep); +#elif defined GNULIB_POSIXCHECK +# undef sleep +# if HAVE_RAW_DECL_SLEEP +_GL_WARN_ON_USE (sleep, "sleep is unportable - " + "use gnulib module sleep for portability"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'swab' to '_swab', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::swab always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef swab +# define swab _swab +# endif +/* Need to cast, because in old mingw the arguments are + (const char *from, char *to, size_t n). */ +_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n)); +# else +# if defined __hpux /* HP-UX */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n)); +# elif defined __sun && (defined __SunOS_5_10 || defined __XOPEN_OR_POSIX) && !defined _XPG4 /* Solaris */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n)); +# else +_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n)); +# endif +# endif +_GL_CXXALIASWARN (swab); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef symlink +# define symlink rpl_symlink +# endif +_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); +# else +# if !1 +_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); +# endif +_GL_CXXALIASWARN (symlink); +#elif defined GNULIB_POSIXCHECK +# undef symlink +# if HAVE_RAW_DECL_SYMLINK +_GL_WARN_ON_USE (symlink, "symlink is not portable - " + "use gnulib module symlink for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef symlinkat +# define symlinkat rpl_symlinkat +# endif +_GL_FUNCDECL_RPL (symlinkat, int, + (char const *contents, int fd, char const *file) + _GL_ARG_NONNULL ((1, 3))); +_GL_CXXALIAS_RPL (symlinkat, int, + (char const *contents, int fd, char const *file)); +# else +# if !1 +_GL_FUNCDECL_SYS (symlinkat, int, + (char const *contents, int fd, char const *file) + _GL_ARG_NONNULL ((1, 3))); +# endif +_GL_CXXALIAS_SYS (symlinkat, int, + (char const *contents, int fd, char const *file)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (symlinkat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef symlinkat +# if HAVE_RAW_DECL_SYMLINKAT +_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " + "use gnulib module symlinkat for portability"); +# endif +#endif + + +#if 0 +/* Change the size of the file designated by FILENAME to become equal to LENGTH. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef truncate +# define truncate rpl_truncate +# endif +_GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length)); +# else +# if !1 +_GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (truncate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef truncate +# if HAVE_RAW_DECL_TRUNCATE +_GL_WARN_ON_USE (truncate, "truncate is unportable - " + "use gnulib module truncate for portability"); +# endif +#endif + + +#if 0 +/* Store at most BUFLEN characters of the pathname of the terminal FD is + open on in BUF. Return 0 on success, otherwise an error number. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ttyname_r +# define ttyname_r rpl_ttyname_r +# endif +_GL_FUNCDECL_RPL (ttyname_r, int, + (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (ttyname_r, int, + (int fd, char *buf, size_t buflen)); +# else +# if !1 +_GL_FUNCDECL_SYS (ttyname_r, int, + (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (ttyname_r, int, + (int fd, char *buf, size_t buflen)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (ttyname_r); +# endif +#elif defined GNULIB_POSIXCHECK +# undef ttyname_r +# if HAVE_RAW_DECL_TTYNAME_R +_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " + "use gnulib module ttyname_r for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink rpl_unlink +# endif +_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (unlink, int, (char const *file)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); +#elif defined GNULIB_POSIXCHECK +# undef unlink +# if HAVE_RAW_DECL_UNLINK +_GL_WARN_ON_USE (unlink, "unlink is not portable - " + "use gnulib module unlink for portability"); +# endif +#elif 1 +/* On native Windows, map 'unlink' to '_unlink', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::unlink always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlinkat +# define unlinkat rpl_unlinkat +# endif +_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); +# endif +_GL_CXXALIASWARN (unlinkat); +#elif defined GNULIB_POSIXCHECK +# undef unlinkat +# if HAVE_RAW_DECL_UNLINKAT +_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " + "use gnulib module unlinkat for portability"); +# endif +#endif + + +#if 0 +/* Pause the execution of the current thread for N microseconds. + Returns 0 on completion, or -1 on range error. + See the POSIX:2001 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef usleep +# define usleep rpl_usleep +# endif +_GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); +_GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); +# endif +/* Need to cast, because on Haiku, the first parameter is + unsigned int n. */ +_GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n)); +# endif +_GL_CXXALIASWARN (usleep); +#elif defined GNULIB_POSIXCHECK +# undef usleep +# if HAVE_RAW_DECL_USLEEP +_GL_WARN_ON_USE (usleep, "usleep is unportable - " + "use gnulib module usleep for portability"); +# endif +#endif + + +#if 0 +/* Write up to COUNT bytes starting at BUF to file descriptor FD. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write rpl_write +# endif +_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#elif 1 +/* On native Windows, map 'write' to '_write', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::write always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count)); +# endif +# else +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#endif + +_GL_INLINE_HEADER_END + +#endif /* _GL_UNISTD_H */ +#endif /* _GL_INCLUDING_UNISTD_H */ +#endif /* _GL_UNISTD_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/wchar.h b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/wchar.h new file mode 100644 index 000000000..f276b85ee --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-runtime/libasprintf/gnulib-lib/wchar.h @@ -0,0 +1,2220 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A substitute for ISO C99 , for platforms that have issues. + + Copyright (C) 2007-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake. */ + +/* + * ISO C 99 for platforms that have issues. + * + * + * For now, this just ensures proper prerequisite inclusion order and + * the declaration of wcwidth(). + */ + +#if __GNUC__ >= 3 + +#endif + + +#if (((defined __need_mbstate_t || defined __need_wint_t) \ + && !defined __MINGW32__) \ + || (defined __hpux \ + && ((defined _INTTYPES_INCLUDED \ + && !defined _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H) \ + || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ + || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \ + || defined _GL_ALREADY_INCLUDING_WCHAR_H) +/* Special invocation convention: + - Inside glibc and uClibc header files, but not MinGW. + - On HP-UX 11.00 we have a sequence of nested includes + -> -> , and the latter includes , + once indirectly -> -> -> + and once directly. In both situations 'wint_t' is not yet defined, + therefore we cannot provide the function overrides; instead include only + the system's . + - With MinGW 3.22, when includes , only some part of + is actually processed, and that doesn't include 'mbstate_t'. + - On IRIX 6.5, similarly, we have an include -> , and + the latter includes . But here, we have no way to detect whether + is completely included or is still being included. */ + +#include "../ucrt/wchar.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_WCHAR_H + +#define _GL_ALREADY_INCLUDING_WCHAR_H + +#if 0 +# include /* for __GLIBC__ */ +#endif + +/* In some builds of uClibc, is nonexistent and wchar_t is defined + by . + But avoid namespace pollution on glibc systems. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +#endif + +/* Include the original if it exists. + Some builds of uClibc lack it. */ +/* The include_next requires a split double-inclusion guard. */ +#if 1 +# include "../ucrt/wchar.h" +#endif + +#undef _GL_ALREADY_INCLUDING_WCHAR_H + +#ifndef _GL_WCHAR_H +#define _GL_WCHAR_H + +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +/* Define wint_t and WEOF. (Also done in wctype.in.h.) */ +#if !1 && !defined wint_t +# define wint_t int +# ifndef WEOF +# define WEOF -1 +# endif +#else +/* mingw and MSVC define wint_t as 'unsigned short' in or + . This is too small: ISO C 99 section 7.24.1.(2) says that + wint_t must be "unchanged by default argument promotions". Override it. */ +# if 1 +# if !GNULIB_defined_wint_t +# if 1 +# include +# else +# include +# endif +typedef unsigned int rpl_wint_t; +# undef wint_t +# define wint_t rpl_wint_t +# define GNULIB_defined_wint_t 1 +# endif +# endif +# ifndef WEOF +# define WEOF ((wint_t) -1) +# endif +#endif + + +/* Override mbstate_t if it is too small. + On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for + implementing mbrtowc for encodings like UTF-8. + On AIX and MSVC, mbrtowc needs to be overridden, but mbstate_t exists and is + large enough and overriding it would cause problems in C++ mode. */ +#if !(((defined _WIN32 && !defined __CYGWIN__) || 1) && 1) || 0 +# if !GNULIB_defined_mbstate_t +# if !(defined _AIX || defined _MSC_VER) +typedef int rpl_mbstate_t; +# undef mbstate_t +# define mbstate_t rpl_mbstate_t +# endif +# define GNULIB_defined_mbstate_t 1 +# endif +#endif + +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif + + +#if 1 +/* Get memset(). */ +# include +#endif + + +/* Convert a single-byte character to a wide character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef btowc +# define btowc rpl_btowc +# endif +_GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (btowc, wint_t, (int c)); +# else +# if !1 +_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); +# endif +/* Need to cast, because on mingw, the return type is 'unsigned short'. */ +_GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (btowc); +# endif +#elif defined GNULIB_POSIXCHECK +# undef btowc +# if HAVE_RAW_DECL_BTOWC +_GL_WARN_ON_USE (btowc, "btowc is unportable - " + "use gnulib module btowc for portability"); +# endif +#endif + + +/* Convert a wide character to a single-byte character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctob +# define wctob rpl_wctob +# endif +_GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); +# else +# if !defined wctob && !1 +/* wctob is provided by gnulib, or wctob exists but is not declared. */ +_GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wctob); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wctob +# if HAVE_RAW_DECL_WCTOB +_GL_WARN_ON_USE (wctob, "wctob is unportable - " + "use gnulib module wctob for portability"); +# endif +#endif + + +/* Test whether *PS is in an initial state. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsinit +# define mbsinit rpl_mbsinit +# endif +_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbsinit); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbsinit +# if HAVE_RAW_DECL_MBSINIT +_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " + "use gnulib module mbsinit for portability"); +# endif +#endif + + +/* Put *PS into an initial state. */ +#if 1 +/* ISO C 23 § 7.31.6.(3) says that zeroing an mbstate_t is a way to put the + mbstate_t into an initial state. However, on many platforms an mbstate_t + is large, and it is possible - as an optimization - to get away with zeroing + only part of it. So, instead of + + mbstate_t state = { 0 }; + + or + + mbstate_t state; + memset (&state, 0, sizeof (mbstate_t)); + + we can write this faster code: + + mbstate_t state; + mbszero (&state); + */ +/* _GL_MBSTATE_INIT_SIZE describes how mbsinit() behaves: It is the number of + bytes at the beginning of an mbstate_t that need to be zero, for mbsinit() + to return true. + _GL_MBSTATE_ZERO_SIZE is the number of bytes at the beginning of an mbstate_t + that need to be zero, + - for mbsinit() to return true, and + - for all other multibyte-aware functions to operate properly. + 0 < _GL_MBSTATE_INIT_SIZE <= _GL_MBSTATE_ZERO_SIZE <= sizeof (mbstate_t). + These values are determined by source code inspection, where possible, and + by running the gnulib unit tests. + We need _GL_MBSTATE_INIT_SIZE because if we define _GL_MBSTATE_ZERO_SIZE + without considering what mbsinit() does, we get test failures such as + assertion "mbsinit (&iter->state)" failed + */ +# if GNULIB_defined_mbstate_t /* AIX, IRIX */ +/* mbstate_t has at least 4 bytes. They are used as coded in + gnulib/lib/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 1 +/* define _GL_MBSTATE_ZERO_SIZE 4 + does not work: it causes test failures. + So, use the safe fallback value, below. */ +# elif __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 /* glibc */ +/* mbstate_t is defined in . + For more details, see glibc/iconv/skeleton.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (((mbstate_t) {0}).__count) */ +# define _GL_MBSTATE_ZERO_SIZE /* 8 */ sizeof (mbstate_t) +# elif defined MUSL_LIBC /* musl libc */ +/* mbstate_t is defined in . + It is an opaque aligned 8-byte struct, of which at most the first + 4 bytes are used. + For more details, see src/multibyte/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (unsigned) */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __APPLE__ && defined __MACH__ /* macOS */ +/* On macOS, mbstate_t is defined in . + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + Libc-/locale/FreeBSD/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8,utf2}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 10 + utf2.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __FreeBSD__ /* FreeBSD */ +/* On FreeBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + src/lib/libc/locale/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __NetBSD__ /* NetBSD */ +/* On NetBSD, mbstate_t is defined in src/sys/sys/ansi.h. + It is an opaque aligned 128-byte struct, of which at most the first + 28 bytes are used. + For more details, see the *State types in + src/lib/libc/citrus/modules/citrus_*.c + (ignoring citrus_{hz,iso2022,utf7,viqr,zw}.c, since these implement + stateful encodings, not usable as locale encodings). */ +/* File ZERO_SIZE + citrus/citrus_none.c 0 + citrus/modules/citrus_euc.c 8 + citrus/modules/citrus_euctw.c 8 + citrus/modules/citrus_mskanji.c 8 + citrus/modules/citrus_big5.c 8 + citrus/modules/citrus_gbk2k.c 8 + citrus/modules/citrus_dechanyu.c 8 + citrus/modules/citrus_johab.c 6 + citrus/modules/citrus_utf8.c 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 28. */ +# define _GL_MBSTATE_ZERO_SIZE 28 +# elif defined __OpenBSD__ /* OpenBSD */ +/* On OpenBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see src/lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 + citrus_utf8.c 12 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __minix /* Minix */ +/* On Minix, mbstate_t is defined in sys/sys/ansi.h. + It is an opaque aligned 128-byte struct. + For more details, see the *State types in + lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 */ +/* But 1 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 4. */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __sun /* Solaris */ +/* On Solaris, mbstate_t is defined in . + It is an opaque aligned 24-byte or 32-byte struct, of which at most the first + 20 or 28 bytes are used. + For more details on OpenSolaris derivatives, see the *State types in + illumos-gate/usr/src/lib/libc/port/locale/ + {none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 12 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures + - in OpenIndiana and OmniOS: for values < 16, + - in Solaris 10 and 11: for values < 20 (in 32-bit mode) + or < 28 (in 64-bit mode). + Since we don't have a good way to distinguish the OpenSolaris derivatives + from the proprietary Solaris versions, and can't inspect the Solaris source + code, use the safe fallback values, below. */ +# elif defined __CYGWIN__ /* Cygwin */ +/* On Cygwin, mbstate_t is defined in . + For more details, see newlib/libc/stdlib/mbtowc_r.c and + winsup/cygwin/strfuncs.cc. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (int) */ +# define _GL_MBSTATE_ZERO_SIZE 8 +# elif defined _WIN32 && !defined __CYGWIN__ /* Native Windows. */ +/* MSVC defines 'mbstate_t' as an aligned 8-byte struct. + On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined + as an aligned 8-byte struct, of which the first 4 bytes matter. + Use the safe values, below. */ +# elif defined __ANDROID__ /* Android */ +/* Android defines 'mbstate_t' in . + It is an opaque 4-byte or 8-byte struct. + For more details, see + bionic/libc/private/bionic_mbstate.h + bionic/libc/bionic/mbrtoc32.cpp + bionic/libc/bionic/mbrtoc16.cpp + */ +# define _GL_MBSTATE_INIT_SIZE 4 +# define _GL_MBSTATE_ZERO_SIZE 4 +# endif +/* Use safe values as defaults. */ +# ifndef _GL_MBSTATE_INIT_SIZE +# define _GL_MBSTATE_INIT_SIZE sizeof (mbstate_t) +# endif +# ifndef _GL_MBSTATE_ZERO_SIZE +# define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t) +# endif +_GL_BEGIN_C_LINKAGE +# if defined IN_MBSZERO +_GL_EXTERN_INLINE +# else +_GL_INLINE +# endif +_GL_ARG_NONNULL ((1)) void +mbszero (mbstate_t *ps) +{ + memset (ps, 0, _GL_MBSTATE_ZERO_SIZE); +} +_GL_END_C_LINKAGE +_GL_CXXALIAS_SYS (mbszero, void, (mbstate_t *ps)); +_GL_CXXALIASWARN (mbszero); +#endif + + +/* Convert a multibyte character to a wide character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrtowc +# define mbrtowc rpl_mbrtowc +# endif +_GL_FUNCDECL_RPL (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +_GL_CXXALIAS_RPL (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +# endif +_GL_CXXALIAS_SYS (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbrtowc); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrtowc +# if HAVE_RAW_DECL_MBRTOWC +_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " + "use gnulib module mbrtowc for portability"); +# endif +#endif + + +/* Recognize a multibyte character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrlen +# define mbrlen rpl_mbrlen +# endif +_GL_FUNCDECL_RPL (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +_GL_CXXALIAS_RPL (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +# endif +_GL_CXXALIAS_SYS (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbrlen); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrlen +# if HAVE_RAW_DECL_MBRLEN +_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " + "use gnulib module mbrlen for portability"); +# endif +#endif + + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsrtowcs +# define mbsrtowcs rpl_mbsrtowcs +# endif +_GL_FUNCDECL_RPL (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbsrtowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbsrtowcs +# if HAVE_RAW_DECL_MBSRTOWCS +_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " + "use gnulib module mbsrtowcs for portability"); +# endif +#endif + + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsnrtowcs +# define mbsnrtowcs rpl_mbsnrtowcs +# endif +_GL_FUNCDECL_RPL (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbsnrtowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbsnrtowcs +# if HAVE_RAW_DECL_MBSNRTOWCS +_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " + "use gnulib module mbsnrtowcs for portability"); +# endif +#endif + + +/* Convert a wide character to a multibyte character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcrtomb +# define wcrtomb rpl_wcrtomb +# endif +_GL_FUNCDECL_RPL (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +_GL_CXXALIAS_RPL (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +# endif +_GL_CXXALIAS_SYS (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcrtomb); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcrtomb +# if HAVE_RAW_DECL_WCRTOMB +_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " + "use gnulib module wcrtomb for portability"); +# endif +#endif + + +/* Convert a wide string to a string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsrtombs +# define wcsrtombs rpl_wcsrtombs +# endif +_GL_FUNCDECL_RPL (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsrtombs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsrtombs +# if HAVE_RAW_DECL_WCSRTOMBS +_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " + "use gnulib module wcsrtombs for portability"); +# endif +#endif + + +/* Convert a wide string to a string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsnrtombs +# define wcsnrtombs rpl_wcsnrtombs +# endif +_GL_FUNCDECL_RPL (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps)); +# else +# if !1 || (defined __cplusplus && defined __sun) +_GL_FUNCDECL_SYS (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsnrtombs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsnrtombs +# if HAVE_RAW_DECL_WCSNRTOMBS +_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " + "use gnulib module wcsnrtombs for portability"); +# endif +#endif + + +/* Return the number of screen columns needed for WC. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcwidth +# define wcwidth rpl_wcwidth +# endif +_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); +# else +# if !1 +/* wcwidth exists but is not declared. */ +_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcwidth); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcwidth +# if HAVE_RAW_DECL_WCWIDTH +_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " + "use gnulib module wcwidth for portability"); +# endif +#endif + + +/* Search N wide characters of S for C. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t); + wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wmemchr, + wchar_t *, (const wchar_t *, wchar_t, size_t), + const wchar_t *, (const wchar_t *, wchar_t, size_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +_GL_CXXALIASWARN1 (wmemchr, const wchar_t *, + (const wchar_t *s, wchar_t c, size_t n)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemchr +# if HAVE_RAW_DECL_WMEMCHR +_GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " + "use gnulib module wmemchr for portability"); +# endif +#endif + + +/* Compare N wide characters of S1 and S2. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmemcmp +# define wmemcmp rpl_wmemcmp +# endif +_GL_FUNCDECL_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemcmp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemcmp +# if HAVE_RAW_DECL_WMEMCMP +_GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " + "use gnulib module wmemcmp for portability"); +# endif +#endif + + +/* Copy N wide characters of SRC to DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wmemcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemcpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemcpy +# if HAVE_RAW_DECL_WMEMCPY +_GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " + "use gnulib module wmemcpy for portability"); +# endif +#endif + + +/* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for + overlapping memory areas. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wmemmove, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemmove, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemmove); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemmove +# if HAVE_RAW_DECL_WMEMMOVE +_GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " + "use gnulib module wmemmove for portability"); +# endif +#endif + + +/* Copy N wide characters of SRC to DEST. + Return pointer to wide characters after the last written wide character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmempcpy +# define wmempcpy rpl_wmempcpy +# endif +_GL_FUNCDECL_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +_GL_CXXALIAS_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmempcpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmempcpy +# if HAVE_RAW_DECL_WMEMPCPY +_GL_WARN_ON_USE (wmempcpy, "wmempcpy is unportable - " + "use gnulib module wmempcpy for portability"); +# endif +#endif + + +/* Set N wide characters of S to C. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemset); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemset +# if HAVE_RAW_DECL_WMEMSET +_GL_WARN_ON_USE (wmemset, "wmemset is unportable - " + "use gnulib module wmemset for portability"); +# endif +#endif + + +/* Return the number of wide characters in S. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcslen); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcslen +# if HAVE_RAW_DECL_WCSLEN +_GL_WARN_ON_USE (wcslen, "wcslen is unportable - " + "use gnulib module wcslen for portability"); +# endif +#endif + + +/* Return the number of wide characters in S, but at most MAXLEN. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); +_GL_CXXALIASWARN (wcsnlen); +#elif defined GNULIB_POSIXCHECK +# undef wcsnlen +# if HAVE_RAW_DECL_WCSNLEN +_GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " + "use gnulib module wcsnlen for portability"); +# endif +#endif + + +/* Copy SRC to DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# endif +_GL_CXXALIAS_SYS (wcscpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscpy +# if HAVE_RAW_DECL_WCSCPY +_GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " + "use gnulib module wcscpy for portability"); +# endif +#endif + + +/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcpcpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# endif +_GL_CXXALIAS_SYS (wcpcpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +_GL_CXXALIASWARN (wcpcpy); +#elif defined GNULIB_POSIXCHECK +# undef wcpcpy +# if HAVE_RAW_DECL_WCPCPY +_GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " + "use gnulib module wcpcpy for portability"); +# endif +#endif + + +/* Copy no more than N wide characters of SRC to DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsncpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsncpy +# if HAVE_RAW_DECL_WCSNCPY +_GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " + "use gnulib module wcsncpy for portability"); +# endif +#endif + + +/* Copy no more than N characters of SRC to DEST, returning the address of + the last character written into DEST. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcpncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcpncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +_GL_CXXALIASWARN (wcpncpy); +#elif defined GNULIB_POSIXCHECK +# undef wcpncpy +# if HAVE_RAW_DECL_WCPNCPY +_GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " + "use gnulib module wcpncpy for portability"); +# endif +#endif + + +/* Append SRC onto DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# endif +_GL_CXXALIAS_SYS (wcscat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscat +# if HAVE_RAW_DECL_WCSCAT +_GL_WARN_ON_USE (wcscat, "wcscat is unportable - " + "use gnulib module wcscat for portability"); +# endif +#endif + + +/* Append no more than N wide characters of SRC onto DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsncat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src, + size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsncat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src, + size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsncat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsncat +# if HAVE_RAW_DECL_WCSNCAT +_GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " + "use gnulib module wcsncat for portability"); +# endif +#endif + + +/* Compare S1 and S2. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcscmp +# define wcscmp rpl_wcscmp +# endif +_GL_FUNCDECL_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscmp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscmp +# if HAVE_RAW_DECL_WCSCMP +_GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " + "use gnulib module wcscmp for portability"); +# endif +#endif + + +/* Compare no more than N wide characters of S1 and S2. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsncmp +# define wcsncmp rpl_wcsncmp +# endif +_GL_FUNCDECL_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsncmp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsncmp +# if HAVE_RAW_DECL_WCSNCMP +_GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " + "use gnulib module wcsncmp for portability"); +# endif +#endif + + +/* Compare S1 and S2, ignoring case. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); +_GL_CXXALIASWARN (wcscasecmp); +#elif defined GNULIB_POSIXCHECK +# undef wcscasecmp +# if HAVE_RAW_DECL_WCSCASECMP +_GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " + "use gnulib module wcscasecmp for portability"); +# endif +#endif + + +/* Compare no more than N chars of S1 and S2, ignoring case. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcsncasecmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsncasecmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +_GL_CXXALIASWARN (wcsncasecmp); +#elif defined GNULIB_POSIXCHECK +# undef wcsncasecmp +# if HAVE_RAW_DECL_WCSNCASECMP +_GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " + "use gnulib module wcsncasecmp for portability"); +# endif +#endif + + +/* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE + category of the current locale. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); +# endif +_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscoll); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscoll +# if HAVE_RAW_DECL_WCSCOLL +_GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " + "use gnulib module wcscoll for portability"); +# endif +#endif + + +/* Transform S2 into array pointed to by S1 such that if wcscmp is applied + to two transformed strings the result is the as applying 'wcscoll' to the + original strings. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsxfrm, size_t, + (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsxfrm, size_t, + (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsxfrm); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsxfrm +# if HAVE_RAW_DECL_WCSXFRM +_GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " + "use gnulib module wcsxfrm for portability"); +# endif +#endif + + +/* Duplicate S, returning an identical malloc'd string. */ +#if 0 +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif +_GL_CXXALIASWARN (wcsdup); +#else +# if __GNUC__ >= 11 && !defined wcsdup +/* For -Wmismatched-dealloc: Associate wcsdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef wcsdup +# if HAVE_RAW_DECL_WCSDUP +_GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " + "use gnulib module wcsdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'wcsdup' to '_wcsdup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::wcsdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# if 1 +_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (wcsdup); +# endif +# endif +#endif + + +/* Find the first occurrence of WC in WCS. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcschr (const wchar_t *, wchar_t); + wchar_t * std::wcschr (wchar_t *, wchar_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcschr, + wchar_t *, (const wchar_t *, wchar_t), + const wchar_t *, (const wchar_t *, wchar_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc)); +_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcschr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcschr +# if HAVE_RAW_DECL_WCSCHR +_GL_WARN_ON_USE (wcschr, "wcschr is unportable - " + "use gnulib module wcschr for portability"); +# endif +#endif + + +/* Find the last occurrence of WC in WCS. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcsrchr (const wchar_t *, wchar_t); + wchar_t * std::wcsrchr (wchar_t *, wchar_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcsrchr, + wchar_t *, (const wchar_t *, wchar_t), + const wchar_t *, (const wchar_t *, wchar_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc)); +_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsrchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsrchr +# if HAVE_RAW_DECL_WCSRCHR +_GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " + "use gnulib module wcsrchr for portability"); +# endif +#endif + + +/* Return the length of the initial segment of WCS which consists entirely + of wide characters not in REJECT. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscspn); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscspn +# if HAVE_RAW_DECL_WCSCSPN +_GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " + "use gnulib module wcscspn for portability"); +# endif +#endif + + +/* Return the length of the initial segment of WCS which consists entirely + of wide characters in ACCEPT. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsspn); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsspn +# if HAVE_RAW_DECL_WCSSPN +_GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " + "use gnulib module wcsspn for portability"); +# endif +#endif + + +/* Find the first occurrence in WCS of any character in ACCEPT. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcspbrk, wchar_t *, + (const wchar_t *wcs, const wchar_t *accept) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *); + wchar_t * std::wcspbrk (wchar_t *, const wchar_t *); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcspbrk, + wchar_t *, (const wchar_t *, const wchar_t *), + const wchar_t *, (const wchar_t *, const wchar_t *)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcspbrk, wchar_t *, + (wchar_t *wcs, const wchar_t *accept)); +_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, + (const wchar_t *wcs, const wchar_t *accept)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcspbrk); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcspbrk +# if HAVE_RAW_DECL_WCSPBRK +_GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " + "use gnulib module wcspbrk for portability"); +# endif +#endif + + +/* Find the first occurrence of NEEDLE in HAYSTACK. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsstr +# define wcsstr rpl_wcsstr +# endif +_GL_FUNCDECL_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); + wchar_t * std::wcsstr (wchar_t *, const wchar_t *); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcsstr, + wchar_t *, + (const wchar_t *restrict, const wchar_t *restrict), + const wchar_t *, + (const wchar_t *restrict, const wchar_t *restrict)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcsstr, wchar_t *, + (wchar_t *restrict haystack, + const wchar_t *restrict needle)); +_GL_CXXALIASWARN1 (wcsstr, const wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsstr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsstr +# if HAVE_RAW_DECL_WCSSTR +_GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " + "use gnulib module wcsstr for portability"); +# endif +#endif + + +/* Divide WCS into tokens separated by characters in DELIM. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcstok +# define wcstok rpl_wcstok +# endif +_GL_FUNCDECL_RPL (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +_GL_CXXALIAS_RPL (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +# endif +_GL_CXXALIAS_SYS (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcstok); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcstok +# if HAVE_RAW_DECL_WCSTOK +_GL_WARN_ON_USE (wcstok, "wcstok is unportable - " + "use gnulib module wcstok for portability"); +# endif +#endif + + +/* Determine number of column positions required for first N wide + characters (or fewer if S ends before this) in S. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcswidth +# define wcswidth rpl_wcswidth +# endif +_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcswidth); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcswidth +# if HAVE_RAW_DECL_WCSWIDTH +_GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " + "use gnulib module wcswidth for portability"); +# endif +#endif + + +/* Convert *TP to a date and time wide string. See + . */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsftime +# define wcsftime rpl_wcsftime +# endif +_GL_FUNCDECL_RPL (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp) + _GL_ARG_NONNULL ((1, 3, 4))); +_GL_CXXALIAS_RPL (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp) + _GL_ARG_NONNULL ((1, 3, 4))); +# endif +_GL_CXXALIAS_SYS (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsftime); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsftime +# if HAVE_RAW_DECL_WCSFTIME +_GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " + "use gnulib module wcsftime for portability"); +# endif +#endif + + +#if 0 && (defined _WIN32 && !defined __CYGWIN__) +/* Gets the name of the current working directory. + (a) If BUF is non-NULL, it is assumed to have room for SIZE wide characters. + This function stores the working directory (NUL-terminated) in BUF and + returns BUF. + (b) If BUF is NULL, an array is allocated with 'malloc'. The array is SIZE + wide characters long, unless SIZE == 0, in which case it is as big as + necessary. + If the directory couldn't be determined or SIZE was too small, this function + returns NULL and sets errno. For a directory of length LEN, SIZE should be + >= LEN + 3 in case (a) or >= LEN + 1 in case (b). + Possible errno values include: + - ERANGE if SIZE is too small. + - ENOMEM if the memory could no be allocated. */ +_GL_FUNCDECL_SYS (wgetcwd, wchar_t *, (wchar_t *buf, size_t size)); +#endif + + +#endif /* _GL_WCHAR_H */ +#endif /* _GL_WCHAR_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/config.h b/gvsbuild/patches/gettext/msvc/gettext-tools/config.h similarity index 64% rename from gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/config.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/config.h index dc06af9ad..52ddf2154 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/config.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/config.h @@ -6,12 +6,19 @@ #define DEFAULT_OUTPUT_ALIGNMENT 1 +/* Witness that has been included. */ +#define _GL_CONFIG_H_INCLUDED 1 + + /* Define this to an absolute name of . */ /* #undef ABSOLUTE_LIBXML2_LIBXML_XMLEXPORTS_H */ /* Define this to an absolute name of . */ /* #undef ABSOLUTE_LIBXML2_LIBXML_XMLVERSION_H */ +/* Define if access does not correctly handle trailing slashes. */ +/* #undef ACCESS_TRAILING_SLASH_BUG */ + /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ @@ -25,11 +32,14 @@ /* #undef BITSIZEOF_SIZE_T */ /* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ +#define BITSIZEOF_WCHAR_T 16 /* Define to the number of bits in type 'wint_t'. */ /* #undef BITSIZEOF_WINT_T */ +/* Define if the c32rtomb function has an incorrect return value. */ +#define C32RTOMB_RETVAL_BUG 1 + /* Define if mono is the preferred C# implementation. */ /* #undef CSHARP_CHOICE_MONO */ @@ -60,7 +70,10 @@ /* Define to 1 if // is a file system root distinct from /. */ -/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ +#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 + +/* Define if struct dirent has a member d_ino that actually works. */ +/* #undef D_INO_IN_DIRENT */ /* Define to 1 if translation of program messages to the user's native language is requested. */ @@ -102,6 +115,13 @@ /* Define to 1 if the system's ftello function has the Solaris bug. */ /* #undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE */ +/* Define to 1 if the system's ftello function has the macOS bug. */ +/* #undef FTELLO_BROKEN_AFTER_UNGETC */ + +/* Define to 1 if fflush is known to work on stdin as per POSIX.1-2008, 0 if + fflush is known to not work, -1 if unknown. */ +#define FUNC_FFLUSH_STDIN 0 + /* Define to 1 if mkdir mistakenly creates a directory given with a trailing dot component. */ #define FUNC_MKDIR_DOT_BUG 1 @@ -110,7 +130,11 @@ /* #undef FUNC_NL_LANGINFO_YESEXPR_WORKS */ /* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ + and handles a trailing slash correctly. */ +/* #undef FUNC_REALPATH_NEARLY_WORKS */ + +/* Define to 1 if realpath() can malloc memory, always gives an absolute path, + and handles leading slashes and a trailing slash correctly. */ /* #undef FUNC_REALPATH_WORKS */ /* Define to 1 if ungetc is broken when used on arbitrary bytes. */ @@ -123,10 +147,6 @@ declaration of the second argument to gettimeofday. */ #define GETTIMEOFDAY_TIMEZONE void -/* Define to 1 if getxattr works with XATTR_NAME_POSIX_ACL_ACCESS and - XATTR_NAME_POSIX_ACL_DEFAULT. */ -/* #undef GETXATTR_WITH_POSIX_ACLS */ - /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module canonicalize shall be considered present. */ #define GNULIB_CANONICALIZE 1 @@ -135,10 +155,18 @@ whether the gnulib module canonicalize-lgpl shall be considered present. */ #define GNULIB_CANONICALIZE_LGPL 1 +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fdopendir shall be considered present. */ +#define GNULIB_FDOPENDIR 1 + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module fd-safer-flag shall be considered present. */ #define GNULIB_FD_SAFER_FLAG 1 +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fflush shall be considered present. */ +#define GNULIB_FFLUSH IN_GETTEXT_TOOLS_GNULIB_TESTS + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module filenamecat shall be considered present. */ #define GNULIB_FILENAMECAT IN_GETTEXT_TOOLS_GNULIB_TESTS @@ -155,6 +183,10 @@ whether the gnulib module fwriteerror shall be considered present. */ #define GNULIB_FWRITEERROR 1 +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module getcwd shall be considered present. */ +#define GNULIB_GETCWD 1 + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module isblank shall be considered present. */ #define GNULIB_ISBLANK 1 @@ -167,6 +199,10 @@ whether the gnulib module msvc-nothrow shall be considered present. */ #define GNULIB_MSVC_NOTHROW 1 +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module openat shall be considered present. */ +#define GNULIB_OPENAT 1 + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module pipe2-safer shall be considered present. */ #define GNULIB_PIPE2_SAFER 1 @@ -175,8 +211,12 @@ "__gnu_printf__" instead of "__printf__" */ /* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module reallocarray shall be considered present. */ +#define GNULIB_REALLOCARRAY 1 + /* Define when the error facility is replaced by gnulib. */ -#define GNULIB_REPLACE_ERROR 1 +/* #undef GNULIB_REPLACE_ERROR */ /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module scanf shall be considered present. */ @@ -190,6 +230,14 @@ whether the gnulib module snprintf shall be considered present. */ #define GNULIB_SNPRINTF 1 +/* Define to 1 if you want the FILE stream functions getc, putc, etc. to use + unlocked I/O if available, throughout the package. Unlocked I/O can improve + performance, sometimes dramatically. But unlocked I/O is safe only in + single-threaded programs, as well as in multithreaded programs for which + you can guarantee that every FILE stream, including stdin, stdout, stderr, + is used only in a single thread. */ +#define GNULIB_STDIO_SINGLE_THREAD 1 + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module strerror shall be considered present. */ #define GNULIB_STRERROR 1 @@ -211,9 +259,72 @@ /* Define to 1 when the gnulib module bind should be tested. */ #define GNULIB_TEST_BIND 1 +/* Define to 1 when the gnulib module btoc32 should be tested. */ +#define GNULIB_TEST_BTOC32 1 + /* Define to 1 when the gnulib module btowc should be tested. */ #define GNULIB_TEST_BTOWC 1 +/* Define to 1 when the gnulib module c32isalnum should be tested. */ +#define GNULIB_TEST_C32ISALNUM 1 + +/* Define to 1 when the gnulib module c32isalpha should be tested. */ +#define GNULIB_TEST_C32ISALPHA 1 + +/* Define to 1 when the gnulib module c32isblank should be tested. */ +#define GNULIB_TEST_C32ISBLANK 1 + +/* Define to 1 when the gnulib module c32iscntrl should be tested. */ +#define GNULIB_TEST_C32ISCNTRL 1 + +/* Define to 1 when the gnulib module c32isdigit should be tested. */ +#define GNULIB_TEST_C32ISDIGIT 1 + +/* Define to 1 when the gnulib module c32isgraph should be tested. */ +#define GNULIB_TEST_C32ISGRAPH 1 + +/* Define to 1 when the gnulib module c32islower should be tested. */ +#define GNULIB_TEST_C32ISLOWER 1 + +/* Define to 1 when the gnulib module c32isprint should be tested. */ +#define GNULIB_TEST_C32ISPRINT 1 + +/* Define to 1 when the gnulib module c32ispunct should be tested. */ +#define GNULIB_TEST_C32ISPUNCT 1 + +/* Define to 1 when the gnulib module c32isspace should be tested. */ +#define GNULIB_TEST_C32ISSPACE 1 + +/* Define to 1 when the gnulib module c32isupper should be tested. */ +#define GNULIB_TEST_C32ISUPPER 1 + +/* Define to 1 when the gnulib module c32isxdigit should be tested. */ +#define GNULIB_TEST_C32ISXDIGIT 1 + +/* Define to 1 when the gnulib module c32rtomb should be tested. */ +#define GNULIB_TEST_C32RTOMB 1 + +/* Define to 1 when the gnulib module c32tob should be tested. */ +#define GNULIB_TEST_C32TOB 1 + +/* Define to 1 when the gnulib module c32tolower should be tested. */ +#define GNULIB_TEST_C32TOLOWER 1 + +/* Define to 1 when the gnulib module c32width should be tested. */ +#define GNULIB_TEST_C32WIDTH 1 + +/* Define to 1 when the gnulib module c32_apply_type_test should be tested. */ +#define GNULIB_TEST_C32_APPLY_TYPE_TEST 1 + +/* Define to 1 when the gnulib module c32_get_type_test should be tested. */ +#define GNULIB_TEST_C32_GET_TYPE_TEST 1 + +/* Define to 1 when the gnulib module calloc-gnu should be tested. */ +#define GNULIB_TEST_CALLOC_GNU 1 + +/* Define to 1 when the gnulib module calloc-posix should be tested. */ +#define GNULIB_TEST_CALLOC_POSIX 1 + /* Define to 1 when the gnulib module canonicalize should be tested. */ #define GNULIB_TEST_CANONICALIZE 1 @@ -221,6 +332,9 @@ */ #define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 +/* Define to 1 when the gnulib module chdir should be tested. */ +#define GNULIB_TEST_CHDIR 1 + /* Define to 1 when the gnulib module cloexec should be tested. */ #define GNULIB_TEST_CLOEXEC 1 @@ -251,8 +365,8 @@ /* Define to 1 when the gnulib module environ should be tested. */ #define GNULIB_TEST_ENVIRON 1 -/* Define to 1 when the gnulib module explicit_bzero should be tested. */ -#define GNULIB_TEST_EXPLICIT_BZERO 1 +/* Define to 1 when the gnulib module fchdir should be tested. */ +#define GNULIB_TEST_FCHDIR 1 /* Define to 1 when the gnulib module fcntl should be tested. */ #define GNULIB_TEST_FCNTL 1 @@ -260,15 +374,63 @@ /* Define to 1 when the gnulib module fdopen should be tested. */ #define GNULIB_TEST_FDOPEN 1 +/* Define to 1 when the gnulib module fdopendir should be tested. */ +#define GNULIB_TEST_FDOPENDIR 1 + +/* Define to 1 when the gnulib module fflush should be tested. */ +#define GNULIB_TEST_FFLUSH 1 + +/* Define to 1 when the gnulib module fgetc should be tested. */ +#define GNULIB_TEST_FGETC 1 + +/* Define to 1 when the gnulib module fgets should be tested. */ +#define GNULIB_TEST_FGETS 1 + /* Define to 1 when the gnulib module fnmatch should be tested. */ #define GNULIB_TEST_FNMATCH 1 /* Define to 1 when the gnulib module fopen should be tested. */ #define GNULIB_TEST_FOPEN 1 +/* Define to 1 when the gnulib module fopen-gnu should be tested. */ +#define GNULIB_TEST_FOPEN_GNU 1 + +/* Define to 1 when the gnulib module fprintf should be tested. */ +#define GNULIB_TEST_FPRINTF 1 + +/* Define to 1 when the gnulib module fpurge should be tested. */ +#define GNULIB_TEST_FPURGE 1 + +/* Define to 1 when the gnulib module fputc should be tested. */ +#define GNULIB_TEST_FPUTC 1 + +/* Define to 1 when the gnulib module fputs should be tested. */ +#define GNULIB_TEST_FPUTS 1 + +/* Define to 1 when the gnulib module fread should be tested. */ +#define GNULIB_TEST_FREAD 1 + +/* Define to 1 when the gnulib module free-posix should be tested. */ +#define GNULIB_TEST_FREE_POSIX 1 + +/* Define to 1 when the gnulib module freopen should be tested. */ +#define GNULIB_TEST_FREOPEN 1 + +/* Define to 1 when the gnulib module fscanf should be tested. */ +#define GNULIB_TEST_FSCANF 1 + +/* Define to 1 when the gnulib module fseek should be tested. */ +#define GNULIB_TEST_FSEEK 1 + +/* Define to 1 when the gnulib module fseeko should be tested. */ +#define GNULIB_TEST_FSEEKO 1 + /* Define to 1 when the gnulib module fstat should be tested. */ #define GNULIB_TEST_FSTAT 1 +/* Define to 1 when the gnulib module fstatat should be tested. */ +#define GNULIB_TEST_FSTATAT 1 + /* Define to 1 when the gnulib module fsync should be tested. */ #define GNULIB_TEST_FSYNC 1 @@ -281,6 +443,18 @@ /* Define to 1 when the gnulib module ftruncate should be tested. */ #define GNULIB_TEST_FTRUNCATE 1 +/* Define to 1 when the gnulib module fwrite should be tested. */ +#define GNULIB_TEST_FWRITE 1 + +/* Define to 1 when the gnulib module getaddrinfo should be tested. */ +#define GNULIB_TEST_GETADDRINFO 1 + +/* Define to 1 when the gnulib module getc should be tested. */ +#define GNULIB_TEST_GETC 1 + +/* Define to 1 when the gnulib module getchar should be tested. */ +#define GNULIB_TEST_GETCHAR 1 + /* Define to 1 when the gnulib module getcwd should be tested. */ #define GNULIB_TEST_GETCWD 1 @@ -299,6 +473,9 @@ /* Define to 1 when the gnulib module getpagesize should be tested. */ #define GNULIB_TEST_GETPAGESIZE 1 +/* Define to 1 when the gnulib module getprogname should be tested. */ +#define GNULIB_TEST_GETPROGNAME 1 + /* Define to 1 when the gnulib module getrandom should be tested. */ #define GNULIB_TEST_GETRANDOM 1 @@ -326,9 +503,15 @@ /* Define to 1 when the gnulib module iswblank should be tested. */ #define GNULIB_TEST_ISWBLANK 1 +/* Define to 1 when the gnulib module iswctype should be tested. */ +#define GNULIB_TEST_ISWCTYPE 1 + /* Define to 1 when the gnulib module iswdigit should be tested. */ #define GNULIB_TEST_ISWDIGIT 1 +/* Define to 1 when the gnulib module iswpunct should be tested. */ +#define GNULIB_TEST_ISWPUNCT 1 + /* Define to 1 when the gnulib module iswxdigit should be tested. */ #define GNULIB_TEST_ISWXDIGIT 1 @@ -353,12 +536,18 @@ /* Define to 1 when the gnulib module lstat should be tested. */ #define GNULIB_TEST_LSTAT 1 +/* Define to 1 when the gnulib module malloc-gnu should be tested. */ +#define GNULIB_TEST_MALLOC_GNU 1 + /* Define to 1 when the gnulib module malloc-posix should be tested. */ #define GNULIB_TEST_MALLOC_POSIX 1 /* Define to 1 when the gnulib module mbrlen should be tested. */ #define GNULIB_TEST_MBRLEN 1 +/* Define to 1 when the gnulib module mbrtoc32 should be tested. */ +#define GNULIB_TEST_MBRTOC32 1 + /* Define to 1 when the gnulib module mbrtowc should be tested. */ #define GNULIB_TEST_MBRTOWC 1 @@ -368,21 +557,39 @@ /* Define to 1 when the gnulib module mbslen should be tested. */ #define GNULIB_TEST_MBSLEN 1 +/* Define to 1 when the gnulib module mbsrtoc32s should be tested. */ +#define GNULIB_TEST_MBSRTOC32S 1 + /* Define to 1 when the gnulib module mbsrtowcs should be tested. */ #define GNULIB_TEST_MBSRTOWCS 1 /* Define to 1 when the gnulib module mbsstr should be tested. */ #define GNULIB_TEST_MBSSTR 1 +/* Define to 1 when the gnulib module mbszero should be tested. */ +#define GNULIB_TEST_MBSZERO 1 + /* Define to 1 when the gnulib module mbtowc should be tested. */ #define GNULIB_TEST_MBTOWC 1 /* Define to 1 when the gnulib module memchr should be tested. */ #define GNULIB_TEST_MEMCHR 1 +/* Define to 1 when the gnulib module memmem should be tested. */ +#define GNULIB_TEST_MEMMEM 1 + /* Define to 1 when the gnulib module mempcpy should be tested. */ #define GNULIB_TEST_MEMPCPY 1 +/* Define to 1 when the gnulib module memrchr should be tested. */ +#define GNULIB_TEST_MEMRCHR 1 + +/* Define to 1 when the gnulib module memset_explicit should be tested. */ +#define GNULIB_TEST_MEMSET_EXPLICIT 1 + +/* Define to 1 when the gnulib module mkdir should be tested. */ +#define GNULIB_TEST_MKDIR 1 + /* Define to 1 when the gnulib module mkdtemp should be tested. */ #define GNULIB_TEST_MKDTEMP 1 @@ -395,6 +602,9 @@ /* Define to 1 when the gnulib module open should be tested. */ #define GNULIB_TEST_OPEN 1 +/* Define to 1 when the gnulib module openat should be tested. */ +#define GNULIB_TEST_OPENAT 1 + /* Define to 1 when the gnulib module opendir should be tested. */ #define GNULIB_TEST_OPENDIR 1 @@ -407,6 +617,9 @@ /* Define to 1 when the gnulib module pipe2 should be tested. */ #define GNULIB_TEST_PIPE2 1 +/* Define to 1 when the gnulib module posix_spawn should be tested. */ +#define GNULIB_TEST_POSIX_SPAWN 1 + /* Define to 1 when the gnulib module posix_spawnattr_destroy should be tested. */ #define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1 @@ -419,6 +632,10 @@ tested. */ #define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1 +/* Define to 1 when the gnulib module posix_spawnattr_setpgroup should be + tested. */ +#define GNULIB_TEST_POSIX_SPAWNATTR_SETPGROUP 1 + /* Define to 1 when the gnulib module posix_spawnattr_setsigmask should be tested. */ #define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1 @@ -426,6 +643,10 @@ /* Define to 1 when the gnulib module posix_spawnp should be tested. */ #define GNULIB_TEST_POSIX_SPAWNP 1 +/* Define to 1 when the gnulib module posix_spawn_file_actions_addchdir should + be tested. */ +#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR 1 + /* Define to 1 when the gnulib module posix_spawn_file_actions_addclose should be tested. */ #define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1 @@ -446,15 +667,30 @@ tested. */ #define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1 +/* Define to 1 when the gnulib module printf should be tested. */ +#define GNULIB_TEST_PRINTF 1 + +/* Define to 1 when the gnulib module pselect should be tested. */ +#define GNULIB_TEST_PSELECT 1 + /* Define to 1 when the gnulib module pthread_sigmask should be tested. */ #define GNULIB_TEST_PTHREAD_SIGMASK 1 /* Define to 1 when the gnulib module pthread-thread should be tested. */ #define GNULIB_TEST_PTHREAD_THREAD 1 +/* Define to 1 when the gnulib module putc should be tested. */ +#define GNULIB_TEST_PUTC 1 + +/* Define to 1 when the gnulib module putchar should be tested. */ +#define GNULIB_TEST_PUTCHAR 1 + /* Define to 1 when the gnulib module putenv should be tested. */ #define GNULIB_TEST_PUTENV 1 +/* Define to 1 when the gnulib module puts should be tested. */ +#define GNULIB_TEST_PUTS 1 + /* Define to 1 when the gnulib module raise should be tested. */ #define GNULIB_TEST_RAISE 1 @@ -470,15 +706,30 @@ /* Define to 1 when the gnulib module readlink should be tested. */ #define GNULIB_TEST_READLINK 1 +/* Define to 1 when the gnulib module reallocarray should be tested. */ +#define GNULIB_TEST_REALLOCARRAY 1 + +/* Define to 1 when the gnulib module realloc-gnu should be tested. */ +#define GNULIB_TEST_REALLOC_GNU 1 + /* Define to 1 when the gnulib module realloc-posix should be tested. */ #define GNULIB_TEST_REALLOC_POSIX 1 /* Define to 1 when the gnulib module realpath should be tested. */ #define GNULIB_TEST_REALPATH 1 +/* Define to 1 when the gnulib module rewinddir should be tested. */ +#define GNULIB_TEST_REWINDDIR 1 + /* Define to 1 when the gnulib module rmdir should be tested. */ #define GNULIB_TEST_RMDIR 1 +/* Define to 1 when the gnulib module scanf should be tested. */ +#define GNULIB_TEST_SCANF 1 + +/* Define to 1 when the gnulib module sched_yield should be tested. */ +#define GNULIB_TEST_SCHED_YIELD 1 + /* Define to 1 when the gnulib module secure_getenv should be tested. */ #define GNULIB_TEST_SECURE_GETENV 1 @@ -527,6 +778,9 @@ /* Define to 1 when the gnulib module strchrnul should be tested. */ #define GNULIB_TEST_STRCHRNUL 1 +/* Define to 1 when the gnulib module strdup should be tested. */ +#define GNULIB_TEST_STRDUP 1 + /* Define to 1 when the gnulib module strerror should be tested. */ #define GNULIB_TEST_STRERROR 1 @@ -542,9 +796,18 @@ /* Define to 1 when the gnulib module strstr should be tested. */ #define GNULIB_TEST_STRSTR 1 +/* Define to 1 when the gnulib module strtol should be tested. */ +#define GNULIB_TEST_STRTOL 1 + +/* Define to 1 when the gnulib module strtoul should be tested. */ +#define GNULIB_TEST_STRTOUL 1 + /* Define to 1 when the gnulib module symlink should be tested. */ #define GNULIB_TEST_SYMLINK 1 +/* Define to 1 when the gnulib module time should be tested. */ +#define GNULIB_TEST_TIME 1 + /* Define to 1 when the gnulib module unlink should be tested. */ #define GNULIB_TEST_UNLINK 1 @@ -560,6 +823,12 @@ /* Define to 1 when the gnulib module vasprintf should be tested. */ #define GNULIB_TEST_VASPRINTF 1 +/* Define to 1 when the gnulib module vfprintf should be tested. */ +#define GNULIB_TEST_VFPRINTF 1 + +/* Define to 1 when the gnulib module vprintf should be tested. */ +#define GNULIB_TEST_VPRINTF 1 + /* Define to 1 when the gnulib module vsnprintf should be tested. */ #define GNULIB_TEST_VSNPRINTF 1 @@ -575,6 +844,9 @@ /* Define to 1 when the gnulib module wctomb should be tested. */ #define GNULIB_TEST_WCTOMB 1 +/* Define to 1 when the gnulib module wctype should be tested. */ +#define GNULIB_TEST_WCTYPE 1 + /* Define to 1 when the gnulib module wcwidth should be tested. */ #define GNULIB_TEST_WCWIDTH 1 @@ -608,6 +880,14 @@ whether the gnulib module unistr/u8-uctomb shall be considered present. */ #define GNULIB_UNISTR_U8_UCTOMB 1 +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module xalloc shall be considered present. */ +#define GNULIB_XALLOC 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module xalloc-die shall be considered present. */ +#define GNULIB_XALLOC_DIE 1 + /* Define to 1 if you have the `aclsort' function. */ /* #undef HAVE_ACLSORT */ @@ -681,8 +961,7 @@ may be supplied by this distribution. */ #define HAVE_ALLOCA 1 -/* Define to 1 if you have and it should be used (not on Ultrix). - */ +/* Define to 1 if works. */ /* #undef HAVE_ALLOCA_H */ /* Define to 1 if you have the header file. */ @@ -691,9 +970,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ARPA_NAMESER_H */ -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - /* Define to 1 if you have the `atexit' function. */ #define HAVE_ATEXIT 1 @@ -709,9 +985,6 @@ /* Define to 1 if nanosleep mishandles large arguments. */ /* #undef HAVE_BUG_BIG_NANOSLEEP */ -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - /* Define to 1 if you have the header file. */ /* #undef HAVE_BYTESWAP_H */ @@ -732,8 +1005,8 @@ /* Define to 1 if you have the `chown' function. */ /* #undef HAVE_CHOWN */ -/* Define to 1 if you have the `chsize' function. */ -#define HAVE_CHSIZE 1 +/* Define to 1 if you have the `clock_getres' function. */ +/* #undef HAVE_CLOCK_GETRES */ /* Define to 1 if you have the `clock_gettime' function. */ /* #undef HAVE_CLOCK_GETTIME */ @@ -744,6 +1017,9 @@ /* Define to 1 if you have the `closedir' function. */ /* #undef HAVE_CLOSEDIR */ +/* Define to 1 if you have the `close_range' function. */ +/* #undef HAVE_CLOSE_RANGE */ + /* Define to 1 if you have the `confstr' function. */ /* #undef HAVE_CONFSTR */ @@ -768,6 +1044,20 @@ /* Define to 1 if you have the header file. */ #define HAVE_CTYPE_H 1 +/* Define to 1 if the alignas and alignof keywords work. */ +/* #undef HAVE_C_ALIGNASOF */ + +/* Define to 1 if bool, true and false work as per C2023. */ +/* #undef HAVE_C_BOOL */ + +/* Define to 1 if the static_assert keyword works. */ +#if (_MSC_VER >= 1931) +# define HAVE_C_STATIC_ASSERT 1 +#endif + +/* Define to 1 if C supports variable-length arrays. */ +/* #undef HAVE_C_VARARRAYS */ + /* Define if the GNU dcgettext() function is already present or preinstalled. */ /* #undef HAVE_DCGETTEXT */ @@ -796,6 +1086,30 @@ */ #define HAVE_DECL_DIRFD 0 +/* Define to 1 if you have the declaration of `ecvt', and to 0 if you don't. + */ +#define HAVE_DECL_ECVT 1 + +/* Define to 1 if you have the declaration of `execvpe', and to 0 if you + don't. */ +#define HAVE_DECL_EXECVPE 0 + +/* Define to 1 if you have the declaration of `fchdir', and to 0 if you don't. + */ +#define HAVE_DECL_FCHDIR 0 + +/* Define to 1 if you have the declaration of `fcloseall', and to 0 if you + don't. */ +#define HAVE_DECL_FCLOSEALL 1 + +/* Define to 1 if you have the declaration of `fcvt', and to 0 if you don't. + */ +#define HAVE_DECL_FCVT 1 + +/* Define to 1 if you have the declaration of `fdopendir', and to 0 if you + don't. */ +#define HAVE_DECL_FDOPENDIR 0 + /* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you don't. */ #define HAVE_DECL_FEOF_UNLOCKED 0 @@ -812,6 +1126,10 @@ you don't. */ #define HAVE_DECL_FGETS_UNLOCKED 0 +/* Define to 1 if you have the declaration of `fpurge', and to 0 if you don't. + */ +#define HAVE_DECL_FPURGE 0 + /* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if you don't. */ #define HAVE_DECL_FPUTC_UNLOCKED 0 @@ -824,6 +1142,14 @@ you don't. */ #define HAVE_DECL_FREAD_UNLOCKED 0 +/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you + don't. */ +#define HAVE_DECL_FREEADDRINFO 1 + +/* Define to 1 if you have the declaration of `fseeko', and to 0 if you don't. + */ +#define HAVE_DECL_FSEEKO 0 + /* Define to 1 if you have the declaration of `ftello', and to 0 if you don't. */ #define HAVE_DECL_FTELLO 0 @@ -832,10 +1158,30 @@ you don't. */ #define HAVE_DECL_FWRITE_UNLOCKED 0 +/* Define to 1 if you have the declaration of `gai_strerror', and to 0 if you + don't. */ +#define HAVE_DECL_GAI_STRERROR 1 + +/* Define to 1 if you have the declaration of `gai_strerrorA', and to 0 if you + don't. */ +#define HAVE_DECL_GAI_STRERRORA 1 + +/* Define to 1 if you have the declaration of `gcvt', and to 0 if you don't. + */ +#define HAVE_DECL_GCVT 1 + +/* Define to 1 if you have the declaration of `getaddrinfo', and to 0 if you + don't. */ +#define HAVE_DECL_GETADDRINFO 1 + /* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if you don't. */ #define HAVE_DECL_GETCHAR_UNLOCKED 0 +/* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't. + */ +#define HAVE_DECL_GETCWD 0 + /* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you don't. */ #define HAVE_DECL_GETC_UNLOCKED 0 @@ -852,6 +1198,18 @@ don't. */ #define HAVE_DECL_GETLINE 0 +/* Define to 1 if you have the declaration of `getnameinfo', and to 0 if you + don't. */ +#define HAVE_DECL_GETNAMEINFO 1 + +/* Define to 1 if you have the declaration of `getw', and to 0 if you don't. + */ +#define HAVE_DECL_GETW 1 + +/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you + don't. */ +#define HAVE_DECL_INET_NTOP 1 + /* Define to 1 if you have the declaration of `inet_pton', and to 0 if you don't. */ #define HAVE_DECL_INET_PTON 1 @@ -888,6 +1246,18 @@ otherwise. */ #define HAVE_DECL_MBSWIDTH_IN_WCHAR_H 0 +/* Define to 1 if you have the declaration of `memmem', and to 0 if you don't. + */ +#define HAVE_DECL_MEMMEM 0 + +/* Define to 1 if you have the declaration of `memrchr', and to 0 if you + don't. */ +#define HAVE_DECL_MEMRCHR 0 + +/* Define to 1 if you have the declaration of `posix_spawn', and to 0 if you + don't. */ +#define HAVE_DECL_POSIX_SPAWN 0 + /* Define to 1 if you have the declaration of `program_invocation_name', and to 0 if you don't. */ #define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 @@ -904,6 +1274,10 @@ don't. */ #define HAVE_DECL_PUTC_UNLOCKED 0 +/* Define to 1 if you have the declaration of `putw', and to 0 if you don't. + */ +#define HAVE_DECL_PUTW 1 + /* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. */ #define HAVE_DECL_SETENV 0 @@ -920,6 +1294,10 @@ don't. */ #define HAVE_DECL_STPNCPY 0 +/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. + */ +#define HAVE_DECL_STRDUP 1 + /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #define HAVE_DECL_STRERROR_R 0 @@ -944,6 +1322,10 @@ don't. */ /* #undef HAVE_DECL_WCRTOMB */ +/* Define to 1 if you have the declaration of `wcsdup', and to 0 if you don't. + */ +#define HAVE_DECL_WCSDUP 1 + /* Define to 1 if you have the declaration of `wctob', and to 0 if you don't. */ /* #undef HAVE_DECL_WCTOB */ @@ -952,6 +1334,10 @@ don't. */ #define HAVE_DECL_WCWIDTH 0 +/* Define to 1 if you have the declaration of `_fseeki64', and to 0 if you + don't. */ +#define HAVE_DECL__FSEEKI64 1 + /* Define to 1 if you have the declaration of `_putenv', and to 0 if you don't. */ #define HAVE_DECL__PUTENV 1 @@ -960,10 +1346,6 @@ don't. */ #define HAVE_DECL__SNPRINTF 1 -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - /* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. */ #define HAVE_DECL___ARGV 1 @@ -989,12 +1371,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 -/* Define to 1 if you have the `explicit_bzero' function. */ -/* #undef HAVE_EXPLICIT_BZERO */ +/* Define to 1 if you have the `error' function. */ +/* #undef HAVE_ERROR */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ERROR_H */ /* Define to 1 if you have the `explicit_memset' function. */ /* #undef HAVE_EXPLICIT_MEMSET */ +/* Define to 1 if you have the `faccessat' function. */ +/* #undef HAVE_FACCESSAT */ + /* Define to 1 if you have the `facl' function. */ /* #undef HAVE_FACL */ @@ -1002,6 +1390,9 @@ OpenBSD. */ /* #undef HAVE_FAKE_LOCALES */ +/* Define to 1 if you have the `fchdir' function. */ +/* #undef HAVE_FCHDIR */ + /* Define to 1 if you have the `fchmod' function. */ /* #undef HAVE_FCHMOD */ @@ -1011,6 +1402,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 +/* Define to 1 if you have the `fdopendir' function. */ +/* #undef HAVE_FDOPENDIR */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_FEATURES_H */ @@ -1026,15 +1420,21 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_FNMATCH_H */ -/* Define to 1 if you have the `fork' function. */ -/* #undef HAVE_FORK */ +/* Define to 1 if you have the `fpurge' function. */ +/* #undef HAVE_FPURGE */ /* Define to 1 if you have the `freelocale' function. */ /* #undef HAVE_FREELOCALE */ +/* Define if the 'free' function is guaranteed to preserve errno. */ +/* #undef HAVE_FREE_POSIX */ + /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ /* #undef HAVE_FSEEKO */ +/* Define to 1 if you have the `fstatat' function. */ +/* #undef HAVE_FSTATAT */ + /* Define to 1 if you have the `fsync' function. */ /* #undef HAVE_FSYNC */ @@ -1057,10 +1457,14 @@ /* #undef HAVE_GETACL */ /* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ +#define HAVE_GETADDRINFO 1 /* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 +/* #undef HAVE_GETCWD */ + +/* Define to 1 if getcwd works, but with shorter paths than is generally + tested with the replacement. */ +/* #undef HAVE_GETCWD_SHORTER */ /* Define to 1 if you have the `getdelim' function. */ /* #undef HAVE_GETDELIM */ @@ -1086,6 +1490,9 @@ /* Define to 1 if you have the `gethostname' function. */ /* #undef HAVE_GETHOSTNAME */ +/* Define to 1 if you have the `getline' function. */ +/* #undef HAVE_GETLINE */ + /* Define to 1 if you have the `getlocalename_l' function. */ /* #undef HAVE_GETLOCALENAME_L */ @@ -1095,7 +1502,7 @@ /* Define to 1 if you have the `getopt_long_only' function. */ /* #undef HAVE_GETOPT_LONG_ONLY */ -/* Define to 1 if you have the `getpagesize' function. */ +/* Define to 1 if the system has the 'getpagesize' function. */ /* #undef HAVE_GETPAGESIZE */ /* Define to 1 if you have the `getppriv' function. */ @@ -1110,6 +1517,9 @@ /* Define to 1 if you have the `getrlimit' function. */ /* #undef HAVE_GETRLIMIT */ +/* Define to 1 if you have the `getservbyname' function. */ +/* #undef HAVE_GETSERVBYNAME */ + /* Define if the GNU gettext() function is already present or preinstalled. */ /* #undef HAVE_GETTEXT */ @@ -1119,6 +1529,10 @@ /* Define to 1 if you have the `getuid' function. */ /* #undef HAVE_GETUID */ +/* Define if the uselocale exists, may be safely called, and returns + sufficient information. */ +/* #undef HAVE_GOOD_USELOCALE */ + /* Define if you have the iconv() function and it works. */ #define HAVE_ICONV 1 @@ -1192,7 +1606,7 @@ /* #undef HAVE_LC_MESSAGES */ /* Define to 1 if you have the header file. */ -#define HAVE_LIBINTL_H 1 +/* #undef HAVE_LIBINTL_H */ /* Define if you have the libtextstyle library. */ /* #undef HAVE_LIBTEXTSTYLE */ @@ -1201,7 +1615,7 @@ /* #undef HAVE_LIBUNISTRING */ /* Define to 1 if you have the header file. */ -#define HAVE_LIBXML2_LIBXML_XMLEXPORTS_H 1 +/* #undef HAVE_LIBXML2_LIBXML_XMLEXPORTS_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBXML2_LIBXML_XMLVERSION_H */ @@ -1212,6 +1626,12 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_XATTR_H */ + +/* Define to 1 if you have the `listxattr' function. */ +/* #undef HAVE_LISTXATTR */ + /* Define to 1 if you have the `localtime' function. */ #define HAVE_LOCALTIME 1 @@ -1233,7 +1653,7 @@ /* Define to 1 if you have the header file. */ #define HAVE_MALLOC_H 1 -/* Define if the 'malloc' function is POSIX compliant. */ +/* Define if malloc, realloc, and calloc set errno on allocation failure. */ /* #undef HAVE_MALLOC_POSIX */ /* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including @@ -1264,21 +1684,34 @@ /* Define to 1 if you have the `mbtowc' function. */ #define HAVE_MBTOWC 1 +/* Define to 1 if you have the `memmem' function. */ +/* #undef HAVE_MEMMEM */ + /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - /* Define to 1 if you have the `mempcpy' function. */ /* #undef HAVE_MEMPCPY */ +/* Define to 1 if you have the `memrchr' function. */ +/* #undef HAVE_MEMRCHR */ + /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 +/* Define to 1 if you have the `memset_explicit' function. */ +/* #undef HAVE_MEMSET_EXPLICIT */ + /* Define to 1 if you have the `memset_s' function. */ /* #undef HAVE_MEMSET_S */ +/* Define to 1 if getcwd minimally works, that is, its result can be trusted + when it succeeds. */ +#define HAVE_MINIMALLY_WORKING_GETCWD 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + /* Define to 1 if defines the MIN and MAX macros. */ /* #undef HAVE_MINMAX_IN_LIMITS_H */ @@ -1288,9 +1721,6 @@ /* Define to 1 if you have the `mkdtemp' function. */ /* #undef HAVE_MKDTEMP */ -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - /* Define to 1 if you have the `mprotect' function. */ /* #undef HAVE_MPROTECT */ @@ -1301,9 +1731,6 @@ concept. */ #define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - /* Define if the locale_t type does not contain the name of each locale category. */ /* #undef HAVE_NAMELESS_LOCALES */ @@ -1323,12 +1750,19 @@ /* Define to 1 if the system has obstacks that work with any size object. */ /* #undef HAVE_OBSTACK */ +/* Define to 1 if you have the `openat' function. */ +/* #undef HAVE_OPENAT */ + /* Define to 1 if you have the `opendir' function. */ /* #undef HAVE_OPENDIR */ /* Define to 1 if you have the header file. */ /* #undef HAVE_OS_H */ +/* Define to 1 if getcwd works, except it sometimes fails when it shouldn't, + setting errno to ERANGE, ENAMETOOLONG, or ENOENT. */ +/* #undef HAVE_PARTLY_WORKING_GETCWD */ + /* Define to 1 if you have the `pathconf' function. */ /* #undef HAVE_PATHCONF */ @@ -1341,21 +1775,29 @@ /* Define to 1 if you have the `pipe2' function. */ /* #undef HAVE_PIPE2 */ -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - /* Define to 1 if you have the `posix_spawn' function. */ /* #undef HAVE_POSIX_SPAWN */ /* Define to 1 if the system has the type `posix_spawnattr_t'. */ /* #undef HAVE_POSIX_SPAWNATTR_T */ +/* Define to 1 if you have the `posix_spawn_file_actions_addchdir' function. + */ +/* #undef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR */ + +/* Define to 1 if you have the `posix_spawn_file_actions_addchdir_np' + function. */ +/* #undef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP */ + /* Define to 1 if the system has the type `posix_spawn_file_actions_t'. */ /* #undef HAVE_POSIX_SPAWN_FILE_ACTIONS_T */ /* Define to 1 if you have the header file. */ /* #undef HAVE_PRIV_H */ +/* Define to 1 if you have the `pselect' function. */ +/* #undef HAVE_PSELECT */ + /* Define to 1 if you have the `pstat_getprocvm' function. */ /* #undef HAVE_PSTAT_GETPROCVM */ @@ -1390,9 +1832,6 @@ /* Define to 1 if the system has the type `ptrdiff_t'. */ #define HAVE_PTRDIFF_T 1 -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_PWD_H */ @@ -1411,8 +1850,8 @@ /* Define to 1 if you have the `readlinkat' function. */ /* #undef HAVE_READLINKAT */ -/* Define if the 'realloc' function is POSIX compliant. */ -/* #undef HAVE_REALLOC_POSIX */ +/* Define to 1 if you have the `reallocarray' function. */ +/* #undef HAVE_REALLOCARRAY */ /* Define to 1 if you have the `realpath' function. */ /* #undef HAVE_REALPATH */ @@ -1420,6 +1859,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_RESOLV_H */ +/* Define to 1 if you have the `rewinddir' function. */ +/* #undef HAVE_REWINDDIR */ + /* Define to 1 if 'long double' and 'double' have the same representation. */ #define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1 @@ -1435,6 +1877,9 @@ /* Define to 1 if you have the `sched_setscheduler' function. */ /* #undef HAVE_SCHED_SETSCHEDULER */ +/* Define to 1 if you have the header file. */ +#define HAVE_SDKDDKVER_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SEARCH_H 1 @@ -1471,7 +1916,7 @@ /* Define to 1 if you have the `sigaltstack' function. */ /* #undef HAVE_SIGALTSTACK */ -/* Define to 1 if defines the siginfo_t type, and struct sigaction +/* Define to 1 if defines the siginfo_t type and struct sigaction has the sa_sigaction member and the SA_SIGINFO flag. */ /* #undef HAVE_SIGINFO */ @@ -1510,6 +1955,10 @@ buffer had been large enough. */ #define HAVE_SNPRINTF_RETVAL_C99 1 +/* Define if the string produced by the snprintf function is always NUL + terminated. */ +#define HAVE_SNPRINTF_TRUNCATION_C99 1 + /* Define if the locale_t type is as on Solaris 11.4. */ /* #undef HAVE_SOLARIS114_LOCALES */ @@ -1522,8 +1971,11 @@ /* Define to 1 if you have the `statacl' function. */ /* #undef HAVE_STATACL */ -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDCKDINT_H */ /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -1532,6 +1984,12 @@ uintmax_t. */ #define HAVE_STDINT_H_WITH_UINTMAX 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDIO_EXT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 @@ -1541,18 +1999,12 @@ /* Define if you have the stpncpy() function and it works. */ /* #undef HAVE_STPNCPY */ -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - /* Define to 1 if you have the `strchrnul' function. */ /* #undef HAVE_STRCHRNUL */ /* Define to 1 if you have the `strcspn' function. */ #define HAVE_STRCSPN 1 -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - /* Define to 1 if you have the `strerror_r' function. */ /* #undef HAVE_STRERROR_R */ @@ -1577,12 +2029,21 @@ /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 +/* Define to 1 if the system has the type `struct addrinfo'. */ +#define HAVE_STRUCT_ADDRINFO 1 + /* Define to 1 if `decimal_point' is a member of `struct lconv'. */ /* #undef HAVE_STRUCT_LCONV_DECIMAL_POINT */ +/* Define to 1 if `int_p_cs_precedes' is a member of `struct lconv'. */ +/* #undef HAVE_STRUCT_LCONV_INT_P_CS_PRECEDES */ + /* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ /* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ +/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */ +/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */ + /* Define to 1 if the system has the type `struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE 1 @@ -1640,6 +2101,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SELECT_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SINGLE_THREADED_H */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SOCKET_H */ @@ -1667,6 +2131,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_THREADS_H */ +/* Define if you have the timespec_get function. */ +#define HAVE_TIMESPEC_GET 1 + /* Define to 1 if you have the header file. */ #define HAVE_TIME_H 1 @@ -1676,12 +2143,15 @@ /* Define to 1 if you have the `tsearch' function. */ /* #undef HAVE_TSEARCH */ -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 +/* Define to 1 if you have the header file. */ +#define HAVE_UCHAR_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_UNISTD_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTRING_WOE32DLL_H */ + /* Define to 1 if you have the `unsetenv' function. */ /* #undef HAVE_UNSETENV */ @@ -1695,7 +2165,7 @@ /* #undef HAVE_USLEEP */ /* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 +/* #undef HAVE_UTIME */ /* Define to 1 if you have the `utimensat' function. */ /* #undef HAVE_UTIMENSAT */ @@ -1715,12 +2185,9 @@ /* Define to 1 if you have the `vfork' function. */ /* #undef HAVE_VFORK */ -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VFORK_H */ - /* Define to 1 or 0, depending whether the compiler supports simple visibility declarations. */ -#define HAVE_VISIBILITY 0 +/* #undef HAVE_VISIBILITY */ /* Define to 1 if you have the `vsnprintf' function. */ /* #undef HAVE_VSNPRINTF */ @@ -1740,9 +2207,6 @@ /* Define to 1 if you have the `wcslen' function. */ #define HAVE_WCSLEN 1 -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - /* Define to 1 if you have the `wctob' function. */ #define HAVE_WCTOB 1 @@ -1765,8 +2229,12 @@ /* Define to 1 if you have the `wmempcpy' function. */ /* #undef HAVE_WMEMPCPY */ -/* Define to 1 if `fork' works. */ -/* #undef HAVE_WORKING_FORK */ +/* Define to 1 if fstatat (..., 0) works. For example, it does not work in AIX + 7.1. */ +/* #undef HAVE_WORKING_FSTATAT_ZERO_FLAG */ + +/* Define if the mbrtoc32 function basically works. */ +/* #undef HAVE_WORKING_MBRTOC32 */ /* Define to 1 if O_NOATIME works. */ #define HAVE_WORKING_O_NOATIME 0 @@ -1774,26 +2242,23 @@ /* Define to 1 if O_NOFOLLOW works. */ #define HAVE_WORKING_O_NOFOLLOW 0 -/* Define if the uselocale function exists any may safely be called. */ +/* Define if the uselocale function exists and may safely be called. */ /* #undef HAVE_WORKING_USELOCALE */ /* Define if utimes works properly. */ /* #undef HAVE_WORKING_UTIMES */ -/* Define to 1 if `vfork' works. */ -/* #undef HAVE_WORKING_VFORK */ - -/* Define to 1 if you have the `wprintf' function. */ -/* #undef HAVE_WPRINTF */ - /* Define to 1 if you have the header file. */ #define HAVE_WS2TCPIP_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_XLOCALE_H */ -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 +/* Define to 1 if you have the `_chsize' function. */ +#define HAVE__CHSIZE 1 + +/* Define to 1 if you have the `_fseeki64' function. */ +#define HAVE__FSEEKI64 1 /* Define to 1 if you have the `_ftelli64' function. */ #define HAVE__FTELLI64 1 @@ -1814,48 +2279,161 @@ #endif -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ +/* Define to 1 if you have the `__fpurge' function. */ +/* #undef HAVE___FPURGE */ -/* Define to 1 if the compiler supports the keyword '__inline'. */ -#define HAVE___INLINE 1 - -/* Define to 1 if you have the `__secure_getenv' function. */ -/* #undef HAVE___SECURE_GETENV */ +/* Define to 1 if you have the `__freading' function. */ +/* #undef HAVE___FREADING */ -/* Define to 1 if you have the `__xpg_strerror_r' function. */ -/* #undef HAVE___XPG_STRERROR_R */ +/* Define to 1 if ctype.h defines __header_inline. */ +/* #undef HAVE___HEADER_INLINE */ -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST +/* Please see the Gnulib manual for how to use these macros. -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . -/* Define to the value of ${prefix}, as a string. */ -#define INSTALLPREFIX "/cygdrive/c/software.b/gettext-0.21" + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Oracle Developer Studio 12.6 + (Sun C 5.15 SunOS_sparc 2017/05/30). -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'long double'. */ -#define LDBL_EXPBIT0_BIT 20 + OS X 10.8 and earlier; see: + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html -/* Define as the word index where to find the exponent of 'long double'. */ -#define LDBL_EXPBIT0_WORD 1 + DragonFly; see + http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log -/* Define as the bit index in the word where to find the sign of 'long - double'. */ -/* #undef LDBL_SIGNBIT_BIT */ + FreeBSD; see: + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html -/* Define as the word index where to find the sign of 'long double'. */ -/* #undef LDBL_SIGNBIT_WORD */ + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. -/* Define if libxml is being used as a static library. */ + GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. It defines a macro + __GNUC_STDC_INLINE__ to indicate this situation or a macro + __GNUC_GNU_INLINE__ to indicate the opposite situation. + GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline + semantics but warns, unless -fgnu89-inline is used: + warning: C99 inline functions are not supported; using GNU89 + warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute + It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. + */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined HAVE___HEADER_INLINE \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? (defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + && !defined __PCC__) \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined __PCC__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE _GL_UNUSED static +# define _GL_EXTERN_INLINE _GL_UNUSED static +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + +/* Define to 1 if the compiler supports the keyword '__inline'. */ +#define HAVE___INLINE 1 + +/* Define to 1 if you have the `__secure_getenv' function. */ +/* #undef HAVE___SECURE_GETENV */ + +/* Define to 1 if you have the `__xpg_strerror_r' function. */ +/* #undef HAVE___XPG_STRERROR_R */ + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* Define to a symbolic name denoting the flavor of iconv_open() + implementation. */ +/* #undef ICONV_FLAVOR */ + +/* Define to the value of ${prefix}, as a string. */ +#define INSTALLPREFIX "c:/vs14.0" + +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'long double'. */ +#define LDBL_EXPBIT0_BIT 20 + +/* Define as the word index where to find the exponent of 'long double'. */ +#define LDBL_EXPBIT0_WORD 1 + +/* Define as the bit index in the word where to find the sign of 'long + double'. */ +/* #undef LDBL_SIGNBIT_BIT */ + +/* Define as the word index where to find the sign of 'long double'. */ +/* #undef LDBL_SIGNBIT_WORD */ + +/* Define if libxml is being used as a static library. */ /* #undef LIBXML_STATIC */ +/* Define if localename.c overrides newlocale(), duplocale(), freelocale(). */ +/* #undef LOCALENAME_ENHANCE_LOCALE_FUNCS */ + /* Define to 1 if lseek does not detect pipes. */ #define LSEEK_PIPE_BROKEN 1 @@ -1872,9 +2450,17 @@ /* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ /* #undef MAP_ANONYMOUS */ +/* Define if the mbrtoc32 function does not return (size_t) -2 for empty + input. */ +/* #undef MBRTOC32_EMPTY_INPUT_BUG */ + +/* Define if the mbrtoc32 function may signal encoding errors in the C locale. + */ +#define MBRTOC32_IN_C_LOCALE_MAYBE_EILSEQ 1 + /* Define if the mbrtowc function does not return (size_t) -2 for empty input. */ -/* #undef MBRTOWC_EMPTY_INPUT_BUG */ +#define MBRTOWC_EMPTY_INPUT_BUG 1 /* Define if the mbrtowc function may signal encoding errors in the C locale. */ @@ -1911,6 +2497,9 @@ /* Define to 1 to enable a multithread-safety fix of setlocale. */ #define NEED_SETLOCALE_MTSAFE 0 +/* Define to 1 if nl_langinfo is multithread-safe. */ +/* #undef NL_LANGINFO_MTSAFE */ + /* Define to 1 if open() fails to recognize a trailing slash. */ /* #undef OPEN_TRAILING_SLASH_BUG */ @@ -1924,10 +2513,10 @@ #define PACKAGE_NAME "gettext-tools" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-tools 0.21" +#define PACKAGE_STRING "gettext-tools 0.22.3" /* Define to the suffix of this package */ -#define PACKAGE_SUFFIX "-0.21" +#define PACKAGE_SUFFIX "-0.22.3" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gettext-tools" @@ -1936,7 +2525,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.21" +#define PACKAGE_VERSION "0.22.3" /* Define to the type that is the result of default argument promotions of type mode_t. */ @@ -1965,16 +2554,28 @@ /* Define to 1 if readlink fails to recognize a trailing slash. */ /* #undef READLINK_TRAILING_SLASH_BUG */ -/* Define to 1 if gnulib's dirfd() replacement is used. */ -/* #undef REPLACE_DIRFD */ +/* Define to 1 if readlink sets errno instead of truncating a too-long link. + */ +/* #undef READLINK_TRUNCATE_BUG */ + +/* Define to 1 if gnulib's fchdir() replacement is used. */ +#define REPLACE_FCHDIR 1 /* Define to 1 if stat needs help when passed a file name with a trailing slash */ /* #undef REPLACE_FUNC_STAT_FILE */ +/* Define to 1 if utime needs help when passed a file name with a trailing + slash */ +/* #undef REPLACE_FUNC_UTIME_FILE */ + /* Define if nl_langinfo exists but is overridden by gnulib. */ /* #undef REPLACE_NL_LANGINFO */ +/* Define to 1 if open() should work around the inability to open a directory. + */ +#define REPLACE_OPEN_DIRECTORY 1 + /* Define if gnulib uses its own posix_spawn and posix_spawnp functions. */ #define REPLACE_POSIX_SPAWN 1 @@ -1984,9 +2585,6 @@ /* Define if vasnprintf exists but is overridden by gnulib. */ /* #undef REPLACE_VASNPRINTF */ -/* Define as const if the declaration of setlocale() needs const. */ -#define SETLOCALE_CONST - /* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */ #define SETLOCALE_NULL_ALL_MTSAFE 1 @@ -1994,8 +2592,10 @@ #define SETLOCALE_NULL_ONE_MTSAFE 1 /* File name of the Bourne shell. */ -#if defined __CYGWIN__ || defined __ANDROID__ +#if (defined _WIN32 && !defined __CYGWIN__) || defined __CYGWIN__ || defined __ANDROID__ /* Omit the directory part because + - For native Windows programs in a Cygwin environment, the Cygwin mounts + are not visible. - For 32-bit Cygwin programs in a 64-bit Cygwin environment, the Cygwin mounts are not visible. - On Android, /bin/sh does not exist. It's /system/bin/sh instead. */ @@ -2024,15 +2624,17 @@ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define to 1 if the `S_IS*' macros in do not work properly. */ /* #undef STAT_MACROS_BROKEN */ -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 /* Define to 1 if strerror_r returns char *. */ @@ -2050,7 +2652,11 @@ /* Define to the prefix of C symbols at the assembler and linker level, either an underscore or empty. */ -#define USER_LABEL_PREFIX +#ifdef _WIN64 +# define USER_LABEL_PREFIX +#else +# define USER_LABEL_PREFIX _ +#endif /* Define to nonzero if you want access control list support. */ #define USE_ACL 0 @@ -2065,6 +2671,10 @@ /* Define if the POSIX multithreading library can be used. */ /* #undef USE_POSIX_THREADS */ +/* Define if references to the POSIX multithreading library are satisfied by + libc. */ +/* #undef USE_POSIX_THREADS_FROM_LIBC */ + /* Define if references to the POSIX multithreading library should be made weak. */ /* #undef USE_POSIX_THREADS_WEAK */ @@ -2077,19 +2687,44 @@ #ifndef _DARWIN_C_SOURCE # define _DARWIN_C_SOURCE 1 #endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif -/* Enable NetBSD extensions on NetBSD. */ +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ #ifndef _NETBSD_SOURCE # define _NETBSD_SOURCE 1 #endif -/* Enable OpenBSD extensions on NetBSD. */ +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ #ifndef _OPENBSD_SOURCE # define _OPENBSD_SOURCE 1 #endif -/* Enable threading extensions on Solaris. */ +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif @@ -2105,11 +2740,15 @@ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # define __STDC_WANT_IEC_60559_DFP_EXT__ 1 #endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# define __STDC_WANT_IEC_60559_EXT__ 1 +#endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 #endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 #endif @@ -2125,36 +2764,27 @@ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ #ifndef _XOPEN_SOURCE /* # undef _XOPEN_SOURCE */ #endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 +/* An alias of GNULIB_STDIO_SINGLE_THREAD. */ +#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD /* Define if the native Windows multithreading API can be used. */ #define USE_WINDOWS_THREADS 1 +/* Define to 1 to use the Linux extended attributes library. */ +/* #undef USE_XATTR */ + /* Define to a working va_copy macro or replacement. */ #define VA_COPY va_copy /* Version number of package */ -#define VERSION "0.21" +#define VERSION "0.22.3" /* Define to 1 if unsetenv returns void instead of int. */ /* #undef VOID_UNSETENV */ @@ -2206,21 +2836,18 @@ #endif +/* Define to enable the declarations of ISO C 11 types and functions. */ +/* #undef _ISOC11_SOURCE */ + /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ /* #undef _LARGEFILE_SOURCE */ -/* Define for large files, on AIX-style hosts. */ +/* Define to 1 on platforms where this makes off_t a 64-bit type. */ /* #undef _LARGE_FILES */ /* Define to 1 on Solaris. */ /* #undef _LCONV_C99 */ -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - /* The _Noreturn keyword of C11. */ #ifndef _Noreturn # if (defined __cplusplus \ @@ -2234,14 +2861,20 @@ AIX system header files and several gnulib header files use precisely this syntax with 'extern'. */ # define _Noreturn [[noreturn]] +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn # elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (_GL_GNUC_PREREQ (4, 7) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C +# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) @@ -2251,17 +2884,10 @@ #endif -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - /* Define to 1 in order to get the POSIX compatible declarations of socket functions. */ /* #undef _POSIX_PII_SOCKET */ -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - /* Define if you want to include , so that it consistently overrides 's RE_DUP_MAX. */ #define _REGEX_INCLUDE_LIMITS_H 1 @@ -2269,6 +2895,9 @@ /* Define if you want regoff_t to be at least as wide POSIX requires. */ #define _REGEX_LARGE_OFFSETS 1 +/* Number of bits in time_t, on hosts where this is settable. */ +/* #undef _TIME_BITS */ + /* For standard stat data types on VMS. */ #define _USE_STD_STAT 1 @@ -2276,12 +2905,19 @@ used. */ #define __GETOPT_PREFIX rpl_ +/* Define to 1 on platforms where this makes time_t a 64-bit type. */ +/* #undef __MINGW_USE_VC2005_COMPAT */ + /* Define to 1 if the system predates C++11. */ /* #undef __STDC_CONSTANT_MACROS */ /* Define to 1 if the system predates C++11. */ /* #undef __STDC_LIMIT_MACROS */ +/* Define to 1 if C does not support variable-length arrays, and if the + compiler does not already define this. */ +#define __STDC_NO_VLA__ 1 + /* The _GL_ASYNC_SAFE marker should be attached to functions that are signal handlers (for signals other than SIGABRT, SIGPIPE) or can be invoked from such signal handlers. Such functions have some restrictions: @@ -2310,7 +2946,11 @@ /* Attributes. */ -#ifdef __has_attribute +#if (defined __has_attribute \ + && (!defined __clang_minor__ \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 5 <= __clang_major__))) # define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) #else # define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr @@ -2320,17 +2960,18 @@ # define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) # define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) # define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) +# define _GL_ATTR_diagnose_if 0 # define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) # define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) # define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) # define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) # define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) +# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) # ifdef _ICC # define _GL_ATTR_may_alias 0 # else # define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) # endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) # define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) # define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) # define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) @@ -2343,306 +2984,482 @@ # define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) #endif - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) +/* Use __has_c_attribute if available. However, do not use with + pre-C23 GCC, which can issue false positives if -Wpedantic. */ +#if (defined __has_c_attribute \ + && ! (_GL_GNUC_PREREQ (4, 6) \ + && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710)) +# define _GL_HAVE___HAS_C_ATTRIBUTE 1 #else -# define _GL_ATTRIBUTE_ALWAYS_INLINE +# define _GL_HAVE___HAS_C_ATTRIBUTE 0 #endif -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) +/* Define if, in a function declaration, the attributes in bracket syntax + [[...]] must come before the attributes in __attribute__((...)) syntax. + If this is defined, it is best to avoid the bracket syntax, so that the + various _GL_ATTRIBUTE_* can be cumulated on the same declaration in any + order. */ +#ifdef __cplusplus +# if defined __clang__ +# define _GL_BRACKET_BEFORE_ATTRIBUTE 1 +# endif #else -# define _GL_ATTRIBUTE_COLD +# if defined __GNUC__ && !defined __clang__ +# define _GL_BRACKET_BEFORE_ATTRIBUTE 1 +# endif #endif -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST +/* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function + is the size of the returned memory block. + _GL_ATTRIBUTE_ALLOC_SIZE ((M, N)) declares that the Mth argument multiplied + by the Nth argument of the function is the size of the returned memory block. + */ +/* Applies to: function, pointer to function, function types. */ +#ifndef _GL_ATTRIBUTE_ALLOC_SIZE +# if _GL_HAS_ATTRIBUTE (alloc_size) +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) +# else +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) +# endif #endif -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED +/* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the + function and report an error if it cannot do so. */ +/* Applies to: function. */ +#ifndef _GL_ATTRIBUTE_ALWAYS_INLINE +# if _GL_HAS_ATTRIBUTE (always_inline) +# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) +# else +# define _GL_ATTRIBUTE_ALWAYS_INLINE +# endif #endif -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) +/* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show + in stack traces when debugging. The compiler should omit the function from + stack traces. */ +/* Applies to: function. */ +#ifndef _GL_ATTRIBUTE_ARTIFICIAL +# if _GL_HAS_ATTRIBUTE (artificial) +# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) +# else +# define _GL_ATTRIBUTE_ARTIFICIAL +# endif #endif -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +/* _GL_ATTRIBUTE_COLD declares that the function is rarely executed. */ +/* Applies to: functions. */ +/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at + . + Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */ +#ifndef _GL_ATTRIBUTE_COLD +# if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ +# ifndef __SUNPRO_C +# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) +# else +# define _GL_ATTRIBUTE_COLD __attribute__ ((cold)) +# endif +# else +# define _GL_ATTRIBUTE_COLD +# endif #endif -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) +/* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate + calls to the function with the same arguments. + This attribute is safe for a function that neither depends on nor affects + observable state, and always returns exactly once - e.g., does not loop + forever, and does not call longjmp. + (This attribute is stricter than _GL_ATTRIBUTE_PURE.) */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_CONST +# if _GL_HAS_ATTRIBUTE (const) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _GL_ATTRIBUTE_CONST +# endif #endif -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. + _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if _GL_GNUC_PREREQ (11, 0) +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif #endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF +/* If gnulib's or has already defined this macro, continue + to use this earlier definition, since may not have been included + yet. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif #endif -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS +/* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated. + The compiler may warn if the entity is used. */ +/* Applies to: + - function, variable, + - struct, union, struct/union member, + - enumeration, enumeration item, + - typedef, + in C++ also: namespace, class, template specialization. */ +#ifndef _GL_ATTRIBUTE_DEPRECATED +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__deprecated__) +# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] +# endif +# endif +# endif +# if !defined _GL_ATTRIBUTE_DEPRECATED && _GL_HAS_ATTRIBUTE (deprecated) +# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) +# endif +# ifndef _GL_ATTRIBUTE_DEPRECATED +# define _GL_ATTRIBUTE_DEPRECATED +# endif #endif -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED +/* _GL_ATTRIBUTE_ERROR(msg) requests an error if a function is called and + the function call is not optimized away. + _GL_ATTRIBUTE_WARNING(msg) requests a warning if a function is called and + the function call is not optimized away. */ +/* Applies to: functions. */ +#if !(defined _GL_ATTRIBUTE_ERROR && defined _GL_ATTRIBUTE_WARNING) +# if _GL_HAS_ATTRIBUTE (error) +# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) +# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) +# elif _GL_HAS_ATTRIBUTE (diagnose_if) +# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error"))) +# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# else +# define _GL_ATTRIBUTE_ERROR(msg) +# define _GL_ATTRIBUTE_WARNING(msg) +# endif #endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC +/* _GL_ATTRIBUTE_EXTERNALLY_VISIBLE declares that the entity should remain + visible to debuggers etc., even with '-fwhole-program'. */ +/* Applies to: functions, variables. */ +#ifndef _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +# if _GL_HAS_ATTRIBUTE (externally_visible) +# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) +# else +# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +# endif #endif -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD +/* _GL_ATTRIBUTE_FALLTHROUGH declares that it is not a programming mistake if + the control flow falls through to the immediately following 'case' or + 'default' label. The compiler should not warn in this case. */ +/* Applies to: Empty statement (;), inside a 'switch' statement. */ +/* Always expands to something. */ +#ifndef _GL_ATTRIBUTE_FALLTHROUGH +# if _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__fallthrough__) +# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] +# endif +# endif +# if !defined _GL_ATTRIBUTE_FALLTHROUGH && _GL_HAS_ATTRIBUTE (fallthrough) +# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) +# endif +# ifndef _GL_ATTRIBUTE_FALLTHROUGH +# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) +# endif #endif -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE +/* _GL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK)) + declares that the STRING-INDEXth function argument is a format string of + style ARCHETYPE, which is one of: + printf, gnu_printf + scanf, gnu_scanf, + strftime, gnu_strftime, + strfmon, + or the same thing prefixed and suffixed with '__'. + If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK + are suitable for the format string. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_FORMAT +# if _GL_HAS_ATTRIBUTE (format) +# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +# else +# define _GL_ATTRIBUTE_FORMAT(spec) +# endif #endif -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) +/* _GL_ATTRIBUTE_LEAF declares that if the function is called from some other + compilation unit, it executes code from that unit only by return or by + exception handling. This declaration lets the compiler optimize that unit + more aggressively. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_LEAF +# if _GL_HAS_ATTRIBUTE (leaf) +# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) +# else +# define _GL_ATTRIBUTE_LEAF +# endif #endif -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if _GL_HAS_ATTRIBUTE (malloc) +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif #endif -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW +/* _GL_ATTRIBUTE_MAY_ALIAS declares that pointers to the type may point to the + same storage as pointers to other types. Thus this declaration disables + strict aliasing optimization. */ +/* Applies to: types. */ +/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */ +#ifndef _GL_ATTRIBUTE_MAY_ALIAS +# if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C +# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) +# else +# define _GL_ATTRIBUTE_MAY_ALIAS +# endif #endif -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED +/* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if + the entity is not used. The compiler should not warn if the entity is not + used. */ +/* Applies to: + - function, variable, + - struct, union, struct/union member, + - enumeration, enumeration item, + - typedef, + in C++ also: class. */ +/* In C++ and C23, this is spelled [[__maybe_unused__]]. + GCC's syntax is __attribute__ ((__unused__)). + clang supports both syntaxes. Except that with clang ≥ 6, < 10, in C++ mode, + __has_c_attribute (__maybe_unused__) yields true but the use of + [[__maybe_unused__]] nevertheless produces a warning. */ +#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if defined __clang__ && defined __cplusplus +# if !defined __apple_build_version__ && __clang_major__ >= 10 +# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# elif _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__maybe_unused__) +# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# endif +# endif +# ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED +# endif #endif +/* Alternative spelling of this macro, for convenience and for + compatibility with glibc/include/libc-symbols.h. */ +#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED +/* Earlier spellings of this macro. */ +#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE +/* _GL_ATTRIBUTE_NODISCARD declares that the caller of the function should not + discard the return value. The compiler may warn if the caller does not use + the return value, unless the caller uses something like ignore_value. */ +/* Applies to: function, enumeration, class. */ +#ifndef _GL_ATTRIBUTE_NODISCARD +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if defined __clang__ && defined __cplusplus + /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] produces + a warning. + The 1000 below means a yet unknown threshold. When clang++ version X + starts supporting [[__nodiscard__]] without warning about it, you can + replace the 1000 with X. */ +# if __clang_major__ >= 1000 +# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] +# endif +# elif _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__nodiscard__) +# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] +# endif +# endif +# endif +# if !defined _GL_ATTRIBUTE_NODISCARD && _GL_HAS_ATTRIBUTE (warn_unused_result) +# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) +# endif +# ifndef _GL_ATTRIBUTE_NODISCARD +# define _GL_ATTRIBUTE_NODISCARD +# endif #endif -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL +/* _GL_ATTRIBUTE_NOINLINE tells that the compiler should not inline the + function. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_NOINLINE +# if _GL_HAS_ATTRIBUTE (noinline) +# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) +# else +# define _GL_ATTRIBUTE_NOINLINE +# endif #endif -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) +/* _GL_ATTRIBUTE_NONNULL ((N1, N2,...)) declares that the arguments N1, N2,... + must not be NULL. + _GL_ATTRIBUTE_NONNULL () declares that all pointer arguments must not be + null. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_NONNULL +# if _GL_HAS_ATTRIBUTE (nonnull) +# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) +# else +# define _GL_ATTRIBUTE_NONNULL(args) +# endif #endif - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL +/* _GL_ATTRIBUTE_NONSTRING declares that the contents of a character array is + not meant to be NUL-terminated. */ +/* Applies to: struct/union members and variables that are arrays of element + type '[[un]signed] char'. */ +#ifndef _GL_ATTRIBUTE_NONSTRING +# if _GL_HAS_ATTRIBUTE (nonstring) +# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) +# else +# define _GL_ATTRIBUTE_NONSTRING +# endif #endif +/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ -/* Define as 'access' if you don't have the eaccess() function. */ -#define eaccess access - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG +/* Applies to: functions. */ +/* After a function's parameter list, this attribute must come first, before + other attributes. */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if _GL_GNUC_PREREQ (2, 8) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if _GL_HAS_ATTRIBUTE (nothrow) +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif #endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) + +/* _GL_ATTRIBUTE_PACKED declares: + For struct members: The member has the smallest possible alignment. + For struct, union, class: All members have the smallest possible alignment, + minimizing the memory required. */ +/* Applies to: struct members, struct, union, + in C++ also: class. */ +#ifndef _GL_ATTRIBUTE_PACKED +# if _GL_HAS_ATTRIBUTE (packed) +# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) # else -# define _GL_INLINE extern inline +# define _GL_ATTRIBUTE_PACKED # endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED #endif -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA +/* _GL_ATTRIBUTE_PURE declares that It is OK for a compiler to omit duplicate + calls to the function with the same arguments if observable state is not + changed between calls. + This attribute is safe for a function that does not affect + observable state, and always returns exactly once. + (This attribute is looser than _GL_ATTRIBUTE_CONST.) */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_PURE +# if _GL_HAS_ATTRIBUTE (pure) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# define _GL_ATTRIBUTE_PURE # endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END #endif -/* Define to `int' if doesn't define. */ -#define gid_t int +/* _GL_ATTRIBUTE_RETURNS_NONNULL declares that the function's return value is + a non-NULL pointer. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_RETURNS_NONNULL +# if _GL_HAS_ATTRIBUTE (returns_nonnull) +# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) +# else +# define _GL_ATTRIBUTE_RETURNS_NONNULL +# endif +#endif -/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b)) +/* _GL_ATTRIBUTE_SENTINEL(pos) declares that the variadic function expects a + trailing NULL argument. + _GL_ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99). + _GL_ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_SENTINEL +# if _GL_HAS_ATTRIBUTE (sentinel) +# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) +# else +# define _GL_ATTRIBUTE_SENTINEL(pos) +# endif +#endif -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#ifndef _GL_UNUSED -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) +/* A helper macro. Don't use it directly. */ +#ifndef _GL_ATTRIBUTE_UNUSED +# if _GL_HAS_ATTRIBUTE (unused) +# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else -# define _GL_UNUSED +# define _GL_ATTRIBUTE_UNUSED # endif #endif -/* The __pure__ attribute was added in gcc 2.96. */ -#ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) + +/* _GL_UNUSED_LABEL; declares that it is not a programming mistake if the + immediately preceding label is not used. The compiler should not warn + if the label is not used. */ +/* Applies to: label (both in C and C++). */ +/* Note that g++ < 4.5 does not support the '__attribute__ ((__unused__)) ;' + syntax. But clang does. */ +#ifndef _GL_UNUSED_LABEL +# if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__ +# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED # else -# define _GL_ATTRIBUTE_PURE /* empty */ +# define _GL_UNUSED_LABEL # endif #endif +/* In C++, there is the concept of "language linkage", that encompasses + name mangling and function calling conventions. + The following macros start and end a block of "C" linkage. */ +#ifdef __cplusplus +# define _GL_BEGIN_C_LINKAGE extern "C" { +# define _GL_END_C_LINKAGE } +#else +# define _GL_BEGIN_C_LINKAGE +# define _GL_END_C_LINKAGE +#endif + + +/* Define as 'access' if you don't have the eaccess() function. */ +#define eaccess access + +/* Define to `int' if doesn't define. */ +#define gid_t int + +/* A replacement for va_copy, if needed. */ +#define gl_va_copy(a,b) ((a) = (b)) + /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus @@ -2665,7 +3482,9 @@ /* Define to a type if does not define. */ /* #undef mbstate_t */ -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. +/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where + n1 and n2 are expressions without side effects, that evaluate to real + numbers (excluding NaN). It returns 1 if n1 > n2 0 if n1 == n2 @@ -2688,8 +3507,12 @@ /* Define to `long int' if does not define. */ /* #undef off_t */ -/* Define to `int' if does not define. */ -#define pid_t int +/* Define as a signed integer type capable of holding a process identifier. */ +#ifdef _WIN64 +# define pid_t __int64 +#else +# define pid_t int +#endif /* Define as the type of the result of subtracting two pointers, if the system doesn't define it. */ @@ -2742,7 +3565,7 @@ /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is - supported directly. */ + supported only directly. */ #define restrict /**/ /* Work around a bug in older versions of Sun C++, which did not #define __restrict__ or support _Restrict or __restrict__ @@ -2766,14 +3589,30 @@ /* #undef socklen_t */ /* Define as a signed type of the same size as size_t. */ -#define ssize_t int +#ifdef _WIN64 +# define ssize_t long long +#else +# define ssize_t long +#endif /* Define to `int' if doesn't define. */ #define uid_t int -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ + + /* This definition is a duplicate of the one in unitypes.h. + It is here so that we can cope with an older version of unitypes.h + that does not contain this definition and that is pre-installed among + the public header files. */ + # if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 + # define _UC_RESTRICT __restrict + # elif 199901L <= __STDC_VERSION__ || defined restrict + # define _UC_RESTRICT restrict + # else + # define _UC_RESTRICT + # endif + /* Define to an unsigned 32-bit type if lacks this type. */ #define useconds_t unsigned int @@ -2781,49 +3620,157 @@ /* Define as a macro for copying va_list variables. */ /* #undef va_copy */ -/* Define as `fork' if `vfork' does not work. */ -#define vfork fork +#if !defined HAVE_C_ALIGNASOF \ + && !(defined __cplusplus && 201103 <= __cplusplus) \ + && !defined alignof +# if defined HAVE_STDALIGN_H +# include +# endif +/* ISO C23 alignas and alignof for platforms that lack it. + + References: + ISO C23 (latest free draft + ) + sections 6.5.3.4, 6.7.5, 7.15. + C++11 (latest free draft + ) + section 18.10. */ + +/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment + requirement of a structure member (i.e., slot or field) that is of + type TYPE, as an integer constant expression. + + This differs from GCC's and clang's __alignof__ operator, which can + yield a better-performing alignment for an object of that type. For + example, on x86 with GCC and on Linux/x86 with clang, + __alignof__ (double) and __alignof__ (long long) are 8, whereas + alignof (double) and alignof (long long) are 4 unless the option + '-malign-double' is used. + + The result cannot be used as a value for an 'enum' constant, if you + want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ + +/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 + . + clang versions < 8.0.0 have the same bug. */ +# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ + || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ + && !defined __clang__) \ + || (defined __clang__ && __clang_major__ < 8)) +# undef/**/_Alignof +# ifdef __cplusplus +# if (201103 <= __cplusplus || defined _MSC_VER) +# define _Alignof(type) alignof (type) +# else + template struct __alignof_helper { char __a; __t __b; }; +# if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__ +# define _Alignof(type) __builtin_offsetof (__alignof_helper, __b) +# else +# define _Alignof(type) offsetof (__alignof_helper, __b) +# endif +# define _GL_STDALIGN_NEEDS_STDDEF 1 +# endif +# else +# if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__ +# define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b) +# else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +# define _GL_STDALIGN_NEEDS_STDDEF 1 +# endif +# endif +# endif +# if ! (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)) +# undef/**/alignof +# define alignof _Alignof +# endif + +/* alignas (A), also known as _Alignas (A), aligns a variable or type + to the alignment A, where A is an integer constant expression. For + example: + + int alignas (8) foo; + struct s { int a; int alignas (8) bar; }; + + aligns the address of FOO and the offset of BAR to be multiples of 8. + + A should be a power of two that is at least the type's alignment + and at most the implementation's alignment limit. This limit is + 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable + to MSVC through at least version 10.0, A should be an integer + constant, as MSVC does not support expressions such as 1 << 3. + To be portable to Sun C 5.11, do not align auto variables to + anything stricter than their default alignment. + + The following C23 requirements are not supported here: + + - If A is zero, alignas has no effect. + - alignas can be used multiple times; the strictest one wins. + - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded + */ +# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +# if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER) +# define _Alignas(a) alignas (a) +# elif (!defined __attribute__ \ + && ((defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + : __GNUC__ && !defined __ibmxl__) \ + || (4 <= __clang_major__) \ + || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ + || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)) +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +# elif 1300 <= _MSC_VER +# define _Alignas(a) __declspec (align (a)) +# endif +# endif +# if !defined HAVE_STDALIGN_H +# if ((defined _Alignas \ + && !(defined __cplusplus \ + && (201103 <= __cplusplus || defined _MSC_VER))) \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# define alignas _Alignas +# endif +# endif + +# if defined _GL_STDALIGN_NEEDS_STDDEF +# include +# endif +#endif + +#ifndef HAVE_C_BOOL +# if !defined __cplusplus && !defined __bool_true_false_are_defined +# if HAVE_STDBOOL_H +# include +# else +# if defined __SUNPRO_C +# error " is not usable with this configuration. To make it usable, add -D_STDC_C99= to $CC." +# else +# error " does not exist on this platform. Use gnulib module 'stdbool-c99' instead of gnulib module 'stdbool'." +# endif +# endif +# endif +# if !true +# define true (!false) +# endif +#endif +#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6))) + #include + #undef/**/assert + #ifdef __sgi + #undef/**/__ASSERT_H__ + #endif + /* Solaris 11.4 defines static_assert as a macro with 2 arguments. + We need it also to be invocable with a single argument. */ + #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus + #undef/**/static_assert + #define static_assert _Static_assert + #endif +#endif #ifndef ENDIANNESS @@ -2867,6 +3814,15 @@ /* Extra OS/2 (emx+gcc) defines. */ #if defined __EMX__ && !defined __KLIBC__ -# include "intl/os2compat.h" +# include "../gettext-runtime/intl/os2compat.h" #endif + + +#define __libc_lock_t gl_lock_t +#define __libc_lock_define gl_lock_define +#define __libc_lock_define_initialized gl_lock_define_initialized +#define __libc_lock_init gl_lock_init +#define __libc_lock_lock gl_lock_lock +#define __libc_lock_unlock gl_lock_unlock + diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/arpa/inet.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/arpa/inet.h similarity index 83% rename from gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/arpa/inet.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/arpa/inet.h index a53c966d4..9ea41a7f8 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/arpa/inet.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/arpa/inet.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_ARPA_INET_H @@ -50,27 +50,32 @@ #ifndef _GL_ARPA_INET_H #define _GL_ARPA_INET_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Get all possible declarations of inet_ntop() and inet_pton(). */ -#if (0 || IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ +#if (1 || IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ && 1 # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -158,6 +163,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -205,6 +216,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -230,6 +251,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -327,7 +356,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -355,9 +384,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -373,26 +402,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -401,19 +430,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -486,13 +515,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -501,27 +537,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -538,7 +580,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use #endif -#if 0 +#if 1 /* Converts an internet address from internal format to a printable, presentable format. AF is an internet address family, such as AF_INET or AF_INET6. @@ -554,7 +596,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use For more details, see the POSIX:2008 specification . */ -# if 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef inet_ntop # define inet_ntop rpl_inet_ntop diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/assert.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/assert.h new file mode 100644 index 000000000..baeb53b67 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/assert.h @@ -0,0 +1,314 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Substitute for and wrapper around + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Do not guard the include, since is supposed to define + the assert macro each time it is included. */ + +#if __GNUC__ >= 3 + +#endif + + +#include "../ucrt/assert.h" + +#if (_MSC_VER < 1931) + +/* The definition of static_assert is copied here. */ +/* Compile-time assert-like macros. + + Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ + +#ifndef _GL_STATIC_ASSERT_H +#define _GL_STATIC_ASSERT_H + + +/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC) + works as per C11. This is supported by GCC 4.6.0+ and by clang 4+. + + Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as + per C23. This is supported by GCC 9.1+. + + Support compilers claiming conformance to the relevant standard, + and also support GCC when not pedantic. If we were willing to slow + 'configure' down we could also use it with other compilers, but + since this affects only the quality of diagnostics, why bother? */ +#ifndef __cplusplus +# if (201112 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__))) +# define _GL_HAVE__STATIC_ASSERT 1 +# endif +# if (202311 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ && 9 <= __GNUC__)) +# define _GL_HAVE__STATIC_ASSERT1 1 +# endif +#endif + +/* FreeBSD 9.1 , included by and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE__STATIC_ASSERT +# include +# undef _Static_assert +#endif + +/* Each of these macros verifies that its argument R is nonzero. To + be portable, R should be an integer constant expression. Unlike + assert (R), there is no run-time overhead. + + If _Static_assert works, verify (R) uses it directly. Similarly, + _GL_STATIC_ASSERT_TRUE works by packaging a _Static_assert inside a struct + that is an operand of sizeof. + + The code below uses several ideas for C++ compilers, and for C + compilers that do not support _Static_assert: + + * The first step is ((R) ? 1 : -1). Given an expression R, of + integral or boolean or floating-point type, this yields an + expression of integral type, whose value is later verified to be + constant and nonnegative. + + * Next this expression W is wrapped in a type + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: W; + }. + If W is negative, this yields a compile-time error. No compiler can + deal with a bit-field of negative size. + + One might think that an array size check would have the same + effect, that is, that the type struct { unsigned int dummy[W]; } + would work as well. However, inside a function, some compilers + (such as C++ compilers and GNU C) allow local parameters and + variables inside array size expressions. With these compilers, + an array size check would not properly diagnose this misuse of + the verify macro: + + void function (int n) { verify (n < 0); } + + * For the verify macro, the struct _gl_static_assert_type will need to + somehow be embedded into a declaration. To be portable, this + declaration must declare an object, a constant, a function, or a + typedef name. If the declared entity uses the type directly, + such as in + + struct dummy {...}; + typedef struct {...} dummy; + extern struct {...} *dummy; + extern void dummy (struct {...} *); + extern struct {...} *dummy (void); + + two uses of the verify macro would yield colliding declarations + if the entity names are not disambiguated. A workaround is to + attach the current line number to the entity name: + + #define _GL_CONCAT0(x, y) x##y + #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) + extern struct {...} * _GL_CONCAT (dummy, __LINE__); + + But this has the problem that two invocations of verify from + within the same macro would collide, since the __LINE__ value + would be the same for both invocations. (The GCC __COUNTER__ + macro solves this problem, but is not portable.) + + A solution is to use the sizeof operator. It yields a number, + getting rid of the identity of the type. Declarations like + + extern int dummy [sizeof (struct {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + + can be repeated. + + * Should the implementation use a named struct or an unnamed struct? + Which of the following alternatives can be used? + + extern int dummy [sizeof (struct {...})]; + extern int dummy [sizeof (struct _gl_static_assert_type {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern void dummy (int [sizeof (struct _gl_static_assert_type {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + extern int (*dummy (void)) [sizeof (struct _gl_static_assert_type {...})]; + + In the second and sixth case, the struct type is exported to the + outer scope; two such declarations therefore collide. GCC warns + about the first, third, and fourth cases. So the only remaining + possibility is the fifth case: + + extern int (*dummy (void)) [sizeof (struct {...})]; + + * GCC warns about duplicate declarations of the dummy function if + -Wredundant-decls is used. GCC 4.3 and later have a builtin + __COUNTER__ macro that can let us generate unique identifiers for + each dummy function, to suppress this warning. + + * This implementation exploits the fact that older versions of GCC, + which do not support _Static_assert, also do not warn about the + last declaration mentioned above. + + * GCC warns if -Wnested-externs is enabled and 'verify' is used + within a function body; but inside a function, you can always + arrange to use verify_expr instead. + + * In C++, any struct definition inside sizeof is invalid. + Use a template type to work around the problem. */ + +/* Concatenate two preprocessor tokens. */ +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y + +/* _GL_COUNTER is an integer, preferably one that changes each time we + use it. Use __COUNTER__ if it works, falling back on __LINE__ + otherwise. __LINE__ isn't perfect, but it's better than a + constant. */ +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif + +/* Generate a symbol with the given prefix, making it unique if + possible. */ +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) + +/* Verify requirement R at compile-time, as an integer constant expression + that returns 1. If R is false, fail at compile-time, preferably + with a diagnostic that includes the string-literal DIAGNOSTIC. */ + +#define _GL_STATIC_ASSERT_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_STATIC_ASSERT_TYPE (R, DIAGNOSTIC))) + +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_static_assert_type +template + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: w; + }; +# define GNULIB_defined_struct__gl_static_assert_type 1 +# endif +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + _gl_static_assert_type<(R) ? 1 : -1> +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_static_assert_error_if_negative: (R) ? 1 : -1; } +#endif + +/* Verify requirement R at compile-time, as a declaration without a + trailing ';'. If R is false, fail at compile-time. + + This macro requires three or more arguments but uses at most the first + two, so that the _Static_assert macro optionally defined below supports + both the C11 two-argument syntax and the C23 one-argument syntax. + + Unfortunately, unlike C11, this implementation must appear as an + ordinary declaration, and cannot appear inside struct { ... }. */ + +#if 202311 <= __STDC_VERSION__ || 200410 <= __cpp_static_assert +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) static_assert (R, DIAGNOSTIC) +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC) +#else +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) \ + extern int (*_GL_GENSYM (_gl_static_assert_function) (void)) \ + [_GL_STATIC_ASSERT_TRUE (R, DIAGNOSTIC)] +# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Wnested-externs" +# endif +#endif + +/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ +#ifdef _GL_STATIC_ASSERT_H +/* Define _Static_assert if needed. */ +/* With clang ≥ 3.8.0 in C++ mode, _Static_assert already works and accepts + 1 or 2 arguments. We better don't override it, because clang's standard + C++ library uses static_assert inside classes in several places, and our + replacement via _GL_STATIC_ASSERT does not work in these contexts. */ +# if (defined __cplusplus && defined __clang__ \ + && (4 <= __clang_major__ + (8 <= __clang_minor__))) +# if 5 <= __clang_major__ +/* Avoid "warning: 'static_assert' with no message is a C++17 extension". */ +# pragma clang diagnostic ignored "-Wc++17-extensions" +# else +/* Avoid "warning: static_assert with no message is a C++1z extension". */ +# pragma clang diagnostic ignored "-Wc++1z-extensions" +# endif +# elif !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert +# if !defined _MSC_VER || defined __clang__ +# define _Static_assert(...) \ + _GL_STATIC_ASSERT (__VA_ARGS__, "static assertion failed", -) +# else +# if defined __cplusplus && _MSC_VER >= 1910 + /* In MSVC 14.1 or newer, static_assert accepts one or two arguments, + but _Static_assert is not defined. */ +# define _Static_assert static_assert +# else + /* Work around MSVC preprocessor incompatibility with ISO C; see + . */ +# define _Static_assert(R, ...) \ + _GL_STATIC_ASSERT ((R), "static assertion failed", -) +# endif +# endif +# endif +/* Define static_assert if needed. */ +# if (!defined static_assert \ + && __STDC_VERSION__ < 202311 \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6 && _MSC_VER < 1910))) +# if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__ +/* MSVC 14 in C++ mode supports the two-arguments static_assert but not + the one-argument static_assert, and it does not support _Static_assert. + We have to play preprocessor tricks to distinguish the two cases. + Since the MSVC preprocessor is not ISO C compliant (see above),. + the solution is specific to MSVC. */ +# define _GL_EXPAND(x) x +# define _GL_SA1(a1) static_assert ((a1), "static assertion failed") +# define _GL_SA2 static_assert +# define _GL_SA3 static_assert +# define _GL_SA_PICK(x1,x2,x3,x4,...) x4 +# define static_assert(...) _GL_EXPAND(_GL_SA_PICK(__VA_ARGS__,_GL_SA3,_GL_SA2,_GL_SA1)) (__VA_ARGS__) +/* Avoid "fatal error C1189: #error: The C++ Standard Library forbids macroizing keywords." */ +# define _ALLOW_KEYWORD_MACROS 1 +# else +# define static_assert _Static_assert /* C11 requires this #define. */ +# endif +# endif +#endif + + +#endif +#endif \ No newline at end of file diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/byteswap.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/byteswap.h index 6da995589..1f853e671 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/byteswap.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/byteswap.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* byteswap.h - Byte swapping - Copyright (C) 2005, 2007, 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2023 Free Software Foundation, Inc. Written by Oskar Liljeblad , 2005. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_BYTESWAP_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/configmake.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/configmake.h new file mode 100644 index 000000000..c663aa359 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/configmake.h @@ -0,0 +1,40 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +#if HAVE_WINSOCK2_H +# include /* avoid mingw pollution on DATADIR */ +#endif + +#ifdef _M_ARM64 +# define GETTEXT_ARCH "arm64" +#elif defined (_M_X64) || defined (_M_AMD64) +# define GETTEXT_ARCH "x64" +#else +# define GETTEXT_ARCH "Win32" +#endif + +#define PREFIX "c:/vs14.0/" GETTEXT_ARCH +#define EXEC_PREFIX "c:/vs14.0/" GETTEXT_ARCH +#define BINDIR PREFIX "/bin" +#define SBINDIR PREFIX "/sbin" +#define LIBEXECDIR PREFIX "/libexec" +#define DATAROOTDIR PREFIX "/share" +#define DATADIR PREFIX "/share" +#define SYSCONFDIR PREFIX "/etc" +#define SHAREDSTATEDIR PREFIX "/com" +#define LOCALSTATEDIR PREFIX "/var" +#define RUNSTATEDIR PREFIX "var/run" +#define INCLUDEDIR "c:/vs14.0/include" +#define OLDINCLUDEDIR "/usr/include" +#define DOCDIR PREFIX "/share/doc/gettext" +#define INFODIR PREFIX "/share/info" +#define HTMLDIR PREFIX "/share/doc/gettext" +#define DVIDIR PREFIX "/share/doc/gettext" +#define PDFDIR PREFIX "/share/doc/gettext" +#define PSDIR PREFIX "/share/doc/gettext" +#define LIBDIR PREFIX "/lib" +#define LISPDIR PREFIX "/share/emacs/site-lisp" +#define LOCALEDIR PREFIX "/share/locale" +#define MANDIR PREFIX "/share/man" +#define PKGDATADIR PREFIX "/share/gettext" +#define PKGINCLUDEDIR PREFIX "/include/gettext-tools" +#define PKGLIBDIR PREFIX "/lib/gettext-tools" +#define PKGLIBEXECDIR PREFIX "/libexec/gettext-tools" diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/ctype.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/ctype.h index 04638c6cc..d4cfa064a 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/ctype.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/ctype.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 , for platforms on which it is incomplete. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Bruno Haible. */ @@ -32,30 +32,31 @@ /* Include the original . */ /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/ctype.h" -#else #include "../ucrt/ctype.h" -#endif #ifndef _GL_CTYPE_H #define _GL_CTYPE_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -143,6 +144,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -190,6 +197,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -215,6 +232,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -312,7 +337,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -340,9 +365,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -358,19 +383,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -443,13 +468,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -458,27 +490,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -495,8 +533,8 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use #endif /* Return non-zero if c is a blank, i.e. a space or tab character. */ -#if (_MSC_VER < 1800) -# if !0 +#if 1 +# if !1 _GL_EXTERN_C int isblank (int c); # endif #elif defined GNULIB_POSIXCHECK diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/dirent.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/dirent.h index 9038142bc..fcbeebc17 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/dirent.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/dirent.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_DIRENT_H @@ -30,6 +30,12 @@ #ifndef _GL_DIRENT_H #define _GL_DIRENT_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Get ino_t. Needed on some systems, including glibc 2.8. */ #include @@ -51,15 +57,50 @@ struct dirent # define DT_LNK 10 /* symbolic link */ # define DT_SOCK 12 /* socket */ # define DT_WHT 14 /* whiteout */ -typedef struct gl_directory DIR; # define GNULIB_defined_struct_dirent 1 # endif #endif +#if !0 +# if !GNULIB_defined_DIR +/* struct gl_directory is a type with a field 'int fd_to_close'. + It is needed for implementing fdopendir(). */ +struct gl_directory; +# if 0 +# define DIR struct gl_directory +# else +typedef struct gl_directory DIR; +# endif +# define GNULIB_defined_DIR 1 +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ @@ -68,19 +109,19 @@ typedef struct gl_directory DIR; /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -168,6 +209,12 @@ typedef struct gl_directory DIR; Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -215,6 +262,16 @@ typedef struct gl_directory DIR; _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -240,6 +297,14 @@ typedef struct gl_directory DIR; _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -337,7 +402,7 @@ typedef struct gl_directory DIR; _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -365,9 +430,9 @@ typedef struct gl_directory DIR; _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -383,26 +448,26 @@ typedef struct gl_directory DIR; /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -411,19 +476,19 @@ typedef struct gl_directory DIR; /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -496,13 +561,20 @@ typedef struct gl_directory DIR; # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -511,27 +583,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -550,6 +628,30 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use /* Declare overridden functions. */ +#if 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef closedir +# define closedir rpl_closedir +# define GNULIB_defined_closedir 1 +# endif +_GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (closedir, int, (DIR *dirp)); +# else +# if !0 +_GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (closedir, int, (DIR *dirp)); +# endif +_GL_CXXALIASWARN (closedir); +#elif defined GNULIB_POSIXCHECK +# undef closedir +# if HAVE_RAW_DECL_CLOSEDIR +_GL_WARN_ON_USE (closedir, "closedir is not portable - " + "use gnulib module closedir for portability"); +# endif +#endif + #if 1 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -557,28 +659,53 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # define opendir rpl_opendir # define GNULIB_defined_opendir 1 # endif -_GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (opendir, DIR *, + (const char *dir_name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); _GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name)); # else -# if !0 -_GL_FUNCDECL_SYS (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); +# if !0 || __GNUC__ >= 11 +_GL_FUNCDECL_SYS (opendir, DIR *, + (const char *dir_name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); # endif _GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name)); # endif _GL_CXXALIASWARN (opendir); -#elif defined GNULIB_POSIXCHECK -# undef opendir -# if HAVE_RAW_DECL_OPENDIR +#else +# if 1 && !GNULIB_defined_DIR && __GNUC__ >= 11 && !defined opendir +/* For -Wmismatched-dealloc: Associate opendir with closedir or + rpl_closedir. */ +_GL_FUNCDECL_SYS (opendir, DIR *, + (const char *dir_name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); +# endif +# if defined GNULIB_POSIXCHECK +# undef opendir +# if HAVE_RAW_DECL_OPENDIR _GL_WARN_ON_USE (opendir, "opendir is not portable - " "use gnulib module opendir for portability"); +# endif # endif #endif #if 1 -# if !0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef readdir +# define readdir rpl_readdir +# endif +_GL_FUNCDECL_RPL (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (readdir, struct dirent *, (DIR *dirp)); +# else +# if !0 _GL_FUNCDECL_SYS (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (readdir, struct dirent *, (DIR *dirp)); +# endif _GL_CXXALIASWARN (readdir); #elif defined GNULIB_POSIXCHECK # undef readdir @@ -588,41 +715,26 @@ _GL_WARN_ON_USE (readdir, "readdir is not portable - " # endif #endif -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp)); -_GL_CXXALIASWARN (rewinddir); -#elif defined GNULIB_POSIXCHECK -# undef rewinddir -# if HAVE_RAW_DECL_REWINDDIR -_GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - " - "use gnulib module rewinddir for portability"); -# endif -#endif - #if 1 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef closedir -# define closedir rpl_closedir -# define GNULIB_defined_closedir 1 +# undef rewinddir +# define rewinddir rpl_rewinddir # endif -_GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (closedir, int, (DIR *dirp)); +_GL_FUNCDECL_RPL (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (rewinddir, void, (DIR *dirp)); # else # if !0 -_GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1))); # endif -_GL_CXXALIAS_SYS (closedir, int, (DIR *dirp)); +_GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp)); # endif -_GL_CXXALIASWARN (closedir); +_GL_CXXALIASWARN (rewinddir); #elif defined GNULIB_POSIXCHECK -# undef closedir -# if HAVE_RAW_DECL_CLOSEDIR -_GL_WARN_ON_USE (closedir, "closedir is not portable - " - "use gnulib module closedir for portability"); +# undef rewinddir +# if HAVE_RAW_DECL_REWINDDIR +_GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - " + "use gnulib module rewinddir for portability"); # endif #endif @@ -630,19 +742,14 @@ _GL_WARN_ON_USE (closedir, "closedir is not portable - " /* Return the file descriptor associated with the given directory stream, or -1 if none exists. */ # if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +/* On kLIBC, dirfd() is a macro that does not work. Undefine it. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) || defined dirfd # undef dirfd # define dirfd rpl_dirfd # endif _GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (dirfd, int, (DIR *)); -# ifdef __KLIBC__ -/* Gnulib internal hooks needed to maintain the dirfd metadata. */ -_GL_EXTERN_C int _gl_register_dirp_fd (int fd, DIR *dirp) - _GL_ARG_NONNULL ((2)); -_GL_EXTERN_C void _gl_unregister_dirp_fd (int fd); -# endif # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd /* dirfd is defined as a macro and not as a function. @@ -664,7 +771,7 @@ _GL_WARN_ON_USE (dirfd, "dirfd is unportable - " # endif #endif -#if 0 +#if 1 /* Open a directory stream visiting the given directory file descriptor. Return NULL and set errno if fd is not visiting a directory. On success, this function consumes fd (it will be @@ -675,20 +782,33 @@ _GL_WARN_ON_USE (dirfd, "dirfd is unportable - " # undef fdopendir # define fdopendir rpl_fdopendir # endif -_GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd)); +_GL_FUNCDECL_RPL (fdopendir, DIR *, + (int fd) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); _GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd)); # else -# if !1 || !1 -_GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd)); +# if !0 || !0 || __GNUC__ >= 11 +_GL_FUNCDECL_SYS (fdopendir, DIR *, + (int fd) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); # endif _GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd)); # endif _GL_CXXALIASWARN (fdopendir); -#elif defined GNULIB_POSIXCHECK -# undef fdopendir -# if HAVE_RAW_DECL_FDOPENDIR +#else +# if 1 && __GNUC__ >= 11 && !defined fdopendir +/* For -Wmismatched-dealloc: Associate fdopendir with closedir or + rpl_closedir. */ +_GL_FUNCDECL_SYS (fdopendir, DIR *, + (int fd) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (closedir, 1)); +# endif +# if defined GNULIB_POSIXCHECK +# undef fdopendir +# if HAVE_RAW_DECL_FDOPENDIR _GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - " "use gnulib module fdopendir for portability"); +# endif # endif #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/errno.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/errno.h index db8affc39..fdd118c4d 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/errno.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/errno.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A POSIX-like . - Copyright (C) 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_ERRNO_H @@ -24,11 +24,7 @@ /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/errno.h" -#else #include "../ucrt/errno.h" -#endif #ifndef _GL_ERRNO_H #define _GL_ERRNO_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/error.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/error.h new file mode 100644 index 000000000..d91938fa8 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/error.h @@ -0,0 +1,563 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Declarations for error-reporting functions. + Copyright (C) 1995-1997, 2003, 2006, 2008-2023 Free Software Foundation, + Inc. + This file is part of the GNU C Library. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_ERROR_H + +/* No @PRAGMA_SYSTEM_HEADER@ here, because it would prevent + -Wimplicit-fallthrough warnings for missing FALLTHROUGH after error(...) + or error_at_line(...) invocations. */ + +/* The include_next requires a split double-inclusion guard. */ +#if 0 +# include +#endif + +#ifndef _GL_ERROR_H +#define _GL_ERROR_H + +/* This file uses _GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_FORMAT, + _GL_ATTRIBUTE_MAYBE_UNUSED. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* Get 'unreachable'. */ +#include + +/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM. */ +#include + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +#if GNULIB_VFPRINTF_POSIX +# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD +#else +# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM +#endif + +/* Helper macro for supporting the compiler's control flow analysis better. + It evaluates its arguments only once. + Test case: Compile copy-file.c with "gcc -Wimplicit-fallthrough". */ +#if defined __GNUC__ || defined __clang__ +/* Use 'unreachable' to tell the compiler when the function call does not + return. */ +# define __gl_error_call1(function, status, ...) \ + ((function) (status, __VA_ARGS__), \ + (status) != 0 ? unreachable () : (void) 0) +/* If STATUS is a not a constant, the function call may or may not return; + therefore -Wimplicit-fallthrough will produce a warning. Use a compound + statement in order to evaluate STATUS only once. + If STATUS is a constant, we don't use a compound statement, because that + would trigger a -Wimplicit-fallthrough warning even when STATUS is != 0, + when not optimizing. This causes STATUS to be evaluated twice, but + that's OK since it does not have side effects. */ +# define __gl_error_call(function, status, ...) \ + (__builtin_constant_p (status) \ + ? __gl_error_call1 (function, status, __VA_ARGS__) \ + : __extension__ \ + ({ \ + int const __errstatus = status; \ + __gl_error_call1 (function, __errstatus, __VA_ARGS__); \ + })) +#else +# define __gl_error_call(function, status, ...) \ + (function) (status, __VA_ARGS__) +#endif + +#if GNULIB_REPLACE_ERROR +# undef error_print_progname +# undef error_message_count +# undef error_one_per_line +# define error_print_progname rpl_error_print_progname +# define error_message_count rpl_error_message_count +# define error_one_per_line rpl_error_one_per_line +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Print a message with 'fprintf (stderr, FORMAT, ...)'; + if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). + If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */ +#if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef error +# define error rpl_error +# endif +_GL_FUNCDECL_RPL (error, void, + (int __status, int __errnum, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4))); +_GL_CXXALIAS_RPL (error, void, + (int __status, int __errnum, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# undef error +# define error(status, ...) \ + __gl_error_call (rpl_error, status, __VA_ARGS__) +# endif +#else +# if ! 0 +_GL_FUNCDECL_SYS (error, void, + (int __status, int __errnum, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4))); +# endif +_GL_CXXALIAS_SYS (error, void, + (int __status, int __errnum, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# ifdef error +/* Only gcc ≥ 4.7 has __builtin_va_arg_pack. */ +# if _GL_GNUC_PREREQ (4, 7) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wattributes" +_GL_ATTRIBUTE_MAYBE_UNUSED +static void +_GL_ATTRIBUTE_ALWAYS_INLINE +_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4)) +_gl_inline_error (int __status, int __errnum, const char *__format, ...) +{ + return error (__status, __errnum, __format, __builtin_va_arg_pack ()); +} +# pragma GCC diagnostic pop +# undef error +# define error(status, ...) \ + __gl_error_call (_gl_inline_error, status, __VA_ARGS__) +# endif +# else +# define error(status, ...) \ + __gl_error_call (error, status, __VA_ARGS__) +# endif +# endif +#endif +#if __GLIBC__ >= 2 +_GL_CXXALIASWARN (error); +#endif + +/* Likewise. If FILENAME is non-NULL, include FILENAME:LINENO: in the + message. */ +#if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef error_at_line +# define error_at_line rpl_error_at_line +# endif +_GL_FUNCDECL_RPL (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6))); +_GL_CXXALIAS_RPL (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# undef error_at_line +# define error_at_line(status, ...) \ + __gl_error_call (rpl_error_at_line, status, __VA_ARGS__) +# endif +#else +# if ! 0 +_GL_FUNCDECL_SYS (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6))); +# endif +_GL_CXXALIAS_SYS (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# ifdef error_at_line +/* Only gcc ≥ 4.7 has __builtin_va_arg_pack. */ +# if _GL_GNUC_PREREQ (4, 7) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wattributes" +_GL_ATTRIBUTE_MAYBE_UNUSED +static void +_GL_ATTRIBUTE_ALWAYS_INLINE +_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6)) +_gl_inline_error_at_line (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) +{ + return error_at_line (__status, __errnum, __filename, __lineno, __format, + __builtin_va_arg_pack ()); +} +# pragma GCC diagnostic pop +# undef error_at_line +# define error_at_line(status, ...) \ + __gl_error_call (_gl_inline_error_at_line, status, __VA_ARGS__) +# endif +# else +# define error_at_line(status, ...) \ + __gl_error_call (error_at_line, status, __VA_ARGS__) +# endif +# endif +#endif +_GL_CXXALIASWARN (error_at_line); + +/* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +extern DLL_VARIABLE void (*error_print_progname) (void); + +/* This variable is incremented each time 'error' is called. */ +extern DLL_VARIABLE unsigned int error_message_count; + +/* Sometimes we want to have at most one error per line. This + variable controls whether this mode is selected or not. */ +extern DLL_VARIABLE int error_one_per_line; + +#ifdef __cplusplus +} +#endif + +#endif /* _GL_ERROR_H */ +#endif /* _GL_ERROR_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/fcntl.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/fcntl.h index 3b01039b9..cdffa533e 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/fcntl.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/fcntl.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Like , but with non-working flags defined to 0. - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* written by Paul Eggert */ @@ -38,11 +38,7 @@ #if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))) # include #endif -#if (_MSC_VER < 1900) -#include "../include/fcntl.h" -#else #include "../ucrt/fcntl.h" -#endif /* Native Windows platforms declare open(), creat() in . */ #if (IN_GETTEXT_TOOLS_GNULIB_TESTS || 1 || defined GNULIB_POSIXCHECK) \ @@ -68,11 +64,7 @@ # include #endif /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/fcntl.h" -#else #include "../ucrt/fcntl.h" -#endif /* Native Windows platforms declare open(), creat() in . */ #if (IN_GETTEXT_TOOLS_GNULIB_TESTS || 1 || defined GNULIB_POSIXCHECK) \ @@ -83,6 +75,11 @@ #ifndef _GL_FCNTL_H #define _GL_FCNTL_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ # include #endif @@ -90,19 +87,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -190,6 +187,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -237,6 +240,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -262,6 +275,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -359,7 +380,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -387,9 +408,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -405,26 +426,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -433,19 +454,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -518,13 +539,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -533,27 +561,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -581,6 +615,12 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use _GL_FUNCDECL_RPL (creat, int, (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (creat, int, (const char *filename, mode_t mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef creat +# define creat _creat +# endif +_GL_CXXALIAS_MDA (creat, int, (const char *filename, mode_t mode)); # else _GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); # endif @@ -590,6 +630,21 @@ _GL_CXXALIASWARN (creat); /* Assume creat is always declared. */ _GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - " "use gnulib module creat for portability"); +#elif 1 +/* On native Windows, map 'creat' to '_creat', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::creat always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef creat +# define creat _creat +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (creat, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (creat); #endif #if 1 @@ -630,6 +685,12 @@ _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef open +# define open _open +# endif +_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); # else _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); # endif @@ -643,9 +704,25 @@ _GL_CXXALIASWARN (open); /* Assume open is always declared. */ _GL_WARN_ON_USE (open, "open is not always POSIX compliant - " "use gnulib module open for portability"); +#elif 1 +/* On native Windows, map 'open' to '_open', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::open always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef open +# define open _open +# endif +_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); +# else +_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); +# endif +# if !defined __hpux +_GL_CXXALIASWARN (open); +# endif #endif -#if 0 +#if 1 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef openat @@ -657,7 +734,7 @@ _GL_FUNCDECL_RPL (openat, int, _GL_CXXALIAS_RPL (openat, int, (int fd, char const *file, int flags, /* mode_t mode */ ...)); # else -# if !1 +# if !0 _GL_FUNCDECL_SYS (openat, int, (int fd, char const *file, int flags, /* mode_t mode */ ...) _GL_ARG_NONNULL ((2))); @@ -876,6 +953,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " # define AT_EACCESS 4 #endif +/* Ignore this flag if not supported. */ +#ifndef AT_NO_AUTOMOUNT +# define AT_NO_AUTOMOUNT 0 +#endif #endif /* _GL_FCNTL_H */ #endif /* _GL_FCNTL_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/fnmatch.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/fnmatch.h index 0e26dd711..4088ec71f 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/fnmatch.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/fnmatch.h @@ -1,22 +1,22 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for and wrapper around . - Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2020 Free + Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_FNMATCH_H @@ -33,21 +33,26 @@ #ifndef _GL_FNMATCH_H #define _GL_FNMATCH_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -135,6 +140,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -182,6 +193,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -207,6 +228,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -304,7 +333,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -332,9 +361,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -350,26 +379,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -378,19 +407,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -463,13 +492,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -478,27 +514,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -555,6 +597,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fnmatch rpl_fnmatch # endif +# define GNULIB_defined_fnmatch_function 1 _GL_FUNCDECL_RPL (fnmatch, int, (const char *pattern, const char *name, int flags) _GL_ARG_NONNULL ((1, 2))); @@ -562,6 +605,7 @@ _GL_CXXALIAS_RPL (fnmatch, int, (const char *pattern, const char *name, int flags)); # else # if !0 +# define GNULIB_defined_fnmatch_function 1 _GL_FUNCDECL_SYS (fnmatch, int, (const char *pattern, const char *name, int flags) _GL_ARG_NONNULL ((1, 2))); diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/getopt-cdefs.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/getopt-cdefs.h index a82f93cd8..39358da57 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/getopt-cdefs.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/getopt-cdefs.h @@ -1,23 +1,22 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* getopt-on-non-glibc compatibility macros. - Copyright (C) 1989-2020 Free Software Foundation, Inc. + Copyright (C) 1989-2023 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. - This file is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public - License along with gnulib; if not, see - . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GETOPT_CDEFS_H #define _GETOPT_CDEFS_H 1 @@ -58,8 +57,12 @@ #endif #ifndef __THROW -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () +# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4) +# if __cplusplus >= 201103L +# define __THROW noexcept (true) +# else +# define __THROW throw () +# endif # else # define __THROW # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/getopt.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/getopt.h index 955344e12..8e0cb6853 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/getopt.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/getopt.h @@ -1,23 +1,23 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Declarations for getopt. - Copyright (C) 1989-2020 Free Software Foundation, Inc. + Copyright (C) 1989-2023 Free Software Foundation, Inc. This file is part of gnulib. Unlike most of the getopt implementation, it is NOT shared with the GNU C Library, which supplies a different version of this file. - This file is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public - License along with gnulib; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_GETOPT_H @@ -55,26 +55,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/iconv.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/iconv.h index 6807652cd..9de292ac9 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/iconv.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/iconv.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_ICONV_H @@ -29,21 +29,26 @@ #ifndef _GL_ICONV_H #define _GL_ICONV_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -131,6 +136,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -178,6 +189,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -203,6 +224,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -300,7 +329,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -328,9 +357,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -346,26 +375,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -374,19 +403,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -459,13 +488,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -474,27 +510,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/inttypes.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/inttypes.h index 73307a6d9..ee4cbd1aa 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/inttypes.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/inttypes.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2006-2020 Free Software Foundation, Inc. +/* Copyright (C) 2006-2023 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* @@ -25,6 +25,12 @@ #endif +#ifdef _WIN64 +# define GNULIB_PTR_MOD "ll" +#else +# define GNULIB_PTR_MOD "l" +#endif + /* Include the original if it exists, and if this file has not been included yet or if this file includes gnulib stdint.h @@ -38,11 +44,7 @@ # define __STDC_FORMAT_MACROS 1 # endif -#if (_MSC_VER < 1900) -#include "../include/inttypes.h" -#else -#include "../ucrt/inttypes.h" -#endif +# include "../ucrt/inttypes.h" # define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H # endif @@ -51,6 +53,11 @@ #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H #define INTTYPES_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Include or the gnulib replacement. But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ @@ -69,19 +76,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -169,6 +176,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -216,6 +229,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -241,6 +264,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -338,7 +369,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -366,9 +397,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -384,26 +415,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -412,19 +443,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -497,13 +528,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -512,27 +550,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -956,32 +1000,32 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use #if !defined PRIdPTR # ifdef INTPTR_MAX -# define PRIdPTR "ll" "d" +# define PRIdPTR GNULIB_PTR_MOD "d" # endif #endif #if !defined PRIiPTR # ifdef INTPTR_MAX -# define PRIiPTR "ll" "i" +# define PRIiPTR GNULIB_PTR_MOD "i" # endif #endif #if !defined PRIoPTR # ifdef UINTPTR_MAX -# define PRIoPTR "ll" "o" +# define PRIoPTR GNULIB_PTR_MOD "o" # endif #endif #if !defined PRIuPTR # ifdef UINTPTR_MAX -# define PRIuPTR "ll" "u" +# define PRIuPTR GNULIB_PTR_MOD "u" # endif #endif #if !defined PRIxPTR # ifdef UINTPTR_MAX -# define PRIxPTR "ll" "x" +# define PRIxPTR GNULIB_PTR_MOD "x" # endif #endif #if !defined PRIXPTR # ifdef UINTPTR_MAX -# define PRIXPTR "ll" "X" +# define PRIXPTR GNULIB_PTR_MOD "X" # endif #endif @@ -1352,27 +1396,27 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use #if !defined SCNdPTR # ifdef INTPTR_MAX -# define SCNdPTR "ll" "d" +# define SCNdPTR GNULIB_PTR_MOD "d" # endif #endif #if !defined SCNiPTR # ifdef INTPTR_MAX -# define SCNiPTR "ll" "i" +# define SCNiPTR GNULIB_PTR_MOD "i" # endif #endif #if !defined SCNoPTR # ifdef UINTPTR_MAX -# define SCNoPTR "ll" "o" +# define SCNoPTR GNULIB_PTR_MOD "o" # endif #endif #if !defined SCNuPTR # ifdef UINTPTR_MAX -# define SCNuPTR "ll" "u" +# define SCNuPTR GNULIB_PTR_MOD "u" # endif #endif #if !defined SCNxPTR # ifdef UINTPTR_MAX -# define SCNxPTR "ll" "x" +# define SCNxPTR GNULIB_PTR_MOD "x" # endif #endif @@ -1383,8 +1427,21 @@ extern "C" { #endif #if 0 -# if !1 -extern intmax_t imaxabs (intmax_t); +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxabs +# define imaxabs rpl_imaxabs +# endif +_GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x)); +_GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +_GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxabs); # endif #elif defined GNULIB_POSIXCHECK # undef imaxabs @@ -1401,8 +1458,21 @@ typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; # define GNULIB_defined_imaxdiv_t 1 # endif # endif -# if !1 -extern imaxdiv_t imaxdiv (intmax_t, intmax_t); +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxdiv +# define imaxdiv rpl_imaxdiv +# endif +_GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +_GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +_GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxdiv); # endif #elif defined GNULIB_POSIXCHECK # undef imaxdiv diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/langinfo.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/langinfo.h index 1af942664..4b2aa8f5b 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/langinfo.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/langinfo.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for and wrapper around . - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* * POSIX for platforms that lack it or have an incomplete one. @@ -35,6 +35,11 @@ #ifndef _GL_LANGINFO_H #define _GL_LANGINFO_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if !0 @@ -186,19 +191,19 @@ typedef int nl_item; /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -286,6 +291,12 @@ typedef int nl_item; Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -333,6 +344,16 @@ typedef int nl_item; _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -358,6 +379,14 @@ typedef int nl_item; _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -455,7 +484,7 @@ typedef int nl_item; _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -483,9 +512,9 @@ typedef int nl_item; _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -501,19 +530,19 @@ typedef int nl_item; /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -586,13 +615,20 @@ typedef int nl_item; # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -601,27 +637,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -644,7 +686,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use Note: The difference between nl_langinfo (CODESET) and locale_charset () is that the latter normalizes the encoding names to GNU conventions. */ -#if IN_GETTEXT_TOOLS_LIBGREP +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef nl_langinfo @@ -658,7 +700,9 @@ _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); # endif _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (nl_langinfo); +# endif #elif defined GNULIB_POSIXCHECK # undef nl_langinfo # if HAVE_RAW_DECL_NL_LANGINFO diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/libxml/parser.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/libxml/parser.h index 8ac8b752c..995ba828f 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/libxml/parser.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/libxml/parser.h @@ -1,6 +1,6 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* libxml2 - Library for parsing XML documents - * Copyright (C) 2006-2019 Free Software Foundation, Inc. + * Copyright (C) 2006-2020 Free Software Foundation, Inc. * * This file is not part of the GNU gettext program, but is used with * GNU gettext. @@ -41,6 +41,7 @@ #define __XML_PARSER_H__ #include +#include /* because Gnulib's may '#define free ...' */ #include #include @@ -690,7 +691,7 @@ typedef int (*hasExternalSubsetSAXFunc) (void *ctx); /************************************************************************ * * - * The SAX version 3 API extensions * + * The SAX version 2 API extensions * * * ************************************************************************/ /** @@ -775,7 +776,7 @@ struct _xmlSAXHandler { cdataBlockSAXFunc cdataBlock; externalSubsetSAXFunc externalSubset; unsigned int initialized; - /* The following fields are extensions available only on version 3 */ + /* The following fields are extensions available only on version 2 */ void *_private; startElementNsSAX2Func startElementNs; endElementNsSAX2Func endElementNs; diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/limits.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/limits.h index d27a2d7f4..b2b002ffe 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/limits.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/limits.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright 2016-2020 Free Software Foundation, Inc. + Copyright 2016-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 3, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -100,10 +100,16 @@ # endif #endif -/* Macros specified by ISO/IEC TS 18661-1:2014. */ +/* Assume no multibyte character is longer than 16 bytes. */ +#ifndef MB_LEN_MAX +# define MB_LEN_MAX 16 +#endif + +/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */ #if (! defined ULLONG_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) + && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) # define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) # define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) # define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) @@ -115,7 +121,31 @@ # define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) # define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) # define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) -#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ +#endif + +/* Macros specified by C23. */ + +#if (defined _GNU_SOURCE \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)) +# if ! defined BOOL_WIDTH +# define BOOL_WIDTH 1 +# define BOOL_MAX 1 +# elif ! defined BOOL_MAX +# define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1) +# endif +#endif + +/* Macro specified by POSIX. */ + +/* The maximum ssize_t value. Although it might not be of ssize_t type + as it should be, it's too much trouble to fix this minor detail. */ +#ifndef SSIZE_MAX +# ifdef _WIN64 +# define SSIZE_MAX LLONG_MAX +# else +# define SSIZE_MAX LONG_MAX +# endif +#endif #endif /* _GL_LIMITS_H */ #endif /* _GL_LIMITS_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/locale.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/locale.h index d246639d8..2e3a82153 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/locale.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/locale.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A POSIX . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -28,11 +28,7 @@ - To handle Solaris header files (through Solaris 10) when combined with gettext's libintl.h. */ -#if (_MSC_VER < 1900) -#include "../include/locale.h" -#else #include "../ucrt/locale.h" -#endif #else /* Normal invocation convention. */ @@ -42,17 +38,18 @@ #define _GL_ALREADY_INCLUDING_LOCALE_H /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/locale.h" -#else #include "../ucrt/locale.h" -#endif #undef _GL_ALREADY_INCLUDING_LOCALE_H #ifndef _GL_LOCALE_H #define _GL_LOCALE_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include @@ -63,19 +60,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -163,6 +160,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -210,6 +213,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -235,6 +248,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -332,7 +353,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -360,9 +381,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -378,26 +399,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -406,19 +427,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -491,13 +512,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -506,27 +534,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -641,7 +675,7 @@ struct lconv }; #endif -#if IN_GETTEXT_TOOLS_LIBGREP +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localeconv @@ -695,8 +729,8 @@ _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " # include "setlocale_null.h" #endif -#if /*@GNULIB_NEWLOCALE@ ||*/ (1 && 0) -# if 0 +#if /*@GNULIB_NEWLOCALE@ ||*/ (1 && 0 && 0) +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef newlocale # define newlocale rpl_newlocale @@ -713,10 +747,10 @@ _GL_CXXALIAS_SYS (newlocale, locale_t, (int category_mask, const char *name, locale_t base)); # endif # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (newlocale); # endif -# if 0 || 0 +# if 0 || 1 # ifndef HAVE_WORKING_NEWLOCALE # define HAVE_WORKING_NEWLOCALE 1 # endif @@ -728,24 +762,24 @@ _GL_WARN_ON_USE (newlocale, "newlocale is not portable"); # endif #endif -#if 0 || (1 && 0) -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef duplocale -# define duplocale rpl_duplocale -# define GNULIB_defined_duplocale 1 -# endif +#if 0 || (1 && 0 && 0) +# if 0 /* locale_t may be undefined if !0. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef duplocale +# define duplocale rpl_duplocale +# define GNULIB_defined_duplocale 1 +# endif _GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); -# else -# if 0 +# else _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); # endif # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (duplocale); # endif -# if 0 || 0 +# if 0 # ifndef HAVE_WORKING_DUPLOCALE # define HAVE_WORKING_DUPLOCALE 1 # endif @@ -758,8 +792,8 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " # endif #endif -#if /*@GNULIB_FREELOCALE@ ||*/ (1 && 0) -# if 0 +#if /*@GNULIB_FREELOCALE@ ||*/ (1 && 0 && 0) +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef freelocale # define freelocale rpl_freelocale @@ -774,7 +808,7 @@ _GL_CXXALIAS_RPL (freelocale, void, (locale_t locale)); _GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale)); # endif # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (freelocale); # endif #elif defined GNULIB_POSIXCHECK diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/malloc/scratch_buffer.gl.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/malloc/scratch_buffer.gl.h new file mode 100644 index 000000000..e139590ac --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/malloc/scratch_buffer.gl.h @@ -0,0 +1,133 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Variable-sized buffer with on-stack default allocation. + Copyright (C) 2015-2023 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SCRATCH_BUFFER_H +#define _SCRATCH_BUFFER_H + +/* Scratch buffers with a default stack allocation and fallback to + heap allocation. It is expected that this function is used in this + way: + + struct scratch_buffer tmpbuf; + scratch_buffer_init (&tmpbuf); + + while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) + if (!scratch_buffer_grow (&tmpbuf)) + return -1; + + scratch_buffer_free (&tmpbuf); + return 0; + + The allocation functions (scratch_buffer_grow, + scratch_buffer_grow_preserve, scratch_buffer_set_array_size) make + sure that the heap allocation, if any, is freed, so that the code + above does not have a memory leak. The buffer still remains in a + state that can be deallocated using scratch_buffer_free, so a loop + like this is valid as well: + + struct scratch_buffer tmpbuf; + scratch_buffer_init (&tmpbuf); + + while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) + if (!scratch_buffer_grow (&tmpbuf)) + break; + + scratch_buffer_free (&tmpbuf); + + scratch_buffer_grow and scratch_buffer_grow_preserve are guaranteed + to grow the buffer by at least 512 bytes. This means that when + using the scratch buffer as a backing store for a non-character + array whose element size, in bytes, is 512 or smaller, the scratch + buffer only has to grow once to make room for at least one more + element. +*/ + +#include +#include +#include + +/* Scratch buffer. Must be initialized with scratch_buffer_init + before its use. */ +struct scratch_buffer { + void *data; /* Pointer to the beginning of the scratch area. */ + size_t length; /* Allocated space at the data pointer, in bytes. */ + union { max_align_t __align; char __c[1024]; } __space; +}; + +/* Initializes *BUFFER so that BUFFER->data points to BUFFER->__space + and BUFFER->length reflects the available space. */ +static inline void +scratch_buffer_init (struct scratch_buffer *buffer) +{ + buffer->data = buffer->__space.__c; + buffer->length = sizeof (buffer->__space); +} + +/* Deallocates *BUFFER (if it was heap-allocated). */ +static inline void +scratch_buffer_free (struct scratch_buffer *buffer) +{ + if (buffer->data != buffer->__space.__c) + free (buffer->data); +} + +/* Grow *BUFFER by some arbitrary amount. The buffer contents is NOT + preserved. Return true on success, false on allocation failure (in + which case the old buffer is freed). On success, the new buffer is + larger than the previous size. On failure, *BUFFER is deallocated, + but remains in a free-able state, and errno is set. */ +bool __libc_scratch_buffer_grow (struct scratch_buffer *buffer); + +/* Alias for __libc_scratch_buffer_grow. */ +static inline _GL_ATTRIBUTE_ALWAYS_INLINE bool +scratch_buffer_grow (struct scratch_buffer *buffer) +{ + return _GL_LIKELY (__libc_scratch_buffer_grow (buffer)); +} + +/* Like __libc_scratch_buffer_grow, but preserve the old buffer + contents on success, as a prefix of the new buffer. */ +bool __libc_scratch_buffer_grow_preserve (struct scratch_buffer *buffer); + +/* Alias for __libc_scratch_buffer_grow_preserve. */ +static inline _GL_ATTRIBUTE_ALWAYS_INLINE bool +scratch_buffer_grow_preserve (struct scratch_buffer *buffer) +{ + return _GL_LIKELY (__libc_scratch_buffer_grow_preserve (buffer)); +} + +/* Grow *BUFFER so that it can store at least NELEM elements of SIZE + bytes. The buffer contents are NOT preserved. Both NELEM and SIZE + can be zero. Return true on success, false on allocation failure + (in which case the old buffer is freed, but *BUFFER remains in a + free-able state, and errno is set). It is unspecified whether this + function can reduce the array size. */ +bool __libc_scratch_buffer_set_array_size (struct scratch_buffer *buffer, + size_t nelem, size_t size); + +/* Alias for __libc_scratch_set_array_size. */ +static inline _GL_ATTRIBUTE_ALWAYS_INLINE bool +scratch_buffer_set_array_size (struct scratch_buffer *buffer, + size_t nelem, size_t size) +{ + return _GL_LIKELY (__libc_scratch_buffer_set_array_size + (buffer, nelem, size)); +} + +#endif /* _SCRATCH_BUFFER_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/math.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/math.h similarity index 84% rename from gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/math.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/math.h index 91bc1bdf7..c118b14bb 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/math.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/math.h @@ -1,21 +1,26 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2007-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ +/* On Android, in C++ mode, when /usr/include/c++/v1/math.h is being included + and /usr/include/math.h has not yet been included, skip this file, since it + would lead to many syntax errors. */ +#if !(defined __ANDROID__ && defined _LIBCPP_MATH_H && !defined INFINITY) + #ifndef _GL_MATH_H #if __GNUC__ >= 3 @@ -23,40 +28,68 @@ #endif +#if defined _GL_INCLUDING_MATH_H +/* Special invocation convention: + - On FreeBSD 12.2 we have a sequence of nested includes + -> -> -> -> + -> -> -> -> + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. */ + +#include "../ucrt/math.h" + +#else +/* Normal invocation convention. */ + /* The include_next requires a split double-inclusion guard. */ +#define _GL_INCLUDING_MATH_H #include "../ucrt/math.h" +#undef _GL_INCLUDING_MATH_H #ifndef _GL_MATH_H #define _GL_MATH_H +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_CONST, + GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ #if defined __VMS && ! defined NAN # include #endif -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_MATH_INLINE # define _GL_MATH_INLINE _GL_INLINE #endif +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __const__ was added in gcc 2.95. */ +#ifndef _GL_ATTRIBUTE_CONST +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__ +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _GL_ATTRIBUTE_CONST /* empty */ +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -144,6 +177,12 @@ _GL_INLINE_HEADER_BEGIN Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -191,6 +230,16 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -216,6 +265,14 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -313,7 +370,7 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -341,9 +398,9 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -359,26 +416,26 @@ _GL_INLINE_HEADER_BEGIN /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -387,19 +444,19 @@ _GL_INLINE_HEADER_BEGIN /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -472,13 +529,20 @@ _GL_INLINE_HEADER_BEGIN # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -487,27 +551,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -603,12 +673,6 @@ static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; #endif -/* For clang: Use __has_builtin to determine whether a builtin is available. */ -#ifndef __has_builtin -# define __has_builtin(name) 0 -#endif - - /* POSIX allows platforms that don't support NAN. But all major machines in the past 15 years have supported something close to IEEE NaN, so we define this unconditionally. We also must define @@ -737,7 +801,9 @@ _GL_WARN_ON_USE (acosf, "acosf is unportable - " _GL_FUNCDECL_SYS (acosl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (acosl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (acosl); +# endif #elif defined GNULIB_POSIXCHECK # undef acosl # if HAVE_RAW_DECL_ACOSL @@ -777,7 +843,9 @@ _GL_WARN_ON_USE (asinf, "asinf is unportable - " _GL_FUNCDECL_SYS (asinl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (asinl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (asinl); +# endif #elif defined GNULIB_POSIXCHECK # undef asinl # if HAVE_RAW_DECL_ASINL @@ -817,7 +885,9 @@ _GL_WARN_ON_USE (atanf, "atanf is unportable - " _GL_FUNCDECL_SYS (atanl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (atanl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (atanl); +# endif #elif defined GNULIB_POSIXCHECK # undef atanl # if HAVE_RAW_DECL_ATANL @@ -881,7 +951,7 @@ _GL_FUNCDECL_SYS (cbrt, double, (double x)); # endif _GL_CXXALIAS_SYS (cbrt, double, (double x)); # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (cbrt); +_GL_CXXALIASWARN1 (cbrt, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef cbrt @@ -905,7 +975,9 @@ _GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (cbrtl); +# endif #elif defined GNULIB_POSIXCHECK # undef cbrtl # if HAVE_RAW_DECL_CBRTL @@ -951,7 +1023,7 @@ _GL_CXXALIAS_RPL (ceil, double, (double x)); _GL_CXXALIAS_SYS (ceil, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ceil); +_GL_CXXALIASWARN1 (ceil, double, (double x)); # endif #endif @@ -970,7 +1042,9 @@ _GL_FUNCDECL_SYS (ceill, long double, (long double x)); # endif _GL_CXXALIAS_SYS (ceill, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ceill); +# endif #elif defined GNULIB_POSIXCHECK # undef ceill # if HAVE_RAW_DECL_CEILL @@ -1001,7 +1075,7 @@ _GL_FUNCDECL_SYS (copysign, double, (double x, double y)); # endif _GL_CXXALIAS_SYS (copysign, double, (double x, double y)); # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (copysign); +_GL_CXXALIASWARN1 (copysign, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef copysign @@ -1016,7 +1090,9 @@ _GL_WARN_ON_USE (copysign, "copysign is unportable - " _GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (copysignl); +# endif #elif defined GNULIB_POSIXCHECK # undef copysignl # if HAVE_RAW_DECL_COPYSIGNL @@ -1056,7 +1132,9 @@ _GL_WARN_ON_USE (cosf, "cosf is unportable - " _GL_FUNCDECL_SYS (cosl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (cosl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (cosl); +# endif #elif defined GNULIB_POSIXCHECK # undef cosl # if HAVE_RAW_DECL_COSL @@ -1130,7 +1208,9 @@ _GL_FUNCDECL_SYS (expl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (expl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (expl); +# endif #elif defined GNULIB_POSIXCHECK # undef expl # if HAVE_RAW_DECL_EXPL @@ -1169,7 +1249,7 @@ _GL_FUNCDECL_SYS (exp2, double, (double x)); _GL_CXXALIAS_SYS (exp2, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (exp2); +_GL_CXXALIASWARN1 (exp2, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef exp2 @@ -1194,7 +1274,9 @@ _GL_FUNCDECL_SYS (exp2l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (exp2l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (exp2l); +# endif #elif defined GNULIB_POSIXCHECK # undef exp2l # if HAVE_RAW_DECL_EXP2L @@ -1242,7 +1324,7 @@ _GL_FUNCDECL_SYS (expm1, double, (double x)); _GL_CXXALIAS_SYS (expm1, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (expm1); +_GL_CXXALIASWARN1 (expm1, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef expm1 @@ -1269,7 +1351,9 @@ _GL_FUNCDECL_SYS (expm1l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (expm1l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (expm1l); +# endif #elif defined GNULIB_POSIXCHECK # undef expm1l # if HAVE_RAW_DECL_EXPM1L @@ -1285,7 +1369,9 @@ _GL_WARN_ON_USE (expm1l, "expm1l is unportable - " _GL_FUNCDECL_SYS (fabsf, float, (float x)); # endif _GL_CXXALIAS_SYS (fabsf, float, (float x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fabsf); +# endif #elif defined GNULIB_POSIXCHECK # undef fabsf # if HAVE_RAW_DECL_FABSF @@ -1309,7 +1395,9 @@ _GL_FUNCDECL_SYS (fabsl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (fabsl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fabsl); +# endif #elif defined GNULIB_POSIXCHECK # undef fabsl # if HAVE_RAW_DECL_FABSL @@ -1355,7 +1443,7 @@ _GL_CXXALIAS_RPL (floor, double, (double x)); _GL_CXXALIAS_SYS (floor, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (floor); +_GL_CXXALIASWARN1 (floor, double, (double x)); # endif #endif @@ -1374,7 +1462,9 @@ _GL_FUNCDECL_SYS (floorl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (floorl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (floorl); +# endif #elif defined GNULIB_POSIXCHECK # undef floorl # if HAVE_RAW_DECL_FLOORL @@ -1424,7 +1514,7 @@ _GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fma); +_GL_CXXALIASWARN1 (fma, double, (double x, double y, double z)); # endif #elif defined GNULIB_POSIXCHECK # undef fma @@ -1455,7 +1545,9 @@ _GL_FUNCDECL_SYS (fmal, long double, _GL_CXXALIAS_SYS (fmal, long double, (long double x, long double y, long double z)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fmal); +# endif #elif defined GNULIB_POSIXCHECK # undef fmal # if HAVE_RAW_DECL_FMAL @@ -1501,7 +1593,7 @@ _GL_CXXALIAS_RPL (fmod, double, (double x, double y)); _GL_CXXALIAS_SYS (fmod, double, (double x, double y)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fmod); +_GL_CXXALIASWARN1 (fmod, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef fmod @@ -1526,7 +1618,9 @@ _GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fmodl); +# endif #elif defined GNULIB_POSIXCHECK # undef fmodl # if HAVE_RAW_DECL_FMODL @@ -1558,7 +1652,9 @@ _GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (frexpf); +# endif #elif defined GNULIB_POSIXCHECK # undef frexpf # if HAVE_RAW_DECL_FREXPF @@ -1620,7 +1716,9 @@ _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); # endif #endif #if 0 && !(0 && !1) +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (frexpl); +# endif #endif #if !0 && defined GNULIB_POSIXCHECK # undef frexpl @@ -1646,7 +1744,9 @@ _GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); # endif _GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (hypotf); +# endif #elif defined GNULIB_POSIXCHECK # undef hypotf # if HAVE_RAW_DECL_HYPOTF @@ -1668,7 +1768,7 @@ _GL_CXXALIAS_RPL (hypot, double, (double x, double y)); _GL_CXXALIAS_SYS (hypot, double, (double x, double y)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (hypot); +_GL_CXXALIASWARN1 (hypot, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef hypot @@ -1693,7 +1793,9 @@ _GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (hypotl); +# endif #elif defined GNULIB_POSIXCHECK # undef hypotl # if HAVE_RAW_DECL_HYPOTL @@ -1741,7 +1843,7 @@ _GL_FUNCDECL_SYS (ilogb, int, (double x)); _GL_CXXALIAS_SYS (ilogb, int, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ilogb); +_GL_CXXALIASWARN1 (ilogb, int, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef ilogb @@ -1761,11 +1863,14 @@ _GL_FUNCDECL_RPL (ilogbl, int, (long double x)); _GL_CXXALIAS_RPL (ilogbl, int, (long double x)); # else # if !1 +# undef ilogbl _GL_FUNCDECL_SYS (ilogbl, int, (long double x)); # endif _GL_CXXALIAS_SYS (ilogbl, int, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ilogbl); +# endif #elif defined GNULIB_POSIXCHECK # undef ilogbl # if HAVE_RAW_DECL_ILOGBL @@ -1775,6 +1880,55 @@ _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " #endif +#if 1 +/* On native Windows, map 'j0' to '_j0', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::j0 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef j0 +# define j0 _j0 +# endif +_GL_CXXALIAS_MDA (j0, double, (double x)); +# else +_GL_CXXALIAS_SYS (j0, double, (double x)); +# endif +_GL_CXXALIASWARN (j0); +#endif + +#if 1 +/* On native Windows, map 'j1' to '_j1', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::j1 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef j1 +# define j1 _j1 +# endif +_GL_CXXALIAS_MDA (j1, double, (double x)); +# else +_GL_CXXALIAS_SYS (j1, double, (double x)); +# endif +_GL_CXXALIASWARN (j1); +#endif + +#if 1 +/* On native Windows, map 'jn' to '_jn', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::jn always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef jn +# define jn _jn +# endif +_GL_CXXALIAS_MDA (jn, double, (int n, double x)); +# else +_GL_CXXALIAS_SYS (jn, double, (int n, double x)); +# endif +_GL_CXXALIASWARN (jn); +#endif + + /* Return x * 2^exp. */ #if 0 # if !1 @@ -1782,7 +1936,9 @@ _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " _GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); # endif _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ldexpf); +# endif #elif defined GNULIB_POSIXCHECK # undef ldexpf # if HAVE_RAW_DECL_LDEXPF @@ -1791,6 +1947,29 @@ _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " # endif #endif +/* Return x * 2^exp. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ldexp +# define ldexp rpl_ldexp +# endif +_GL_FUNCDECL_RPL (ldexp, double, (double x, int exp)); +_GL_CXXALIAS_RPL (ldexp, double, (double x, int exp)); +# else +/* Assume ldexp is always declared. */ +_GL_CXXALIAS_SYS (ldexp, double, (double x, int exp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN1 (ldexp, double, (double x, int exp)); +# endif +#elif defined GNULIB_POSIXCHECK +# undef ldexp +/* Assume ldexp is always declared. */ +_GL_WARN_ON_USE (ldexp, "ldexp is unportable - " + "use gnulib module ldexp for portability"); +#endif + /* Return x * 2^exp. */ #if 0 && 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1808,7 +1987,9 @@ _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); # endif #endif #if 0 +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ldexpl); +# endif #endif #if !0 && defined GNULIB_POSIXCHECK # undef ldexpl @@ -1855,7 +2036,7 @@ _GL_CXXALIAS_RPL (log, double, (double x)); _GL_CXXALIAS_SYS (log, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log); +_GL_CXXALIASWARN1 (log, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log @@ -1880,7 +2061,9 @@ _GL_FUNCDECL_SYS (logl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (logl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (logl); +# endif #elif defined GNULIB_POSIXCHECK # undef logl # if HAVE_RAW_DECL_LOGL @@ -1926,7 +2109,7 @@ _GL_CXXALIAS_RPL (log10, double, (double x)); _GL_CXXALIAS_SYS (log10, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log10); +_GL_CXXALIASWARN1 (log10, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log10 @@ -1951,7 +2134,9 @@ _GL_FUNCDECL_SYS (log10l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log10l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log10l); +# endif #elif defined GNULIB_POSIXCHECK # undef log10l # if HAVE_RAW_DECL_LOG10L @@ -1999,7 +2184,7 @@ _GL_FUNCDECL_SYS (log1p, double, (double x)); _GL_CXXALIAS_SYS (log1p, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log1p); +_GL_CXXALIASWARN1 (log1p, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log1p @@ -2023,7 +2208,9 @@ _GL_FUNCDECL_SYS (log1pl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log1pl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log1pl); +# endif #elif defined GNULIB_POSIXCHECK # undef log1pl # if HAVE_RAW_DECL_LOG1PL @@ -2048,7 +2235,9 @@ _GL_FUNCDECL_SYS (log2f, float, (float x)); # endif _GL_CXXALIAS_SYS (log2f, float, (float x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log2f); +# endif #elif defined GNULIB_POSIXCHECK # undef log2f # if HAVE_RAW_DECL_LOG2F @@ -2073,7 +2262,7 @@ _GL_FUNCDECL_SYS (log2, double, (double x)); _GL_CXXALIAS_SYS (log2, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log2); +_GL_CXXALIASWARN1 (log2, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log2 @@ -2097,7 +2286,9 @@ _GL_FUNCDECL_SYS (log2l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log2l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log2l); +# endif #elif defined GNULIB_POSIXCHECK # undef log2l # if HAVE_RAW_DECL_LOG2L @@ -2145,7 +2336,7 @@ _GL_FUNCDECL_SYS (logb, double, (double x)); _GL_CXXALIAS_SYS (logb, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (logb); +_GL_CXXALIASWARN1 (logb, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef logb @@ -2169,7 +2360,9 @@ _GL_FUNCDECL_SYS (logbl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (logbl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (logbl); +# endif #elif defined GNULIB_POSIXCHECK # undef logbl # if HAVE_RAW_DECL_LOGBL @@ -2215,7 +2408,7 @@ _GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); _GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (modf); +_GL_CXXALIASWARN1 (modf, double, (double x, double *iptr)); # endif #elif defined GNULIB_POSIXCHECK # undef modf @@ -2242,7 +2435,9 @@ _GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) # endif _GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (modfl); +# endif #elif defined GNULIB_POSIXCHECK # undef modfl # if HAVE_RAW_DECL_MODFL @@ -2306,7 +2501,7 @@ _GL_FUNCDECL_SYS (remainder, double, (double x, double y)); _GL_CXXALIAS_SYS (remainder, double, (double x, double y)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remainder); +_GL_CXXALIASWARN1 (remainder, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef remainder @@ -2333,7 +2528,9 @@ _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (remainderl); +# endif #elif defined GNULIB_POSIXCHECK # undef remainderl # if HAVE_RAW_DECL_REMAINDERL @@ -2363,7 +2560,7 @@ _GL_FUNCDECL_SYS (rint, double, (double x)); # endif _GL_CXXALIAS_SYS (rint, double, (double x)); # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rint); +_GL_CXXALIASWARN1 (rint, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef rint @@ -2387,7 +2584,9 @@ _GL_FUNCDECL_SYS (rintl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (rintl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (rintl); +# endif #elif defined GNULIB_POSIXCHECK # undef rintl # if HAVE_RAW_DECL_RINTL @@ -2435,7 +2634,7 @@ _GL_FUNCDECL_SYS (round, double, (double x)); _GL_CXXALIAS_SYS (round, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (round); +_GL_CXXALIASWARN1 (round, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef round @@ -2462,7 +2661,9 @@ _GL_FUNCDECL_SYS (roundl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (roundl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (roundl); +# endif #elif defined GNULIB_POSIXCHECK # undef roundl # if HAVE_RAW_DECL_ROUNDL @@ -2482,7 +2683,7 @@ _GL_FUNCDECL_RPL (sinf, float, (float x)); _GL_CXXALIAS_RPL (sinf, float, (float x)); # else # if !1 - # undef sinf +# undef sinf _GL_FUNCDECL_SYS (sinf, float, (float x)); # endif _GL_CXXALIAS_SYS (sinf, float, (float x)); @@ -2502,7 +2703,9 @@ _GL_WARN_ON_USE (sinf, "sinf is unportable - " _GL_FUNCDECL_SYS (sinl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (sinl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sinl); +# endif #elif defined GNULIB_POSIXCHECK # undef sinl # if HAVE_RAW_DECL_SINL @@ -2576,7 +2779,9 @@ _GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sqrtl); +# endif #elif defined GNULIB_POSIXCHECK # undef sqrtl # if HAVE_RAW_DECL_SQRTL @@ -2616,7 +2821,9 @@ _GL_WARN_ON_USE (tanf, "tanf is unportable - " _GL_FUNCDECL_SYS (tanl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (tanl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (tanl); +# endif #elif defined GNULIB_POSIXCHECK # undef tanl # if HAVE_RAW_DECL_TANL @@ -2689,7 +2896,7 @@ _GL_FUNCDECL_SYS (trunc, double, (double x)); _GL_CXXALIAS_SYS (trunc, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (trunc); +_GL_CXXALIASWARN1 (trunc, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef trunc @@ -2713,7 +2920,9 @@ _GL_FUNCDECL_SYS (truncl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (truncl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (truncl); +# endif #elif defined GNULIB_POSIXCHECK # undef truncl # if HAVE_RAW_DECL_TRUNCL @@ -2723,6 +2932,55 @@ _GL_WARN_ON_USE (truncl, "truncl is unportable - " #endif +#if 1 +/* On native Windows, map 'y0' to '_y0', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::y0 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef y0 +# define y0 _y0 +# endif +_GL_CXXALIAS_MDA (y0, double, (double x)); +# else +_GL_CXXALIAS_SYS (y0, double, (double x)); +# endif +_GL_CXXALIASWARN (y0); +#endif + +#if 1 +/* On native Windows, map 'y1' to '_y1', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::y1 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef y1 +# define y1 _y1 +# endif +_GL_CXXALIAS_MDA (y1, double, (double x)); +# else +_GL_CXXALIAS_SYS (y1, double, (double x)); +# endif +_GL_CXXALIASWARN (y1); +#endif + +#if 1 +/* On native Windows, map 'yn' to '_yn', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::yn always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef yn +# define yn _yn +# endif +_GL_CXXALIAS_MDA (yn, double, (int n, double x)); +# else +_GL_CXXALIAS_SYS (yn, double, (int n, double x)); +# endif +_GL_CXXALIASWARN (yn); +#endif + + /* Definitions of function-like macros come here, after the function declarations. */ @@ -2742,11 +3000,12 @@ _GL_EXTERN_C int gl_isfinitel (long double x); # if defined isfinite || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) # undef isfinite -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isfinite through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) # define isfinite rpl_isfinite +# define GNULIB_NAMESPACE_LACKS_ISFINITE 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) # endif @@ -2776,11 +3035,12 @@ _GL_EXTERN_C int gl_isinfl (long double x); # if defined isinf || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) # undef isinf -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isinf through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) # define isinf rpl_isinf +# define GNULIB_NAMESPACE_LACKS_ISINF 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) # endif @@ -2800,10 +3060,11 @@ _GL_WARN_REAL_FLOATING_DECL (isinf); # if 0 /* The original included above provides a declaration of isnan macro or (older) isnanf function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ +# if (__GNUC__ >= 4) || (__clang_major__ >= 4) + /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. + GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't. */ # undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) +# define isnanf(x) __builtin_isnan ((float)(x)) # elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) @@ -2823,8 +3084,8 @@ _GL_EXTERN_C int isnanf (float x); # if 1 /* The original included above provides a declaration of isnan macro. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ +# if (__GNUC__ >= 4) || (__clang_major__ >= 4) + /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. */ # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) # else @@ -2844,10 +3105,11 @@ _GL_EXTERN_C int isnand (double x); # if 0 /* The original included above provides a declaration of isnan macro or (older) isnanl function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ +# if (__GNUC__ >= 4) || (__clang_major__ >= 4) + /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. + GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't. */ # undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) +# define isnanl(x) __builtin_isnan ((long double)(x)) # elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) @@ -2867,20 +3129,20 @@ _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; isnanf.h (e.g.) here, because those may end up being macros that recursively expand back to isnan. So use the gnulib replacements for them directly. */ -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) -# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) +# if 0 && (__GNUC__ >= 4) || (__clang_major__ >= 4) +# define gl_isnan_f(x) __builtin_isnan ((float)(x)) # else _GL_EXTERN_C int rpl_isnanf (float x); # define gl_isnan_f(x) rpl_isnanf (x) # endif -# if 1 && __GNUC__ >= 4 +# if 1 && (__GNUC__ >= 4) || (__clang_major__ >= 4) # define gl_isnan_d(x) __builtin_isnan ((double)(x)) # else _GL_EXTERN_C int rpl_isnand (double x); # define gl_isnan_d(x) rpl_isnand (x) # endif -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) -# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) +# if 0 && (__GNUC__ >= 4) || (__clang_major__ >= 4) +# define gl_isnan_l(x) __builtin_isnan ((long double)(x)) # else _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; # define gl_isnan_l(x) rpl_isnanl (x) @@ -2890,22 +3152,28 @@ _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ gl_isnan_f (x)) -# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl))) +# elif (__GNUC__ >= 4) || (__clang_major__ >= 4) # undef isnan # define isnan(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ + (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \ sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ - __builtin_isnanf ((float)(x))) + __builtin_isnan ((float)(x))) # endif # ifdef __cplusplus # if defined isnan || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) # undef isnan -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ != 12) || (defined __FreeBSD__ && (__clang_major__ < 7 || __clang_major__ >= 11)) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isnan through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) # define isnan rpl_isnan +# define GNULIB_NAMESPACE_LACKS_ISNAN 1 +# elif (defined __FreeBSD__ && __clang_major__ >= 14) + /* Neither of the two possible _GL_MATH_CXX_REAL_FLOATING_DECL_2 invocations + works. Inline functions are already present in /usr/include/c++/v1/math.h, + which comes from LLVM. */ +# define GNULIB_NAMESPACE_LACKS_ISNAN 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) # endif @@ -2929,7 +3197,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); # if (0 \ && (!defined __cplusplus || __cplusplus < 201103)) # undef signbit - /* GCC 4.0 and newer provides three built-ins for signbit. */ + /* GCC >= 4.0 and clang provide three built-ins for signbit. */ # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ @@ -2940,12 +3208,13 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); _GL_EXTERN_C int gl_signbitf (float arg); _GL_EXTERN_C int gl_signbitd (double arg); _GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ +# if __GNUC__ >= 2 || defined __clang__ # define _GL_NUM_UINT_WORDS(type) \ ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf # define gl_signbitf_OPTIMIZED_MACRO # define gl_signbitf(arg) \ + __extension__ \ ({ union { float _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ } _m; \ @@ -2956,6 +3225,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd # define gl_signbitd_OPTIMIZED_MACRO # define gl_signbitd(arg) \ + __extension__ \ ({ union { double _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ } _m; \ @@ -2966,6 +3236,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl # define gl_signbitl_OPTIMIZED_MACRO # define gl_signbitl(arg) \ + __extension__ \ ({ union { long double _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ } _m; \ @@ -2984,11 +3255,12 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined signbit || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) # undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines signbit through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) # define signbit rpl_signbit +# define GNULIB_NAMESPACE_LACKS_SIGNBIT 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) # endif @@ -3002,7 +3274,85 @@ _GL_WARN_REAL_FLOATING_DECL (signbit); # endif #endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef totalorderf +# define totalorderf rpl_totalorderf +# endif +_GL_FUNCDECL_RPL (totalorderf, int, (float const *, float const *)); +_GL_CXXALIAS_RPL (totalorderf, int, (float const *, float const *)); +# else +# if !1 +_GL_FUNCDECL_SYS (totalorderf, int, (float const *, float const *)); +# endif +_GL_CXXALIAS_SYS (totalorderf, int, (float const *, float const *)); +# endif +_GL_CXXALIASWARN (totalorderf); +#elif defined GNULIB_POSIXCHECK +# undef totalorderf +# if HAVE_RAW_DECL_TOTALORDERF +_GL_WARN_ON_USE (totalorderf, "totalorderf is unportable - " + "use gnulib module totalorderf for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef totalorder +# define totalorder rpl_totalorder +# endif +_GL_FUNCDECL_RPL (totalorder, int, (double const *, double const *)); +_GL_CXXALIAS_RPL (totalorder, int, (double const *, double const *)); +# else +# if !1 +_GL_FUNCDECL_SYS (totalorder, int, (double const *, double const *)); +# endif +_GL_CXXALIAS_SYS (totalorder, int, (double const *, double const *)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN1 (totalorder, int, (double const *, double const *)); +# endif +#elif defined GNULIB_POSIXCHECK +# undef totalorder +# if HAVE_RAW_DECL_TOTALORDER +_GL_WARN_ON_USE (totalorder, "totalorder is unportable - " + "use gnulib module totalorder for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef totalorderl +# define totalorderl rpl_totalorderl +# endif +_GL_FUNCDECL_RPL (totalorderl, int, + (long double const *, long double const *)); +_GL_CXXALIAS_RPL (totalorderl, int, + (long double const *, long double const *)); +# else +# if !1 +_GL_FUNCDECL_SYS (totalorderl, int, + (long double const *, long double const *)); +# endif +_GL_CXXALIAS_SYS (totalorderl, int, + (long double const *, long double const *)); +# endif +_GL_CXXALIASWARN (totalorderl); +#elif defined GNULIB_POSIXCHECK +# undef totalorderl +# if HAVE_RAW_DECL_TOTALORDERL +_GL_WARN_ON_USE (totalorderl, "totalorderl is unportable - " + "use gnulib module totalorderl for portability"); +# endif +#endif + _GL_INLINE_HEADER_END #endif /* _GL_MATH_H */ +#endif /* _GL_INCLUDING_MATH_H */ #endif /* _GL_MATH_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/netdb.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/netdb.h new file mode 100644 index 000000000..92d0fade7 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/netdb.h @@ -0,0 +1,813 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Provide a netdb.h header file for systems lacking it (read: MinGW). + Copyright (C) 2008-2023 Free Software Foundation, Inc. + Written by Simon Josefsson. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* This file is supposed to be used on platforms that lack . + It is intended to provide definitions and prototypes needed by an + application. */ + +#ifndef _GL_NETDB_H + +#if __GNUC__ >= 3 + +#endif + + +#if 0 + +/* The include_next requires a split double-inclusion guard. */ +# include + +#endif + +#ifndef _GL_NETDB_H +#define _GL_NETDB_H + +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* Get definitions such as 'socklen_t' on IRIX 6.5 and OSF/1 4.0 and + 'struct hostent' on MinGW. */ +#include + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + +/* Declarations for a platform that lacks , or where it is + incomplete. */ + +#if 1 + +# if !1 + +# ifdef __cplusplus +extern "C" { +# endif + +# if !GNULIB_defined_struct_addrinfo +/* Structure to contain information about address of a service provider. */ +struct addrinfo +{ + int ai_flags; /* Input flags. */ + int ai_family; /* Protocol family for socket. */ + int ai_socktype; /* Socket type. */ + int ai_protocol; /* Protocol for socket. */ + socklen_t ai_addrlen; /* Length of socket address. */ + struct sockaddr *ai_addr; /* Socket address for socket. */ + char *ai_canonname; /* Canonical name for service location. */ + struct addrinfo *ai_next; /* Pointer to next in list. */ +}; +# define GNULIB_defined_struct_addrinfo 1 +# endif + +# ifdef __cplusplus +} +# endif + +# endif + +/* Possible values for 'ai_flags' field in 'addrinfo' structure. */ +# ifndef AI_PASSIVE +# define AI_PASSIVE 0x0001 /* Socket address is intended for 'bind'. */ +# endif +# ifndef AI_CANONNAME +# define AI_CANONNAME 0x0002 /* Request for canonical name. */ +# endif +# ifndef AI_NUMERICSERV +# define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */ +# endif + +# if 0 +# define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */ +# endif + +/* These symbolic constants are required to be present by POSIX, but + our getaddrinfo replacement doesn't use them (yet). Setting them + to 0 on systems that doesn't have them avoids causing problems for + system getaddrinfo implementations that would be confused by + unknown values. */ +# ifndef AI_V4MAPPED +# define AI_V4MAPPED 0 /* 0x0008: IPv4 mapped addresses are acceptable. */ +# endif +# ifndef AI_ALL +# define AI_ALL 0 /* 0x0010: Return IPv4 mapped and IPv6 addresses. */ +# endif +# ifndef AI_ADDRCONFIG +# define AI_ADDRCONFIG 0 /* 0x0020: Use configuration of this host to choose + returned address type. */ +# endif + +/* Error values for 'getaddrinfo' function. */ +# ifndef EAI_BADFLAGS +# define EAI_BADFLAGS -1 /* Invalid value for 'ai_flags' field. */ +# define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ +# define EAI_AGAIN -3 /* Temporary failure in name resolution. */ +# define EAI_FAIL -4 /* Non-recoverable failure in name res. */ +# define EAI_NODATA -5 /* No address associated with NAME. */ +# define EAI_FAMILY -6 /* 'ai_family' not supported. */ +# define EAI_SOCKTYPE -7 /* 'ai_socktype' not supported. */ +# define EAI_SERVICE -8 /* SERVICE not supported for 'ai_socktype'. */ +# define EAI_MEMORY -10 /* Memory allocation failure. */ +# endif + +/* Since EAI_NODATA is deprecated by RFC3493, some systems (at least + FreeBSD, which does define EAI_BADFLAGS) have removed the definition + in favor of EAI_NONAME. */ +# if !defined EAI_NODATA && defined EAI_NONAME +# define EAI_NODATA EAI_NONAME +# endif + +# ifndef EAI_OVERFLOW +/* Not defined on mingw32 and Haiku. */ +# define EAI_OVERFLOW -12 /* Argument buffer overflow. */ +# endif +# ifndef EAI_ADDRFAMILY +/* Not defined on mingw32. */ +# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ +# endif +# ifndef EAI_SYSTEM +/* Not defined on mingw32. */ +# define EAI_SYSTEM -11 /* System error returned in 'errno'. */ +# endif + +# if 0 +/* The commented out definitions below are not yet implemented in the + GNULIB getaddrinfo() replacement, so are not yet needed. + + If they are restored, be sure to protect the definitions with #ifndef. */ +# ifndef EAI_INPROGRESS +# define EAI_INPROGRESS -100 /* Processing request in progress. */ +# define EAI_CANCELED -101 /* Request canceled. */ +# define EAI_NOTCANCELED -102 /* Request not canceled. */ +# define EAI_ALLDONE -103 /* All requests done. */ +# define EAI_INTR -104 /* Interrupted by a signal. */ +# define EAI_IDN_ENCODE -105 /* IDN encoding failed. */ +# endif +# endif + +/* Translate name of a service location and/or a service name to set of + socket addresses. + For more details, see the POSIX:2008 specification + . */ +# ifndef _WIN64 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getaddrinfo +# define getaddrinfo rpl_getaddrinfo +# endif +_GL_FUNCDECL_RPL (getaddrinfo, int, + (const char *restrict nodename, + const char *restrict servname, + const struct addrinfo *restrict hints, + struct addrinfo **restrict res) + _GL_ARG_NONNULL ((4))); +_GL_CXXALIAS_RPL (getaddrinfo, int, + (const char *restrict nodename, + const char *restrict servname, + const struct addrinfo *restrict hints, + struct addrinfo **restrict res)); +# else +# if !1 +_GL_FUNCDECL_SYS (getaddrinfo, int, + (const char *restrict nodename, + const char *restrict servname, + const struct addrinfo *restrict hints, + struct addrinfo **restrict res) + _GL_ARG_NONNULL ((4))); +# endif +_GL_CXXALIAS_SYS (getaddrinfo, int, + (const char *restrict nodename, + const char *restrict servname, + const struct addrinfo *restrict hints, + struct addrinfo **restrict res)); +# endif +_GL_CXXALIASWARN (getaddrinfo); + +/* Free 'addrinfo' structure AI including associated storage. + For more details, see the POSIX:2008 specification + . */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef freeaddrinfo +# define freeaddrinfo rpl_freeaddrinfo +# endif +_GL_FUNCDECL_RPL (freeaddrinfo, void, (struct addrinfo *ai) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (freeaddrinfo, void, (struct addrinfo *ai)); +# else +# if !1 +_GL_FUNCDECL_SYS (freeaddrinfo, void, (struct addrinfo *ai) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (freeaddrinfo, void, (struct addrinfo *ai)); +# endif +_GL_CXXALIASWARN (freeaddrinfo); + +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gai_strerror +# define gai_strerror rpl_gai_strerror +# endif +_GL_FUNCDECL_RPL (gai_strerror, const char *, (int ecode)); +_GL_CXXALIAS_RPL (gai_strerror, const char *, (int ecode)); +# else +# if !1 +/* Convert error return from getaddrinfo() to a string. + For more details, see the POSIX:2008 specification + . */ +_GL_FUNCDECL_SYS (gai_strerror, const char *, (int ecode)); +# endif +_GL_CXXALIAS_SYS (gai_strerror, const char *, (int ecode)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (gai_strerror); +# endif + +# if !1 +/* Convert socket address to printable node and service names. + For more details, see the POSIX:2008 specification + . */ +_GL_FUNCDECL_SYS (getnameinfo, int, + (const struct sockaddr *restrict sa, socklen_t salen, + char *restrict node, socklen_t nodelen, + char *restrict service, socklen_t servicelen, + int flags) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on glibc systems, the seventh parameter is + unsigned int flags. */ +_GL_CXXALIAS_SYS_CAST (getnameinfo, int, + (const struct sockaddr *restrict sa, socklen_t salen, + char *restrict node, socklen_t nodelen, + char *restrict service, socklen_t servicelen, + int flags)); +_GL_CXXALIASWARN (getnameinfo); + +/* Possible flags for getnameinfo. */ +# ifndef NI_NUMERICHOST +# define NI_NUMERICHOST 1 +# endif +# ifndef NI_NUMERICSERV +# define NI_NUMERICSERV 2 +# endif + +#elif defined GNULIB_POSIXCHECK + +# undef getaddrinfo +# if HAVE_RAW_DECL_GETADDRINFO +_GL_WARN_ON_USE (getaddrinfo, "getaddrinfo is unportable - " + "use gnulib module getaddrinfo for portability"); +# endif + +# undef freeaddrinfo +# if HAVE_RAW_DECL_FREEADDRINFO +_GL_WARN_ON_USE (freeaddrinfo, "freeaddrinfo is unportable - " + "use gnulib module getaddrinfo for portability"); +# endif + +# undef gai_strerror +# if HAVE_RAW_DECL_GAI_STRERROR +_GL_WARN_ON_USE (gai_strerror, "gai_strerror is unportable - " + "use gnulib module getaddrinfo for portability"); +# endif + +# undef getnameinfo +# if HAVE_RAW_DECL_GETNAMEINFO +_GL_WARN_ON_USE (getnameinfo, "getnameinfo is unportable - " + "use gnulib module getaddrinfo for portability"); +# endif + +#endif + +#endif /* _GL_NETDB_H */ +#endif /* _GL_NETDB_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/netinet/in.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/netinet/in.h similarity index 53% rename from gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/netinet/in.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/netinet/in.h index 124d63b4d..b0779b92a 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/netinet/in.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/netinet/in.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_NETINET_IN_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/omp.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/omp.h index 1956140ed..cb3112a26 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/omp.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/omp.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* OpenMP declarations. - Copyright (C) 2019-2020 Free Software Foundation, Inc. + Copyright (C) 2019-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -24,7 +24,9 @@ #ifndef _GL_OMP_H /* The include_next requires a split double-inclusion guard. */ -#include "../include/omp.h" +#ifdef _OPENMP +# include "../include/omp.h" +#endif #ifndef _GL_OMP_H #define _GL_OMP_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sched.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sched.h index 0f1cb7900..1a11e7875 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sched.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sched.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_SCHED_H @@ -22,6 +22,13 @@ #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* The include_next requires a split double-inclusion guard. */ #if 0 # if 0 @@ -33,6 +40,11 @@ #ifndef _GL_SCHED_H #define _GL_SCHED_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Get pid_t. This is needed on glibc 2.11 (see glibc bug ) @@ -51,19 +63,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -151,6 +163,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -198,6 +216,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -223,6 +251,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -320,7 +356,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -348,9 +384,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -366,19 +402,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -451,13 +487,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -466,27 +509,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -520,8 +569,8 @@ struct sched_param # define SCHED_OTHER 0 #endif -#if 0 -# if 0 +#if IN_GETTEXT_TOOLS_GNULIB_TESTS +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sched_yield # define sched_yield rpl_sched_yield @@ -534,7 +583,9 @@ _GL_FUNCDECL_SYS (sched_yield, int, (void)); # endif _GL_CXXALIAS_SYS (sched_yield, int, (void)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sched_yield); +# endif #elif defined GNULIB_POSIXCHECK # undef sched_yield # if HAVE_RAW_DECL_SCHED_YIELD diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/signal.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/signal.h index e908f59a6..f38b7ee80 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/signal.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/signal.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -33,11 +33,7 @@ In this situation, some of the functions are not yet declared, therefore we cannot provide the C++ aliases. */ -#if (_MSC_VER < 1900) -#include "../include/signal.h" -#else -#include "../ucrt/signal.h" -#endif +# include "../ucrt/signal.h" #else /* Normal invocation convention. */ @@ -53,43 +49,52 @@ #include /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/signal.h" -#else #include "../ucrt/signal.h" -#endif #undef _GL_ALREADY_INCLUDING_SIGNAL_H #ifndef _GL_SIGNAL_H #define _GL_SIGNAL_H -/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android - declare pthread_sigmask in , not in . +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* For testing the OpenBSD version. */ +#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ + && defined __OpenBSD__ +# include +#endif + +/* Mac OS X 10.3, FreeBSD < 8.0, OpenBSD < 5.1, OSF/1 4.0, Solaris 2.6, Android, + OS/2 kLIBC declare pthread_sigmask in , not in . But avoid namespace pollution on glibc systems.*/ #if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ && ((defined __APPLE__ && defined __MACH__) \ - || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \ - || defined __sun || defined __ANDROID__) \ + || (defined __FreeBSD__ && __FreeBSD__ < 8) \ + || (defined __OpenBSD__ && OpenBSD < 201205) \ + || defined __osf__ || defined __sun || defined __ANDROID__ \ + || defined __KLIBC__) \ && ! defined __GLIBC__ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -177,6 +182,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -224,6 +235,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -249,6 +270,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -346,7 +375,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -374,9 +403,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -392,26 +421,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -420,19 +449,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -505,13 +534,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -520,27 +556,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/spawn.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/spawn.h index c08beecc3..987045c81 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/spawn.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/spawn.h @@ -1,36 +1,58 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Definitions for POSIX spawn interface. - Copyright (C) 2000, 2003-2004, 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2000, 2003-2004, 2008-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ -#ifndef _GL_SPAWN_H - #if __GNUC__ >= 3 #endif +#if defined _GL_ALREADY_INCLUDING_SPAWN_H +/* Special invocation convention: + On OS/2 kLIBC, includes . Then -> + -> -> are included by GNULIB. + In this situation, struct sched_param is not yet defined. */ + +#include + +#else + +#ifndef _GL_SPAWN_H +/* Normal invocation convention. */ + /* The include_next requires a split double-inclusion guard. */ #if 0 + +# define _GL_ALREADY_INCLUDING_SPAWN_H + # include + +# define _GL_ALREADY_INCLUDING_SPAWN_H + #endif #ifndef _GL_SPAWN_H #define _GL_SPAWN_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Get definitions of 'struct sched_param' and 'sigset_t'. But avoid namespace pollution on glibc systems. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) @@ -51,7 +73,9 @@ 'configure' might #define 'restrict' to those words, so pick a different name. */ #ifndef _Restrict_ -# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) +# if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 # define _Restrict_ __restrict # elif 199901L <= __STDC_VERSION__ || defined restrict # define _Restrict_ restrict @@ -59,13 +83,18 @@ # define _Restrict_ # endif #endif -/* For [restrict], use glibc's __restrict_arr if available. - Otherwise, GCC 3.1 (not in C++ mode) and C99 support [restrict]. */ +/* For the ISO C99 syntax + array_name[restrict] + use glibc's __restrict_arr if available. + Otherwise, GCC 3.1 and clang support this syntax (but not in C++ mode). + Other ISO C99 compilers support it as well. */ #ifndef _Restrict_arr_ # ifdef __restrict_arr # define _Restrict_arr_ __restrict_arr -# elif ((199901L <= __STDC_VERSION__ || 3 < __GNUC__ + (1 <= __GNUC_MINOR__)) \ - && !defined __GNUG__) +# elif ((199901L <= __STDC_VERSION__ \ + || 3 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3) \ + && !defined __cplusplus) # define _Restrict_arr_ _Restrict_ # else # define _Restrict_arr_ @@ -74,19 +103,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -174,6 +203,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -221,6 +256,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -246,6 +291,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -343,7 +396,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -371,9 +424,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -389,26 +442,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -417,19 +470,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -502,13 +555,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -517,27 +577,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -596,26 +662,25 @@ typedef struct /* Flags to be set in the 'posix_spawnattr_t'. */ #if 0 -/* Use the values from the system, but provide the missing ones. */ +# if 0 +/* Use the values from the system, for better compatibility. */ +/* But this implementation does not support AIX extensions. */ +# undef POSIX_SPAWN_FORK_HANDLERS +# endif +/* Provide the values that the system is lacking. */ # ifndef POSIX_SPAWN_SETSCHEDPARAM # define POSIX_SPAWN_SETSCHEDPARAM 0 # endif # ifndef POSIX_SPAWN_SETSCHEDULER # define POSIX_SPAWN_SETSCHEDULER 0 # endif -#else -# if 0 -/* Use the values from the system, for better compatibility. */ -/* But this implementation does not support AIX extensions. */ -# undef POSIX_SPAWN_FORK_HANDLERS -# else -# define POSIX_SPAWN_RESETIDS 0x01 -# define POSIX_SPAWN_SETPGROUP 0x02 -# define POSIX_SPAWN_SETSIGDEF 0x04 -# define POSIX_SPAWN_SETSIGMASK 0x08 -# define POSIX_SPAWN_SETSCHEDPARAM 0x10 -# define POSIX_SPAWN_SETSCHEDULER 0x20 -# endif +#else /* !0 */ +# define POSIX_SPAWN_RESETIDS 0x01 +# define POSIX_SPAWN_SETPGROUP 0x02 +# define POSIX_SPAWN_SETSIGDEF 0x04 +# define POSIX_SPAWN_SETSIGMASK 0x08 +# define POSIX_SPAWN_SETSCHEDPARAM 0x10 +# define POSIX_SPAWN_SETSCHEDULER 0x20 #endif /* A GNU extension. Use the next free bit position. */ #ifndef POSIX_SPAWN_USEVFORK @@ -642,7 +707,7 @@ typedef int verify_POSIX_SPAWN_USEVFORK_no_overlap #endif -#if 0 +#if 1 /* Spawn a new process executing PATH with the attributes describes in *ATTRP. Before running the process perform the actions described in FILE-ACTIONS. @@ -686,7 +751,9 @@ _GL_CXXALIAS_SYS (posix_spawn, int, char *const argv[_Restrict_arr_], char *const envp[_Restrict_arr_])); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawn); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawn # if HAVE_RAW_DECL_POSIX_SPAWN @@ -730,7 +797,9 @@ _GL_CXXALIAS_SYS (posix_spawnp, int, const posix_spawnattr_t *__attrp, char *const argv[], char *const envp[])); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawnp); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawnp # if HAVE_RAW_DECL_POSIX_SPAWNP @@ -756,7 +825,9 @@ _GL_FUNCDECL_SYS (posix_spawnattr_init, int, (posix_spawnattr_t *__attr) # endif _GL_CXXALIAS_SYS (posix_spawnattr_init, int, (posix_spawnattr_t *__attr)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawnattr_init); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_init # if HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT @@ -781,7 +852,9 @@ _GL_FUNCDECL_SYS (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr) # endif _GL_CXXALIAS_SYS (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawnattr_destroy); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_destroy # if HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY @@ -816,7 +889,9 @@ _GL_CXXALIAS_SYS (posix_spawnattr_getsigdefault, int, (const posix_spawnattr_t *_Restrict_ __attr, sigset_t *_Restrict_ __sigdefault)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawnattr_getsigdefault); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_getsigdefault # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT @@ -850,7 +925,9 @@ _GL_CXXALIAS_SYS (posix_spawnattr_setsigdefault, int, (posix_spawnattr_t *_Restrict_ __attr, const sigset_t *_Restrict_ __sigdefault)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawnattr_setsigdefault); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_setsigdefault # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT @@ -884,7 +961,9 @@ _GL_CXXALIAS_SYS (posix_spawnattr_getsigmask, int, (const posix_spawnattr_t *_Restrict_ __attr, sigset_t *_Restrict_ __sigmask)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawnattr_getsigmask); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_getsigmask # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK @@ -918,7 +997,9 @@ _GL_CXXALIAS_SYS (posix_spawnattr_setsigmask, int, (posix_spawnattr_t *_Restrict_ __attr, const sigset_t *_Restrict_ __sigmask)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawnattr_setsigmask); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_setsigmask # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK @@ -952,7 +1033,9 @@ _GL_CXXALIAS_SYS (posix_spawnattr_getflags, int, (const posix_spawnattr_t *_Restrict_ __attr, short int *_Restrict_ __flags)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawnattr_getflags); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_getflags # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS @@ -982,7 +1065,9 @@ _GL_FUNCDECL_SYS (posix_spawnattr_setflags, int, _GL_CXXALIAS_SYS (posix_spawnattr_setflags, int, (posix_spawnattr_t *__attr, short int __flags)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawnattr_setflags); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_setflags # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS @@ -1016,7 +1101,9 @@ _GL_CXXALIAS_SYS (posix_spawnattr_getpgroup, int, (const posix_spawnattr_t *_Restrict_ __attr, pid_t *_Restrict_ __pgroup)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawnattr_getpgroup); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_getpgroup # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP @@ -1026,7 +1113,7 @@ _GL_WARN_ON_USE (posix_spawnattr_getpgroup, # endif #endif -#if 0 +#if 1 /* Store process group ID in the attribute structure. */ # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1046,7 +1133,9 @@ _GL_FUNCDECL_SYS (posix_spawnattr_setpgroup, int, _GL_CXXALIAS_SYS (posix_spawnattr_setpgroup, int, (posix_spawnattr_t *__attr, pid_t __pgroup)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawnattr_setpgroup); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_setpgroup # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP @@ -1217,7 +1306,9 @@ _GL_FUNCDECL_SYS (posix_spawn_file_actions_init, int, _GL_CXXALIAS_SYS (posix_spawn_file_actions_init, int, (posix_spawn_file_actions_t *__file_actions)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawn_file_actions_init); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_init # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT @@ -1247,7 +1338,9 @@ _GL_FUNCDECL_SYS (posix_spawn_file_actions_destroy, int, _GL_CXXALIAS_SYS (posix_spawn_file_actions_destroy, int, (posix_spawn_file_actions_t *__file_actions)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawn_file_actions_destroy); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_destroy # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY @@ -1368,7 +1461,7 @@ _GL_WARN_ON_USE (posix_spawn_file_actions_adddup2, # endif #endif -#if 0 +#if 1 /* Add an action to FILE-ACTIONS which tells the implementation to call 'chdir' to the given directory during the 'spawn' call. */ # if 0 @@ -1383,7 +1476,7 @@ _GL_CXXALIAS_RPL (posix_spawn_file_actions_addchdir, int, (posix_spawn_file_actions_t *_Restrict_ __file_actions, const char *_Restrict_ __path)); # else -# if !1 +# if !0 _GL_FUNCDECL_SYS (posix_spawn_file_actions_addchdir, int, (posix_spawn_file_actions_t *_Restrict_ __file_actions, const char *_Restrict_ __path) @@ -1393,7 +1486,9 @@ _GL_CXXALIAS_SYS (posix_spawn_file_actions_addchdir, int, (posix_spawn_file_actions_t *_Restrict_ __file_actions, const char *_Restrict_ __path)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawn_file_actions_addchdir); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_addchdir # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR @@ -1428,7 +1523,9 @@ _GL_CXXALIAS_SYS (posix_spawn_file_actions_addfchdir, int, (posix_spawn_file_actions_t *_Restrict_ __file_actions, int __fd)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_spawn_file_actions_addfchdir); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_addfchdir # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR @@ -1441,3 +1538,4 @@ _GL_WARN_ON_USE (posix_spawn_file_actions_addfchdir, #endif /* _GL_SPAWN_H */ #endif /* _GL_SPAWN_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdckdint.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdckdint.h new file mode 100644 index 000000000..edcda2982 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdckdint.h @@ -0,0 +1,36 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* stdckdint.h -- checked integer arithmetic + + Copyright 2022-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_STDCKDINT_H +#define _GL_STDCKDINT_H + +#include "intprops-internal.h" + +/* Store into *R the low-order bits of A + B, A - B, A * B, respectively. + Return 1 if the result overflows, 0 otherwise. + A, B, and *R can have any integer type other than char, bool, a + bit-precise integer type, or an enumeration type. + + These are like the standard macros introduced in C23, except that + arguments should not have side effects. */ + +#define ckd_add(r, a, b) ((bool) _GL_INT_ADD_WRAPV (a, b, r)) +#define ckd_sub(r, a, b) ((bool) _GL_INT_SUBTRACT_WRAPV (a, b, r)) +#define ckd_mul(r, a, b) ((bool) _GL_INT_MULTIPLY_WRAPV (a, b, r)) + +#endif /* _GL_STDCKDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stddef.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stddef.h index 8e048b3ec..40a21db6f 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stddef.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stddef.h @@ -1,25 +1,25 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for POSIX 2008 , for platforms that have issues. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake. */ /* - * POSIX 2008 for platforms that have issues. + * POSIX 2008 and ISO C 23 for platforms that have issues. * */ @@ -42,11 +42,14 @@ # ifdef __need_wint_t # define _GL_STDDEF_WINT_T # endif -#if (_MSC_VER < 1900) -#include "../include/stddef.h" -#else -#include "../ucrt/stddef.h" -#endif +# include "../ucrt/stddef.h" + /* On TinyCC, make sure that the macros that indicate the special invocation + convention get undefined. */ +# undef __need_wchar_t +# undef __need_size_t +# undef __need_ptrdiff_t +# undef __need_NULL +# undef __need_wint_t # endif #else @@ -54,13 +57,27 @@ # ifndef _GL_STDDEF_H +/* On AIX 7.2, with xlc in 64-bit mode, defines max_align_t to a + type with alignment 4, but 'long' has alignment 8. */ +# if defined _AIX && defined __LP64__ && !0 +# if !GNULIB_defined_max_align_t +# ifdef _MAX_ALIGN_T +/* /usr/include/stddef.h has already defined max_align_t. Override it. */ +typedef long rpl_max_align_t; +# define max_align_t rpl_max_align_t +# else +/* Prevent /usr/include/stddef.h from defining max_align_t. */ +typedef long max_align_t; +# define _MAX_ALIGN_T +# endif +# define __CLANG_MAX_ALIGN_T_DEFINED +# define GNULIB_defined_max_align_t 1 +# endif +# endif + /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/stddef.h" -#else -#include "../ucrt/stddef.h" -#endif +# include "../ucrt/stddef.h" /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ # if (0 \ @@ -85,6 +102,33 @@ # ifndef _GL_STDDEF_H # define _GL_STDDEF_H +/* This file uses _Noreturn, _GL_ATTRIBUTE_NOTHROW. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* Some platforms lack wchar_t. */ #if !1 # define wchar_t int @@ -95,18 +139,20 @@ we are currently compiling with gcc. On MSVC, max_align_t is defined only in C++ mode, after was included. Its definition is good since it has an alignment of 8 (on x86 - and x86_64). */ -#if defined _MSC_VER && defined __cplusplus + and x86_64). + Similarly on OS/2 kLIBC. */ +#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \ + && defined __cplusplus # include #else -# if ! (0 || defined _GCC_MAX_ALIGN_T) +# if ! (0 || (defined _GCC_MAX_ALIGN_T && !defined __clang__)) # if !GNULIB_defined_max_align_t /* On the x86, the maximum storage alignment of double, long, etc. is 4, but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, and the C11 standard allows this. Work around this problem by using __alignof__ (which returns 8 for double) rather than _Alignof (which returns 4), and align each union member accordingly. */ -# ifdef __GNUC__ +# if defined __GNUC__ || (__clang_major__ >= 4) # define _GL_STDDEF_ALIGNAS(type) \ __attribute__ ((__aligned__ (__alignof__ (type)))) # else @@ -120,11 +166,49 @@ typedef union long int __i _GL_STDDEF_ALIGNAS (long int); } rpl_max_align_t; # define max_align_t rpl_max_align_t +# define __CLANG_MAX_ALIGN_T_DEFINED # define GNULIB_defined_max_align_t 1 # endif # endif #endif +/* ISO C 23 § 7.21.1 The unreachable macro */ +#ifndef unreachable + +/* Code borrowed from verify.h. */ +# ifndef _GL_HAS_BUILTIN_UNREACHABLE +# if defined __clang_major__ && __clang_major__ < 5 +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__) +# define _GL_HAS_BUILTIN_UNREACHABLE 1 +# elif defined __has_builtin +# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable) +# else +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# endif +# endif + +# if _GL_HAS_BUILTIN_UNREACHABLE +# define unreachable() __builtin_unreachable () +# elif 1200 <= _MSC_VER +# define unreachable() __assume (0) +# else +/* Declare abort(), without including . */ +extern +# if defined __cplusplus +"C" +# endif +_Noreturn +void abort (void) +# if defined __cplusplus && (__GLIBC__ >= 2) +_GL_ATTRIBUTE_NOTHROW +# endif +; +# define unreachable() abort () +# endif + +#endif + # endif /* _GL_STDDEF_H */ # endif /* _GL_STDDEF_H */ #endif /* __need_XXX */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/stdint.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdint.h similarity index 95% rename from gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/stdint.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdint.h index 851128d88..197ddd87c 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/stdint.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdint.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2023 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* * ISO C 99 for platforms that lack it. @@ -303,12 +303,11 @@ typedef gl_uint_fast32_t gl_uint_fast16_t; /* kLIBC's defines _INTPTR_T_DECLARED and needs its own definitions of intptr_t and uintptr_t (which use int and unsigned) to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and + Similarly, MinGW WSL-5.4.1 needs its own intptr_t and uintptr_t to avoid conflicting declarations of system functions like _findclose in . */ # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) + || defined __MINGW32__) # undef intptr_t # undef uintptr_t # ifdef _WIN64 @@ -581,11 +580,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) -> -> -> , and the latter includes and assumes its types are already defined. */ # if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H @@ -594,13 +588,13 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # undef WCHAR_MAX # if # define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) + _STDINT_SIGNED_MIN (16, 0) # else # define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) + _STDINT_UNSIGNED_MIN (16, 0) # endif # define WCHAR_MAX \ - _STDINT_MAX (, , 0) + _STDINT_MAX (, 16, 0) /* wint_t limits */ /* If gnulib's or overrides wint_t, is not diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/stdio.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdio.h similarity index 77% rename from gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/stdio.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdio.h index 825e60c9c..3587c525a 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/stdio.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdio.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -37,6 +37,12 @@ #ifndef _GL_STDIO_H +/* Suppress macOS deprecation warnings for sprintf and vsprintf. */ +#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200809L +# define _GL_DEFINED__POSIX_C_SOURCE +#endif + #define _GL_ALREADY_INCLUDING_STDIO_H /* The include_next requires a split double-inclusion guard. */ @@ -44,9 +50,21 @@ #undef _GL_ALREADY_INCLUDING_STDIO_H +#ifdef _GL_DEFINED__POSIX_C_SOURCE +# undef _GL_DEFINED__POSIX_C_SOURCE +# undef _POSIX_C_SOURCE +#endif + #ifndef _GL_STDIO_H #define _GL_STDIO_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_FORMAT, + _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Get va_list. Needed on many systems, including glibc 2.8. */ #include @@ -57,6 +75,52 @@ May also define off_t to a 64-bit type on native Windows. */ #include +/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ + && ! defined __GLIBC__ +# include +#endif + +/* Android 4.3 declares renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'perror' in , not in . We must include + it before we #define perror rpl_perror. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'remove' in , not in . We must include + it before we #define remove rpl_remove. */ +/* MSVC declares 'rename' in , not in . We must include + it before we #define rename rpl_rename. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. @@ -64,37 +128,83 @@ gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__ # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) # else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ # endif #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones + standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD */ +/* __gnu_printf__ is supported in GCC >= 4.4. */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__ #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__ #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones of the + system printf(), rather than the ones standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM */ +/* On mingw, Gnulib sets __USE_MINGW_ANSI_STDIO in order to get closer to + the standards. The macro GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU indicates + whether this change is effective. On older mingw, it is not. */ #if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM __printf__ #endif +/* _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD + indicates to GCC that the function takes a format string and arguments, + where the format string directives are the ones standardized by ISO C99 + and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument)) + +/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD, + except that it indicates to GCC that the supported format string directives + are the ones of the system printf(), rather than the ones standardized by + ISO C99 and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, formatstring_parameter, first_argument)) + /* _GL_ATTRIBUTE_FORMAT_SCANF indicates to GCC that the function takes a format string and arguments, where the format string directives are the ones standardized by ISO C99 @@ -114,56 +224,21 @@ #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -251,6 +326,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -298,6 +379,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -323,6 +414,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -420,7 +519,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -448,9 +547,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -466,26 +565,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -494,19 +593,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -579,13 +678,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -594,27 +700,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -644,24 +756,56 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # undef putc_unlocked #endif + +/* Maximum number of characters produced by printing a NaN value. */ +#ifndef _PRINTF_NAN_LEN_MAX +# if defined __FreeBSD__ || defined __DragonFly__ \ + || defined __NetBSD__ \ + || (defined __APPLE__ && defined __MACH__) +/* On BSD systems, a NaN value prints as just "nan", without a sign. */ +# define _PRINTF_NAN_LEN_MAX 3 +# elif (__GLIBC__ >= 2) || MUSL_LIBC || defined __OpenBSD__ || defined __sun || defined __CYGWIN__ +/* glibc, musl libc, OpenBSD, Solaris libc, and Cygwin produce "[-]nan". */ +# define _PRINTF_NAN_LEN_MAX 4 +# elif defined _AIX +/* AIX produces "[-]NaNQ". */ +# define _PRINTF_NAN_LEN_MAX 5 +# elif defined _WIN32 && !defined __CYGWIN__ +/* On native Windows, the output can be: + - with MSVC ucrt: "[-]nan" or "[-]nan(ind)" or "[-]nan(snan)", + - with mingw: "[-]1.#IND" or "[-]1.#QNAN". */ +# define _PRINTF_NAN_LEN_MAX 10 +# elif defined __sgi +/* On IRIX, the output typically is "[-]nan0xNNNNNNNN" with 8 hexadecimal + digits. */ +# define _PRINTF_NAN_LEN_MAX 14 +# else +/* We don't know, but 32 should be a safe maximum. */ +# define _PRINTF_NAN_LEN_MAX 32 +# endif +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dprintf rpl_dprintf # endif _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); # else # if !1 _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (dprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF @@ -672,7 +816,7 @@ _GL_WARN_ON_USE (dprintf, "dprintf is unportable - " #if 0 /* Close STREAM and its underlying file descriptor. */ -# if 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fclose rpl_fclose # endif @@ -691,34 +835,113 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " "use gnulib module fclose for portable POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'fcloseall' to '_fcloseall', so that -loldnames is + not required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcloseall on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcloseall +# define fcloseall _fcloseall +# endif +_GL_CXXALIAS_MDA (fcloseall, int, (void)); +# else +# if 1 +# if defined __FreeBSD__ || defined __DragonFly__ +_GL_CXXALIAS_SYS (fcloseall, void, (void)); +# else +_GL_CXXALIAS_SYS (fcloseall, int, (void)); +# endif +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcloseall); +# endif +#endif + #if 1 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fdopen # define fdopen rpl_fdopen # endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); +_GL_FUNCDECL_RPL (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); # endif _GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen +#else +# if 0 && __GNUC__ >= 11 && !defined fdopen +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef fdopen /* Assume fdopen is always declared. */ _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " "use gnulib module fdopen for portability"); +# elif 1 +/* On native Windows, map 'fdopen' to '_fdopen', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fdopen always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); +# else +_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); +# endif +_GL_CXXALIASWARN (fdopen); +# endif #endif -#if 0 +#if IN_GETTEXT_TOOLS_GNULIB_TESTS /* Flush all pending data on STREAM according to POSIX rules. Both output and seekable input streams are supported. Note! LOSS OF DATA can occur if fflush is applied on an input stream that is _not_seekable_ or on an update stream that is _not_seekable_ and in which the most recent operation was input. Seekability can be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fflush rpl_fflush # endif @@ -774,28 +997,60 @@ _GL_CXXALIASWARN (fgets); #endif #if 1 -# if 1 +/* On native Windows, map 'fileno' to '_fileno', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fileno always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fileno +# define fileno _fileno +# endif +_GL_CXXALIAS_MDA (fileno, int, (FILE *restrict stream)); +# else +_GL_CXXALIAS_SYS (fileno, int, (FILE *restrict stream)); +# endif +_GL_CXXALIASWARN (fileno); +#endif + +#if 1 +# if (1 && 1) \ + || (1 && 1) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fopen # define fopen rpl_fopen # endif _GL_FUNCDECL_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif _GL_CXXALIAS_SYS (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (fopen); # endif -#elif defined GNULIB_POSIXCHECK -# undef fopen +#else +# if 0 && __GNUC__ >= 11 && !defined fopen +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif +# if defined GNULIB_POSIXCHECK +# undef fopen /* Assume fopen is always declared. */ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " "use gnulib module fopen for portability"); +# endif #endif #if 0 || 1 @@ -808,7 +1063,7 @@ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX complian # if 0 || 0 _GL_FUNCDECL_RPL (fprintf, int, (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (fprintf, int, @@ -836,7 +1091,7 @@ _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " "POSIX compliance"); #endif -#if 0 +#if IN_GETTEXT_TOOLS_GNULIB_TESTS /* Discard all pending buffered I/O data on STREAM. STREAM must not be wide-character oriented. When discarding pending output, the file position is set back to where it @@ -850,7 +1105,7 @@ _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); # else -# if !1 +# if !0 _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); @@ -923,8 +1178,8 @@ _GL_CXXALIASWARN (fread); # endif #endif -#if 0 -# if 0 +#if IN_GETTEXT_TOOLS_GNULIB_TESTS +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef freopen # define freopen rpl_freopen @@ -1005,12 +1260,12 @@ _GL_CXXALIASWARN (fscanf); Most gnulib clients that perform stream operations should fall into category 3. */ -#if 0 +#if IN_GETTEXT_TOOLS_GNULIB_TESTS # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 2, above. */ # undef fseek # endif -# if 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fseek # define fseek rpl_fseek @@ -1026,8 +1281,8 @@ _GL_CXXALIASWARN (fseek); # endif #endif -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES +#if IN_GETTEXT_TOOLS_GNULIB_TESTS +# if !IN_GETTEXT_TOOLS_GNULIB_TESTS && !defined _GL_NO_LARGE_FILES # define _GL_FSEEK_WARN /* Category 3, above. */ # undef fseek # endif @@ -1042,7 +1297,7 @@ _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); # else -# if ! 1 +# if ! 0 _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1))); # endif @@ -1242,7 +1497,9 @@ _GL_CXXALIAS_SYS (getdelim, ssize_t, int delimiter, FILE *restrict stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getdelim); +# endif #elif defined GNULIB_POSIXCHECK # undef getdelim # if HAVE_RAW_DECL_GETDELIM @@ -1281,7 +1538,7 @@ _GL_CXXALIAS_SYS (getline, ssize_t, (char **restrict lineptr, size_t *restrict linesize, FILE *restrict stream)); # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (getline); # endif #elif defined GNULIB_POSIXCHECK @@ -1300,6 +1557,30 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif +#if 1 +/* On native Windows, map 'getw' to '_getw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getw +# define getw _getw +# endif +_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getw); +# endif +#endif + #if 0 || 0 struct obstack; /* Grow an obstack with formatted output. Return the number of @@ -1313,7 +1594,7 @@ struct obstack; # endif _GL_FUNCDECL_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...)); @@ -1321,7 +1602,7 @@ _GL_CXXALIAS_RPL (obstack_printf, int, # if !1 _GL_FUNCDECL_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_printf, int, @@ -1334,7 +1615,7 @@ _GL_CXXALIASWARN (obstack_printf); # endif _GL_FUNCDECL_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); @@ -1342,7 +1623,7 @@ _GL_CXXALIAS_RPL (obstack_vprintf, int, # if !1 _GL_FUNCDECL_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_vprintf, int, @@ -1388,35 +1669,54 @@ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " "use gnulib module perror for portability"); #endif +#ifdef _WIN64 +# define GNULIB_SYM_PREFIX "" +#else +# define GNULIB_SYM_PREFIX "_" +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef popen # define popen rpl_popen # endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +_GL_FUNCDECL_RPL (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); # else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +# if !1 || __GNUC__ >= 11 +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); # endif _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); # endif _GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN +#else +# if 0 && __GNUC__ >= 11 && !defined popen +/* For -Wmismatched-dealloc: Associate popen with pclose or rpl_pclose. */ +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef popen +# if HAVE_RAW_DECL_POPEN _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " "use gnulib module popen or pipe for more portability"); +# endif # endif #endif #if 0 || 1 # if (0 && 0) \ || (1 && 1 && (0 || 1)) -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ @@ -1424,14 +1724,14 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " # if 0 || 0 _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *restrict format, ...) - __asm__ ("" + __asm__ (GNULIB_SYM_PREFIX _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *restrict format, ...) - __asm__ ("" + __asm__ (GNULIB_SYM_PREFIX _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); @@ -1443,7 +1743,7 @@ _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); # endif _GL_FUNCDECL_RPL (printf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); # endif @@ -1513,6 +1813,30 @@ _GL_CXXALIASWARN (puts); # endif #endif +#if 1 +/* On native Windows, map 'putw' to '_putw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putw +# define putw _putw +# endif +_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (putw); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1590,7 +1914,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - " #if 1 # if 0 && 0 -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef scanf /* Don't break __attribute__((format(scanf,M,N))). */ @@ -1598,7 +1922,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - " # endif _GL_FUNCDECL_RPL_1 (__scanf__, int, (const char *restrict format, ...) - __asm__ ("" + __asm__ (GNULIB_SYM_PREFIX _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); @@ -1626,10 +1950,11 @@ _GL_CXXALIASWARN (scanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif +# define GNULIB_overrides_snprintf 1 _GL_FUNCDECL_RPL (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (snprintf, int, (char *restrict str, size_t size, @@ -1639,14 +1964,16 @@ _GL_CXXALIAS_RPL (snprintf, int, _GL_FUNCDECL_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (snprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef snprintf # if HAVE_RAW_DECL_SNPRINTF @@ -1669,9 +1996,10 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif +# define GNULIB_overrides_sprintf 1 _GL_FUNCDECL_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...)); @@ -1690,24 +2018,56 @@ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " "POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'tempnam' to '_tempnam', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::tempnam always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tempnam +# define tempnam _tempnam +# endif +_GL_CXXALIAS_MDA (tempnam, char *, (const char *dir, const char *prefix)); +# else +_GL_CXXALIAS_SYS (tempnam, char *, (const char *dir, const char *prefix)); +# endif +_GL_CXXALIASWARN (tempnam); +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define tmpfile rpl_tmpfile # endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); +_GL_FUNCDECL_RPL (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (tmpfile); # endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE +#else +# if 0 && __GNUC__ >= 11 && !defined tmpfile +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef tmpfile +# if HAVE_RAW_DECL_TMPFILE _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " "use gnulib module tmpfile for portability"); +# endif # endif #endif @@ -1720,9 +2080,10 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif +# define GNULIB_overrides_asprintf _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (asprintf, int, (char **result, const char *format, ...)); @@ -1730,7 +2091,7 @@ _GL_CXXALIAS_RPL (asprintf, int, # if !0 _GL_FUNCDECL_SYS (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (asprintf, int, @@ -1741,9 +2102,10 @@ _GL_CXXALIASWARN (asprintf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif +# define GNULIB_overrides_vasprintf 1 _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vasprintf, int, (char **result, const char *format, va_list args)); @@ -1751,7 +2113,7 @@ _GL_CXXALIAS_RPL (vasprintf, int, # if !0 _GL_FUNCDECL_SYS (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (vasprintf, int, @@ -1767,7 +2129,7 @@ _GL_CXXALIASWARN (vasprintf); # endif _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args)); @@ -1775,7 +2137,7 @@ _GL_CXXALIAS_RPL (vdprintf, int, # if !1 _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); # endif /* Need to cast, because on Solaris, the third parameter will likely be @@ -1805,7 +2167,7 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " _GL_FUNCDECL_RPL (vfprintf, int, (FILE *restrict fp, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (vfprintf, int, @@ -1858,7 +2220,9 @@ _GL_CXXALIAS_SYS (vfscanf, int, (FILE *restrict stream, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vfscanf); +# endif #endif #if 0 || 1 @@ -1870,7 +2234,7 @@ _GL_CXXALIASWARN (vfscanf); # define GNULIB_overrides_vprintf 1 # if 0 || 0 _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) @@ -1912,7 +2276,9 @@ _GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); # else _GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vscanf); +# endif #endif #if 1 @@ -1920,10 +2286,11 @@ _GL_CXXALIASWARN (vscanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif +# define GNULIB_overrides_vsnprintf 1 _GL_FUNCDECL_RPL (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (vsnprintf, int, (char *restrict str, size_t size, @@ -1933,14 +2300,16 @@ _GL_CXXALIAS_RPL (vsnprintf, int, _GL_FUNCDECL_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vsnprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef vsnprintf # if HAVE_RAW_DECL_VSNPRINTF @@ -1954,10 +2323,11 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif +# define GNULIB_overrides_vsprintf 1 _GL_FUNCDECL_RPL (vsprintf, int, (char *restrict str, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vsprintf, int, (char *restrict str, diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdlib.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdlib.h index 98219c555..0c04dadb2 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdlib.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/stdlib.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2020 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -25,11 +25,7 @@ /* Special invocation conventions inside some gnulib header files, and inside some glibc header files, respectively. */ -#if (_MSC_VER < 1900) -#include "../include/stdlib.h" -#else #include "../ucrt/stdlib.h" -#endif #else /* Normal invocation convention. */ @@ -37,15 +33,18 @@ #ifndef _GL_STDLIB_H /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/stdlib.h" -#else #include "../ucrt/stdlib.h" -#endif #ifndef _GL_STDLIB_H #define _GL_STDLIB_H +/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include @@ -62,8 +61,8 @@ # include #endif -/* Native Windows platforms declare mktemp() in . */ -#if 0 && (defined _WIN32 && ! defined __CYGWIN__) +/* Native Windows platforms declare _mktemp() in . */ +#if defined _WIN32 && !defined __CYGWIN__ # include #endif @@ -76,9 +75,7 @@ # include # endif -# if !1 || 0 || !1 -# include -# endif +# include # if !1 /* Define 'struct random_data'. @@ -108,10 +105,61 @@ struct random_data # include #endif +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ @@ -120,19 +168,19 @@ struct random_data /* The definition of _Noreturn is copied here. */ /* A C macro for declaring that a function does not return. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _Noreturn @@ -147,14 +195,21 @@ struct random_data AIX system header files and several gnulib header files use precisely this syntax with 'extern'. */ # define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) /* _Noreturn works as-is. */ -# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C +# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \ + || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) @@ -165,19 +220,19 @@ struct random_data /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -265,6 +320,12 @@ struct random_data Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -312,6 +373,16 @@ struct random_data _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -337,6 +408,14 @@ struct random_data _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -434,7 +513,7 @@ struct random_data _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -462,9 +541,9 @@ struct random_data _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -480,26 +559,26 @@ struct random_data /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -508,19 +587,19 @@ struct random_data /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -593,13 +672,20 @@ struct random_data # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -608,27 +694,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -662,11 +754,22 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use #if 0 /* Terminate the current process with the given return code, without running the 'atexit' handlers. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef _Exit +# define _Exit rpl__Exit +# endif +_GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status)); +_GL_CXXALIAS_RPL (_Exit, void, (int status)); +# else +# if !1 _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); -# endif +# endif _GL_CXXALIAS_SYS (_Exit, void, (int status)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (_Exit); +# endif #elif defined GNULIB_POSIXCHECK # undef _Exit # if HAVE_RAW_DECL__EXIT @@ -676,6 +779,87 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " #endif +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef free +# define free rpl_free +# endif +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_FUNCDECL_RPL (free, void, (void *ptr) _GL_ATTRIBUTE_NOTHROW); +# else +_GL_FUNCDECL_RPL (free, void, (void *ptr)); +# endif +_GL_CXXALIAS_RPL (free, void, (void *ptr)); +# else +_GL_CXXALIAS_SYS (free, void, (void *ptr)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (free); +# endif +#elif defined GNULIB_POSIXCHECK +# undef free +/* Assume free is always declared. */ +_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - " + "use gnulib module free for portability"); +#endif + + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef aligned_alloc +# define aligned_alloc rpl_aligned_alloc +# endif +_GL_FUNCDECL_RPL (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); +# else +# if 1 +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size)); +# endif +# endif +# if (__GLIBC__ >= 2) && 1 +_GL_CXXALIASWARN (aligned_alloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined aligned_alloc +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef aligned_alloc +# if HAVE_RAW_DECL_ALIGNED_ALLOC +_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " + "use gnulib module aligned_alloc for portability"); +# endif +# endif +#endif + #if 0 /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ @@ -694,25 +878,56 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - " # endif #endif -#if 0 -# if 0 +#if 1 +# if (1 && 1) \ + || (1 && 1) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc # endif -_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); +_GL_FUNCDECL_RPL (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (calloc); # endif -#elif defined GNULIB_POSIXCHECK -# undef calloc +#else +# if 1 && __GNUC__ >= 11 && !defined calloc +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef calloc /* Assume calloc is always declared. */ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " "use gnulib module calloc-posix for portability"); +# endif #endif #if 1 @@ -720,13 +935,25 @@ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define canonicalize_file_name rpl_canonicalize_file_name # endif -_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); # else -# if !0 -_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); +# if !0 || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); # endif @@ -735,12 +962,97 @@ _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); (!0 || 0) # endif _GL_CXXALIASWARN (canonicalize_file_name); -#elif defined GNULIB_POSIXCHECK -# undef canonicalize_file_name -# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME +#else +# if 1 && __GNUC__ >= 11 && !defined canonicalize_file_name +/* For -Wmismatched-dealloc: Associate canonicalize_file_name with free or + rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef canonicalize_file_name +# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - " "use gnulib module canonicalize-lgpl for portability"); +# endif +# endif +#endif + +#if 1 +/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ecvt +# define ecvt _ecvt +# endif +_GL_CXXALIAS_MDA (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (ecvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcvt +# define fcvt _fcvt +# endif +_GL_CXXALIAS_MDA (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gcvt +# define gcvt _gcvt +# endif +_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf)); +# else +# if 1 +_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (gcvt); # endif #endif @@ -749,12 +1061,24 @@ _GL_WARN_ON_USE (canonicalize_file_name, The three numbers are the load average of the last 1 minute, the last 5 minutes, and the last 15 minutes, respectively. LOADAVG is an array of NELEM numbers. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getloadavg +# define getloadavg rpl_getloadavg +# endif +_GL_FUNCDECL_RPL (getloadavg, int, (double loadavg[], int nelem) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getloadavg, int, (double loadavg[], int nelem)); +# else +# if !1 _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getloadavg); +# endif #elif defined GNULIB_POSIXCHECK # undef getloadavg # if HAVE_RAW_DECL_GETLOADAVG @@ -763,6 +1087,41 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " # endif #endif +#if 1 +/* Return the base name of the executing program. + On native Windows this will usually end in ".exe" or ".EXE". */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getprogname +# define getprogname rpl_getprogname +# endif +# if 0 +_GL_FUNCDECL_RPL (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_RPL (getprogname, const char *, (void)); +# endif +_GL_CXXALIAS_RPL (getprogname, const char *, (void)); +# else +# if !0 +# if 0 +_GL_FUNCDECL_SYS (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_SYS (getprogname, const char *, (void)); +# endif +# endif +_GL_CXXALIAS_SYS (getprogname, const char *, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getprogname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getprogname +# if HAVE_RAW_DECL_GETPROGNAME +_GL_WARN_ON_USE (getprogname, "getprogname is unportable - " + "use gnulib module getprogname for portability"); +# endif +#endif + #if 0 /* Assuming *OPTIONP is a comma separated list of elements of the form "token" or "token=value", getsubopt parses the first of these elements. @@ -775,14 +1134,28 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. For more details see the POSIX specification. https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getsubopt +# define getsubopt rpl_getsubopt +# endif +_GL_FUNCDECL_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep)); +# else +# if !1 _GL_FUNCDECL_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep) _GL_ARG_NONNULL ((1, 2, 3))); -# endif +# endif _GL_CXXALIAS_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getsubopt); +# endif #elif defined GNULIB_POSIXCHECK # undef getsubopt # if HAVE_RAW_DECL_GETSUBOPT @@ -812,25 +1185,101 @@ _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " by never specifying a zero size), so it does not need malloc or realloc to be redefined. */ #if 1 -# if 1 +# if (1 && 1) \ + || (1 && 1) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef malloc # define malloc rpl_malloc # endif -_GL_FUNCDECL_RPL (malloc, void *, (size_t size)); +_GL_FUNCDECL_RPL (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (malloc); # endif -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef malloc +#else +# if 1 && __GNUC__ >= 11 && !defined malloc +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef malloc /* Assume malloc is always declared. */ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " "use gnulib module malloc-posix for portability"); +# endif +#endif + +/* Return maximum number of bytes of a multibyte character. */ +#if 0 +# if !GNULIB_defined_MB_CUR_MAX +static inline +int gl_MB_CUR_MAX (void) +{ + /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ + return MB_CUR_MAX + (MB_CUR_MAX == 3); +} +# undef MB_CUR_MAX +# define MB_CUR_MAX gl_MB_CUR_MAX () +# define GNULIB_defined_MB_CUR_MAX 1 +# endif +#endif + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbstowcs +# define mbstowcs rpl_mbstowcs +# endif +_GL_FUNCDECL_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# else +_GL_CXXALIAS_SYS (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbstowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbstowcs +# if HAVE_RAW_DECL_MBSTOWCS +_GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - " + "use gnulib module mbstowcs for portability"); +# endif #endif /* Convert a multibyte character to a wide character. */ @@ -895,12 +1344,24 @@ _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemp +# define mkostemp rpl_mkostemp +# endif +_GL_FUNCDECL_RPL (mkostemp, int, (char * /*template*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemp, int, (char * /*template*/, int /*flags*/)); +# else +# if !1 _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkostemp); +# endif #elif defined GNULIB_POSIXCHECK # undef mkostemp # if HAVE_RAW_DECL_MKOSTEMP @@ -923,14 +1384,28 @@ _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemps +# define mkostemps rpl_mkostemps +# endif +_GL_FUNCDECL_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# else +# if !1 _GL_FUNCDECL_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkostemps); +# endif #elif defined GNULIB_POSIXCHECK # undef mkostemps # if HAVE_RAW_DECL_MKOSTEMPS @@ -995,14 +1470,70 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " # endif #endif +#if 1 +/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::mktemp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mktemp +# define mktemp _mktemp +# endif +_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/)); +# else +_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/)); +# endif +_GL_CXXALIASWARN (mktemp); +#endif + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_memalign +# define posix_memalign rpl_posix_memalign +# endif +_GL_FUNCDECL_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# else +# if 1 +_GL_CXXALIAS_SYS (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# endif +# endif +# if __GLIBC__ >= 2 && 1 +_GL_CXXALIASWARN (posix_memalign); +# endif +#elif defined GNULIB_POSIXCHECK +# undef posix_memalign +# if HAVE_RAW_DECL_POSIX_MEMALIGN +_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " + "use gnulib module posix_memalign for portability"); +# endif +#endif + #if 0 /* Return an FD open to the master side of a pseudo-terminal. Flags should include O_RDWR, and may also include O_NOCTTY. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_openpt +# define posix_openpt rpl_posix_openpt +# endif +_GL_FUNCDECL_RPL (posix_openpt, int, (int flags)); +_GL_CXXALIAS_RPL (posix_openpt, int, (int flags)); +# else +# if !1 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); -# endif +# endif _GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_openpt); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_openpt # if HAVE_RAW_DECL_POSIX_OPENPT @@ -1073,6 +1604,36 @@ _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " # endif _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (putenv, int, (char *string)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +_GL_CXXALIAS_MDA (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); +# else +_GL_CXXALIAS_SYS (putenv, int, (char *string)); +# endif +_GL_CXXALIASWARN (putenv); +#elif 1 +/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putenv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +/* Need to cast, because on mingw, the parameter is either + 'const char *string' or 'char *string'. */ +_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); # else _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif @@ -1083,29 +1644,35 @@ _GL_CXXALIASWARN (putenv); /* Sort an array of NMEMB elements, starting at address BASE, each element occupying SIZE bytes, in ascending order according to the comparison function COMPARE. */ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_qsort_r_fn_types +typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *); +# define GNULIB_defined_qsort_r_fn_types 1 +# endif +# ifdef __cplusplus +} +# endif # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef qsort_r # define qsort_r rpl_qsort_r # endif _GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # else # if !1 _GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); # endif _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # endif _GL_CXXALIASWARN (qsort_r); @@ -1143,7 +1710,9 @@ _GL_FUNCDECL_SYS (random, long, (void)); int. */ _GL_CXXALIAS_SYS_CAST (random, long, (void)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (random); +# endif #elif defined GNULIB_POSIXCHECK # undef random # if HAVE_RAW_DECL_RANDOM @@ -1168,7 +1737,9 @@ _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); unsigned long seed. */ _GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (srandom); +# endif #elif defined GNULIB_POSIXCHECK # undef srandom # if HAVE_RAW_DECL_SRANDOM @@ -1199,7 +1770,9 @@ _GL_FUNCDECL_SYS (initstate, char *, _GL_CXXALIAS_SYS_CAST (initstate, char *, (unsigned int seed, char *buf, size_t buf_size)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (initstate); +# endif #elif defined GNULIB_POSIXCHECK # undef initstate # if HAVE_RAW_DECL_INITSTATE @@ -1224,7 +1797,9 @@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); is const char *arg_state. */ _GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (setstate); +# endif #elif defined GNULIB_POSIXCHECK # undef setstate # if HAVE_RAW_DECL_SETSTATE @@ -1356,36 +1931,79 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " #if 1 -# if 1 +# if (1 && 1) \ + || (1 && 0) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef realloc # define realloc rpl_realloc # endif -_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); +_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (realloc); # endif -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef realloc +#else +# if 1 && __GNUC__ >= 11 && !defined realloc +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef realloc /* Assume realloc is always declared. */ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " "use gnulib module realloc-posix for portability"); +# endif #endif -#if 0 -# if ! 1 +#if 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef reallocarray +# define reallocarray rpl_reallocarray +# endif +_GL_FUNCDECL_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +_GL_CXXALIAS_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# else +# if ! 0 _GL_FUNCDECL_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); -# endif +# endif _GL_CXXALIAS_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (reallocarray); +# endif #elif defined GNULIB_POSIXCHECK # undef reallocarray # if HAVE_RAW_DECL_REALLOCARRAY @@ -1549,6 +2167,49 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable - " # endif #endif +#if 1 +/* Parse a signed integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is set + to ERANGE. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtol rpl_strtol +# endif +# define GNULIB_defined_strtol_function 1 +_GL_FUNCDECL_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtol); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtol +# if HAVE_RAW_DECL_STRTOL +_GL_WARN_ON_USE (strtol, "strtol is unportable - " + "use gnulib module strtol for portability"); +# endif +#endif + #if 0 /* Parse a signed integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, @@ -1558,15 +2219,29 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable - " stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set to ERANGE. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoll rpl_strtoll +# endif +# define GNULIB_defined_strtoll_function 1 +_GL_FUNCDECL_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 _GL_FUNCDECL_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoll); #elif defined GNULIB_POSIXCHECK # undef strtoll @@ -1576,6 +2251,48 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " # endif #endif +#if 1 +/* Parse an unsigned integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is ULONG_MAX, and errno is set to ERANGE. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoul rpl_strtoul +# endif +# define GNULIB_defined_strtoul_function 1 +_GL_FUNCDECL_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtoul); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtoul +# if HAVE_RAW_DECL_STRTOUL +_GL_WARN_ON_USE (strtoul, "strtoul is unportable - " + "use gnulib module strtoul for portability"); +# endif +#endif + #if 0 /* Parse an unsigned integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, @@ -1585,15 +2302,29 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoull rpl_strtoull +# endif +# define GNULIB_defined_strtoull_function 1 +_GL_FUNCDECL_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 _GL_FUNCDECL_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoull); #elif defined GNULIB_POSIXCHECK # undef strtoull diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/string.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/string.h index 2c4b50a82..4ac02857b 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/string.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/string.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2020 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -28,11 +28,7 @@ In this situation system _chk variants due to -D_FORTIFY_SOURCE might be used after any replacements defined here. */ -#if (_MSC_VER < 1900) -#include "../include/string.h" -#else #include "../ucrt/string.h" -#endif #else /* Normal invocation convention. */ @@ -42,17 +38,20 @@ #define _GL_ALREADY_INCLUDING_STRING_H /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/string.h" -#else #include "../ucrt/string.h" -#endif #undef _GL_ALREADY_INCLUDING_STRING_H #ifndef _GL_STRING_H #define _GL_STRING_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include @@ -61,38 +60,105 @@ # include #endif +/* NetBSD 5.0 declares strsignal in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ + && ! defined __GLIBC__ +# include +#endif + +/* AIX 7.2 and Android 13 declare ffsl and ffsll in , not in + . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if ((0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _AIX || defined __ANDROID__)) \ + && ! defined __GLIBC__ +# include +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ # endif #endif -/* NetBSD 5.0 declares strsignal in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ - && ! defined __GLIBC__ -# include -#endif - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -180,6 +246,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -227,6 +299,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -252,6 +334,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -349,7 +439,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -377,9 +467,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -395,26 +485,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -423,19 +513,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -508,13 +598,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -523,27 +620,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -559,11 +662,54 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif /* Clear a block of memory. The compiler will not delete a call to this function, even if the block is dead after the call. */ -#if 1 -# if ! 0 +#if 0 +# if ! 1 _GL_FUNCDECL_SYS (explicit_bzero, void, (void *__dest, size_t __n) _GL_ARG_NONNULL ((1))); # endif @@ -594,10 +740,18 @@ _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); /* Find the index of the least-significant set bit. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define ffsll rpl_ffsll +# endif +_GL_FUNCDECL_RPL (ffsll, int, (long long int i)); +_GL_CXXALIAS_RPL (ffsll, int, (long long int i)); +# else +# if !1 _GL_FUNCDECL_SYS (ffsll, int, (long long int i)); -# endif +# endif _GL_CXXALIAS_SYS (ffsll, int, (long long int i)); +# endif _GL_CXXALIASWARN (ffsll); #elif defined GNULIB_POSIXCHECK # undef ffsll @@ -607,10 +761,30 @@ _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); #endif +#if 1 +/* On native Windows, map 'memccpy' to '_memccpy', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::memccpy always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memccpy +# define memccpy _memccpy +# endif +_GL_CXXALIAS_MDA (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# else +_GL_CXXALIAS_SYS (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# endif +_GL_CXXALIASWARN (memccpy); +#endif + + /* Return the first instance of C within N bytes of S, or NULL. */ #if 1 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memchr # define memchr rpl_memchr # endif _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) @@ -626,10 +800,14 @@ _GL_CXXALIAS_SYS_CAST2 (memchr, void const *, (void const *__s, int __c, size_t __n)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memchr, void *, + (void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (memchr, void const *, - (void const *__s, int __c, size_t __n)); + (void const *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (memchr); # endif @@ -641,7 +819,7 @@ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " #endif /* Return the first occurrence of NEEDLE in HAYSTACK. */ -#if 0 +#if 1 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define memmem rpl_memmem @@ -655,7 +833,7 @@ _GL_CXXALIAS_RPL (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len)); # else -# if ! 1 +# if ! 0 _GL_FUNCDECL_SYS (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) @@ -679,16 +857,32 @@ _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ #if 1 -# if ! 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mempcpy +# define mempcpy rpl_mempcpy +# endif +_GL_FUNCDECL_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n)); +# else +# if !0 _GL_FUNCDECL_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); -# endif +# endif _GL_CXXALIAS_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mempcpy); +# endif #elif defined GNULIB_POSIXCHECK # undef mempcpy # if HAVE_RAW_DECL_MEMPCPY @@ -698,8 +892,8 @@ _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " #endif /* Search backwards through a block for a byte (specified as an int). */ -#if 0 -# if ! 1 +#if 1 +# if ! 0 _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); @@ -711,10 +905,15 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr, void *, (void const *, int, size_t), void const *, (void const *, int, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); -_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); -# else + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memrchr, void *, + (void *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (memrchr, void const *, + (void const *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (memrchr); # endif #elif defined GNULIB_POSIXCHECK @@ -725,6 +924,23 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " # endif #endif +/* Overwrite a block of memory. The compiler will not optimize + effects away, even if the block is dead after the call. */ +#if 1 +# if ! 0 +_GL_FUNCDECL_SYS (memset_explicit, void *, + (void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n)); +_GL_CXXALIASWARN (memset_explicit); +#elif defined GNULIB_POSIXCHECK +# undef memset_explicit +# if HAVE_RAW_DECL_MEMSET_EXPLICIT +_GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - " + "use gnulib module memset_explicit for portability"); +# endif +#endif + /* Find the first occurrence of C in S. More efficient than memchr(S,C,N), at the expense of undefined behavior if C does not occur within N bytes. */ @@ -741,9 +957,14 @@ _GL_CXXALIAS_SYS_CAST2 (rawmemchr, void *, (void const *__s, int __c_in), void const *, (void const *__s, int __c_in)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); -_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (rawmemchr, void *, + (void *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (rawmemchr, void const *, + (void const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); # else _GL_CXXALIASWARN (rawmemchr); # endif @@ -757,14 +978,28 @@ _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ #if 1 -# if ! 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef stpcpy +# define stpcpy rpl_stpcpy +# endif +_GL_FUNCDECL_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src)); +# else +# if !0 _GL_FUNCDECL_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src) _GL_ARG_NONNULL ((1, 2))); -# endif +# endif _GL_CXXALIAS_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (stpcpy); +# endif #elif defined GNULIB_POSIXCHECK # undef stpcpy # if HAVE_RAW_DECL_STPCPY @@ -799,7 +1034,9 @@ _GL_CXXALIAS_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (stpncpy); +# endif #elif defined GNULIB_POSIXCHECK # undef stpncpy # if HAVE_RAW_DECL_STPNCPY @@ -813,7 +1050,8 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " GB18030 and the character to be searched is a digit. */ # undef strchr /* Assume strchr is always declared. */ -_GL_WARN_ON_USE_CXX (strchr, const char *, (const char *, int), +_GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), "strchr cannot work correctly on character strings " "in some multibyte locales - " "use mbschr if you care about internationalization"); @@ -844,10 +1082,15 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul, char const *, (char const *__s, int __c_in)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); -_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); -# else + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strchrnul, char *, + (char *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strchrnul, char const *, + (char const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strchrnul); # endif #elif defined GNULIB_POSIXCHECK @@ -859,30 +1102,84 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " #endif /* Duplicate S, returning an identical malloc'd string. */ -#if 0 -# if 0 +#if 1 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strdup # define strdup rpl_strdup # endif -_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup /* strdup exists as a function and as a macro. Get rid of the macro. */ # undef strdup # endif -# if !(1 || defined strdup) -_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); +# if (!1 || __GNUC__ >= 11) && !defined strdup +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); # endif _GL_CXXALIASWARN (strdup); -#elif defined GNULIB_POSIXCHECK -# undef strdup -# if HAVE_RAW_DECL_STRDUP +#else +# if __GNUC__ >= 11 && !defined strdup +/* For -Wmismatched-dealloc: Associate strdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strdup +# if HAVE_RAW_DECL_STRDUP _GL_WARN_ON_USE (strdup, "strdup is unportable - " "use gnulib module strdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'creat' to '_creat', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::strdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); +# else +# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup +# undef strdup +# endif +_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); +# endif +_GL_CXXALIASWARN (strdup); # endif #endif @@ -920,22 +1217,51 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - " # undef strndup # define strndup rpl_strndup # endif -_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); # else -# if ! 1 -_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); +# if !1 || (__GNUC__ >= 11 && !defined strndup) +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); # endif _GL_CXXALIASWARN (strndup); -#elif defined GNULIB_POSIXCHECK -# undef strndup -# if HAVE_RAW_DECL_STRNDUP +#else +# if __GNUC__ >= 11 && !defined strndup +/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strndup +# if HAVE_RAW_DECL_STRNDUP _GL_WARN_ON_USE (strndup, "strndup is unportable - " "use gnulib module strndup for portability"); +# endif # endif #endif @@ -995,10 +1321,14 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk, char *, (char const *__s, char const *__accept), const char *, (char const *__s, char const *__accept)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strpbrk, char *, + (char *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strpbrk, char const *, - (char const *__s, char const *__accept)); + (char const *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strpbrk); # endif @@ -1008,7 +1338,8 @@ _GL_CXXALIASWARN (strpbrk); locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strpbrk -_GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), "strpbrk cannot work correctly on character strings " "in multibyte locales - " "use mbspbrk if you care about internationalization"); @@ -1016,7 +1347,8 @@ _GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), #elif defined GNULIB_POSIXCHECK # undef strpbrk # if HAVE_RAW_DECL_STRPBRK -_GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), "strpbrk is unportable - " "use gnulib module strpbrk for portability"); # endif @@ -1037,7 +1369,8 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " GB18030 and the character to be searched is a digit. */ # undef strrchr /* Assume strrchr is always declared. */ -_GL_WARN_ON_USE_CXX (strrchr, const char *, (const char *, int), +_GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), "strrchr cannot work correctly on character strings " "in some multibyte locales - " "use mbsrchr if you care about internationalization"); @@ -1100,10 +1433,14 @@ _GL_CXXALIAS_SYS_CAST2 (strstr, const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strstr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strstr, const char *, - (const char *haystack, const char *needle)); + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strstr); # endif @@ -1149,11 +1486,15 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr, const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strcasestr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strcasestr, const char *, - (const char *haystack, const char *needle)); -# else + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strcasestr); # endif #elif defined GNULIB_POSIXCHECK @@ -1257,7 +1598,9 @@ _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbslen); +# endif #endif #if 0 @@ -1499,7 +1842,7 @@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) # endif _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (strerror_r); # endif #elif defined GNULIB_POSIXCHECK @@ -1510,6 +1853,60 @@ _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " # endif #endif +/* Return the name of the system error code ERRNUM. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerrorname_np +# define strerrorname_np rpl_strerrorname_np +# endif +_GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum)); +_GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum)); +# else +# if !1 +_GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIASWARN (strerrorname_np); +#elif defined GNULIB_POSIXCHECK +# undef strerrorname_np +# if HAVE_RAW_DECL_STRERRORNAME_NP +_GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - " + "use gnulib module strerrorname_np for portability"); +# endif +#endif + +/* Return an abbreviation string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigabbrev_np); +#elif defined GNULIB_POSIXCHECK +# undef sigabbrev_np +# if HAVE_RAW_DECL_SIGABBREV_NP +_GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - " + "use gnulib module sigabbrev_np for portability"); +# endif +#endif + +/* Return an English description string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigdescr_np); +#elif defined GNULIB_POSIXCHECK +# undef sigdescr_np +# if HAVE_RAW_DECL_SIGDESCR_NP +_GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - " + "use gnulib module sigdescr_np for portability"); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/random.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/random.h index 77117a3a5..8772041ae 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/random.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/random.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for . - Copyright (C) 2020 Free Software Foundation, Inc. + Copyright (C) 2020-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ # if __GNUC__ >= 3 @@ -24,6 +24,12 @@ #if 0 +/* On uClibc < 1.0.35, assumes prior inclusion of . + Do not use __UCLIBC__ here, as it might not be defined yet. + But avoid namespace pollution on glibc systems. */ +# ifndef __GLIBC__ +# include +# endif /* On Mac OS X 10.5, assumes prior inclusion of . On Max OS X 10.13, assumes prior inclusion of a file that includes , such as or . */ @@ -40,6 +46,11 @@ #ifndef _GL_SYS_RANDOM_H #define _GL_SYS_RANDOM_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #include /* Define the GRND_* constants. */ @@ -50,19 +61,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -150,6 +161,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -197,6 +214,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -222,6 +249,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -319,7 +354,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -347,9 +382,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -365,26 +400,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -393,19 +428,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -478,13 +513,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -493,27 +535,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -554,7 +602,9 @@ _GL_FUNCDECL_SYS (getrandom, ssize_t, _GL_CXXALIAS_SYS (getrandom, ssize_t, (void *buffer, size_t length, unsigned int flags)); # endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 25) > 2 _GL_CXXALIASWARN (getrandom); +# endif #elif defined GNULIB_POSIXCHECK # undef getrandom # if HAVE_RAW_DECL_GETRANDOM diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/select.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/select.h index 610a48c64..b0003643d 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/select.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/select.h @@ -1,28 +1,35 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ # if __GNUC__ >= 3 # endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* On OSF/1 and Solaris 2.6, and both include . - On Cygwin, includes . + On Cygwin and OpenBSD, includes . Simply delegate to the system's header in this case. */ #if (0 \ && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H \ @@ -40,6 +47,7 @@ || (!defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \ && ((defined __osf__ && defined _SYS_TIME_H_ \ && defined _OSF_SOURCE) \ + || (defined __OpenBSD__ && defined _SYS_TIME_H_) \ || (defined __sun && defined _SYS_TIME_H \ && (! (defined _XOPEN_SOURCE \ || defined _POSIX_C_SOURCE) \ @@ -71,6 +79,11 @@ #ifndef _GL_SYS_SELECT_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* On many platforms, assumes prior inclusion of . Also, mingw defines sigset_t there, instead of in where it belongs. */ @@ -82,9 +95,10 @@ of 'struct timeval', and no definition of this type. Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select() in . - But avoid namespace pollution on glibc systems and "unknown type - name" problems on Cygwin. */ -# if !(defined __GLIBC__ || defined __CYGWIN__) + But avoid namespace pollution on glibc systems, a circular include + -> -> on FreeBSD 13.1, and + "unknown type name" problems on Cygwin. */ +# if !(defined __GLIBC__ || defined __FreeBSD__ || defined __CYGWIN__) # include # endif @@ -104,9 +118,16 @@ /* Get definition of 'sigset_t'. But avoid namespace pollution on glibc systems and "unknown type name" problems on Cygwin. + On OS/2 kLIBC, sigset_t is defined in , too. In addition, + if is included, -> -> + are included. Then -> are included by GNULIB. By the + way, requires PAGE_SIZE defined in . However, + has not been processed, yet. As a result, 'PAGE_SIZE' + undeclared error occurs in . Do this after the include_next (for the sake of OpenBSD 5.0) but before the split double-inclusion guard (for the sake of Solaris). */ -#if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__) +#if !((defined __GLIBC__ || defined __CYGWIN__ || defined __KLIBC__) \ + && !defined __UCLIBC__) # include #endif @@ -138,19 +159,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -238,6 +259,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -285,6 +312,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -310,6 +347,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -407,7 +452,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -435,9 +480,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -453,19 +498,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -538,13 +583,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -553,27 +605,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -627,14 +685,14 @@ rpl_fd_isset (SOCKET fd, fd_set * set) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close close_used_without_including_unistd_h -# else +# elif !defined __clang__ _GL_WARN_ON_USE (close, "close() used without including "); # endif # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gethostname # define gethostname gethostname_used_without_including_unistd_h -# else +# elif !defined __clang__ _GL_WARN_ON_USE (gethostname, "gethostname() used without including "); # endif @@ -669,7 +727,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set) # define setsockopt setsockopt_used_without_including_sys_socket_h # undef shutdown # define shutdown shutdown_used_without_including_sys_socket_h -# else +# elif !defined __clang__ _GL_WARN_ON_USE (socket, "socket() used without including "); _GL_WARN_ON_USE (connect, @@ -703,8 +761,8 @@ rpl_fd_isset (SOCKET fd, fd_set * set) #endif -#if 0 -# if 0 +#if IN_GETTEXT_TOOLS_GNULIB_TESTS +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pselect # define pselect rpl_pselect @@ -721,11 +779,17 @@ _GL_FUNCDECL_SYS (pselect, int, (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timespec const *restrict, const sigset_t *restrict)); # endif -_GL_CXXALIAS_SYS (pselect, int, - (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, - struct timespec const *restrict, const sigset_t *restrict)); +/* Need to cast, because on AIX 7, the second, third, fourth argument may be + void *restrict, void *restrict, void *restrict. */ +_GL_CXXALIAS_SYS_CAST (pselect, int, + (int, + fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, + const sigset_t *restrict)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pselect); +# endif #elif defined GNULIB_POSIXCHECK # undef pselect # if HAVE_RAW_DECL_PSELECT diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/sys/socket.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/socket.h similarity index 89% rename from gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/sys/socket.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/socket.h index 0e97d86ba..a3dd39217 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/sys/socket.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/socket.h @@ -1,21 +1,21 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a sys/socket header file for systems lacking it (read: MinGW) and for systems where it is incomplete. - Copyright (C) 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. Written by Simon Josefsson. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* This file is supposed to be used on platforms that lack , on platforms where cannot be included standalone, and on @@ -64,9 +64,12 @@ #ifndef _GL_SYS_SOCKET_H #define _GL_SYS_SOCKET_H -#ifndef _GL_INLINE_HEADER_BEGIN +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*, alignof. */ +#if !_GL_CONFIG_H_INCLUDED #error "Please include config.h first." #endif + _GL_INLINE_HEADER_BEGIN #ifndef _GL_SYS_SOCKET_INLINE # define _GL_SYS_SOCKET_INLINE _GL_INLINE @@ -74,19 +77,19 @@ _GL_INLINE_HEADER_BEGIN /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -174,6 +177,12 @@ _GL_INLINE_HEADER_BEGIN Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -221,6 +230,16 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -246,6 +265,14 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -343,7 +370,7 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -371,9 +398,9 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -389,26 +416,26 @@ _GL_INLINE_HEADER_BEGIN /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -417,19 +444,19 @@ _GL_INLINE_HEADER_BEGIN /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -502,13 +529,20 @@ _GL_INLINE_HEADER_BEGIN # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -517,27 +551,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -573,7 +613,6 @@ typedef unsigned char sa_family_t; # endif # endif #else -# include /* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */ # define __ss_aligntype unsigned long int @@ -732,7 +771,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close close_used_without_including_unistd_h -# else +# elif !defined __clang__ _GL_WARN_ON_USE (close, "close() used without including "); # endif @@ -832,7 +871,9 @@ _GL_CXXALIAS_SYS_CAST (accept, int, struct sockaddr *restrict addr, socklen_t *restrict addrlen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (accept); +# endif #elif 1 # undef accept # define accept accept_used_without_requesting_gnulib_module_accept @@ -894,7 +935,9 @@ _GL_CXXALIAS_SYS_CAST (getpeername, int, (int fd, struct sockaddr *restrict addr, socklen_t *restrict addrlen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getpeername); +# endif #elif 1 # undef getpeername # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername @@ -926,7 +969,9 @@ _GL_CXXALIAS_SYS_CAST (getsockname, int, (int fd, struct sockaddr *restrict addr, socklen_t *restrict addrlen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getsockname); +# endif #elif 1 # undef getsockname # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname @@ -1073,7 +1118,9 @@ _GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t, struct sockaddr *restrict from, socklen_t *restrict fromlen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (recvfrom); +# endif #elif 1 # undef recvfrom # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/stat.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/stat.h index c71b23fd2..d90effe76 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/stat.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/stat.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a more complete sys/stat.h header file. - Copyright (C) 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ @@ -26,14 +26,17 @@ #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if defined __need_system_sys_stat_h /* Special invocation convention. */ -#if (_MSC_VER < 1900) -#include "../include/sys/stat.h" -#else #include "../ucrt/sys/stat.h" -#endif #else /* Normal invocation convention. */ @@ -48,30 +51,54 @@ #include /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/sys/stat.h" -#else #include "../ucrt/sys/stat.h" -#endif #ifndef _GL_SYS_STAT_H #define _GL_SYS_STAT_H +/* This file uses _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -159,6 +186,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -206,6 +239,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -231,6 +274,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -328,7 +379,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -356,9 +407,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -374,26 +425,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -402,19 +453,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -487,13 +538,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -502,27 +560,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -538,6 +602,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif + /* Before doing "#define mknod rpl_mknod" below, we need to include all headers that may declare mknod(). OS/2 kLIBC declares mknod() in , not in . */ @@ -859,11 +924,11 @@ struct stat # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif -/* S_IXUGO is a common extension to POSIX. */ +/* Although S_IXUGO and S_IRWXUGO are not specified by POSIX and are + not implemented in GNU/Linux, some Gnulib-using apps use the macros. */ #if !S_IXUGO # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif - #ifndef S_IRWXUGO # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif @@ -875,6 +940,50 @@ struct stat #endif +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod rpl_chmod +# endif +_GL_FUNCDECL_RPL (chmod, int, (const char *filename, mode_t mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (chmod, int, (const char *filename, mode_t mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod _chmod +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (chmod); +#elif defined GNULIB_POSIXCHECK +# undef chmod +# if HAVE_RAW_DECL_CHMOD +_GL_WARN_ON_USE (chmod, "chmod has portability problems - " + "use gnulib module chmod for portability"); +# endif +#elif 1 +/* On native Windows, map 'chmod' to '_chmod', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chmod always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod _chmod +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (chmod); +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -916,7 +1025,9 @@ _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); # else _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fstat); +# endif #elif 0 # undef fstat # define fstat fstat_used_without_requesting_gnulib_module_fstat @@ -932,7 +1043,7 @@ _GL_WARN_ON_USE (fstat, "fstat has portability problems - " #endif -#if 0 +#if 1 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fstatat @@ -946,7 +1057,7 @@ _GL_CXXALIAS_RPL (fstatat, int, (int fd, char const *restrict name, struct stat *restrict st, int flags)); # else -# if !1 +# if !0 _GL_FUNCDECL_SYS (fstatat, int, (int fd, char const *restrict name, struct stat *restrict st, int flags) @@ -987,7 +1098,7 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (futimens); # endif #elif defined GNULIB_POSIXCHECK @@ -1001,7 +1112,11 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " #if 0 # if !1 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (getumask, mode_t, (void) _GL_ATTRIBUTE_NOTHROW); +# else _GL_FUNCDECL_SYS (getumask, mode_t, (void)); +# endif # endif _GL_CXXALIAS_SYS (getumask, mode_t, (void)); # if 1 @@ -1035,58 +1150,19 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " #if 1 -# if ! 0 -/* mingw does not support symlinks, therefore it does not have lstat. But - without links, stat does just fine. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lstat stat -# endif -_GL_CXXALIAS_RPL_1 (lstat, stat, int, - (const char *restrict name, struct stat *restrict buf)); -# elif 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lstat -# define lstat rpl_lstat +# undef mkdir +# define mkdir rpl_mkdir # endif -_GL_FUNCDECL_RPL (lstat, int, - (const char *restrict name, struct stat *restrict buf) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (lstat, int, - (const char *restrict name, struct stat *restrict buf)); -# else -_GL_CXXALIAS_SYS (lstat, int, - (const char *restrict name, struct stat *restrict buf)); -# endif -# if 0 -_GL_CXXALIASWARN (lstat); -# endif -#elif 0 -# undef lstat -# define lstat lstat_used_without_requesting_gnulib_module_lstat -#elif defined GNULIB_POSIXCHECK -# undef lstat -# if HAVE_RAW_DECL_LSTAT -_GL_WARN_ON_USE (lstat, "lstat is unportable - " - "use gnulib module lstat for portability"); -# endif -#endif - - -#if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkdir -# define mkdir rpl_mkdir -# endif _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) - _GL_ARG_NONNULL ((1))); + _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -#else +# elif defined _WIN32 && !defined __CYGWIN__ /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes and , which are included above. */ -# if defined _WIN32 && ! defined __CYGWIN__ - # if !GNULIB_defined_rpl_mkdir static int rpl_mkdir (char const *name, mode_t mode) @@ -1095,16 +1171,44 @@ rpl_mkdir (char const *name, mode_t mode) } # define GNULIB_defined_rpl_mkdir 1 # endif - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkdir # define mkdir rpl_mkdir # endif _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); # else _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); # endif -#endif _GL_CXXALIASWARN (mkdir); +#elif defined GNULIB_POSIXCHECK +# undef mkdir +# if HAVE_RAW_DECL_MKDIR +_GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " + "use gnulib module mkdir for portability"); +# endif +#elif 1 +/* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::mkdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !GNULIB_defined_rpl_mkdir +static int +rpl_mkdir (char const *name, mode_t mode) +{ + return _mkdir (name); +} +# define GNULIB_defined_rpl_mkdir 1 +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkdir +# define mkdir rpl_mkdir +# endif +_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); +# else +_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); +# endif +_GL_CXXALIASWARN (mkdir); +#endif #if 0 @@ -1150,12 +1254,24 @@ _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkfifoat +# define mkfifoat rpl_mkfifoat +# endif +_GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)); +# else +# if !1 _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); -# endif +# endif _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkfifoat); +# endif #elif defined GNULIB_POSIXCHECK # undef mkfifoat # if HAVE_RAW_DECL_MKFIFOAT @@ -1193,14 +1309,28 @@ _GL_WARN_ON_USE (mknod, "mknod is not portable - " #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mknodat +# define mknodat rpl_mknodat +# endif +_GL_FUNCDECL_RPL (mknodat, int, + (int fd, char const *file, mode_t mode, dev_t dev) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mknodat, int, + (int fd, char const *file, mode_t mode, dev_t dev)); +# else +# if !1 _GL_FUNCDECL_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((2))); -# endif +# endif _GL_CXXALIAS_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mknodat); +# endif #elif defined GNULIB_POSIXCHECK # undef mknodat # if HAVE_RAW_DECL_MKNODAT @@ -1284,6 +1414,62 @@ _GL_WARN_ON_USE (stat, "stat is unportable - " #endif +#if 1 +# if ! 0 +/* mingw does not support symlinks, therefore it does not have lstat. But + without links, stat does just fine. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define lstat stat +# endif +_GL_CXXALIAS_RPL_1 (lstat, stat, int, + (const char *restrict name, struct stat *restrict buf)); +# elif 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lstat +# define lstat rpl_lstat +# endif +_GL_FUNCDECL_RPL (lstat, int, + (const char *restrict name, struct stat *restrict buf) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (lstat, int, + (const char *restrict name, struct stat *restrict buf)); +# else +_GL_CXXALIAS_SYS (lstat, int, + (const char *restrict name, struct stat *restrict buf)); +# endif +# if 0 +_GL_CXXALIASWARN (lstat); +# endif +#elif 0 +# undef lstat +# define lstat lstat_used_without_requesting_gnulib_module_lstat +#elif defined GNULIB_POSIXCHECK +# undef lstat +# if HAVE_RAW_DECL_LSTAT +_GL_WARN_ON_USE (lstat, "lstat is unportable - " + "use gnulib module lstat for portability"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'umask' to '_umask', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::umask always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef umask +# define umask _umask +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (umask, mode_t, (mode_t mask)); +# else +_GL_CXXALIAS_SYS (umask, mode_t, (mode_t mask)); +# endif +_GL_CXXALIASWARN (umask); +#endif + + #if 0 /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat implementation relies on futimesat, which on Solaris 10 makes an invocation @@ -1308,7 +1494,7 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (utimensat); # endif #elif defined GNULIB_POSIXCHECK diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/time.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/time.h index 02be29105..ead7b6c5d 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/time.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/time.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a more complete sys/time.h. - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Paul Eggert. */ @@ -25,6 +25,13 @@ #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* On Cygwin and on many BSDish systems, includes itself recursively via . Simply delegate to the system's header in this case; it is a no-op. @@ -42,6 +49,11 @@ #ifndef _GL_SYS_TIME_H #define _GL_SYS_TIME_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if ! 0 # include #endif @@ -58,19 +70,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -158,6 +170,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -205,6 +223,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -230,6 +258,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -327,7 +363,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -355,9 +391,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -373,26 +409,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -401,19 +437,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -486,13 +522,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -501,27 +544,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -611,7 +660,7 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close close_used_without_including_unistd_h -# else +# elif !defined __clang__ _GL_WARN_ON_USE (close, "close() used without including "); # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/types.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/types.h index 1aa387faf..f46d600f8 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/types.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/types.h @@ -1,37 +1,40 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a more complete sys/types.h. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if defined _WIN32 && !defined __CYGWIN__ \ && (defined __need_off_t || defined __need___off64_t \ || defined __need_ssize_t || defined __need_time_t) /* Special invocation convention inside mingw header files. */ -#if (_MSC_VER < 1900) -#include "../include/sys/types.h" -#else #include "../ucrt/sys/types.h" -#endif #else /* Normal invocation convention. */ @@ -40,11 +43,7 @@ /* The include_next requires a split double-inclusion guard. */ # define _GL_INCLUDING_SYS_TYPES_H -#if (_MSC_VER < 1900) -#include "../include/sys/types.h" -#else #include "../ucrt/sys/types.h" -#endif # undef _GL_INCLUDING_SYS_TYPES_H #ifndef _GL_SYS_TYPES_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/sys/uio.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/uio.h similarity index 63% rename from gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/sys/uio.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/uio.h index 8036d0373..374fa8f22 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/sys/uio.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/uio.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for . - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ # if __GNUC__ >= 3 diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/wait.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/wait.h index 45f853cec..2cade63fb 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/wait.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/sys/wait.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A POSIX-like . - Copyright (C) 2001-2003, 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_SYS_WAIT_H @@ -31,25 +31,30 @@ #ifndef _GL_SYS_WAIT_H #define _GL_SYS_WAIT_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Get pid_t. */ #include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -137,6 +142,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -184,6 +195,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -209,6 +230,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -306,7 +335,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -334,9 +363,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -352,19 +381,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -437,13 +466,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -452,27 +488,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/time.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/time.h index 6df2ea6ea..c4870e8a1 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/time.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/time.h @@ -1,26 +1,33 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A more-standard . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. (However, skip this for MinGW as it treats __need_time_t @@ -32,11 +39,7 @@ && !defined __MINGW32__) \ || defined _GL_TIME_H) -#if (_MSC_VER < 1900) -#include "../include/time.h" -#else -#include "../ucrt/time.h" -#endif +# include "../ucrt/time.h" #else @@ -48,30 +51,32 @@ # include # endif -#if (_MSC_VER < 1900) -#include "../include/time.h" -#else -#include "../ucrt/time.h" -#endif +# include "../ucrt/time.h" + +/* This file uses _GL_ATTRIBUTE_DEPRECATED, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +# if !_GL_CONFIG_H_INCLUDED +# error "Please include config.h first." +# endif /* NetBSD 5.0 mis-defines NULL. */ # include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -159,6 +164,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -206,6 +217,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -231,6 +252,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -328,7 +357,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -356,9 +385,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -374,26 +403,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -402,19 +431,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -487,13 +516,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -502,27 +538,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -542,7 +584,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use Or they define it with the wrong member names or define it in (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, but the pthreads-win32 library defines it in . */ -# if (_MSC_VER < 1900) +# if ! 1 # if 0 # include # elif 0 @@ -585,11 +627,87 @@ struct __time_t_must_be_integral { # define GNULIB_defined_struct_time_t_must_be_integral 1 # endif +/* Define TIME_UTC, a positive integer constant used for timespec_get(). */ +# if ! 1 +# if !GNULIB_defined_TIME_UTC +# define TIME_UTC 1 +# define GNULIB_defined_TIME_UTC 1 +# endif +# endif + +/* Set *TS to the current time, and return BASE. + Upon failure, return 0. */ +# if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef timespec_get +# define timespec_get rpl_timespec_get +# endif +_GL_FUNCDECL_RPL (timespec_get, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (timespec_get, int, (struct timespec *ts, int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (timespec_get); +# endif +# elif defined GNULIB_POSIXCHECK +# undef timespec_get +# if HAVE_RAW_DECL_TIMESPEC_GET +_GL_WARN_ON_USE (timespec_get, "timespec_get is unportable - " + "use gnulib module timespec_get for portability"); +# endif +# endif + +/* Set *TS to the current time resolution, and return BASE. + Upon failure, return 0. */ +# if 0 +# if ! 1 +_GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base)); +_GL_CXXALIASWARN (timespec_getres); +# elif defined GNULIB_POSIXCHECK +# undef timespec_getres +# if HAVE_RAW_DECL_TIMESPEC_GETRES +_GL_WARN_ON_USE (timespec_getres, "timespec_getres is unportable - " + "use gnulib module timespec_getres for portability"); +# endif +# endif + +/* Return the number of seconds that have elapsed since the Epoch. */ +# if IN_GETTEXT_TOOLS_GNULIB_TESTS +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define time rpl_time +# endif +_GL_FUNCDECL_RPL (time, time_t, (time_t *__tp)); +_GL_CXXALIAS_RPL (time, time_t, (time_t *__tp)); +# else +_GL_CXXALIAS_SYS (time, time_t, (time_t *__tp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (time); +# endif +# elif defined GNULIB_POSIXCHECK +# undef time +# if HAVE_RAW_DECL_TIME +_GL_WARN_ON_USE (time, "time has consistency problems - " + "use gnulib module time for portability"); +# endif +# endif + /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ # if IN_GETTEXT_TOOLS_GNULIB_TESTS -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define nanosleep rpl_nanosleep # endif @@ -608,29 +726,58 @@ _GL_CXXALIAS_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # endif _GL_CXXALIASWARN (nanosleep); +# elif defined GNULIB_POSIXCHECK +# undef nanosleep +# if HAVE_RAW_DECL_NANOSLEEP +_GL_WARN_ON_USE (nanosleep, "nanosleep is unportable - " + "use gnulib module nanosleep for portability"); +# endif # endif /* Initialize time conversion information. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef tzset # define tzset rpl_tzset # endif _GL_FUNCDECL_RPL (tzset, void, (void)); _GL_CXXALIAS_RPL (tzset, void, (void)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tzset +# define tzset _tzset +# endif +_GL_CXXALIAS_MDA (tzset, void, (void)); # else -# if ! 1 -_GL_FUNCDECL_SYS (tzset, void, (void)); +_GL_CXXALIAS_SYS (tzset, void, (void)); +# endif +_GL_CXXALIASWARN (tzset); +# elif 1 +/* On native Windows, map 'tzset' to '_tzset', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::tzset always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tzset +# define tzset _tzset # endif +_GL_CXXALIAS_MDA (tzset, void, (void)); +# else _GL_CXXALIAS_SYS (tzset, void, (void)); # endif _GL_CXXALIASWARN (tzset); +# elif defined GNULIB_POSIXCHECK +# undef tzset +# if HAVE_RAW_DECL_TZSET +_GL_WARN_ON_USE (tzset, "tzset has portability problems - " + "use gnulib module tzset for portability"); +# endif # endif /* Return the 'time_t' representation of TP and normalize TP. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mktime rpl_mktime # endif @@ -642,13 +789,19 @@ _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (mktime); # endif +# elif defined GNULIB_POSIXCHECK +# undef mktime +# if HAVE_RAW_DECL_MKTIME +_GL_WARN_ON_USE (mktime, "mktime has portability problems - " + "use gnulib module mktime for portability"); +# endif # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime_r # define localtime_r rpl_localtime_r @@ -670,7 +823,7 @@ _GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, # if 1 _GL_CXXALIASWARN (localtime_r); # endif -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime_r # define gmtime_r rpl_gmtime_r @@ -692,6 +845,17 @@ _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, # if 1 _GL_CXXALIASWARN (gmtime_r); # endif +# elif defined GNULIB_POSIXCHECK +# undef localtime_r +# if HAVE_RAW_DECL_LOCALTIME_R +_GL_WARN_ON_USE (localtime_r, "localtime_r is unportable - " + "use gnulib module time_r for portability"); +# endif +# undef gmtime_r +# if HAVE_RAW_DECL_GMTIME_R +_GL_WARN_ON_USE (gmtime_r, "gmtime_r is unportable - " + "use gnulib module time_r for portability"); +# endif # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See @@ -712,6 +876,12 @@ _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (localtime); # endif +# elif defined GNULIB_POSIXCHECK +# undef localtime +# if HAVE_RAW_DECL_LOCALTIME +_GL_WARN_ON_USE (localtime, "localtime has portability problems - " + "use gnulib module localtime for portability"); +# endif # endif # if 0 || 0 @@ -743,15 +913,24 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm)); _GL_CXXALIASWARN (strptime); +# elif defined GNULIB_POSIXCHECK +# undef strptime +# if HAVE_RAW_DECL_STRPTIME +_GL_WARN_ON_USE (strptime, "strptime is unportable - " + "use gnulib module strptime for portability"); +# endif # endif /* Convert *TP to a date and time string. See . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define ctime rpl_ctime # endif +# ifndef __cplusplus +_GL_ATTRIBUTE_DEPRECATED +# endif _GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp)); @@ -761,12 +940,18 @@ _GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (ctime); # endif +# elif defined GNULIB_POSIXCHECK +# undef ctime +# if HAVE_RAW_DECL_CTIME +_GL_WARN_ON_USE (ctime, "ctime has portability problems - " + "use gnulib module ctime for portability"); +# endif # endif /* Convert *TP to a date and time string. See . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strftime rpl_strftime # endif @@ -785,30 +970,74 @@ _GL_CXXALIAS_SYS (strftime, size_t, # if __GLIBC__ >= 2 _GL_CXXALIASWARN (strftime); # endif +# elif defined GNULIB_POSIXCHECK +# undef strftime +# if HAVE_RAW_DECL_STRFTIME +_GL_WARN_ON_USE (strftime, "strftime has portability problems - " + "use gnulib module strftime-fixes for portability"); +# endif # endif # if defined _GNU_SOURCE && 0 && ! 0 +/* Functions that use a first-class time zone data type, instead of + relying on an implicit global time zone. + Inspired by NetBSD. */ + +/* Represents a time zone. + (timezone_t) NULL stands for UTC. */ typedef struct tm_zone *timezone_t; + +/* tzalloc (name) + Returns a time zone object for the given time zone NAME. This object + represents the time zone that other functions would use it the TZ + environment variable was set to NAME. + If NAME is NULL, the result represents the time zone that other functions + would use it the TZ environment variable was unset. + May return NULL if NAME is invalid (this is platform dependent) or + upon memory allocation failure. */ _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); + +/* tzfree (tz) + Frees a time zone object. + The argument must have been returned by tzalloc(). */ _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); + +/* localtime_rz (tz, &t, &result) + Converts an absolute time T to a broken-down time RESULT, assuming the + time zone TZ. + This function is like 'localtime_r', but relies on the argument TZ instead + of an implicit global time zone. */ _GL_FUNCDECL_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result)); + +/* mktime_z (tz, &tm) + Normalizes the broken-down time TM and converts it to an absolute time, + assuming the time zone TZ. Returns the absolute time. + This function is like 'mktime', but relies on the argument TZ instead + of an implicit global time zone. */ _GL_FUNCDECL_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result) + (timezone_t __tz, struct tm *restrict __tm) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result)); + (timezone_t __tz, struct tm *restrict __tm)); + +/* Time zone abbreviation strings (returned by 'localtime_rz' or 'mktime_z' + in the 'tm_zone' member of 'struct tm') are valid as long as + - the 'struct tm' argument is not destroyed or overwritten, + and + - the 'timezone_t' argument is not freed through tzfree(). */ + # endif /* Convert TM to a time_t value, assuming UTC. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef timegm # define timegm rpl_timegm @@ -821,7 +1050,15 @@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (timegm); +# endif +# elif defined GNULIB_POSIXCHECK +# undef timegm +# if HAVE_RAW_DECL_TIMEGM +_GL_WARN_ON_USE (timegm, "timegm is unportable - " + "use gnulib module timegm for portability"); +# endif # endif /* Encourage applications to avoid unsafe functions that can overrun @@ -829,23 +1066,31 @@ _GL_CXXALIASWARN (timegm); applications should use strftime (or even sprintf) instead. */ # if defined GNULIB_POSIXCHECK # undef asctime +# if HAVE_RAW_DECL_ASCTIME _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef asctime_r -_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " +# if HAVE_RAW_DECL_ASCTIME_R +_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef ctime -_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " +# if HAVE_RAW_DECL_CTIME +_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef ctime_r -_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " +# if HAVE_RAW_DECL_CTIME_R +_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uchar.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uchar.h new file mode 100644 index 000000000..3abe066ec --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uchar.h @@ -0,0 +1,1423 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* substitute - 16-bit and 32-bit wide character types. + Copyright (C) 2019-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2019. */ + +/* + * ISO C 23 for platforms that lack it. + */ + +#ifndef _GL_UCHAR_H + +#if __GNUC__ >= 3 + +#endif + + +/* The include_next requires a split double-inclusion guard. */ +#if 1 +# if defined __HAIKU__ +/* Work around . */ +# include +# endif +/* On AIX 7.2 with xlclang++, /usr/include/uchar.h produces compilation errors + because it contains typedef definitions of char16_t and char32_t, however + char16_t and char32_t are keywords in this situation. To work around it, + define char16_t and char32_t as macros. */ +# if defined __cplusplus && defined _AIX && defined __ibmxl__ && defined __clang__ +# define char16_t gl_char16_t +# define char32_t gl_char32_t +# endif +# include "../ucrt/uchar.h" +#endif + +#ifndef _GL_UCHAR_H +#define _GL_UCHAR_H + +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_BEGIN_C_LINKAGE, + _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* Get uint_least16_t, uint_least32_t. */ +#include + +/* Get mbstate_t, size_t. */ +#include + +/* For the inline functions. */ +#include +#include + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +_GL_INLINE_HEADER_BEGIN + + +#if !(1 || (defined __cplusplus && 0)) + +/* An 8-bit variant of wchar_t. + Note: This type is only mandated by ISO C 23 or newer, and it does + denote UTF-8 units. */ +typedef unsigned char char8_t; + +#elif 1 + +typedef unsigned char gl_char8_t; +# define char8_t gl_char8_t + +#endif + +#if !(1 || (defined __cplusplus && 0)) + +/* A 16-bit variant of wchar_t. + Note: This type is only mandated by ISO C 11 or newer. In ISO C 23 + and newer, it denotes UTF-16 units; in older versions of ISO C it did + so only on platforms on which __STDC_UTF_16__ was defined. */ +typedef uint_least16_t char16_t; + +#elif 0 + +typedef uint_least16_t gl_char16_t; +# define char16_t gl_char16_t + +#endif + +#if !(1 || (defined __cplusplus && 0)) + +/* A 32-bit variant of wchar_t. + Note: This type is only mandated by ISO C 11 or newer. In ISO C 23 + and newer, it denotes UTF-32 code points; in older versions of ISO C + it did so only on platforms on which __STDC_UTF_32__ was defined. + In gnulib, we guarantee that it denotes UTF-32 code points if and + only if the module 'uchar-c23' is in use. */ +typedef uint_least32_t char32_t; + +#elif 0 + +typedef uint_least32_t gl_char32_t; +# define char32_t gl_char32_t + +#endif + +/* Define if a 'char32_t' can hold more characters than a 'wchar_t'. */ +#if 1 /* 32-bit AIX, Cygwin, native Windows */ +# define _GL_SMALL_WCHAR_T 1 +#endif + +/* Define if 'wchar_t', like 'char32_t', + - is a 32-bit type, and + - represents Unicode code points. + For this test, we can use __STDC_ISO_10646__ (defined by glibc, musl libc, + Cygwin) but need to consider _GL_SMALL_WCHAR_T, so as to exclude Cygwin. + We cannot use __STDC_UTF_16__ or __STDC_UTF_32__ + - because these macros provide info about char16_t and char32_t (not + wchar_t!), and + - because GCC >= 4.9 defines these macros on all platforms, even on + FreeBSD and Solaris. + We should better not use __STD_UTF_16__, __STD_UTF_32__ either, because + these macros are misspellings, only defined by Android's . */ +#if defined __STDC_ISO_10646__ && !_GL_SMALL_WCHAR_T +/* glibc, musl libc */ +# define _GL_WCHAR_T_IS_UCS4 1 +#endif +#if _GL_WCHAR_T_IS_UCS4 +static_assert (sizeof (char32_t) == sizeof (wchar_t)); +#endif + + +/* Convert a single-byte character to a 32-bit wide character. */ +#if 1 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_BTOC32 +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ATTRIBUTE_PURE wint_t +btoc32 (int c) +{ + return +# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + btowc (c); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (btoc32, wint_t, (int c) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (btoc32, wint_t, (int c)); +_GL_CXXALIASWARN (btoc32); +#endif + + +/* Test a specific property of a 32-bit wide character. */ +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISALNUM +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isalnum (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswalnum (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isalnum, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isalnum, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isalnum); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISALPHA +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isalpha (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswalpha (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isalpha, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isalpha, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isalpha); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISBLANK +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isblank (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswblank (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isblank, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isblank, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isblank); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISCNTRL +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32iscntrl (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswcntrl (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32iscntrl, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32iscntrl, int, (wint_t wc)); +_GL_CXXALIASWARN (c32iscntrl); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISDIGIT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isdigit (wint_t wc) +{ + return +# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswdigit (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isdigit, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isdigit, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isdigit); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISGRAPH +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isgraph (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswgraph (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isgraph, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isgraph, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isgraph); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISLOWER +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32islower (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswlower (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32islower, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32islower, int, (wint_t wc)); +_GL_CXXALIASWARN (c32islower); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISPRINT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isprint (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswprint (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isprint, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isprint, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isprint); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISPUNCT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32ispunct (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswpunct (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32ispunct, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32ispunct, int, (wint_t wc)); +_GL_CXXALIASWARN (c32ispunct); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISSPACE +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isspace (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswspace (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isspace, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isspace, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isspace); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISUPPER +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isupper (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswupper (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isupper, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isupper, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isupper); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISXDIGIT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isxdigit (wint_t wc) +{ + return +# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswxdigit (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isxdigit, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isxdigit, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isxdigit); +#endif + + +/* Case mapping of a 32-bit wide character. */ +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32TOLOWER +_GL_BEGIN_C_LINKAGE +_GL_INLINE wint_t +c32tolower (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + towlower (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32tolower, wint_t, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32tolower, wint_t, (wint_t wc)); +_GL_CXXALIASWARN (c32tolower); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32TOUPPER +_GL_BEGIN_C_LINKAGE +_GL_INLINE wint_t +c32toupper (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + towupper (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32toupper, wint_t, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32toupper, wint_t, (wint_t wc)); +_GL_CXXALIASWARN (c32toupper); +#endif + + +/* Number of screen columns needed for a 32-bit wide character. */ +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32WIDTH +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32width (char32_t wc) +{ + return +# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcwidth (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32width, int, (char32_t wc)); +# endif +_GL_CXXALIAS_SYS (c32width, int, (char32_t wc)); +_GL_CXXALIASWARN (c32width); +#endif + + +/* Converts a 32-bit wide character to a multibyte character. */ +#if IN_GETTEXT_TOOLS_GNULIB_TESTS +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef c32rtomb +# define c32rtomb rpl_c32rtomb +# endif +_GL_FUNCDECL_RPL (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +_GL_CXXALIAS_RPL (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +# endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_CXXALIASWARN (c32rtomb); +# endif +#elif defined GNULIB_POSIXCHECK +# undef c32rtomb +# if HAVE_RAW_DECL_C32RTOMB +_GL_WARN_ON_USE (c32rtomb, "c32rtomb is not portable - " + "use gnulib module c32rtomb for portability"); +# endif +#endif + + +/* Convert a 32-bit wide string to a string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32SNRTOMBS +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +c32snrtombs (char *dest, const char32_t **srcp, size_t srclen, size_t len, + mbstate_t *ps) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcsnrtombs (dest, (const wchar_t **) srcp, srclen, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32snrtombs, size_t, + (char *dest, const char32_t **srcp, size_t srclen, size_t len, + mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32snrtombs, size_t, + (char *dest, const char32_t **srcp, size_t srclen, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (c32snrtombs); +#endif + + +/* Convert a 32-bit wide string to a string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32SRTOMBS +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +c32srtombs (char *dest, const char32_t **srcp, size_t len, mbstate_t *ps) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcsrtombs (dest, (const wchar_t **) srcp, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32srtombs, size_t, + (char *dest, const char32_t **srcp, size_t len, mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32srtombs, size_t, + (char *dest, const char32_t **srcp, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (c32srtombs); +#endif + + +/* Convert a 32-bit wide string to a string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32STOMBS +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +c32stombs (char *dest, const char32_t *src, size_t len) +{ + mbstate_t state; + + mbszero (&state); + return c32srtombs (dest, &src, len, &state); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32stombs, size_t, + (char *dest, const char32_t *src, size_t len) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32stombs, size_t, + (char *dest, const char32_t *src, size_t len)); +_GL_CXXALIASWARN (c32stombs); +#endif + + +/* Number of screen columns needed for a size-bounded 32-bit wide string. */ +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32SWIDTH +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((1)) int +c32swidth (const char32_t *s, size_t n) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcswidth ((const wchar_t *) s, n); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32swidth, int, (const char32_t *s, size_t n) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (c32swidth, int, (const char32_t *s, size_t n)); +_GL_CXXALIASWARN (c32swidth); +#endif + + +/* Converts a 32-bit wide character to unibyte character. + Returns the single-byte representation of WC if it exists, + or EOF otherwise. */ +#if IN_GETTEXT_TOOLS_GNULIB_TESTS +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32TOB +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32tob (wint_t wc) +{ + return +# if IN_GETTEXT_TOOLS_GNULIB_TESTS && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wctob (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32tob, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32tob, int, (wint_t wc)); +_GL_CXXALIASWARN (c32tob); +#endif + + +/* Converts a multibyte character to a 32-bit wide character. */ +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrtoc32 +# define mbrtoc32 rpl_mbrtoc32 +# endif +_GL_FUNCDECL_RPL (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_CXXALIASWARN (mbrtoc32); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrtoc32 +# if HAVE_RAW_DECL_MBRTOC32 +_GL_WARN_ON_USE (mbrtoc32, "mbrtoc32 is not portable - " + "use gnulib module mbrtoc32 for portability"); +# endif +#endif + + +/* Converts a multibyte character and returns the next 16-bit wide + character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrtoc16 +# define mbrtoc16 rpl_mbrtoc16 +# endif +_GL_FUNCDECL_RPL (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_CXXALIASWARN (mbrtoc16); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrtoc16 +# if HAVE_RAW_DECL_MBRTOC16 +_GL_WARN_ON_USE (mbrtoc16, "mbrtoc16 is not portable - " + "use gnulib module mbrtoc16 for portability"); +# endif +#endif + + +/* Convert a string to a 32-bit wide string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSNRTOC32S +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +mbsnrtoc32s (char32_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + mbsnrtowcs ((wchar_t *) dest, srcp, srclen, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (mbsnrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsnrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (mbsnrtoc32s); +#endif + + +/* Convert a string to a 32-bit wide string. */ +#if 1 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSRTOC32S +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +mbsrtoc32s (char32_t *dest, const char **srcp, size_t len, mbstate_t *ps) +{ + return +# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + mbsrtowcs ((wchar_t *) dest, srcp, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (mbsrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t len, mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (mbsrtoc32s); +#endif + + +/* Convert a string to a 32-bit wide string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSTOC32S +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +mbstoc32s (char32_t *dest, const char *src, size_t len) +{ + mbstate_t state; + + mbszero (&state); + return mbsrtoc32s (dest, &src, len, &state); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (mbstoc32s, size_t, + (char32_t *dest, const char *src, size_t len) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbstoc32s, size_t, + (char32_t *dest, const char *src, size_t len)); +_GL_CXXALIASWARN (mbstoc32s); +#endif + + +#if 1 || 1 +/* A scalar type. Instances of this type, other than (c32_type_test_t) 0, + represent a character property, sometimes also viewed as a "character class". + It can be applied to 32-bit wide characters. It is the counterpart of + type 'wctype_t' for wide characters. + To test whether a given character has a certain property, use the function + 'c32_apply_type_test'. */ +# if _GL_WCHAR_T_IS_UCS4 +typedef wctype_t c32_type_test_t; +# else +typedef /*bool*/int (*c32_type_test_t) (wint_t wc); +# endif +#endif + +/* Return a character property with the given name, or (c32_type_test_t) 0 + if the designated property does not exist. + This function is the counterpart of function 'wctype' for wide characters. + */ +#if 1 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_GET_TYPE_TEST +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((1)) c32_type_test_t +c32_get_type_test (const char *name) +{ + return +# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wctype (name); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_get_type_test, c32_type_test_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (c32_get_type_test, c32_type_test_t, (const char *name)); +_GL_CXXALIASWARN (c32_get_type_test); +#endif + +/* Test whether a given 32-bit wide character has the specified character + property. + Return non-zero if true, zero if false or if the argument is WEOF. + This function is the counterpart of function 'iswctype' for wide characters. + */ +#if 1 +# if _GL_WCHAR_T_IS_UCS4 +# if !defined IN_C32_APPLY_TYPE_TEST +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32_apply_type_test (wint_t wc, c32_type_test_t property) +{ + return +# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswctype (wc, property); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_apply_type_test, int, + (wint_t wc, c32_type_test_t property)); +# endif +# else +_GL_FUNCDECL_SYS (c32_apply_type_test, int, + (wint_t wc, c32_type_test_t property) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32_apply_type_test, int, + (wint_t wc, c32_type_test_t property)); +_GL_CXXALIASWARN (c32_apply_type_test); +#endif + + +#if 0 || 0 +/* A scalar type. Instances of this type, other than (c32_mapping_t) 0, + represent a character mapping. It can be applied to 32-bit wide characters. + It is the counterpart of type 'wctrans_t' for wide characters. + To apply a certain mapping to a given character, use the function + 'c32_apply_mapping'. */ +# if _GL_WCHAR_T_IS_UCS4 +typedef wctrans_t c32_mapping_t; +# else +typedef wint_t (*c32_mapping_t) (wint_t wc); +# endif +#endif + +/* Return a character mapping with the given name, or (c32_mapping_t) 0 + if the designated mapping does not exist. + This function is the counterpart of function 'wctrans' for wide characters. + */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_GET_MAPPING +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((1)) c32_mapping_t +c32_get_mapping (const char *name) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wctrans (name); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_get_mapping, c32_mapping_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (c32_get_mapping, c32_mapping_t, (const char *name)); +_GL_CXXALIASWARN (c32_get_mapping); +#endif + +/* Apply the specified character mapping to a given 32-bit wide character. + Return the result of this mapping. Return the WC argument unchanged if it is + WEOF. + This function is the counterpart of function 'towctrans' for wide characters. + */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_APPLY_MAPPING +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) wint_t +c32_apply_mapping (wint_t wc, c32_mapping_t mapping) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + towctrans (wc, mapping); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_apply_mapping, wint_t, + (wint_t wc, c32_mapping_t mapping) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32_apply_mapping, wint_t, + (wint_t wc, c32_mapping_t mapping)); +_GL_CXXALIASWARN (c32_apply_mapping); +#endif + + +_GL_INLINE_HEADER_END + +#endif /* _GL_UCHAR_H */ +#endif /* _GL_UCHAR_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unicase.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unicase.h new file mode 100644 index 000000000..fdbe9e319 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unicase.h @@ -0,0 +1,472 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Unicode character case mappings. + Copyright (C) 2002, 2009-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNICASE_H +#define _UNICASE_H + +#include "unitypes.h" + +/* Get bool. */ +#include + +/* Get size_t. */ +#include + +/* Get uninorm_t. */ +#include "uninorm.h" + +#if 0 +# include +#else +# define LIBUNISTRING_DLL_VARIABLE +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* ========================================================================= */ + +/* Character case mappings. + These mappings are locale and context independent. + WARNING! These functions are not sufficient for languages such as German. + Better use the functions below that treat an entire string at once and are + language aware. */ + +/* Return the uppercase mapping of a Unicode character. */ +extern ucs4_t + uc_toupper (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the lowercase mapping of a Unicode character. */ +extern ucs4_t + uc_tolower (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* Return the titlecase mapping of a Unicode character. */ +extern ucs4_t + uc_totitle (ucs4_t uc) + _UC_ATTRIBUTE_CONST; + +/* ========================================================================= */ + +/* String case mappings. */ + +/* These functions are locale dependent. The iso639_language argument + identifies the language (e.g. "tr" for Turkish). NULL means to use + locale independent case mappings. */ + +/* Return the ISO 639 language code of the current locale. + Return "" if it is unknown, or in the "C" locale. */ +extern const char * + uc_locale_language (void) + _UC_ATTRIBUTE_PURE; + +/* Conventions: + + All functions prefixed with u8_ operate on UTF-8 encoded strings. + Their unit is an uint8_t (1 byte). + + All functions prefixed with u16_ operate on UTF-16 encoded strings. + Their unit is an uint16_t (a 2-byte word). + + All functions prefixed with u32_ operate on UCS-4 encoded strings. + Their unit is an uint32_t (a 4-byte word). + + All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly + n units. + + Functions returning a string result take a (resultbuf, lengthp) argument + pair. If resultbuf is not NULL and the result fits into *lengthp units, + it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly + allocated string is returned. In both cases, *lengthp is set to the + length (number of units) of the returned string. In case of error, + NULL is returned and errno is set. */ + +/* Return the uppercase mapping of a string. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_toupper (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_toupper (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_toupper (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the lowercase mapping of a string. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_tolower (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_tolower (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_tolower (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the titlecase mapping of a string. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_totitle (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_totitle (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_totitle (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* The case-mapping context given by a prefix string. */ +typedef struct casing_prefix_context + { + /* These fields are private, undocumented. */ + uint32_t last_char_except_ignorable; + uint32_t last_char_normal_or_above; + } + casing_prefix_context_t; +/* The case-mapping context of the empty prefix string. */ +extern LIBUNISTRING_DLL_VARIABLE const casing_prefix_context_t unicase_empty_prefix_context; +/* Return the case-mapping context of a given prefix string. */ +extern casing_prefix_context_t + u8_casing_prefix_context (const uint8_t *s, size_t n); +extern casing_prefix_context_t + u16_casing_prefix_context (const uint16_t *s, size_t n); +extern casing_prefix_context_t + u32_casing_prefix_context (const uint32_t *s, size_t n); +/* Return the case-mapping context of the prefix concat(A, S), given the + case-mapping context of the prefix A. */ +extern casing_prefix_context_t + u8_casing_prefixes_context (const uint8_t *s, size_t n, + casing_prefix_context_t a_context); +extern casing_prefix_context_t + u16_casing_prefixes_context (const uint16_t *s, size_t n, + casing_prefix_context_t a_context); +extern casing_prefix_context_t + u32_casing_prefixes_context (const uint32_t *s, size_t n, + casing_prefix_context_t a_context); + +/* The case-mapping context given by a suffix string. */ +typedef struct casing_suffix_context + { + /* These fields are private, undocumented. */ + uint32_t first_char_except_ignorable; + uint32_t bits; + } + casing_suffix_context_t; +/* The case-mapping context of the empty suffix string. */ +extern LIBUNISTRING_DLL_VARIABLE const casing_suffix_context_t unicase_empty_suffix_context; +/* Return the case-mapping context of a given suffix string. */ +extern casing_suffix_context_t + u8_casing_suffix_context (const uint8_t *s, size_t n); +extern casing_suffix_context_t + u16_casing_suffix_context (const uint16_t *s, size_t n); +extern casing_suffix_context_t + u32_casing_suffix_context (const uint32_t *s, size_t n); +/* Return the case-mapping context of the suffix concat(S, A), given the + case-mapping context of the suffix A. */ +extern casing_suffix_context_t + u8_casing_suffixes_context (const uint8_t *s, size_t n, + casing_suffix_context_t a_context); +extern casing_suffix_context_t + u16_casing_suffixes_context (const uint16_t *s, size_t n, + casing_suffix_context_t a_context); +extern casing_suffix_context_t + u32_casing_suffixes_context (const uint32_t *s, size_t n, + casing_suffix_context_t a_context); + +/* Return the uppercase mapping of a string that is surrounded by a prefix + and a suffix. */ +extern uint8_t * + u8_ct_toupper (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_toupper (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_toupper (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the lowercase mapping of a string that is surrounded by a prefix + and a suffix. */ +extern uint8_t * + u8_ct_tolower (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_tolower (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_tolower (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the titlecase mapping of a string that is surrounded by a prefix + and a suffix. */ +extern uint8_t * + u8_ct_totitle (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_totitle (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_totitle (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Return the case folded string. + Comparing uN_casefold (S1) and uN_casefold (S2) with uN_cmp2() is equivalent + to comparing S1 and S2 with uN_casecmp(). + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. */ +extern uint8_t * + u8_casefold (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_casefold (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_casefold (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); +/* Likewise, for a string that is surrounded by a prefix and a suffix. */ +extern uint8_t * + u8_ct_casefold (const uint8_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_ct_casefold (const uint16_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_ct_casefold (const uint32_t *s, size_t n, + casing_prefix_context_t prefix_context, + casing_suffix_context_t suffix_context, + const char *iso639_language, + uninorm_t nf, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Compare S1 and S2, ignoring differences in case and normalization. + The nf argument identifies the normalization form to apply after the + case-mapping. It can also be NULL, for no normalization. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_casecmp (const uint8_t *s1, size_t n1, + const uint8_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u16_casecmp (const uint16_t *s1, size_t n1, + const uint16_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u32_casecmp (const uint32_t *s1, size_t n1, + const uint32_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + ulc_casecmp (const char *s1, size_t n1, + const char *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); + +/* Convert the string S of length N to a NUL-terminated byte sequence, in such + a way that comparing uN_casexfrm (S1) and uN_casexfrm (S2) with the gnulib + function memcmp2() is equivalent to comparing S1 and S2 with uN_casecoll(). + NF must be either UNINORM_NFC, UNINORM_NFKC, or NULL for no normalization. */ +extern char * + u8_casexfrm (const uint8_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); +extern char * + u16_casexfrm (const uint16_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); +extern char * + u32_casexfrm (const uint32_t *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); +extern char * + ulc_casexfrm (const char *s, size_t n, const char *iso639_language, + uninorm_t nf, + char *_UC_RESTRICT resultbuf, size_t *lengthp); + +/* Compare S1 and S2, ignoring differences in case and normalization, using the + collation rules of the current locale. + The nf argument identifies the normalization form to apply after the + case-mapping. It must be either UNINORM_NFC or UNINORM_NFKC. It can also + be NULL, for no normalization. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_casecoll (const uint8_t *s1, size_t n1, + const uint8_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u16_casecoll (const uint16_t *s1, size_t n1, + const uint16_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + u32_casecoll (const uint32_t *s1, size_t n1, + const uint32_t *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); +extern int + ulc_casecoll (const char *s1, size_t n1, + const char *s2, size_t n2, + const char *iso639_language, uninorm_t nf, int *resultp); + + +/* Set *RESULTP to true if mapping NFD(S) to upper case is a no-op, or to false + otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_uppercase (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_uppercase (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_uppercase (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if mapping NFD(S) to lower case is a no-op, or to false + otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_lowercase (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_lowercase (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_lowercase (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if mapping NFD(S) to title case is a no-op, or to false + otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_titlecase (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_titlecase (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_titlecase (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if applying case folding to NFD(S) is a no-op, or to + false otherwise, and return 0. Upon failure, return -1 with errno set. */ +extern int + u8_is_casefolded (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_casefolded (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_casefolded (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + +/* Set *RESULTP to true if case matters for S, that is, if mapping NFD(S) to + either upper case or lower case or title case is not a no-op. + Set *RESULTP to false if NFD(S) maps to itself under the upper case mapping, + under the lower case mapping, and under the title case mapping; in other + words, when NFD(S) consists entirely of caseless characters. + Upon failure, return -1 with errno set. */ +extern int + u8_is_cased (const uint8_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u16_is_cased (const uint16_t *s, size_t n, + const char *iso639_language, + bool *resultp); +extern int + u32_is_cased (const uint32_t *s, size_t n, + const char *iso639_language, + bool *resultp); + + +/* ========================================================================= */ + +#ifdef __cplusplus +} +#endif + +#endif /* _UNICASE_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniconv.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniconv.h index 2727b8229..c7173a0fd 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniconv.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniconv.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Conversions between Unicode and legacy encodings. - Copyright (C) 2002, 2005, 2007, 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2002, 2005, 2007, 2009-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNICONV_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unictype.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unictype.h index 54016658d..d752b8a1d 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unictype.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unictype.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Unicode character classification and properties. - Copyright (C) 2002, 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNICTYPE_H @@ -26,6 +26,12 @@ /* Get size_t. */ #include +#if 0 +# include +#else +# define LIBUNISTRING_DLL_VARIABLE +#endif + #ifdef __cplusplus extern "C" { #endif @@ -102,44 +108,44 @@ enum }; /* Predefined General category values. */ -extern const uc_general_category_t UC_CATEGORY_L; -extern const uc_general_category_t UC_CATEGORY_LC; -extern const uc_general_category_t UC_CATEGORY_Lu; -extern const uc_general_category_t UC_CATEGORY_Ll; -extern const uc_general_category_t UC_CATEGORY_Lt; -extern const uc_general_category_t UC_CATEGORY_Lm; -extern const uc_general_category_t UC_CATEGORY_Lo; -extern const uc_general_category_t UC_CATEGORY_M; -extern const uc_general_category_t UC_CATEGORY_Mn; -extern const uc_general_category_t UC_CATEGORY_Mc; -extern const uc_general_category_t UC_CATEGORY_Me; -extern const uc_general_category_t UC_CATEGORY_N; -extern const uc_general_category_t UC_CATEGORY_Nd; -extern const uc_general_category_t UC_CATEGORY_Nl; -extern const uc_general_category_t UC_CATEGORY_No; -extern const uc_general_category_t UC_CATEGORY_P; -extern const uc_general_category_t UC_CATEGORY_Pc; -extern const uc_general_category_t UC_CATEGORY_Pd; -extern const uc_general_category_t UC_CATEGORY_Ps; -extern const uc_general_category_t UC_CATEGORY_Pe; -extern const uc_general_category_t UC_CATEGORY_Pi; -extern const uc_general_category_t UC_CATEGORY_Pf; -extern const uc_general_category_t UC_CATEGORY_Po; -extern const uc_general_category_t UC_CATEGORY_S; -extern const uc_general_category_t UC_CATEGORY_Sm; -extern const uc_general_category_t UC_CATEGORY_Sc; -extern const uc_general_category_t UC_CATEGORY_Sk; -extern const uc_general_category_t UC_CATEGORY_So; -extern const uc_general_category_t UC_CATEGORY_Z; -extern const uc_general_category_t UC_CATEGORY_Zs; -extern const uc_general_category_t UC_CATEGORY_Zl; -extern const uc_general_category_t UC_CATEGORY_Zp; -extern const uc_general_category_t UC_CATEGORY_C; -extern const uc_general_category_t UC_CATEGORY_Cc; -extern const uc_general_category_t UC_CATEGORY_Cf; -extern const uc_general_category_t UC_CATEGORY_Cs; -extern const uc_general_category_t UC_CATEGORY_Co; -extern const uc_general_category_t UC_CATEGORY_Cn; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_L; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_LC; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lu; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ll; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lt; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lm; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lo; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_M; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mn; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Me; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_N; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Nd; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Nl; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_No; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_P; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pd; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ps; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pe; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pi; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pf; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Po; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_S; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sm; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sk; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_So; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Z; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zs; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zl; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zp; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_C; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cf; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cs; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Co; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cn; /* Non-public. */ extern const uc_general_category_t _UC_CATEGORY_NONE; @@ -467,95 +473,110 @@ extern int This enumeration may be extended in the future. */ enum { - UC_JOINING_GROUP_NONE, /* No_Joining_Group */ - UC_JOINING_GROUP_AIN, /* Ain */ - UC_JOINING_GROUP_ALAPH, /* Alaph */ - UC_JOINING_GROUP_ALEF, /* Alef */ - UC_JOINING_GROUP_BEH, /* Beh */ - UC_JOINING_GROUP_BETH, /* Beth */ - UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, /* Burushaski_Yeh_Barree */ - UC_JOINING_GROUP_DAL, /* Dal */ - UC_JOINING_GROUP_DALATH_RISH, /* Dalath_Rish */ - UC_JOINING_GROUP_E, /* E */ - UC_JOINING_GROUP_FARSI_YEH, /* Farsi_Yeh */ - UC_JOINING_GROUP_FE, /* Fe */ - UC_JOINING_GROUP_FEH, /* Feh */ - UC_JOINING_GROUP_FINAL_SEMKATH, /* Final_Semkath */ - UC_JOINING_GROUP_GAF, /* Gaf */ - UC_JOINING_GROUP_GAMAL, /* Gamal */ - UC_JOINING_GROUP_HAH, /* Hah */ - UC_JOINING_GROUP_HE, /* He */ - UC_JOINING_GROUP_HEH, /* Heh */ - UC_JOINING_GROUP_HEH_GOAL, /* Heh_Goal */ - UC_JOINING_GROUP_HETH, /* Heth */ - UC_JOINING_GROUP_KAF, /* Kaf */ - UC_JOINING_GROUP_KAPH, /* Kaph */ - UC_JOINING_GROUP_KHAPH, /* Khaph */ - UC_JOINING_GROUP_KNOTTED_HEH, /* Knotted_Heh */ - UC_JOINING_GROUP_LAM, /* Lam */ - UC_JOINING_GROUP_LAMADH, /* Lamadh */ - UC_JOINING_GROUP_MEEM, /* Meem */ - UC_JOINING_GROUP_MIM, /* Mim */ - UC_JOINING_GROUP_NOON, /* Noon */ - UC_JOINING_GROUP_NUN, /* Nun */ - UC_JOINING_GROUP_NYA, /* Nya */ - UC_JOINING_GROUP_PE, /* Pe */ - UC_JOINING_GROUP_QAF, /* Qaf */ - UC_JOINING_GROUP_QAPH, /* Qaph */ - UC_JOINING_GROUP_REH, /* Reh */ - UC_JOINING_GROUP_REVERSED_PE, /* Reversed_Pe */ - UC_JOINING_GROUP_SAD, /* Sad */ - UC_JOINING_GROUP_SADHE, /* Sadhe */ - UC_JOINING_GROUP_SEEN, /* Seen */ - UC_JOINING_GROUP_SEMKATH, /* Semkath */ - UC_JOINING_GROUP_SHIN, /* Shin */ - UC_JOINING_GROUP_SWASH_KAF, /* Swash_Kaf */ - UC_JOINING_GROUP_SYRIAC_WAW, /* Syriac_Waw */ - UC_JOINING_GROUP_TAH, /* Tah */ - UC_JOINING_GROUP_TAW, /* Taw */ - UC_JOINING_GROUP_TEH_MARBUTA, /* Teh_Marbuta */ - UC_JOINING_GROUP_TEH_MARBUTA_GOAL, /* Teh_Marbuta_Goal */ - UC_JOINING_GROUP_TETH, /* Teth */ - UC_JOINING_GROUP_WAW, /* Waw */ - UC_JOINING_GROUP_YEH, /* Yeh */ - UC_JOINING_GROUP_YEH_BARREE, /* Yeh_Barree */ - UC_JOINING_GROUP_YEH_WITH_TAIL, /* Yeh_With_Tail */ - UC_JOINING_GROUP_YUDH, /* Yudh */ - UC_JOINING_GROUP_YUDH_HE, /* Yudh_He */ - UC_JOINING_GROUP_ZAIN, /* Zain */ - UC_JOINING_GROUP_ZHAIN, /* Zhain */ - UC_JOINING_GROUP_ROHINGYA_YEH, /* Rohingya_Yeh */ - UC_JOINING_GROUP_STRAIGHT_WAW, /* Straight_Waw */ - UC_JOINING_GROUP_MANICHAEAN_ALEPH, /* Manichaean_Aleph */ - UC_JOINING_GROUP_MANICHAEAN_BETH, /* Manichaean_Beth */ - UC_JOINING_GROUP_MANICHAEAN_GIMEL, /* Manichaean_Gimel */ - UC_JOINING_GROUP_MANICHAEAN_DALETH, /* Manichaean_Daleth */ - UC_JOINING_GROUP_MANICHAEAN_WAW, /* Manichaean_Waw */ - UC_JOINING_GROUP_MANICHAEAN_ZAYIN, /* Manichaean_Zayin */ - UC_JOINING_GROUP_MANICHAEAN_HETH, /* Manichaean_Heth */ - UC_JOINING_GROUP_MANICHAEAN_TETH, /* Manichaean_Teth */ - UC_JOINING_GROUP_MANICHAEAN_YODH, /* Manichaean_Yodh */ - UC_JOINING_GROUP_MANICHAEAN_KAPH, /* Manichaean_Kaph */ - UC_JOINING_GROUP_MANICHAEAN_LAMEDH, /* Manichaean_Lamedh */ - UC_JOINING_GROUP_MANICHAEAN_DHAMEDH, /* Manichaean_Dhamedh */ - UC_JOINING_GROUP_MANICHAEAN_THAMEDH, /* Manichaean_Thamedh */ - UC_JOINING_GROUP_MANICHAEAN_MEM, /* Manichaean_Mem */ - UC_JOINING_GROUP_MANICHAEAN_NUN, /* Manichaean_Nun */ - UC_JOINING_GROUP_MANICHAEAN_SAMEKH, /* Manichaean_Aleph */ - UC_JOINING_GROUP_MANICHAEAN_AYIN, /* Manichaean_Ayin */ - UC_JOINING_GROUP_MANICHAEAN_PE, /* Manichaean_Pe */ - UC_JOINING_GROUP_MANICHAEAN_SADHE, /* Manichaean_Sadhe */ - UC_JOINING_GROUP_MANICHAEAN_QOPH, /* Manichaean_Qoph */ - UC_JOINING_GROUP_MANICHAEAN_RESH, /* Manichaean_Resh */ - UC_JOINING_GROUP_MANICHAEAN_TAW, /* Manichaean_Taw */ - UC_JOINING_GROUP_MANICHAEAN_ONE, /* Manichaean_One */ - UC_JOINING_GROUP_MANICHAEAN_FIVE, /* Manichaean_Five */ - UC_JOINING_GROUP_MANICHAEAN_TEN, /* Manichaean_Ten */ - UC_JOINING_GROUP_MANICHAEAN_TWENTY, /* Manichaean_Twenty */ - UC_JOINING_GROUP_MANICHAEAN_HUNDRED, /* Manichaean_Hundred */ - UC_JOINING_GROUP_AFRICAN_FEH, /* African_Feh */ - UC_JOINING_GROUP_AFRICAN_QAF, /* African_Qaf */ - UC_JOINING_GROUP_AFRICAN_NOON /* African_Noon */ + UC_JOINING_GROUP_NONE, /* No_Joining_Group */ + UC_JOINING_GROUP_AIN, /* Ain */ + UC_JOINING_GROUP_ALAPH, /* Alaph */ + UC_JOINING_GROUP_ALEF, /* Alef */ + UC_JOINING_GROUP_BEH, /* Beh */ + UC_JOINING_GROUP_BETH, /* Beth */ + UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, /* Burushaski_Yeh_Barree */ + UC_JOINING_GROUP_DAL, /* Dal */ + UC_JOINING_GROUP_DALATH_RISH, /* Dalath_Rish */ + UC_JOINING_GROUP_E, /* E */ + UC_JOINING_GROUP_FARSI_YEH, /* Farsi_Yeh */ + UC_JOINING_GROUP_FE, /* Fe */ + UC_JOINING_GROUP_FEH, /* Feh */ + UC_JOINING_GROUP_FINAL_SEMKATH, /* Final_Semkath */ + UC_JOINING_GROUP_GAF, /* Gaf */ + UC_JOINING_GROUP_GAMAL, /* Gamal */ + UC_JOINING_GROUP_HAH, /* Hah */ + UC_JOINING_GROUP_HE, /* He */ + UC_JOINING_GROUP_HEH, /* Heh */ + UC_JOINING_GROUP_HEH_GOAL, /* Heh_Goal */ + UC_JOINING_GROUP_HETH, /* Heth */ + UC_JOINING_GROUP_KAF, /* Kaf */ + UC_JOINING_GROUP_KAPH, /* Kaph */ + UC_JOINING_GROUP_KHAPH, /* Khaph */ + UC_JOINING_GROUP_KNOTTED_HEH, /* Knotted_Heh */ + UC_JOINING_GROUP_LAM, /* Lam */ + UC_JOINING_GROUP_LAMADH, /* Lamadh */ + UC_JOINING_GROUP_MEEM, /* Meem */ + UC_JOINING_GROUP_MIM, /* Mim */ + UC_JOINING_GROUP_NOON, /* Noon */ + UC_JOINING_GROUP_NUN, /* Nun */ + UC_JOINING_GROUP_NYA, /* Nya */ + UC_JOINING_GROUP_PE, /* Pe */ + UC_JOINING_GROUP_QAF, /* Qaf */ + UC_JOINING_GROUP_QAPH, /* Qaph */ + UC_JOINING_GROUP_REH, /* Reh */ + UC_JOINING_GROUP_REVERSED_PE, /* Reversed_Pe */ + UC_JOINING_GROUP_SAD, /* Sad */ + UC_JOINING_GROUP_SADHE, /* Sadhe */ + UC_JOINING_GROUP_SEEN, /* Seen */ + UC_JOINING_GROUP_SEMKATH, /* Semkath */ + UC_JOINING_GROUP_SHIN, /* Shin */ + UC_JOINING_GROUP_SWASH_KAF, /* Swash_Kaf */ + UC_JOINING_GROUP_SYRIAC_WAW, /* Syriac_Waw */ + UC_JOINING_GROUP_TAH, /* Tah */ + UC_JOINING_GROUP_TAW, /* Taw */ + UC_JOINING_GROUP_TEH_MARBUTA, /* Teh_Marbuta */ + UC_JOINING_GROUP_TEH_MARBUTA_GOAL, /* Teh_Marbuta_Goal */ + UC_JOINING_GROUP_TETH, /* Teth */ + UC_JOINING_GROUP_WAW, /* Waw */ + UC_JOINING_GROUP_YEH, /* Yeh */ + UC_JOINING_GROUP_YEH_BARREE, /* Yeh_Barree */ + UC_JOINING_GROUP_YEH_WITH_TAIL, /* Yeh_With_Tail */ + UC_JOINING_GROUP_YUDH, /* Yudh */ + UC_JOINING_GROUP_YUDH_HE, /* Yudh_He */ + UC_JOINING_GROUP_ZAIN, /* Zain */ + UC_JOINING_GROUP_ZHAIN, /* Zhain */ + UC_JOINING_GROUP_ROHINGYA_YEH, /* Rohingya_Yeh */ + UC_JOINING_GROUP_STRAIGHT_WAW, /* Straight_Waw */ + UC_JOINING_GROUP_MANICHAEAN_ALEPH, /* Manichaean_Aleph */ + UC_JOINING_GROUP_MANICHAEAN_BETH, /* Manichaean_Beth */ + UC_JOINING_GROUP_MANICHAEAN_GIMEL, /* Manichaean_Gimel */ + UC_JOINING_GROUP_MANICHAEAN_DALETH, /* Manichaean_Daleth */ + UC_JOINING_GROUP_MANICHAEAN_WAW, /* Manichaean_Waw */ + UC_JOINING_GROUP_MANICHAEAN_ZAYIN, /* Manichaean_Zayin */ + UC_JOINING_GROUP_MANICHAEAN_HETH, /* Manichaean_Heth */ + UC_JOINING_GROUP_MANICHAEAN_TETH, /* Manichaean_Teth */ + UC_JOINING_GROUP_MANICHAEAN_YODH, /* Manichaean_Yodh */ + UC_JOINING_GROUP_MANICHAEAN_KAPH, /* Manichaean_Kaph */ + UC_JOINING_GROUP_MANICHAEAN_LAMEDH, /* Manichaean_Lamedh */ + UC_JOINING_GROUP_MANICHAEAN_DHAMEDH, /* Manichaean_Dhamedh */ + UC_JOINING_GROUP_MANICHAEAN_THAMEDH, /* Manichaean_Thamedh */ + UC_JOINING_GROUP_MANICHAEAN_MEM, /* Manichaean_Mem */ + UC_JOINING_GROUP_MANICHAEAN_NUN, /* Manichaean_Nun */ + UC_JOINING_GROUP_MANICHAEAN_SAMEKH, /* Manichaean_Aleph */ + UC_JOINING_GROUP_MANICHAEAN_AYIN, /* Manichaean_Ayin */ + UC_JOINING_GROUP_MANICHAEAN_PE, /* Manichaean_Pe */ + UC_JOINING_GROUP_MANICHAEAN_SADHE, /* Manichaean_Sadhe */ + UC_JOINING_GROUP_MANICHAEAN_QOPH, /* Manichaean_Qoph */ + UC_JOINING_GROUP_MANICHAEAN_RESH, /* Manichaean_Resh */ + UC_JOINING_GROUP_MANICHAEAN_TAW, /* Manichaean_Taw */ + UC_JOINING_GROUP_MANICHAEAN_ONE, /* Manichaean_One */ + UC_JOINING_GROUP_MANICHAEAN_FIVE, /* Manichaean_Five */ + UC_JOINING_GROUP_MANICHAEAN_TEN, /* Manichaean_Ten */ + UC_JOINING_GROUP_MANICHAEAN_TWENTY, /* Manichaean_Twenty */ + UC_JOINING_GROUP_MANICHAEAN_HUNDRED, /* Manichaean_Hundred */ + UC_JOINING_GROUP_AFRICAN_FEH, /* African_Feh */ + UC_JOINING_GROUP_AFRICAN_QAF, /* African_Qaf */ + UC_JOINING_GROUP_AFRICAN_NOON, /* African_Noon */ + UC_JOINING_GROUP_MALAYALAM_NGA, /* Malayalam_Nga */ + UC_JOINING_GROUP_MALAYALAM_JA, /* Malayalam_Ja */ + UC_JOINING_GROUP_MALAYALAM_NYA, /* Malayalam_Nya */ + UC_JOINING_GROUP_MALAYALAM_TTA, /* Malayalam_Tta */ + UC_JOINING_GROUP_MALAYALAM_NNA, /* Malayalam_Nna */ + UC_JOINING_GROUP_MALAYALAM_NNNA, /* Malayalam_Nnna */ + UC_JOINING_GROUP_MALAYALAM_BHA, /* Malayalam_Bha */ + UC_JOINING_GROUP_MALAYALAM_RA, /* Malayalam_Ra */ + UC_JOINING_GROUP_MALAYALAM_LLA, /* Malayalam_Lla */ + UC_JOINING_GROUP_MALAYALAM_LLLA, /* Malayalam_Llla */ + UC_JOINING_GROUP_MALAYALAM_SSA, /* Malayalam_Ssa */ + UC_JOINING_GROUP_HANIFI_ROHINGYA_PA, /* Hanifi_Rohingya_Pa */ + UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA, /* Hanifi_Rohingya_Kinna_Ya */ + UC_JOINING_GROUP_THIN_YEH, /* Thin_Yeh */ + UC_JOINING_GROUP_VERTICAL_TAIL /* Vertical_Tail */ }; /* Return the name of a joining group. */ @@ -588,99 +609,107 @@ uc_property_t; /* Predefined properties. */ /* General. */ -extern const uc_property_t UC_PROPERTY_WHITE_SPACE; -extern const uc_property_t UC_PROPERTY_ALPHABETIC; -extern const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC; -extern const uc_property_t UC_PROPERTY_NOT_A_CHARACTER; -extern const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT; -extern const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; -extern const uc_property_t UC_PROPERTY_DEPRECATED; -extern const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION; -extern const uc_property_t UC_PROPERTY_VARIATION_SELECTOR; -extern const uc_property_t UC_PROPERTY_PRIVATE_USE; -extern const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_WHITE_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ALPHABETIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NOT_A_CHARACTER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DEPRECATED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_VARIATION_SELECTOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PRIVATE_USE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE; /* Case. */ -extern const uc_property_t UC_PROPERTY_UPPERCASE; -extern const uc_property_t UC_PROPERTY_OTHER_UPPERCASE; -extern const uc_property_t UC_PROPERTY_LOWERCASE; -extern const uc_property_t UC_PROPERTY_OTHER_LOWERCASE; -extern const uc_property_t UC_PROPERTY_TITLECASE; -extern const uc_property_t UC_PROPERTY_CASED; -extern const uc_property_t UC_PROPERTY_CASE_IGNORABLE; -extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_LOWERCASED; -extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_UPPERCASED; -extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_TITLECASED; -extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEFOLDED; -extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED; -extern const uc_property_t UC_PROPERTY_SOFT_DOTTED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UPPERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_UPPERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOWERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_LOWERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TITLECASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASE_IGNORABLE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_LOWERCASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_UPPERCASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_TITLECASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEFOLDED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SOFT_DOTTED; /* Identifiers. */ -extern const uc_property_t UC_PROPERTY_ID_START; -extern const uc_property_t UC_PROPERTY_OTHER_ID_START; -extern const uc_property_t UC_PROPERTY_ID_CONTINUE; -extern const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE; -extern const uc_property_t UC_PROPERTY_XID_START; -extern const uc_property_t UC_PROPERTY_XID_CONTINUE; -extern const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE; -extern const uc_property_t UC_PROPERTY_PATTERN_SYNTAX; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_SYNTAX; /* Shaping and rendering. */ -extern const uc_property_t UC_PROPERTY_JOIN_CONTROL; -extern const uc_property_t UC_PROPERTY_GRAPHEME_BASE; -extern const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND; -extern const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND; -extern const uc_property_t UC_PROPERTY_GRAPHEME_LINK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_JOIN_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_BASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_LINK; /* Bidi. */ -extern const uc_property_t UC_PROPERTY_BIDI_CONTROL; -extern const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT; -extern const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT; -extern const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT; -extern const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT; -extern const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR; -extern const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR; -extern const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT; -extern const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR; -extern const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR; -extern const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR; -extern const uc_property_t UC_PROPERTY_BIDI_WHITESPACE; -extern const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK; -extern const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL; -extern const uc_property_t UC_PROPERTY_BIDI_PDF; -extern const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE; -extern const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_WHITESPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_PDF; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL; /* Numeric. */ -extern const uc_property_t UC_PROPERTY_HEX_DIGIT; -extern const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_HEX_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT; /* CJK. */ -extern const uc_property_t UC_PROPERTY_IDEOGRAPHIC; -extern const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH; -extern const uc_property_t UC_PROPERTY_RADICAL; -extern const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR; -extern const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDEOGRAPHIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_RADICAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR; +/* Emoji. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_PRESENTATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_MODIFIER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_MODIFIER_BASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_COMPONENT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EXTENDED_PICTOGRAPHIC; /* Misc. */ -extern const uc_property_t UC_PROPERTY_ZERO_WIDTH; -extern const uc_property_t UC_PROPERTY_SPACE; -extern const uc_property_t UC_PROPERTY_NON_BREAK; -extern const uc_property_t UC_PROPERTY_ISO_CONTROL; -extern const uc_property_t UC_PROPERTY_FORMAT_CONTROL; -extern const uc_property_t UC_PROPERTY_DASH; -extern const uc_property_t UC_PROPERTY_HYPHEN; -extern const uc_property_t UC_PROPERTY_PUNCTUATION; -extern const uc_property_t UC_PROPERTY_LINE_SEPARATOR; -extern const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR; -extern const uc_property_t UC_PROPERTY_QUOTATION_MARK; -extern const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL; -extern const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION; -extern const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL; -extern const uc_property_t UC_PROPERTY_MATH; -extern const uc_property_t UC_PROPERTY_OTHER_MATH; -extern const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION; -extern const uc_property_t UC_PROPERTY_LEFT_OF_PAIR; -extern const uc_property_t UC_PROPERTY_COMBINING; -extern const uc_property_t UC_PROPERTY_COMPOSITE; -extern const uc_property_t UC_PROPERTY_DECIMAL_DIGIT; -extern const uc_property_t UC_PROPERTY_NUMERIC; -extern const uc_property_t UC_PROPERTY_DIACRITIC; -extern const uc_property_t UC_PROPERTY_EXTENDER; -extern const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ZERO_WIDTH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NON_BREAK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ISO_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_FORMAT_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DASH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_HYPHEN; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LINE_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_QUOTATION_MARK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_MATH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_MATH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LEFT_OF_PAIR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_COMBINING; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_COMPOSITE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DECIMAL_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NUMERIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DIACRITIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EXTENDER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_REGIONAL_INDICATOR; /* Return the property given by name, e.g. "White space". */ extern uc_property_t @@ -814,6 +843,18 @@ extern bool uc_is_property_ids_binary_operator (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_ids_trinary_operator (ucs4_t uc) _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_presentation (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_modifier (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_modifier_base (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_component (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_extended_pictographic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; extern bool uc_is_property_zero_width (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_space (ucs4_t uc) @@ -864,6 +905,8 @@ extern bool uc_is_property_extender (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_ignorable_control (ucs4_t uc) _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_regional_indicator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; /* ========================================================================= */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unilbrk.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unilbrk.h index 50f63afb2..cf4702ab5 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unilbrk.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unilbrk.h @@ -1,20 +1,28 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Line breaking of Unicode strings. - Copyright (C) 2001-2003, 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2023 Free Software Foundation, Inc. Written by Bruno Haible , 2001. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, + This file is free software. + It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". + You can redistribute it and/or modify it under either + - the terms of the GNU Lesser General Public License as published + by the Free Software Foundation, either version 3, or (at your + option) any later version, or + - the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) + any later version, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License and the GNU General Public License + for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + You should have received a copy of the GNU Lesser General Public + License and of the GNU General Public License along with this + program. If not, see . */ #ifndef _UNILBRK_H #define _UNILBRK_H @@ -45,11 +53,14 @@ enum UC_BREAK_PROHIBITED, UC_BREAK_POSSIBLE, UC_BREAK_MANDATORY, - UC_BREAK_HYPHENATION + UC_BREAK_HYPHENATION, + UC_BREAK_CR_BEFORE_LF /* only used in _v2 or later */ }; /* Determine the line break points in S, and store the result at p[0..n-1]. p[i] = UC_BREAK_MANDATORY means that s[i] is a line break character. + p[i] = UC_BREAK_CR_BEFORE_LF means that s[i] and s[i+1] is the CR-LF + character sequence. (Only used in _v2 or later.) p[i] = UC_BREAK_POSSIBLE means that a line break may be inserted between s[i-1] and s[i]. p[i] = UC_BREAK_HYPHENATION means that a hyphen and a line break may be @@ -60,15 +71,34 @@ enum extern void u8_possible_linebreaks (const uint8_t *s, size_t n, const char *encoding, char *_UC_RESTRICT p); +extern void + u8_possible_linebreaks_v2 (const uint8_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define u8_possible_linebreaks u8_possible_linebreaks_v2 + extern void u16_possible_linebreaks (const uint16_t *s, size_t n, const char *encoding, char *_UC_RESTRICT p); +extern void + u16_possible_linebreaks_v2 (const uint16_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define u16_possible_linebreaks u16_possible_linebreaks_v2 + extern void u32_possible_linebreaks (const uint32_t *s, size_t n, const char *encoding, char *_UC_RESTRICT p); +extern void + u32_possible_linebreaks_v2 (const uint32_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define u32_possible_linebreaks u32_possible_linebreaks_v2 + extern void ulc_possible_linebreaks (const char *s, size_t n, const char *encoding, char *_UC_RESTRICT p); +extern void + ulc_possible_linebreaks_v2 (const char *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define ulc_possible_linebreaks ulc_possible_linebreaks_v2 /* Choose the best line breaks, assuming the uc_width function. The string is s[0..n-1]. The maximum number of columns per line is given @@ -86,21 +116,48 @@ extern int int start_column, int at_end_columns, const char *o, const char *encoding, char *_UC_RESTRICT p); +extern int + u8_width_linebreaks_v2 (const uint8_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define u8_width_linebreaks u8_width_linebreaks_v2 + extern int u16_width_linebreaks (const uint16_t *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *_UC_RESTRICT p); +extern int + u16_width_linebreaks_v2 (const uint16_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define u16_width_linebreaks u16_width_linebreaks_v2 + extern int u32_width_linebreaks (const uint32_t *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *_UC_RESTRICT p); +extern int + u32_width_linebreaks_v2 (const uint32_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define u32_width_linebreaks u32_width_linebreaks_v2 + extern int ulc_width_linebreaks (const char *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *_UC_RESTRICT p); +extern int + ulc_width_linebreaks_v2 (const char *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define ulc_width_linebreaks ulc_width_linebreaks_v2 #ifdef __cplusplus diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniname.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniname.h index b33d12545..020f40539 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniname.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniname.h @@ -1,20 +1,28 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Association between Unicode characters and their names. - Copyright (C) 2000-2002, 2005, 2007, 2009-2020 Free Software Foundation, + Copyright (C) 2000-2002, 2005, 2007, 2009-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, + This file is free software. + It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". + You can redistribute it and/or modify it under either + - the terms of the GNU Lesser General Public License as published + by the Free Software Foundation, either version 3, or (at your + option) any later version, or + - the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) + any later version, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License and the GNU General Public License + for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + You should have received a copy of the GNU Lesser General Public + License and of the GNU General Public License along with this + program. If not, see . */ #ifndef _UNINAME_H #define _UNINAME_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uninorm.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uninorm.h new file mode 100644 index 000000000..cf8ab31b4 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uninorm.h @@ -0,0 +1,256 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Normalization forms (composition and decomposition) of Unicode strings. + Copyright (C) 2001-2002, 2009-2023 Free Software Foundation, Inc. + Written by Bruno Haible , 2009. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _UNINORM_H +#define _UNINORM_H + +/* Get size_t. */ +#include + +#include "unitypes.h" + +#if 0 +# include +#else +# define LIBUNISTRING_DLL_VARIABLE +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Conventions: + + All functions prefixed with u8_ operate on UTF-8 encoded strings. + Their unit is an uint8_t (1 byte). + + All functions prefixed with u16_ operate on UTF-16 encoded strings. + Their unit is an uint16_t (a 2-byte word). + + All functions prefixed with u32_ operate on UCS-4 encoded strings. + Their unit is an uint32_t (a 4-byte word). + + All argument pairs (s, n) denote a Unicode string s[0..n-1] with exactly + n units. + + Functions returning a string result take a (resultbuf, lengthp) argument + pair. If resultbuf is not NULL and the result fits into *lengthp units, + it is put in resultbuf, and resultbuf is returned. Otherwise, a freshly + allocated string is returned. In both cases, *lengthp is set to the + length (number of units) of the returned string. In case of error, + NULL is returned and errno is set. */ + + +enum +{ + UC_DECOMP_CANONICAL,/* Canonical decomposition. */ + UC_DECOMP_FONT, /* A font variant (e.g. a blackletter form). */ + UC_DECOMP_NOBREAK, /* A no-break version of a space or hyphen. */ + UC_DECOMP_INITIAL, /* An initial presentation form (Arabic). */ + UC_DECOMP_MEDIAL, /* A medial presentation form (Arabic). */ + UC_DECOMP_FINAL, /* A final presentation form (Arabic). */ + UC_DECOMP_ISOLATED,/* An isolated presentation form (Arabic). */ + UC_DECOMP_CIRCLE, /* An encircled form. */ + UC_DECOMP_SUPER, /* A superscript form. */ + UC_DECOMP_SUB, /* A subscript form. */ + UC_DECOMP_VERTICAL,/* A vertical layout presentation form. */ + UC_DECOMP_WIDE, /* A wide (or zenkaku) compatibility character. */ + UC_DECOMP_NARROW, /* A narrow (or hankaku) compatibility character. */ + UC_DECOMP_SMALL, /* A small variant form (CNS compatibility). */ + UC_DECOMP_SQUARE, /* A CJK squared font variant. */ + UC_DECOMP_FRACTION,/* A vulgar fraction form. */ + UC_DECOMP_COMPAT /* Otherwise unspecified compatibility character. */ +}; + +/* Maximum size of decomposition of a single Unicode character. */ +#define UC_DECOMPOSITION_MAX_LENGTH 32 + +/* Return the character decomposition mapping of a Unicode character. + DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH + ucs_t elements. + When a decomposition exists, DECOMPOSITION[0..N-1] and *DECOMP_TAG are + filled and N is returned. Otherwise -1 is returned. */ +extern int + uc_decomposition (ucs4_t uc, int *decomp_tag, ucs4_t *decomposition); + +/* Return the canonical character decomposition mapping of a Unicode character. + DECOMPOSITION must point to an array of at least UC_DECOMPOSITION_MAX_LENGTH + ucs_t elements. + When a decomposition exists, DECOMPOSITION[0..N-1] is filled and N is + returned. Otherwise -1 is returned. */ +extern int + uc_canonical_decomposition (ucs4_t uc, ucs4_t *decomposition); + + +/* Attempt to combine the Unicode characters uc1, uc2. + uc1 is known to have canonical combining class 0. + Return the combination of uc1 and uc2, if it exists. + Return 0 otherwise. + Not all decompositions can be recombined using this function. See the + Unicode file CompositionExclusions.txt for details. */ +extern ucs4_t + uc_composition (ucs4_t uc1, ucs4_t uc2) + _UC_ATTRIBUTE_CONST; + + +/* An object of type uninorm_t denotes a Unicode normalization form. */ +struct unicode_normalization_form; +typedef const struct unicode_normalization_form *uninorm_t; + +/* UNINORM_NFD: Normalization form D: canonical decomposition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfd; +#define UNINORM_NFD (&uninorm_nfd) + +/* UNINORM_NFC: Normalization form C: canonical decomposition, then + canonical composition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfc; +#define UNINORM_NFC (&uninorm_nfc) + +/* UNINORM_NFKD: Normalization form KD: compatibility decomposition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfkd; +#define UNINORM_NFKD (&uninorm_nfkd) + +/* UNINORM_NFKC: Normalization form KC: compatibility decomposition, then + canonical composition. */ +extern LIBUNISTRING_DLL_VARIABLE const struct unicode_normalization_form uninorm_nfkc; +#define UNINORM_NFKC (&uninorm_nfkc) + +/* Test whether a normalization form does compatibility decomposition. */ +#define uninorm_is_compat_decomposing(nf) \ + ((* (const unsigned int *) (nf) >> 0) & 1) + +/* Test whether a normalization form includes canonical composition. */ +#define uninorm_is_composing(nf) \ + ((* (const unsigned int *) (nf) >> 1) & 1) + +/* Return the decomposing variant of a normalization form. + This maps NFC,NFD -> NFD and NFKC,NFKD -> NFKD. */ +extern uninorm_t + uninorm_decomposing_form (uninorm_t nf) + _UC_ATTRIBUTE_PURE; + + +/* Return the specified normalization form of a string. */ +extern uint8_t * + u8_normalize (uninorm_t nf, const uint8_t *s, size_t n, + uint8_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint16_t * + u16_normalize (uninorm_t nf, const uint16_t *s, size_t n, + uint16_t *_UC_RESTRICT resultbuf, size_t *lengthp); +extern uint32_t * + u32_normalize (uninorm_t nf, const uint32_t *s, size_t n, + uint32_t *_UC_RESTRICT resultbuf, size_t *lengthp); + + +/* Compare S1 and S2, ignoring differences in normalization. + NF must be either UNINORM_NFD or UNINORM_NFKD. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_normcmp (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u16_normcmp (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u32_normcmp (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, + uninorm_t nf, int *resultp); + + +/* Converts the string S of length N to a NUL-terminated byte sequence, in such + a way that comparing uN_normxfrm (S1) and uN_normxfrm (S2) with uN_cmp2() is + equivalent to comparing S1 and S2 with uN_normcoll(). + NF must be either UNINORM_NFC or UNINORM_NFKC. */ +extern char * + u8_normxfrm (const uint8_t *s, size_t n, uninorm_t nf, + char *resultbuf, size_t *lengthp); +extern char * + u16_normxfrm (const uint16_t *s, size_t n, uninorm_t nf, + char *resultbuf, size_t *lengthp); +extern char * + u32_normxfrm (const uint32_t *s, size_t n, uninorm_t nf, + char *resultbuf, size_t *lengthp); + + +/* Compare S1 and S2, ignoring differences in normalization, using the + collation rules of the current locale. + NF must be either UNINORM_NFC or UNINORM_NFKC. + If successful, set *RESULTP to -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2, and + return 0. Upon failure, return -1 with errno set. */ +extern int + u8_normcoll (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u16_normcoll (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2, + uninorm_t nf, int *resultp); +extern int + u32_normcoll (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2, + uninorm_t nf, int *resultp); + + +/* Normalization of a stream of Unicode characters. + + A "stream of Unicode characters" is essentially a function that accepts an + ucs4_t argument repeatedly, optionally combined with a function that + "flushes" the stream. */ + +/* Data type of a stream of Unicode characters that normalizes its input + according to a given normalization form and passes the normalized character + sequence to the encapsulated stream of Unicode characters. */ +struct uninorm_filter; + +/* Bring data buffered in the filter to its destination, the encapsulated + stream, then close and free the filter. + Return 0 if successful, or -1 with errno set upon failure. */ +extern int + uninorm_filter_free (struct uninorm_filter *filter); + +/* Create and return a normalization filter for Unicode characters. + The pair (stream_func, stream_data) is the encapsulated stream. + stream_func (stream_data, uc) receives the Unicode character uc + and returns 0 if successful, or -1 with errno set upon failure. + Return the new filter, or NULL with errno set upon failure. */ +extern struct uninorm_filter * + uninorm_filter_create (uninorm_t nf, + int (*stream_func) (void *stream_data, ucs4_t uc), + void *stream_data) + _GL_ATTRIBUTE_DEALLOC (uninorm_filter_free, 1); + +/* Stuff a Unicode character into a normalizing filter. + Return 0 if successful, or -1 with errno set upon failure. */ +extern int + uninorm_filter_write (struct uninorm_filter *filter, ucs4_t uc); + +/* Bring data buffered in the filter to its destination, the encapsulated + stream. + Return 0 if successful, or -1 with errno set upon failure. + Note! If after calling this function, additional characters are written + into the filter, the resulting character sequence in the encapsulated stream + will not necessarily be normalized. */ +extern int + uninorm_filter_flush (struct uninorm_filter *filter); + + +#ifdef __cplusplus +} +#endif + + +#endif /* _UNINORM_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unistd.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unistd.h index 4e8c6425c..3851228a5 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unistd.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unistd.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for and wrapper around . - Copyright (C) 2003-2020 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_UNISTD_H @@ -41,6 +41,24 @@ # undef _GL_INCLUDING_UNISTD_H #endif +/* Avoid lseek bugs in FreeBSD, macOS . + This bug is fixed after FreeBSD 13; see . + Use macOS "9999" to stand for a future fixed macOS version. */ +#if defined __FreeBSD__ && __FreeBSD__ < 14 +# undef SEEK_DATA +# undef SEEK_HOLE +#elif defined __APPLE__ && defined __MACH__ && defined SEEK_DATA +# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ +# include +# endif +# if (!defined MAC_OS_X_VERSION_MIN_REQUIRED \ + || MAC_OS_X_VERSION_MIN_REQUIRED < 99990000) +# include /* It also defines the two macros. */ +# undef SEEK_DATA +# undef SEEK_HOLE +# endif +#endif + /* Get all possible declarations of gethostname(). */ #if 0 && 1 \ && !defined _GL_INCLUDING_WINSOCK2_H @@ -52,6 +70,12 @@ #if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H #define _GL_UNISTD_H +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ /* But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ @@ -94,20 +118,18 @@ # undef __need_system_stdlib_h #endif -/* Native Windows platforms declare chdir, getcwd, rmdir in +/* Native Windows platforms declare _chdir, _getcwd, _rmdir in and/or , not in . - They also declare access(), chmod(), close(), dup(), dup2(), isatty(), - lseek(), read(), unlink(), write() in . */ -#if ((0 || IN_GETTEXT_TOOLS_GNULIB_TESTS || 1 \ - || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__)) -# include /* mingw32, mingw64 */ -# include /* mingw64, MSVC 9 */ -#elif (1 || IN_GETTEXT_TOOLS_GNULIB_TESTS || 1 || 0 \ - || 1 || 1 || 1 || 1 \ - || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) + They also declare _access(), _chmod(), _close(), _dup(), _dup2(), _isatty(), + _lseek(), _read(), _unlink(), _write() in . */ +#if defined _WIN32 && !defined __CYGWIN__ # include +# include +#endif + +/* Native Windows platforms declare _execl*, _execv* in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include #endif /* AIX and OSF/1 5.1 declare getdomainname in , not in . @@ -139,27 +161,24 @@ /* MSVC defines off_t in . May also define off_t to a 64-bit type on native Windows. */ -/* But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -/* Get off_t, ssize_t. */ -# include -#endif +/* Get off_t, ssize_t, mode_t. */ +#include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -247,6 +266,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -294,6 +319,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -319,6 +354,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -416,7 +459,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -444,9 +487,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -462,26 +505,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -490,19 +533,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -575,13 +618,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -590,27 +640,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -637,9 +693,6 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # include #endif -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_UNISTD_INLINE # define _GL_UNISTD_INLINE _GL_INLINE @@ -753,6 +806,12 @@ _GL_INLINE_HEADER_BEGIN _GL_FUNCDECL_RPL (access, int, (const char *file, int mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); # else _GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); # endif @@ -766,11 +825,33 @@ _GL_WARN_ON_USE (access, "access does not always support X_OK - " "also, this function is a security risk - " "use the gnulib module faccessat instead"); # endif +#elif 1 +/* On native Windows, map 'access' to '_access', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::access always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); #endif -#if 0 +#if 1 +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIASWARN (chdir); #elif defined GNULIB_POSIXCHECK # undef chdir @@ -778,6 +859,20 @@ _GL_CXXALIASWARN (chdir); _GL_WARN_ON_USE (chown, "chdir is not always in - " "use gnulib module chdir for portability"); # endif +#elif 1 +/* On native Windows, map 'chdir' to '_chdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIASWARN (chdir); #endif @@ -822,6 +917,12 @@ _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " # endif _GL_FUNCDECL_RPL (close, int, (int fd)); _GL_CXXALIAS_RPL (close, int, (int fd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close _close +# endif +_GL_CXXALIAS_MDA (close, int, (int fd)); # else _GL_CXXALIAS_SYS (close, int, (int fd)); # endif @@ -834,34 +935,69 @@ _GL_CXXALIASWARN (close); /* Assume close is always declared. */ _GL_WARN_ON_USE (close, "close does not portably work on sockets - " "use gnulib module close for portability"); +#elif 1 +/* On native Windows, map 'close' to '_close', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::close always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close _close +# endif +_GL_CXXALIAS_MDA (close, int, (int fd)); +# else +_GL_CXXALIAS_SYS (close, int, (int fd)); +# endif +_GL_CXXALIASWARN (close); #endif #if 1 -# if !0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef copy_file_range +# define copy_file_range rpl_copy_file_range +# endif +_GL_FUNCDECL_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +_GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +# else +# if !0 _GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); +# endif _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); # endif _GL_CXXALIASWARN (copy_file_range); #elif defined GNULIB_POSIXCHECK -/* Assume copy_file_range is always declared. */ +# undef copy_file_range +# if HAVE_RAW_DECL_COPY_FILE_RANGE _GL_WARN_ON_USE (copy_file_range, "copy_file_range is unportable - " "use gnulib module copy_file_range for portability"); +# endif #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 1 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup rpl_dup # endif _GL_FUNCDECL_RPL (dup, int, (int oldfd)); _GL_CXXALIAS_RPL (dup, int, (int oldfd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup +# define dup _dup +# endif +_GL_CXXALIAS_MDA (dup, int, (int oldfd)); # else _GL_CXXALIAS_SYS (dup, int, (int oldfd)); # endif @@ -872,6 +1008,20 @@ _GL_CXXALIASWARN (dup); _GL_WARN_ON_USE (dup, "dup is unportable - " "use gnulib module dup for portability"); # endif +#elif 1 +/* On native Windows, map 'dup' to '_dup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup +# define dup _dup +# endif +_GL_CXXALIAS_MDA (dup, int, (int oldfd)); +# else +_GL_CXXALIAS_SYS (dup, int, (int oldfd)); +# endif +_GL_CXXALIASWARN (dup); #endif @@ -887,6 +1037,12 @@ _GL_WARN_ON_USE (dup, "dup is unportable - " # endif _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); # else _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); # endif @@ -897,6 +1053,20 @@ _GL_CXXALIASWARN (dup2); _GL_WARN_ON_USE (dup2, "dup2 is unportable - " "use gnulib module dup2 for portability"); # endif +#elif 1 +/* On native Windows, map 'dup2' to '_dup2', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup2 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); +# else +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); #endif @@ -909,17 +1079,22 @@ _GL_WARN_ON_USE (dup2, "dup2 is unportable - " Return newfd if successful, otherwise -1 and errno set. See the Linux man page at . */ -# if 1 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup3 # define dup3 rpl_dup3 # endif _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); # else +# if !1 _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (dup3); +# endif #elif defined GNULIB_POSIXCHECK # undef dup3 # if HAVE_RAW_DECL_DUP3 @@ -997,6 +1172,284 @@ _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " #endif +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl rpl_execl +# endif +_GL_FUNCDECL_RPL (execl, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execl, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#elif defined GNULIB_POSIXCHECK +# undef execl +# if HAVE_RAW_DECL_EXECL +_GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - " + "use gnulib module execl for portability"); +# endif +#elif 1 +/* On native Windows, map 'execl' to '_execl', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execl always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl _execl +# endif +_GL_CXXALIAS_MDA (execl, intptr_t, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle rpl_execle +# endif +_GL_FUNCDECL_RPL (execle, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execle, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#elif defined GNULIB_POSIXCHECK +# undef execle +# if HAVE_RAW_DECL_EXECLE +_GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - " + "use gnulib module execle for portability"); +# endif +#elif 1 +/* On native Windows, map 'execle' to '_execle', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execle always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle _execle +# endif +_GL_CXXALIAS_MDA (execle, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp rpl_execlp +# endif +_GL_FUNCDECL_RPL (execlp, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execlp, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#elif defined GNULIB_POSIXCHECK +# undef execlp +# if HAVE_RAW_DECL_EXECLP +_GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - " + "use gnulib module execlp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execlp' to '_execlp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execlp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp _execlp +# endif +_GL_CXXALIAS_MDA (execlp, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv rpl_execv +# endif +_GL_FUNCDECL_RPL (execv, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execv, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#elif defined GNULIB_POSIXCHECK +# undef execv +# if HAVE_RAW_DECL_EXECV +_GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - " + "use gnulib module execv for portability"); +# endif +#elif 1 +/* On native Windows, map 'execv' to '_execv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv _execv +# endif +_GL_CXXALIAS_MDA_CAST (execv, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve rpl_execve +# endif +_GL_FUNCDECL_RPL (execve, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execve, int, + (const char *program, char * const *argv, char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#elif defined GNULIB_POSIXCHECK +# undef execve +# if HAVE_RAW_DECL_EXECVE +_GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - " + "use gnulib module execve for portability"); +# endif +#elif 1 +/* On native Windows, map 'execve' to '_execve', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execve always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve _execve +# endif +_GL_CXXALIAS_MDA_CAST (execve, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp rpl_execvp +# endif +_GL_FUNCDECL_RPL (execvp, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvp, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#elif defined GNULIB_POSIXCHECK +# undef execvp +# if HAVE_RAW_DECL_EXECVP +_GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - " + "use gnulib module execvp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvp' to '_execvp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp _execvp +# endif +_GL_CXXALIAS_MDA_CAST (execvp, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe rpl_execvpe +# endif +_GL_FUNCDECL_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# else +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (execvpe); +# endif +#elif defined GNULIB_POSIXCHECK +# undef execvpe +# if HAVE_RAW_DECL_EXECVPE +_GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - " + "use gnulib module execvpe for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvpe' to '_execvpe', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvpe on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe _execvpe +# endif +_GL_CXXALIAS_MDA_CAST (execvpe, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# elif 1 +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (execvpe); +# endif +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1017,7 +1470,9 @@ _GL_FUNCDECL_SYS (faccessat, int, _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (faccessat); +# endif #elif defined GNULIB_POSIXCHECK # undef faccessat # if HAVE_RAW_DECL_FACCESSAT @@ -1027,29 +1482,34 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " #endif -#if 0 +#if 1 /* Change the process' current working directory to the directory on which the given file descriptor is open. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification . */ -# if ! 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchdir +# define fchdir rpl_fchdir +# endif +_GL_FUNCDECL_RPL (fchdir, int, (int /*fd*/)); +_GL_CXXALIAS_RPL (fchdir, int, (int /*fd*/)); +# else +# if !0 || !0 _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); - +# endif +_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); +# endif +_GL_CXXALIASWARN (fchdir); +# if 0 || !0 /* Gnulib internal hooks needed to maintain the fchdir metadata. */ _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) _GL_ARG_NONNULL ((2)); _GL_EXTERN_C void _gl_unregister_fd (int fd); _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); _GL_EXTERN_C const char *_gl_directory_name (int fd); - -# else -# if !1 -_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); -# endif # endif -_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); -_GL_CXXALIASWARN (fchdir); #elif defined GNULIB_POSIXCHECK # undef fchdir # if HAVE_RAW_DECL_FCHDIR @@ -1084,7 +1544,7 @@ _GL_CXXALIASWARN (fchownat); # undef fchownat # if HAVE_RAW_DECL_FCHOWNAT _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " - "use gnulib module openat for portability"); + "use gnulib module fchownat for portability"); # endif #endif @@ -1094,11 +1554,22 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification . */ -# if !1 || !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdatasync +# define fdatasync rpl_fdatasync +# endif +_GL_FUNCDECL_RPL (fdatasync, int, (int fd)); +_GL_CXXALIAS_RPL (fdatasync, int, (int fd)); +# else +# if !1|| !1 _GL_FUNCDECL_SYS (fdatasync, int, (int fd)); -# endif +# endif _GL_CXXALIAS_SYS (fdatasync, int, (int fd)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fdatasync); +# endif #elif defined GNULIB_POSIXCHECK # undef fdatasync # if HAVE_RAW_DECL_FDATASYNC @@ -1108,7 +1579,7 @@ _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " #endif -#if 1 +#if 0 /* Synchronize changes, including metadata, to a file. Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification @@ -1145,7 +1616,9 @@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); # endif _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ftruncate); +# endif #elif defined GNULIB_POSIXCHECK # undef ftruncate # if HAVE_RAW_DECL_FTRUNCATE @@ -1155,23 +1628,29 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 1 /* Get the name of the current working directory, and put it in SIZE bytes of BUF. Return BUF if successful, or NULL if the directory couldn't be determined or SIZE was too small. See the POSIX:2008 specification . - Additionally, the gnulib module 'getcwd' guarantees the following GNU - extension: If BUF is NULL, an array is allocated with 'malloc'; the array - is SIZE bytes long, unless SIZE == 0, in which case it is as big as - necessary. */ + Additionally, the gnulib module 'getcwd' or 'getcwd-lgpl' guarantees the + following GNU extension: If BUF is NULL, an array is allocated with + 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case + it is as big as necessary. */ # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getcwd rpl_getcwd # endif _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +_GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size)); # else /* Need to cast, because on mingw, the second parameter is int size. */ @@ -1184,6 +1663,22 @@ _GL_CXXALIASWARN (getcwd); _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " "use gnulib module getcwd for portability"); # endif +#elif 1 +/* On native Windows, map 'getcwd' to '_getcwd', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getcwd always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +/* Need to cast, because on mingw, the second parameter is either + 'int size' or 'size_t size'. */ +_GL_CXXALIAS_MDA_CAST (getcwd, char *, (char *buf, size_t size)); +# else +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); #endif @@ -1213,7 +1708,9 @@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) # endif _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getdomainname); +# endif #elif defined GNULIB_POSIXCHECK # undef getdomainname # if HAVE_RAW_DECL_GETDOMAINNAME @@ -1253,11 +1750,22 @@ _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " #if 0 /* Fill a buffer with random bytes. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getentropy +# define getentropy rpl_getentropy +# endif +_GL_FUNCDECL_RPL (getentropy, int, (void *buffer, size_t length)); +_GL_CXXALIAS_RPL (getentropy, int, (void *buffer, size_t length)); +# else +# if !1 _GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length)); -# endif +# endif _GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getentropy); +# endif #elif defined GNULIB_POSIXCHECK # undef getentropy # if HAVE_RAW_DECL_GETENTROPY @@ -1391,7 +1899,9 @@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) int size. */ _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getlogin_r); +# endif #elif defined GNULIB_POSIXCHECK # undef getlogin_r # if HAVE_RAW_DECL_GETLOGIN_R @@ -1493,7 +2003,8 @@ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " Read a password from /dev/tty or stdin. Function getpass() from module 'getpass-gnu': Read a password of arbitrary length from /dev/tty or stdin. */ -# if 0 +# if (0 && 0) \ + || (0 && 0) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getpass # define getpass rpl_getpass @@ -1518,6 +2029,23 @@ _GL_WARN_ON_USE (getpass, "getpass is unportable - " #endif +#if 1 +/* On native Windows, map 'getpid' to '_getpid', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getpid always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpid +# define getpid _getpid +# endif +_GL_CXXALIAS_MDA (getpid, int, (void)); +# else +_GL_CXXALIAS_SYS (getpid, pid_t, (void)); +# endif +_GL_CXXALIASWARN (getpid); +#endif + + #if 0 /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ @@ -1588,8 +2116,15 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - " # undef isatty # define isatty rpl_isatty # endif +# define GNULIB_defined_isatty 1 _GL_FUNCDECL_RPL (isatty, int, (int fd)); _GL_CXXALIAS_RPL (isatty, int, (int fd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); # else _GL_CXXALIAS_SYS (isatty, int, (int fd)); # endif @@ -1600,6 +2135,20 @@ _GL_CXXALIASWARN (isatty); _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " "use gnulib module isatty for portability"); # endif +#elif 1 +/* On native Windows, map 'isatty' to '_isatty', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::isatty always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); #endif @@ -1690,7 +2239,9 @@ _GL_CXXALIAS_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (linkat); +# endif #elif defined GNULIB_POSIXCHECK # undef linkat # if HAVE_RAW_DECL_LINKAT @@ -1711,6 +2262,12 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - " # endif _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence)); # else _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); # endif @@ -1721,10 +2278,24 @@ _GL_CXXALIASWARN (lseek); _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " "systems - use gnulib module lseek for portability"); # endif +#elif 1 +/* On native Windows, map 'lseek' to '_lseek', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::lseek always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, long, (int fd, long offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 1 /* Create a pipe, defaulting to O_BINARY mode. Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. */ @@ -1753,6 +2324,7 @@ _GL_WARN_ON_USE (pipe, "pipe is unportable - " . */ # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pipe2 # define pipe2 rpl_pipe2 # endif _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); @@ -1761,7 +2333,9 @@ _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pipe2); +# endif #elif defined GNULIB_POSIXCHECK # undef pipe2 # if HAVE_RAW_DECL_PIPE2 @@ -1796,7 +2370,9 @@ _GL_FUNCDECL_SYS (pread, ssize_t, _GL_CXXALIAS_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pread); +# endif #elif defined GNULIB_POSIXCHECK # undef pread # if HAVE_RAW_DECL_PREAD @@ -1831,7 +2407,9 @@ _GL_FUNCDECL_SYS (pwrite, ssize_t, _GL_CXXALIAS_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pwrite); +# endif #elif defined GNULIB_POSIXCHECK # undef pwrite # if HAVE_RAW_DECL_PWRITE @@ -1853,11 +2431,32 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count)); # else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (read); +#elif 1 +/* On native Windows, map 'read' to '_read', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::read always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count)); +# endif +# else +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); # endif _GL_CXXALIASWARN (read); #endif @@ -1924,7 +2523,9 @@ _GL_CXXALIAS_SYS (readlinkat, ssize_t, (int fd, char const *restrict file, char *restrict buf, size_t len)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (readlinkat); +# endif #elif defined GNULIB_POSIXCHECK # undef readlinkat # if HAVE_RAW_DECL_READLINKAT @@ -1942,6 +2543,12 @@ _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " # endif _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (rmdir, int, (char const *name)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); # else _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); # endif @@ -1952,6 +2559,20 @@ _GL_CXXALIASWARN (rmdir); _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " "use gnulib module rmdir for portability"); # endif +#elif 1 +/* On native Windows, map 'rmdir' to '_rmdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::rmdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); #endif @@ -1964,15 +2585,27 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " Platforms with no ability to set the hostname return -1 and set errno = ENOSYS. */ -# if !1 || !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sethostname +# define sethostname rpl_sethostname +# endif +_GL_FUNCDECL_RPL (sethostname, int, (const char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (sethostname, int, (const char *name, size_t len)); +# else +# if !1 || !1 _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) _GL_ARG_NONNULL ((1))); -# endif +# endif /* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 and FreeBSD 6.4 the second parameter is int. On Solaris 11 2011-10, the first parameter is not const. */ _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sethostname); +# endif #elif defined GNULIB_POSIXCHECK # undef sethostname # if HAVE_RAW_DECL_SETHOSTNAME @@ -2010,6 +2643,31 @@ _GL_WARN_ON_USE (sleep, "sleep is unportable - " #endif +#if 1 +/* On native Windows, map 'swab' to '_swab', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::swab always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef swab +# define swab _swab +# endif +/* Need to cast, because in old mingw the arguments are + (const char *from, char *to, size_t n). */ +_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n)); +# else +# if defined __hpux /* HP-UX */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n)); +# elif defined __sun && (defined __SunOS_5_10 || defined __XOPEN_OR_POSIX) && !defined _XPG4 /* Solaris */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n)); +# else +_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n)); +# endif +# endif +_GL_CXXALIASWARN (swab); +#endif + + #if IN_GETTEXT_TOOLS_GNULIB_TESTS # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -2056,7 +2714,9 @@ _GL_FUNCDECL_SYS (symlinkat, int, _GL_CXXALIAS_SYS (symlinkat, int, (char const *contents, int fd, char const *file)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (symlinkat); +# endif #elif defined GNULIB_POSIXCHECK # undef symlinkat # if HAVE_RAW_DECL_SYMLINKAT @@ -2086,7 +2746,9 @@ _GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) # endif _GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (truncate); +# endif #elif defined GNULIB_POSIXCHECK # undef truncate # if HAVE_RAW_DECL_TRUNCATE @@ -2116,7 +2778,9 @@ _GL_FUNCDECL_SYS (ttyname_r, int, _GL_CXXALIAS_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ttyname_r); +# endif #elif defined GNULIB_POSIXCHECK # undef ttyname_r # if HAVE_RAW_DECL_TTYNAME_R @@ -2134,6 +2798,12 @@ _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " # endif _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unlink, int, (char const *file)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); # else _GL_CXXALIAS_SYS (unlink, int, (char const *file)); # endif @@ -2144,6 +2814,20 @@ _GL_CXXALIASWARN (unlink); _GL_WARN_ON_USE (unlink, "unlink is not portable - " "use gnulib module unlink for portability"); # endif +#elif 1 +/* On native Windows, map 'unlink' to '_unlink', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::unlink always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); #endif @@ -2168,7 +2852,7 @@ _GL_CXXALIASWARN (unlinkat); # undef unlinkat # if HAVE_RAW_DECL_UNLINKAT _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " - "use gnulib module openat for portability"); + "use gnulib module unlinkat for portability"); # endif #endif @@ -2215,11 +2899,32 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - " _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#elif 1 +/* On native Windows, map 'write' to '_write', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::write always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count)); +# endif # else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); # endif _GL_CXXALIASWARN (write); #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unistr.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unistr.h index 7b4d3f108..1ca6c20d5 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unistr.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unistr.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Elementary Unicode string functions. - Copyright (C) 2001-2002, 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2005-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNISTR_H @@ -20,15 +20,15 @@ #include "unitypes.h" -/* Get common macros for C. */ -#include "unused-parameter.h" - /* Get bool. */ #include -/* Get size_t. */ +/* Get size_t, ptrdiff_t. */ #include +/* Get free(). */ +#include + #ifdef __cplusplus extern "C" { #endif @@ -194,7 +194,7 @@ extern int # else static inline int u32_mbtouc_unsafe (ucs4_t *puc, - const uint32_t *s, size_t n _GL_UNUSED_PARAMETER) + const uint32_t *s, _GL_ATTRIBUTE_MAYBE_UNUSED size_t n) { uint32_t c = *s; @@ -260,7 +260,8 @@ extern int u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n); # else static inline int -u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER) +u32_mbtouc (ucs4_t *puc, const uint32_t *s, + _GL_ATTRIBUTE_MAYBE_UNUSED size_t n) { uint32_t c = *s; @@ -306,13 +307,13 @@ extern int #if GNULIB_UNISTR_U8_UCTOMB || HAVE_LIBUNISTRING /* Auxiliary function, also used by u8_chr, u8_strchr, u8_strrchr. */ extern int - u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n); + u8_uctomb_aux (uint8_t *s, ucs4_t uc, ptrdiff_t n); # if !HAVE_INLINE extern int - u8_uctomb (uint8_t *s, ucs4_t uc, int n); + u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u8_uctomb (uint8_t *s, ucs4_t uc, int n) +u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0x80 && n > 0) { @@ -328,13 +329,13 @@ u8_uctomb (uint8_t *s, ucs4_t uc, int n) #if GNULIB_UNISTR_U16_UCTOMB || HAVE_LIBUNISTRING /* Auxiliary function, also used by u16_chr, u16_strchr, u16_strrchr. */ extern int - u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n); + u16_uctomb_aux (uint16_t *s, ucs4_t uc, ptrdiff_t n); # if !HAVE_INLINE extern int - u16_uctomb (uint16_t *s, ucs4_t uc, int n); + u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u16_uctomb (uint16_t *s, ucs4_t uc, int n) +u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0xd800 && n > 0) { @@ -350,10 +351,10 @@ u16_uctomb (uint16_t *s, ucs4_t uc, int n) #if GNULIB_UNISTR_U32_UCTOMB || HAVE_LIBUNISTRING # if !HAVE_INLINE extern int - u32_uctomb (uint32_t *s, ucs4_t uc, int n); + u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u32_uctomb (uint32_t *s, ucs4_t uc, int n) +u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000)) { @@ -380,6 +381,15 @@ extern uint16_t * extern uint32_t * u32_cpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); +/* Copy N units from SRC to DEST, returning pointer after last written unit. */ +/* Similar to mempcpy(). */ +extern uint8_t * + u8_pcpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n); +extern uint16_t * + u16_pcpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n); +extern uint32_t * + u32_pcpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); + /* Copy N units from SRC to DEST, guaranteeing correct behavior for overlapping memory areas. */ /* Similar to memmove(). */ @@ -627,11 +637,14 @@ extern int /* Duplicate S, returning an identical malloc'd string. */ /* Similar to strdup(), wcsdup(). */ extern uint8_t * - u8_strdup (const uint8_t *s); + u8_strdup (const uint8_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; extern uint16_t * - u16_strdup (const uint16_t *s); + u16_strdup (const uint16_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; extern uint32_t * - u32_strdup (const uint32_t *s); + u32_strdup (const uint32_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; /* Find the first occurrence of UC in STR. */ /* Similar to strchr(), wcschr(). */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unitypes.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unitypes.h index b277a0858..cd57d2721 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unitypes.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/unitypes.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Elementary types and macros for the GNU UniString library. - Copyright (C) 2002, 2005-2006, 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNITYPES_H @@ -27,7 +27,7 @@ typedef uint32_t ucs4_t; /* Attribute of a function whose result depends only on the arguments (not pointers!) and which has no side effects. */ #ifndef _UC_ATTRIBUTE_CONST -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__ # define _UC_ATTRIBUTE_CONST __attribute__ ((__const__)) # else # define _UC_ATTRIBUTE_CONST @@ -37,7 +37,7 @@ typedef uint32_t ucs4_t; /* Attribute of a function whose result depends only on the arguments (possibly pointers) and global memory, and which has no side effects. */ #ifndef _UC_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _UC_ATTRIBUTE_PURE @@ -48,7 +48,9 @@ typedef uint32_t ucs4_t; pass a pointer to a different object in the specified pointer argument than in the other pointer arguments. */ #ifndef _UC_RESTRICT -# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) +# if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 # define _UC_RESTRICT __restrict # elif 199901L <= __STDC_VERSION__ || defined restrict # define _UC_RESTRICT restrict diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniwidth.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniwidth.h index b28898b54..0ff97ac4f 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniwidth.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/uniwidth.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Display width functions. - Copyright (C) 2001-2002, 2005, 2007, 2009-2020 Free Software Foundation, + Copyright (C) 2001-2002, 2005, 2007, 2009-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNIWIDTH_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/utime.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/utime.h index d376445ce..3b8a6ae3d 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/utime.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/utime.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for and wrapper around . - Copyright (C) 2017-2020 Free Software Foundation, Inc. + Copyright (C) 2017-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_UTIME_H @@ -22,6 +22,13 @@ #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* The include_next requires a split double-inclusion guard. */ #if 0 # include @@ -30,6 +37,11 @@ #ifndef _GL_UTIME_H #define _GL_UTIME_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if !0 # include #endif @@ -41,19 +53,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -141,6 +153,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -188,6 +206,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -213,6 +241,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -310,7 +346,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -338,9 +374,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -356,26 +392,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -384,19 +420,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -469,13 +505,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -484,27 +527,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -538,6 +587,12 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use _GL_FUNCDECL_RPL (utime, int, (const char *filename, const struct utimbuf *ts) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (utime, int, (const char *filename, const struct utimbuf *ts)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef utime +# define utime _utime +# endif +_GL_CXXALIAS_MDA (utime, int, (const char *filename, const struct utimbuf *ts)); # else # if !1 _GL_FUNCDECL_SYS (utime, int, (const char *filename, const struct utimbuf *ts) @@ -545,7 +600,9 @@ _GL_FUNCDECL_SYS (utime, int, (const char *filename, const struct utimbuf *ts) # endif _GL_CXXALIAS_SYS (utime, int, (const char *filename, const struct utimbuf *ts)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (utime); +# endif #elif defined GNULIB_POSIXCHECK # undef utime # if HAVE_RAW_DECL_UTIME @@ -553,6 +610,22 @@ _GL_WARN_ON_USE (utime, "utime is unportable - " "use gnulib module canonicalize-lgpl for portability"); # endif +#elif 1 +/* On native Windows, map 'utime' to '_utime', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::utime always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef utime +# define utime _utime +# endif +_GL_CXXALIAS_MDA (utime, int, (const char *filename, const struct utimbuf *ts)); +# else +_GL_CXXALIAS_SYS (utime, int, (const char *filename, const struct utimbuf *ts)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (utime); +# endif #endif #if 1 diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/wchar.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/wchar.h index dc8e5acd5..ed8cbdd28 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/wchar.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/wchar.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake. */ @@ -53,11 +53,7 @@ the latter includes . But here, we have no way to detect whether is completely included or is still being included. */ -#if (_MSC_VER < 1900) -#include "../include/wchar.h" -#else #include "../ucrt/wchar.h" -#endif #else /* Normal invocation convention. */ @@ -70,30 +66,18 @@ # include /* for __GLIBC__ */ #endif -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . - In some builds of uClibc, is nonexistent and wchar_t is defined +/* In some builds of uClibc, is nonexistent and wchar_t is defined by . But avoid namespace pollution on glibc systems. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include #endif -#ifndef __GLIBC__ -# include -# include -#endif /* Include the original if it exists. Some builds of uClibc lack it. */ /* The include_next requires a split double-inclusion guard. */ #if 1 -#if (_MSC_VER < 1900) -#include "../include/wchar.h" -#else -#include "../ucrt/wchar.h" -#endif +# include "../ucrt/wchar.h" #endif #undef _GL_ALREADY_INCLUDING_WCHAR_H @@ -101,31 +85,96 @@ #ifndef _GL_WCHAR_H #define _GL_WCHAR_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ # endif #endif +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -213,6 +262,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -260,6 +315,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -285,6 +350,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -382,7 +455,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -410,9 +483,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -428,26 +501,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -456,19 +529,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -541,13 +614,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -556,27 +636,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -638,6 +724,56 @@ typedef int rpl_mbstate_t; # endif #endif +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif + + +#if 1 +/* Get memset(). */ +# include +#endif + /* Convert a single-byte character to a wide character. */ #if 1 @@ -695,7 +831,7 @@ _GL_WARN_ON_USE (wctob, "wctob is unportable - " #endif -/* Test whether *PS is in the initial state. */ +/* Test whether *PS is in an initial state. */ #if 1 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -722,6 +858,208 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " #endif +/* Put *PS into an initial state. */ +#if 1 +/* ISO C 23 § 7.31.6.(3) says that zeroing an mbstate_t is a way to put the + mbstate_t into an initial state. However, on many platforms an mbstate_t + is large, and it is possible - as an optimization - to get away with zeroing + only part of it. So, instead of + + mbstate_t state = { 0 }; + + or + + mbstate_t state; + memset (&state, 0, sizeof (mbstate_t)); + + we can write this faster code: + + mbstate_t state; + mbszero (&state); + */ +/* _GL_MBSTATE_INIT_SIZE describes how mbsinit() behaves: It is the number of + bytes at the beginning of an mbstate_t that need to be zero, for mbsinit() + to return true. + _GL_MBSTATE_ZERO_SIZE is the number of bytes at the beginning of an mbstate_t + that need to be zero, + - for mbsinit() to return true, and + - for all other multibyte-aware functions to operate properly. + 0 < _GL_MBSTATE_INIT_SIZE <= _GL_MBSTATE_ZERO_SIZE <= sizeof (mbstate_t). + These values are determined by source code inspection, where possible, and + by running the gnulib unit tests. + We need _GL_MBSTATE_INIT_SIZE because if we define _GL_MBSTATE_ZERO_SIZE + without considering what mbsinit() does, we get test failures such as + assertion "mbsinit (&iter->state)" failed + */ +# if GNULIB_defined_mbstate_t /* AIX, IRIX */ +/* mbstate_t has at least 4 bytes. They are used as coded in + gnulib/lib/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 1 +/* define _GL_MBSTATE_ZERO_SIZE 4 + does not work: it causes test failures. + So, use the safe fallback value, below. */ +# elif __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 /* glibc */ +/* mbstate_t is defined in . + For more details, see glibc/iconv/skeleton.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (((mbstate_t) {0}).__count) */ +# define _GL_MBSTATE_ZERO_SIZE /* 8 */ sizeof (mbstate_t) +# elif defined MUSL_LIBC /* musl libc */ +/* mbstate_t is defined in . + It is an opaque aligned 8-byte struct, of which at most the first + 4 bytes are used. + For more details, see src/multibyte/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (unsigned) */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __APPLE__ && defined __MACH__ /* macOS */ +/* On macOS, mbstate_t is defined in . + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + Libc-/locale/FreeBSD/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8,utf2}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 10 + utf2.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __FreeBSD__ /* FreeBSD */ +/* On FreeBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + src/lib/libc/locale/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __NetBSD__ /* NetBSD */ +/* On NetBSD, mbstate_t is defined in src/sys/sys/ansi.h. + It is an opaque aligned 128-byte struct, of which at most the first + 28 bytes are used. + For more details, see the *State types in + src/lib/libc/citrus/modules/citrus_*.c + (ignoring citrus_{hz,iso2022,utf7,viqr,zw}.c, since these implement + stateful encodings, not usable as locale encodings). */ +/* File ZERO_SIZE + citrus/citrus_none.c 0 + citrus/modules/citrus_euc.c 8 + citrus/modules/citrus_euctw.c 8 + citrus/modules/citrus_mskanji.c 8 + citrus/modules/citrus_big5.c 8 + citrus/modules/citrus_gbk2k.c 8 + citrus/modules/citrus_dechanyu.c 8 + citrus/modules/citrus_johab.c 6 + citrus/modules/citrus_utf8.c 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 28. */ +# define _GL_MBSTATE_ZERO_SIZE 28 +# elif defined __OpenBSD__ /* OpenBSD */ +/* On OpenBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see src/lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 + citrus_utf8.c 12 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __minix /* Minix */ +/* On Minix, mbstate_t is defined in sys/sys/ansi.h. + It is an opaque aligned 128-byte struct. + For more details, see the *State types in + lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 */ +/* But 1 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 4. */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __sun /* Solaris */ +/* On Solaris, mbstate_t is defined in . + It is an opaque aligned 24-byte or 32-byte struct, of which at most the first + 20 or 28 bytes are used. + For more details on OpenSolaris derivatives, see the *State types in + illumos-gate/usr/src/lib/libc/port/locale/ + {none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 12 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures + - in OpenIndiana and OmniOS: for values < 16, + - in Solaris 10 and 11: for values < 20 (in 32-bit mode) + or < 28 (in 64-bit mode). + Since we don't have a good way to distinguish the OpenSolaris derivatives + from the proprietary Solaris versions, and can't inspect the Solaris source + code, use the safe fallback values, below. */ +# elif defined __CYGWIN__ /* Cygwin */ +/* On Cygwin, mbstate_t is defined in . + For more details, see newlib/libc/stdlib/mbtowc_r.c and + winsup/cygwin/strfuncs.cc. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (int) */ +# define _GL_MBSTATE_ZERO_SIZE 8 +# elif defined _WIN32 && !defined __CYGWIN__ /* Native Windows. */ +/* MSVC defines 'mbstate_t' as an aligned 8-byte struct. + On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined + as an aligned 8-byte struct, of which the first 4 bytes matter. + Use the safe values, below. */ +# elif defined __ANDROID__ /* Android */ +/* Android defines 'mbstate_t' in . + It is an opaque 4-byte or 8-byte struct. + For more details, see + bionic/libc/private/bionic_mbstate.h + bionic/libc/bionic/mbrtoc32.cpp + bionic/libc/bionic/mbrtoc16.cpp + */ +# define _GL_MBSTATE_INIT_SIZE 4 +# define _GL_MBSTATE_ZERO_SIZE 4 +# endif +/* Use safe values as defaults. */ +# ifndef _GL_MBSTATE_INIT_SIZE +# define _GL_MBSTATE_INIT_SIZE sizeof (mbstate_t) +# endif +# ifndef _GL_MBSTATE_ZERO_SIZE +# define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t) +# endif +_GL_BEGIN_C_LINKAGE +# if defined IN_MBSZERO +_GL_EXTERN_INLINE +# else +_GL_INLINE +# endif +_GL_ARG_NONNULL ((1)) void +mbszero (mbstate_t *ps) +{ + memset (ps, 0, _GL_MBSTATE_ZERO_SIZE); +} +_GL_END_C_LINKAGE +_GL_CXXALIAS_SYS (mbszero, void, (mbstate_t *ps)); +_GL_CXXALIASWARN (mbszero); +#endif + + /* Convert a multibyte character to a wide character. */ #if 1 # if 1 @@ -758,7 +1096,7 @@ _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " /* Recognize a multibyte character. */ -#if IN_GETTEXT_TOOLS_LIBGREP +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbrlen @@ -790,7 +1128,7 @@ _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " /* Convert a string to a wide string. */ #if 1 -# if (_MSC_VER >= 1900) && defined (_M_ARM64) +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbsrtowcs # define mbsrtowcs rpl_mbsrtowcs @@ -858,7 +1196,9 @@ _GL_CXXALIAS_SYS (mbsnrtowcs, size_t, const char **restrict srcp, size_t srclen, size_t len, mbstate_t *restrict ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbsnrtowcs); +# endif #elif defined GNULIB_POSIXCHECK # undef mbsnrtowcs # if HAVE_RAW_DECL_MBSNRTOWCS @@ -869,8 +1209,8 @@ _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " /* Convert a wide character to a multibyte character. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || IN_GETTEXT_TOOLS_LIBGREP) -# if (_MSC_VER >= 1900) +#if IN_GETTEXT_TOOLS_GNULIB_TESTS +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcrtomb # define wcrtomb rpl_wcrtomb @@ -1046,13 +1386,25 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " /* Compare N wide characters of S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmemcmp +# define wmemcmp rpl_wmemcmp +# endif +_GL_FUNCDECL_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 _GL_FUNCDECL_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmemcmp); # endif @@ -1111,14 +1463,27 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " /* Copy N wide characters of SRC to DEST. Return pointer to wide characters after the last written wide character. */ #if 1 -# if !0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmempcpy +# define wmempcpy rpl_wmempcpy +# endif +_GL_FUNCDECL_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +_GL_CXXALIAS_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# else +# if !0 _GL_FUNCDECL_SYS (wmempcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); -# endif +# endif _GL_CXXALIAS_SYS (wmempcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmempcpy); # endif @@ -1169,7 +1534,10 @@ _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " /* Return the number of wide characters in S, but at most MAXLEN. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) _GL_ATTRIBUTE_PURE); # endif @@ -1206,7 +1574,10 @@ _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src)); # endif @@ -1247,7 +1618,10 @@ _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcpncpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); @@ -1309,11 +1683,21 @@ _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " /* Compare S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcscmp +# define wcscmp rpl_wcscmp +# endif +_GL_FUNCDECL_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# else +# if !1 _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcscmp); # endif @@ -1328,13 +1712,25 @@ _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " /* Compare no more than N wide characters of S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsncmp +# define wcsncmp rpl_wcsncmp +# endif +_GL_FUNCDECL_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 _GL_FUNCDECL_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsncmp); # endif @@ -1349,7 +1745,10 @@ _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " /* Compare S1 and S2, ignoring case. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) _GL_ATTRIBUTE_PURE); # endif @@ -1366,7 +1765,10 @@ _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " /* Compare no more than N chars of S1 and S2, ignoring case. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcsncasecmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); @@ -1426,16 +1828,79 @@ _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " /* Duplicate S, returning an identical malloc'd string. */ #if 0 -# if !1 -_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s)); -# endif +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif _GL_CXXALIASWARN (wcsdup); -#elif defined GNULIB_POSIXCHECK -# undef wcsdup -# if HAVE_RAW_DECL_WCSDUP +#else +# if __GNUC__ >= 11 && !defined wcsdup +/* For -Wmismatched-dealloc: Associate wcsdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef wcsdup +# if HAVE_RAW_DECL_WCSDUP _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " "use gnulib module wcsdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'wcsdup' to '_wcsdup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::wcsdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# if 1 +_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (wcsdup); +# endif # endif #endif @@ -1500,7 +1965,7 @@ _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " #endif -/* Return the length of the initial segmet of WCS which consists entirely +/* Return the length of the initial segment of WCS which consists entirely of wide characters not in REJECT. */ #if 0 # if !1 @@ -1520,7 +1985,7 @@ _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " #endif -/* Return the length of the initial segmet of WCS which consists entirely +/* Return the length of the initial segment of WCS which consists entirely of wide characters in ACCEPT. */ #if 0 # if !1 @@ -1575,12 +2040,25 @@ _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " /* Find the first occurrence of NEEDLE in HAYSTACK. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsstr +# define wcsstr rpl_wcsstr +# endif +_GL_FUNCDECL_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle)); +# else +# if !1 _GL_FUNCDECL_SYS (wcsstr, wchar_t *, (const wchar_t *restrict haystack, const wchar_t *restrict needle) _GL_ATTRIBUTE_PURE); -# endif +# endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); @@ -1591,6 +2069,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcsstr, (const wchar_t *restrict, const wchar_t *restrict), const wchar_t *, (const wchar_t *restrict, const wchar_t *restrict)); +# endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcsstr, wchar_t *, @@ -1718,6 +2197,24 @@ _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " #endif +#if 0 && (defined _WIN32 && !defined __CYGWIN__) +/* Gets the name of the current working directory. + (a) If BUF is non-NULL, it is assumed to have room for SIZE wide characters. + This function stores the working directory (NUL-terminated) in BUF and + returns BUF. + (b) If BUF is NULL, an array is allocated with 'malloc'. The array is SIZE + wide characters long, unless SIZE == 0, in which case it is as big as + necessary. + If the directory couldn't be determined or SIZE was too small, this function + returns NULL and sets errno. For a directory of length LEN, SIZE should be + >= LEN + 3 in case (a) or >= LEN + 1 in case (b). + Possible errno values include: + - ERANGE if SIZE is too small. + - ENOMEM if the memory could no be allocated. */ +_GL_FUNCDECL_SYS (wgetcwd, wchar_t *, (wchar_t *buf, size_t size)); +#endif + + #endif /* _GL_WCHAR_H */ #endif /* _GL_WCHAR_H */ #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/wctype.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/wctype.h index 1e82e91d9..16fecee78 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/wctype.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-lib/wctype.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 , for platforms that lack it. - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Bruno Haible and Paul Eggert. */ @@ -38,26 +38,21 @@ is being processed, which doesn't include the idempotency guard. */ -#if (_MSC_VER < 1900) -#include "../include/wctype.h" -#else #include "../ucrt/wctype.h" -#endif #else /* Normal invocation convention. */ #ifndef _GL_WCTYPE_H +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if 1 -/* Solaris 2.5 has a bug: must be included before . - Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include +/* Solaris 2.5 has a bug: must be included before . */ # include #endif @@ -74,19 +69,12 @@ BeOS 5 has the functions but no . */ /* The include_next requires a split double-inclusion guard. */ #if 1 -#if (_MSC_VER < 1900) -#include "../include/wctype.h" -#else -#include "../ucrt/wctype.h" -#endif +# include "../ucrt/wctype.h" #endif #ifndef _GL_WCTYPE_H #define _GL_WCTYPE_H -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_WCTYPE_INLINE # define _GL_WCTYPE_INLINE _GL_INLINE @@ -94,19 +82,19 @@ _GL_INLINE_HEADER_BEGIN /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -194,6 +182,12 @@ _GL_INLINE_HEADER_BEGIN Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -241,6 +235,16 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -266,6 +270,14 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -363,7 +375,7 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -391,9 +403,9 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -407,21 +419,49 @@ _GL_INLINE_HEADER_BEGIN #endif /* _GL_CXXDEFS_H */ +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -494,13 +534,20 @@ _GL_INLINE_HEADER_BEGIN # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -509,27 +556,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -592,7 +645,8 @@ typedef unsigned int rpl_wint_t; /* FreeBSD 4.4 to 4.11 has but lacks the functions. Linux libc5 has and the functions but they are broken. mingw and MSVC have and the functions but they take a wchar_t - as argument, not an rpl_wint_t. + as argument, not an rpl_wint_t. Additionally, the mingw iswprint function + and the Android iswpunct function are broken. Assume all 11 functions (all isw* except iswblank) are implemented the same way, or not at all. */ # if ! 1 || 1 @@ -644,7 +698,11 @@ rpl_iswlower (wint_t wc) _GL_WCTYPE_INLINE int rpl_iswprint (wint_t wc) { +# ifdef __MINGW32__ + return ((wchar_t) wc == wc ? wc == ' ' || iswgraph ((wchar_t) wc) : 0); +# else return ((wchar_t) wc == wc ? iswprint ((wchar_t) wc) : 0); +# endif } _GL_WCTYPE_INLINE int @@ -927,7 +985,7 @@ towupper # else /* Only some of the functions are missing or broken. */ -# if 1 && (_MSC_VER < 1800) +# if 1 && (! 1 || 0) /* Only the iswblank function is missing. */ # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -949,6 +1007,16 @@ _GL_FUNCDECL_RPL (iswdigit, int, (wint_t wc)); # endif # endif +# if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef iswpunct +# define iswpunct rpl_iswpunct +# endif +_GL_FUNCDECL_RPL (iswpunct, int, (wint_t wc)); +# endif +# endif + # if 1 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1088,14 +1156,32 @@ _GL_CXXALIASWARN (iswblank); typedef void * wctype_t; # define GNULIB_defined_wctype_t 1 # endif +#elif 1 +# if !GNULIB_defined_wctype_t +typedef void *rpl_wctype_t; +# undef wctype_t +# define wctype_t rpl_wctype_t +# define GNULIB_defined_wctype_t 1 +# endif #endif /* Get a descriptor for a wide character property. */ -#if 0 -# if !1 -_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)); -# endif +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctype +# define wctype rpl_wctype +# endif +_GL_FUNCDECL_RPL (wctype, wctype_t, (const char *name) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (wctype, wctype_t, (const char *name)); +# else +# if !1 +_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wctype); # endif @@ -1110,8 +1196,8 @@ _GL_WARN_ON_USE (wctype, "wctype is unportable - " /* Test whether a wide character has a given property. The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctype() function. */ -#if 0 -# if 1 +#if 1 +# if 1 || 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef iswctype # define iswctype rpl_iswctype @@ -1152,14 +1238,32 @@ _GL_CXXALIASWARN (towupper); typedef void * wctrans_t; # define GNULIB_defined_wctrans_t 1 # endif +#elif 0 +# if !GNULIB_defined_wctrans_t +typedef void *rpl_wctrans_t; +# undef wctrans_t +# define wctrans_t rpl_wctrans_t +# define GNULIB_defined_wctrans_t 1 +# endif #endif /* Get a descriptor for a wide character case conversion. */ #if 0 -# if !1 -_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)); -# endif +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctrans +# define wctrans rpl_wctrans +# endif +_GL_FUNCDECL_RPL (wctrans, wctrans_t, (const char *name) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (wctrans, wctrans_t, (const char *name)); +# else +# if !1 +_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wctrans); # endif @@ -1175,10 +1279,19 @@ _GL_WARN_ON_USE (wctrans, "wctrans is unportable - " The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctrans() function. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef towctrans +# define towctrans rpl_towctrans +# endif +_GL_FUNCDECL_RPL (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +_GL_CXXALIAS_RPL (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +# else +# if !1 _GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); -# endif +# endif _GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (towctrans); # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/pthread.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/pthread.h deleted file mode 100644 index 26533fbf3..000000000 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/pthread.h +++ /dev/null @@ -1,2396 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Implement the most essential subset of POSIX 1003.1-2008 pthread.h. - - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Paul Eggert, Glen Lenker, and Bruno Haible. */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined _GL_ALREADY_INCLUDING_PTHREAD_H -/* Special invocation convention: - On Android, we have a sequence of nested includes - -> -> -> -> - -> . - In this situation, PTHREAD_COND_INITIALIZER is not yet defined, - therefore we should not attempt to define PTHREAD_MUTEX_NORMAL etc. */ - -#include - -#else -/* Normal invocation convention. */ - -#ifndef _GL_PTHREAD_H_ - -#if 0 - -# define _GL_ALREADY_INCLUDING_PTHREAD_H - -/* The include_next requires a split double-inclusion guard. */ -# include - -# undef _GL_ALREADY_INCLUDING_PTHREAD_H - -#endif - -#ifndef _GL_PTHREAD_H_ -#define _GL_PTHREAD_H_ - -#define __need_system_stdlib_h -#include -#undef __need_system_stdlib_h - - -/* The pthreads-win32 defines a couple of broken macros. */ -#undef asctime_r -#undef ctime_r -#undef gmtime_r -#undef localtime_r -#undef rand_r -#undef strtok_r - -#include -#include -#include -#include - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _Noreturn is copied here. */ -/* A C macro for declaring that a function does not return. - Copyright (C) 2011-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* =========== Thread types and macros =========== */ - -#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS -# if IN_GETTEXT_TOOLS_GNULIB_TESTS -# include "windows-thread.h" -# if 0 -# define pthread_t rpl_pthread_t -# define pthread_attr_t rpl_pthread_attr_t -# endif -# if !GNULIB_defined_pthread_thread_types -typedef glwthread_thread_t pthread_t; -typedef unsigned int pthread_attr_t; -# define GNULIB_defined_pthread_thread_types 1 -# endif -# else -# if 0 -# define pthread_t rpl_pthread_t -# define pthread_attr_t rpl_pthread_attr_t -# endif -# if !GNULIB_defined_pthread_thread_types -typedef int pthread_t; -typedef unsigned int pthread_attr_t; -# define GNULIB_defined_pthread_thread_types 1 -# endif -# endif -# undef PTHREAD_CREATE_JOINABLE -# undef PTHREAD_CREATE_DETACHED -# define PTHREAD_CREATE_JOINABLE 0 -# define PTHREAD_CREATE_DETACHED 1 -#else -# if !0 -# if !GNULIB_defined_pthread_thread_types -typedef int pthread_t; -typedef unsigned int pthread_attr_t; -# define GNULIB_defined_pthread_thread_types 1 -# endif -# endif -# if !0 -# define PTHREAD_CREATE_JOINABLE 0 -# define PTHREAD_CREATE_DETACHED 1 -# endif -#endif - -/* =========== Once-only control (initialization) types and macros ========== */ - -#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS -# if 0 -# include "windows-once.h" -# if 0 -# define pthread_once_t rpl_pthread_once_t -# endif -# if !GNULIB_defined_pthread_once_types -typedef glwthread_once_t pthread_once_t; -# define GNULIB_defined_pthread_once_types 1 -# endif -# undef PTHREAD_ONCE_INIT -# define PTHREAD_ONCE_INIT GLWTHREAD_ONCE_INIT -# else -# if 0 -# define pthread_once_t rpl_pthread_once_t -# endif -# if !GNULIB_defined_pthread_once_types -typedef int pthread_once_t; -# define GNULIB_defined_pthread_once_types 1 -# endif -# undef PTHREAD_ONCE_INIT -# define PTHREAD_ONCE_INIT { 0 } -# endif -#else -# if !0 -# if !GNULIB_defined_pthread_once_types -typedef int pthread_once_t; -# define GNULIB_defined_pthread_once_types 1 -# endif -# undef PTHREAD_ONCE_INIT -# define PTHREAD_ONCE_INIT { 0 } -# endif -#endif - -/* =========== Mutex types and macros =========== */ - -#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS -# if 0 -# include "windows-timedmutex.h" -# include "windows-timedrecmutex.h" -# if 0 -# define pthread_mutex_t rpl_pthread_mutex_t -# define pthread_mutexattr_t rpl_pthread_mutexattr_t -# endif -# if !GNULIB_defined_pthread_mutex_types -typedef struct - { - int type; - union - { - glwthread_timedmutex_t u_timedmutex; - glwthread_timedrecmutex_t u_timedrecmutex; - } - u; - } - pthread_mutex_t; -typedef unsigned int pthread_mutexattr_t; -# define GNULIB_defined_pthread_mutex_types 1 -# endif -# undef PTHREAD_MUTEX_INITIALIZER -# define PTHREAD_MUTEX_INITIALIZER { 1, { GLWTHREAD_TIMEDMUTEX_INIT } } -# else -# if 0 -# define pthread_mutex_t rpl_pthread_mutex_t -# define pthread_mutexattr_t rpl_pthread_mutexattr_t -# endif -# if !GNULIB_defined_pthread_mutex_types -typedef int pthread_mutex_t; -typedef unsigned int pthread_mutexattr_t; -# define GNULIB_defined_pthread_mutex_types 1 -# endif -# undef PTHREAD_MUTEX_INITIALIZER -# define PTHREAD_MUTEX_INITIALIZER { 0 } -# endif -# undef PTHREAD_MUTEX_DEFAULT -# undef PTHREAD_MUTEX_NORMAL -# undef PTHREAD_MUTEX_ERRORCHECK -# undef PTHREAD_MUTEX_RECURSIVE -# define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL -# define PTHREAD_MUTEX_NORMAL 0 -# define PTHREAD_MUTEX_ERRORCHECK 1 -# define PTHREAD_MUTEX_RECURSIVE 2 -# undef PTHREAD_MUTEX_STALLED -# undef PTHREAD_MUTEX_ROBUST -# define PTHREAD_MUTEX_STALLED 0 -# define PTHREAD_MUTEX_ROBUST 1 -#else -# if !0 -# if !GNULIB_defined_pthread_mutex_types -typedef int pthread_mutex_t; -typedef unsigned int pthread_mutexattr_t; -# define GNULIB_defined_pthread_mutex_types 1 -# endif -# undef PTHREAD_MUTEX_INITIALIZER -# define PTHREAD_MUTEX_INITIALIZER { 0 } -# endif -# if !0 -# define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL -# define PTHREAD_MUTEX_NORMAL 0 -# define PTHREAD_MUTEX_ERRORCHECK 1 -# define PTHREAD_MUTEX_RECURSIVE 2 -# endif -# if !0 -# define PTHREAD_MUTEX_STALLED 0 -# define PTHREAD_MUTEX_ROBUST 1 -# endif -#endif - -/* =========== Read-write lock types and macros =========== */ - -#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS -# if 0 -# include "windows-timedrwlock.h" -# if 0 -# define pthread_rwlock_t rpl_pthread_rwlock_t -# define pthread_rwlockattr_t rpl_pthread_rwlockattr_t -# endif -# if !GNULIB_defined_pthread_rwlock_types -typedef glwthread_timedrwlock_t pthread_rwlock_t; -typedef unsigned int pthread_rwlockattr_t; -# define GNULIB_defined_pthread_rwlock_types 1 -# endif -# undef PTHREAD_RWLOCK_INITIALIZER -# define PTHREAD_RWLOCK_INITIALIZER GLWTHREAD_TIMEDRWLOCK_INIT -# else -# if 0 -# define pthread_rwlock_t rpl_pthread_rwlock_t -# define pthread_rwlockattr_t rpl_pthread_rwlockattr_t -# endif -# if !GNULIB_defined_pthread_rwlock_types -typedef int pthread_rwlock_t; -typedef unsigned int pthread_rwlockattr_t; -# define GNULIB_defined_pthread_rwlock_types 1 -# endif -# undef PTHREAD_RWLOCK_INITIALIZER -# define PTHREAD_RWLOCK_INITIALIZER { 0 } -# endif -#elif 0 && 0 /* i.e. PTHREAD_RWLOCK_UNIMPLEMENTED */ -# if 0 -# define pthread_rwlock_t rpl_pthread_rwlock_t -# define pthread_rwlockattr_t rpl_pthread_rwlockattr_t -# endif -# if !GNULIB_defined_pthread_rwlock_types -typedef struct - { - pthread_mutex_t lock; /* protects the remaining fields */ - pthread_cond_t waiting_readers; /* waiting readers */ - pthread_cond_t waiting_writers; /* waiting writers */ - unsigned int waiting_writers_count; /* number of waiting writers */ - int runcount; /* number of readers running, or -1 when a writer runs */ - } - pthread_rwlock_t; -typedef unsigned int pthread_rwlockattr_t; -# define GNULIB_defined_pthread_rwlock_types 1 -# endif -# undef PTHREAD_RWLOCK_INITIALIZER -# define PTHREAD_RWLOCK_INITIALIZER \ - { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } -#else -# if 0 -# if !defined PTHREAD_RWLOCK_INITIALIZER && defined PTHREAD_RWLOCK_INITIALIZER_NP /* z/OS */ -# define PTHREAD_RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER_NP -# endif -# else -# if !GNULIB_defined_pthread_rwlock_types -typedef int pthread_rwlock_t; -typedef unsigned int pthread_rwlockattr_t; -# define GNULIB_defined_pthread_rwlock_types 1 -# endif -# undef PTHREAD_RWLOCK_INITIALIZER -# define PTHREAD_RWLOCK_INITIALIZER { 0 } -# endif -#endif - -/* =========== Condition variable types and macros =========== */ - -#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS -# if 0 -# include "windows-cond.h" -# if 0 -# define pthread_cond_t rpl_pthread_cond_t -# define pthread_condattr_t rpl_pthread_condattr_t -# endif -# if !GNULIB_defined_pthread_cond_types -typedef glwthread_cond_t pthread_cond_t; -typedef unsigned int pthread_condattr_t; -# define GNULIB_defined_pthread_cond_types 1 -# endif -# undef PTHREAD_COND_INITIALIZER -# define PTHREAD_COND_INITIALIZER GLWTHREAD_COND_INIT -# else -# if 0 -# define pthread_cond_t rpl_pthread_cond_t -# define pthread_condattr_t rpl_pthread_condattr_t -# endif -# if !GNULIB_defined_pthread_cond_types -typedef int pthread_cond_t; -typedef unsigned int pthread_condattr_t; -# define GNULIB_defined_pthread_cond_types 1 -# endif -# undef PTHREAD_COND_INITIALIZER -# define PTHREAD_COND_INITIALIZER { 0 } -# endif -#else -# if !0 -# if !GNULIB_defined_pthread_cond_types -typedef int pthread_cond_t; -typedef unsigned int pthread_condattr_t; -# define GNULIB_defined_pthread_cond_types 1 -# endif -# undef PTHREAD_COND_INITIALIZER -# define PTHREAD_COND_INITIALIZER { 0 } -# endif -#endif - -/* =========== Thread-specific storage types and macros =========== */ - -#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS -# if 0 -# include "windows-tls.h" -# if 0 -# define pthread_key_t rpl_pthread_key_t -# endif -# if !GNULIB_defined_pthread_tss_types -typedef glwthread_tls_key_t pthread_key_t; -# define GNULIB_defined_pthread_tss_types 1 -# endif -# undef PTHREAD_DESTRUCTOR_ITERATIONS -# define PTHREAD_DESTRUCTOR_ITERATIONS GLWTHREAD_DESTRUCTOR_ITERATIONS -# else -# if 0 -# define pthread_key_t rpl_pthread_key_t -# endif -# if !GNULIB_defined_pthread_tss_types -typedef void ** pthread_key_t; -# define GNULIB_defined_pthread_tss_types 1 -# endif -# undef PTHREAD_DESTRUCTOR_ITERATIONS -# define PTHREAD_DESTRUCTOR_ITERATIONS 0 -# endif -#else -# if !0 -# if !GNULIB_defined_pthread_tss_types -typedef void ** pthread_key_t; -# define GNULIB_defined_pthread_tss_types 1 -# endif -# undef PTHREAD_DESTRUCTOR_ITERATIONS -# define PTHREAD_DESTRUCTOR_ITERATIONS 0 -# endif -#endif - -/* =========== Spinlock types and macros =========== */ - -#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS -# if 0 -# include "windows-spin.h" -# if 0 -# define pthread_spinlock_t rpl_pthread_spinlock_t -# endif -# if !GNULIB_defined_pthread_spin_types -typedef glwthread_spinlock_t pthread_spinlock_t; -# define GNULIB_defined_pthread_spin_types 1 -# endif -# else -# if 0 -# define pthread_spinlock_t rpl_pthread_spinlock_t -# endif -# if !GNULIB_defined_pthread_spin_types -typedef pthread_mutex_t pthread_spinlock_t; -# define GNULIB_defined_pthread_spin_types 1 -# endif -# endif -# undef PTHREAD_PROCESS_PRIVATE -# undef PTHREAD_PROCESS_SHARED -# define PTHREAD_PROCESS_PRIVATE 0 -# define PTHREAD_PROCESS_SHARED 1 -#else -# if !0 -/* Approximate spinlocks with mutexes. */ -# if !GNULIB_defined_pthread_spin_types -typedef pthread_mutex_t pthread_spinlock_t; -# define GNULIB_defined_pthread_spin_types 1 -# endif -# endif -# if !0 -# define PTHREAD_PROCESS_PRIVATE 0 -# define PTHREAD_PROCESS_SHARED 1 -# endif -#endif - -/* =========== Other types and macros =========== */ - -#if !0 -# if !GNULIB_defined_other_pthread_types -typedef int pthread_barrier_t; -typedef unsigned int pthread_barrierattr_t; -# define GNULIB_defined_other_pthread_types 1 -# endif -#endif - -#if !defined PTHREAD_CANCELED - -# define PTHREAD_BARRIER_SERIAL_THREAD (-1) - -# define PTHREAD_CANCEL_DEFERRED 0 -# define PTHREAD_CANCEL_ASYNCHRONOUS 1 - -# define PTHREAD_CANCEL_ENABLE 0 -# define PTHREAD_CANCEL_DISABLE 1 - -# define PTHREAD_CANCELED ((void *) -1) - -# define PTHREAD_INHERIT_SCHED 0 -# define PTHREAD_EXPLICIT_SCHED 1 - -# define PTHREAD_PRIO_NONE 0 -# define PTHREAD_PRIO_INHERIT 1 -# define PTHREAD_PRIO_PROTECT 2 - -# define PTHREAD_SCOPE_SYSTEM 0 -# define PTHREAD_SCOPE_PROCESS 1 - -#endif - -/* =========== Thread functions =========== */ - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -/* The 'restrict' qualifier on ARG is nonsense, but POSIX specifies it this way. - Sigh. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_create -# define pthread_create rpl_pthread_create -# endif -_GL_FUNCDECL_RPL (pthread_create, int, - (pthread_t *restrict threadp, - const pthread_attr_t *restrict attr, - void * (*mainfunc) (void *), void *restrict arg) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (pthread_create, int, - (pthread_t *restrict threadp, - const pthread_attr_t *restrict attr, - void * (*mainfunc) (void *), void *restrict arg)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_create, int, - (pthread_t *restrict threadp, - const pthread_attr_t *restrict attr, - void * (*mainfunc) (void *), void *restrict arg) - _GL_ARG_NONNULL ((1, 3))); -# endif -_GL_CXXALIAS_SYS_CAST (pthread_create, int, - (pthread_t *restrict threadp, - const pthread_attr_t *restrict attr, - void * (*mainfunc) (void *), void *restrict arg)); -# endif -_GL_CXXALIASWARN (pthread_create); -#elif defined GNULIB_POSIXCHECK -# undef pthread_create -# if HAVE_RAW_DECL_PTHREAD_CREATE -_GL_WARN_ON_USE (pthread_create, "pthread_create is not portable - " - "use gnulib module pthread-thread for portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_attr_init -# define pthread_attr_init rpl_pthread_attr_init -# endif -_GL_FUNCDECL_RPL (pthread_attr_init, int, (pthread_attr_t *attr) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_attr_init, int, (pthread_attr_t *attr)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_attr_init, int, (pthread_attr_t *attr) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_attr_init, int, (pthread_attr_t *attr)); -# endif -_GL_CXXALIASWARN (pthread_attr_init); -#elif defined GNULIB_POSIXCHECK -# undef pthread_attr_init -# if HAVE_RAW_DECL_PTHREAD_ATTR_INIT -_GL_WARN_ON_USE (pthread_attr_init, "pthread_attr_init is not portable - " - "use gnulib module pthread-thread for portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_attr_getdetachstate -# define pthread_attr_getdetachstate rpl_pthread_attr_getdetachstate -# endif -_GL_FUNCDECL_RPL (pthread_attr_getdetachstate, int, - (const pthread_attr_t *attr, int *detachstatep) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (pthread_attr_getdetachstate, int, - (const pthread_attr_t *attr, int *detachstatep)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_attr_getdetachstate, int, - (const pthread_attr_t *attr, int *detachstatep) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (pthread_attr_getdetachstate, int, - (const pthread_attr_t *attr, int *detachstatep)); -# endif -_GL_CXXALIASWARN (pthread_attr_getdetachstate); -#elif defined GNULIB_POSIXCHECK -# undef pthread_attr_getdetachstate -# if HAVE_RAW_DECL_PTHREAD_ATTR_GETDETACHSTATE -_GL_WARN_ON_USE (pthread_attr_getdetachstate, "pthread_attr_getdetachstate is not portable - " - "use gnulib module pthread-thread for portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_attr_setdetachstate -# define pthread_attr_setdetachstate rpl_pthread_attr_setdetachstate -# endif -_GL_FUNCDECL_RPL (pthread_attr_setdetachstate, int, - (pthread_attr_t *attr, int detachstate) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_attr_setdetachstate, int, - (pthread_attr_t *attr, int detachstate)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_attr_setdetachstate, int, - (pthread_attr_t *attr, int detachstate) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_attr_setdetachstate, int, - (pthread_attr_t *attr, int detachstate)); -# endif -_GL_CXXALIASWARN (pthread_attr_setdetachstate); -#elif defined GNULIB_POSIXCHECK -# undef pthread_attr_setdetachstate -# if HAVE_RAW_DECL_PTHREAD_ATTR_SETDETACHSTATE -_GL_WARN_ON_USE (pthread_attr_setdetachstate, "pthread_attr_setdetachstate is not portable - " - "use gnulib module pthread-thread for portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_attr_destroy -# define pthread_attr_destroy rpl_pthread_attr_destroy -# endif -_GL_FUNCDECL_RPL (pthread_attr_destroy, int, (pthread_attr_t *attr) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_attr_destroy, int, (pthread_attr_t *attr)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_attr_destroy, int, (pthread_attr_t *attr) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_attr_destroy, int, (pthread_attr_t *attr)); -# endif -_GL_CXXALIASWARN (pthread_attr_destroy); -#elif defined GNULIB_POSIXCHECK -# undef pthread_attr_destroy -# if HAVE_RAW_DECL_PTHREAD_ATTR_DESTROY -_GL_WARN_ON_USE (pthread_attr_destroy, "pthread_attr_destroy is not portable - " - "use gnulib module pthread-thread for portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_self -# define pthread_self rpl_pthread_self -# endif -_GL_FUNCDECL_RPL (pthread_self, pthread_t, (void) _GL_ATTRIBUTE_PURE); -_GL_CXXALIAS_RPL (pthread_self, pthread_t, (void)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_self, pthread_t, (void) _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (pthread_self, pthread_t, (void)); -# endif -_GL_CXXALIASWARN (pthread_self); -#elif defined GNULIB_POSIXCHECK -# undef pthread_self -# if HAVE_RAW_DECL_PTHREAD_SELF -_GL_WARN_ON_USE (pthread_self, "pthread_self is not portable - " - "use gnulib module pthread-thread for portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_equal -# define pthread_equal rpl_pthread_equal -# endif -_GL_FUNCDECL_RPL (pthread_equal, int, (pthread_t thread1, pthread_t thread2)); -_GL_CXXALIAS_RPL (pthread_equal, int, (pthread_t thread1, pthread_t thread2)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_equal, int, (pthread_t thread1, pthread_t thread2)); -# endif -_GL_CXXALIAS_SYS (pthread_equal, int, (pthread_t thread1, pthread_t thread2)); -# endif -_GL_CXXALIASWARN (pthread_equal); -#elif defined GNULIB_POSIXCHECK -# undef pthread_equal -# if HAVE_RAW_DECL_PTHREAD_EQUAL -_GL_WARN_ON_USE (pthread_equal, "pthread_equal is not portable - " - "use gnulib module pthread-thread for portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_detach -# define pthread_detach rpl_pthread_detach -# endif -_GL_FUNCDECL_RPL (pthread_detach, int, (pthread_t thread)); -_GL_CXXALIAS_RPL (pthread_detach, int, (pthread_t thread)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_detach, int, (pthread_t thread)); -# endif -_GL_CXXALIAS_SYS (pthread_detach, int, (pthread_t thread)); -# endif -_GL_CXXALIASWARN (pthread_detach); -#elif defined GNULIB_POSIXCHECK -# undef pthread_detach -# if HAVE_RAW_DECL_PTHREAD_DETACH -_GL_WARN_ON_USE (pthread_detach, "pthread_detach is not portable - " - "use gnulib module pthread-thread for portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_join -# define pthread_join rpl_pthread_join -# endif -_GL_FUNCDECL_RPL (pthread_join, int, (pthread_t thread, void **valuep)); -_GL_CXXALIAS_RPL (pthread_join, int, (pthread_t thread, void **valuep)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_join, int, (pthread_t thread, void **valuep)); -# endif -_GL_CXXALIAS_SYS (pthread_join, int, (pthread_t thread, void **valuep)); -# endif -_GL_CXXALIASWARN (pthread_join); -#elif defined GNULIB_POSIXCHECK -# undef pthread_join -# if HAVE_RAW_DECL_PTHREAD_JOIN -_GL_WARN_ON_USE (pthread_join, "pthread_join is not portable - " - "use gnulib module pthread-thread for portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_exit -# define pthread_exit rpl_pthread_exit -# endif -_GL_FUNCDECL_RPL (pthread_exit, _Noreturn void, (void *value)); -_GL_CXXALIAS_RPL (pthread_exit, void, (void *value)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_exit, _Noreturn void, (void *value)); -# endif -/* Need to cast because of AIX with xlclang++. */ -_GL_CXXALIAS_SYS_CAST (pthread_exit, void, (void *value)); -# endif -_GL_CXXALIASWARN (pthread_exit); -#elif defined GNULIB_POSIXCHECK -# undef pthread_exit -# if HAVE_RAW_DECL_PTHREAD_EXIT -_GL_WARN_ON_USE (pthread_exit, "pthread_exit is not portable - " - "use gnulib module pthread-thread for portability"); -# endif -#endif - -/* =========== Once-only control (initialization) functions =========== */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_once -# define pthread_once rpl_pthread_once -# endif -_GL_FUNCDECL_RPL (pthread_once, int, - (pthread_once_t *once_control, void (*initfunction) (void)) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (pthread_once, int, - (pthread_once_t *once_control, void (*initfunction) (void))); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_once, int, - (pthread_once_t *once_control, void (*initfunction) (void)) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS_CAST (pthread_once, int, - (pthread_once_t *once_control, - void (*initfunction) (void))); -# endif -_GL_CXXALIASWARN (pthread_once); -#elif defined GNULIB_POSIXCHECK -# undef pthread_once -# if HAVE_RAW_DECL_PTHREAD_ONCE -_GL_WARN_ON_USE (pthread_once, "pthread_once is not portable - " - "use gnulib module pthread-once for portability"); -# endif -#endif - -/* =========== Mutex functions =========== */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutex_init -# define pthread_mutex_init rpl_pthread_mutex_init -# endif -_GL_FUNCDECL_RPL (pthread_mutex_init, int, - (pthread_mutex_t *restrict mutex, - const pthread_mutexattr_t *restrict attr) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_mutex_init, int, - (pthread_mutex_t *restrict mutex, - const pthread_mutexattr_t *restrict attr)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutex_init, int, - (pthread_mutex_t *restrict mutex, - const pthread_mutexattr_t *restrict attr) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_mutex_init, int, - (pthread_mutex_t *restrict mutex, - const pthread_mutexattr_t *restrict attr)); -# endif -_GL_CXXALIASWARN (pthread_mutex_init); -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutex_init -# if HAVE_RAW_DECL_PTHREAD_MUTEX_INIT -_GL_WARN_ON_USE (pthread_mutex_init, "pthread_mutex_init is not portable - " - "use gnulib module pthread-mutex for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutexattr_init -# define pthread_mutexattr_init rpl_pthread_mutexattr_init -# endif -_GL_FUNCDECL_RPL (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr)); -# endif -_GL_CXXALIASWARN (pthread_mutexattr_init); -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutexattr_init -# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_INIT -_GL_WARN_ON_USE (pthread_mutexattr_init, "pthread_mutexattr_init is not portable - " - "use gnulib module pthread-mutex for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutexattr_gettype -# define pthread_mutexattr_gettype rpl_pthread_mutexattr_gettype -# endif -_GL_FUNCDECL_RPL (pthread_mutexattr_gettype, int, - (const pthread_mutexattr_t *restrict attr, - int *restrict typep) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (pthread_mutexattr_gettype, int, - (const pthread_mutexattr_t *restrict attr, - int *restrict typep)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutexattr_gettype, int, - (const pthread_mutexattr_t *restrict attr, - int *restrict typep) - _GL_ARG_NONNULL ((1, 2))); -# endif -/* Need to cast, because on FreeBSD the first parameter is - pthread_mutexattr_t *attr. */ -_GL_CXXALIAS_SYS_CAST (pthread_mutexattr_gettype, int, - (const pthread_mutexattr_t *restrict attr, - int *restrict typep)); -# endif -_GL_CXXALIASWARN (pthread_mutexattr_gettype); -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutexattr_gettype -# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETTYPE -_GL_WARN_ON_USE (pthread_mutexattr_gettype, "pthread_mutexattr_gettype is not portable - " - "use gnulib module pthread-mutex for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutexattr_settype -# define pthread_mutexattr_settype rpl_pthread_mutexattr_settype -# endif -_GL_FUNCDECL_RPL (pthread_mutexattr_settype, int, - (pthread_mutexattr_t *attr, int type) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_mutexattr_settype, int, - (pthread_mutexattr_t *attr, int type)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutexattr_settype, int, - (pthread_mutexattr_t *attr, int type) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_mutexattr_settype, int, - (pthread_mutexattr_t *attr, int type)); -# endif -_GL_CXXALIASWARN (pthread_mutexattr_settype); -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutexattr_settype -# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETTYPE -_GL_WARN_ON_USE (pthread_mutexattr_settype, "pthread_mutexattr_settype is not portable - " - "use gnulib module pthread-mutex for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutexattr_getrobust -# define pthread_mutexattr_getrobust rpl_pthread_mutexattr_getrobust -# endif -_GL_FUNCDECL_RPL (pthread_mutexattr_getrobust, int, - (const pthread_mutexattr_t *restrict attr, - int *restrict robustp) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (pthread_mutexattr_getrobust, int, - (const pthread_mutexattr_t *restrict attr, - int *restrict robustp)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutexattr_getrobust, int, - (const pthread_mutexattr_t *restrict attr, - int *restrict robustp) - _GL_ARG_NONNULL ((1, 2))); -# endif -/* Need to cast, because on FreeBSD the first parameter is - pthread_mutexattr_t *attr. */ -_GL_CXXALIAS_SYS_CAST (pthread_mutexattr_getrobust, int, - (const pthread_mutexattr_t *restrict attr, - int *restrict robustp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (pthread_mutexattr_getrobust); -# endif -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutexattr_getrobust -# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETROBUST -_GL_WARN_ON_USE (pthread_mutexattr_getrobust, "pthread_mutexattr_getrobust is not portable - " - "use gnulib module pthread-mutex for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutexattr_setrobust -# define pthread_mutexattr_setrobust rpl_pthread_mutexattr_setrobust -# endif -_GL_FUNCDECL_RPL (pthread_mutexattr_setrobust, int, - (pthread_mutexattr_t *attr, int robust) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_mutexattr_setrobust, int, - (pthread_mutexattr_t *attr, int robust)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutexattr_setrobust, int, - (pthread_mutexattr_t *attr, int robust) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_mutexattr_setrobust, int, - (pthread_mutexattr_t *attr, int robust)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (pthread_mutexattr_setrobust); -# endif -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutexattr_setrobust -# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETROBUST -_GL_WARN_ON_USE (pthread_mutexattr_setrobust, "pthread_mutexattr_setrobust is not portable - " - "use gnulib module pthread-mutex for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutexattr_destroy -# define pthread_mutexattr_destroy rpl_pthread_mutexattr_destroy -# endif -_GL_FUNCDECL_RPL (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr)); -# endif -_GL_CXXALIASWARN (pthread_mutexattr_destroy); -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutexattr_destroy -# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_DESTROY -_GL_WARN_ON_USE (pthread_mutexattr_destroy, "pthread_mutexattr_destroy is not portable - " - "use gnulib module pthread-mutex for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutex_lock -# define pthread_mutex_lock rpl_pthread_mutex_lock -# endif -_GL_FUNCDECL_RPL (pthread_mutex_lock, int, (pthread_mutex_t *mutex) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_mutex_lock, int, (pthread_mutex_t *mutex)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (pthread_mutex_lock); -# endif -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutex_lock -# if HAVE_RAW_DECL_PTHREAD_MUTEX_LOCK -_GL_WARN_ON_USE (pthread_mutex_lock, "pthread_mutex_lock is not portable - " - "use gnulib module pthread-mutex for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutex_trylock -# define pthread_mutex_trylock rpl_pthread_mutex_trylock -# endif -_GL_FUNCDECL_RPL (pthread_mutex_trylock, int, (pthread_mutex_t *mutex) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_mutex_trylock, int, (pthread_mutex_t *mutex)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutex_trylock, int, (pthread_mutex_t *mutex) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_mutex_trylock, int, (pthread_mutex_t *mutex)); -# endif -_GL_CXXALIASWARN (pthread_mutex_trylock); -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutex_trylock -# if HAVE_RAW_DECL_PTHREAD_MUTEX_TRYLOCK -_GL_WARN_ON_USE (pthread_mutex_trylock, "pthread_mutex_trylock is not portable - " - "use gnulib module pthread-mutex for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutex_timedlock -# define pthread_mutex_timedlock rpl_pthread_mutex_timedlock -# endif -_GL_FUNCDECL_RPL (pthread_mutex_timedlock, int, - (pthread_mutex_t *restrict mutex, - const struct timespec *restrict abstime) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (pthread_mutex_timedlock, int, - (pthread_mutex_t *restrict mutex, - const struct timespec *restrict abstime)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutex_timedlock, int, - (pthread_mutex_t *restrict mutex, - const struct timespec *restrict abstime) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (pthread_mutex_timedlock, int, - (pthread_mutex_t *restrict mutex, - const struct timespec *restrict abstime)); -# endif -_GL_CXXALIASWARN (pthread_mutex_timedlock); -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutex_timedlock -# if HAVE_RAW_DECL_PTHREAD_MUTEX_TIMEDLOCK -_GL_WARN_ON_USE (pthread_mutex_timedlock, "pthread_mutex_timedlock is not portable - " - "use gnulib module pthread_mutex_timedlock for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutex_unlock -# define pthread_mutex_unlock rpl_pthread_mutex_unlock -# endif -_GL_FUNCDECL_RPL (pthread_mutex_unlock, int, (pthread_mutex_t *mutex) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_mutex_unlock, int, (pthread_mutex_t *mutex)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutex_unlock, int, (pthread_mutex_t *mutex) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_mutex_unlock, int, (pthread_mutex_t *mutex)); -# endif -_GL_CXXALIASWARN (pthread_mutex_unlock); -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutex_unlock -# if HAVE_RAW_DECL_PTHREAD_MUTEX_UNLOCK -_GL_WARN_ON_USE (pthread_mutex_unlock, "pthread_mutex_unlock is not portable - " - "use gnulib module pthread-mutex for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_mutex_destroy -# define pthread_mutex_destroy rpl_pthread_mutex_destroy -# endif -_GL_FUNCDECL_RPL (pthread_mutex_destroy, int, (pthread_mutex_t *mutex) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_mutex_destroy, int, (pthread_mutex_t *mutex)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_mutex_destroy, int, (pthread_mutex_t *mutex) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_mutex_destroy, int, (pthread_mutex_t *mutex)); -# endif -_GL_CXXALIASWARN (pthread_mutex_destroy); -#elif defined GNULIB_POSIXCHECK -# undef pthread_mutex_destroy -# if HAVE_RAW_DECL_PTHREAD_MUTEX_DESTROY -_GL_WARN_ON_USE (pthread_mutex_destroy, "pthread_mutex_destroy is not portable - " - "use gnulib module pthread-mutex for portability"); -# endif -#endif - -/* =========== Read-write lock functions =========== */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_rwlock_init -# define pthread_rwlock_init rpl_pthread_rwlock_init -# endif -_GL_FUNCDECL_RPL (pthread_rwlock_init, int, - (pthread_rwlock_t *restrict lock, - const pthread_rwlockattr_t *restrict attr) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_rwlock_init, int, - (pthread_rwlock_t *restrict lock, - const pthread_rwlockattr_t *restrict attr)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_rwlock_init, int, - (pthread_rwlock_t *restrict lock, - const pthread_rwlockattr_t *restrict attr) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_rwlock_init, int, - (pthread_rwlock_t *restrict lock, - const pthread_rwlockattr_t *restrict attr)); -# endif -_GL_CXXALIASWARN (pthread_rwlock_init); -#elif defined GNULIB_POSIXCHECK -# undef pthread_rwlock_init -# if HAVE_RAW_DECL_PTHREAD_RWLOCK_INIT -_GL_WARN_ON_USE (pthread_rwlock_init, "pthread_rwlock_init is not portable - " - "use gnulib module pthread-rwlock for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_rwlockattr_init -# define pthread_rwlockattr_init rpl_pthread_rwlockattr_init -# endif -_GL_FUNCDECL_RPL (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr)); -# endif -_GL_CXXALIASWARN (pthread_rwlockattr_init); -#elif defined GNULIB_POSIXCHECK -# undef pthread_rwlockattr_init -# if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_INIT -_GL_WARN_ON_USE (pthread_rwlockattr_init, "pthread_rwlockattr_init is not portable - " - "use gnulib module pthread-rwlock for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_rwlockattr_destroy -# define pthread_rwlockattr_destroy rpl_pthread_rwlockattr_destroy -# endif -_GL_FUNCDECL_RPL (pthread_rwlockattr_destroy, int, - (pthread_rwlockattr_t *attr) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_rwlockattr_destroy, int, - (pthread_rwlockattr_t *attr)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_rwlockattr_destroy, int, - (pthread_rwlockattr_t *attr) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_rwlockattr_destroy, int, - (pthread_rwlockattr_t *attr)); -# endif -_GL_CXXALIASWARN (pthread_rwlockattr_destroy); -#elif defined GNULIB_POSIXCHECK -# undef pthread_rwlockattr_destroy -# if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_DESTROY -_GL_WARN_ON_USE (pthread_rwlockattr_destroy, "pthread_rwlockattr_destroy is not portable - " - "use gnulib module pthread-rwlock for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_rwlock_rdlock -# define pthread_rwlock_rdlock rpl_pthread_rwlock_rdlock -# endif -_GL_FUNCDECL_RPL (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock)); -# endif -_GL_CXXALIASWARN (pthread_rwlock_rdlock); -#elif defined GNULIB_POSIXCHECK -# undef pthread_rwlock_rdlock -# if HAVE_RAW_DECL_PTHREAD_RWLOCK_RDLOCK -_GL_WARN_ON_USE (pthread_rwlock_rdlock, "pthread_rwlock_rdlock is not portable - " - "use gnulib module pthread-rwlock for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_rwlock_wrlock -# define pthread_rwlock_wrlock rpl_pthread_rwlock_wrlock -# endif -_GL_FUNCDECL_RPL (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock)); -# endif -_GL_CXXALIASWARN (pthread_rwlock_wrlock); -#elif defined GNULIB_POSIXCHECK -# undef pthread_rwlock_wrlock -# if HAVE_RAW_DECL_PTHREAD_RWLOCK_WRLOCK -_GL_WARN_ON_USE (pthread_rwlock_wrlock, "pthread_rwlock_wrlock is not portable - " - "use gnulib module pthread-rwlock for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_rwlock_tryrdlock -# define pthread_rwlock_tryrdlock rpl_pthread_rwlock_tryrdlock -# endif -_GL_FUNCDECL_RPL (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock)); -# endif -_GL_CXXALIASWARN (pthread_rwlock_tryrdlock); -#elif defined GNULIB_POSIXCHECK -# undef pthread_rwlock_tryrdlock -# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYRDLOCK -_GL_WARN_ON_USE (pthread_rwlock_tryrdlock, "pthread_rwlock_tryrdlock is not portable - " - "use gnulib module pthread-rwlock for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_rwlock_trywrlock -# define pthread_rwlock_trywrlock rpl_pthread_rwlock_trywrlock -# endif -_GL_FUNCDECL_RPL (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock)); -# endif -_GL_CXXALIASWARN (pthread_rwlock_trywrlock); -#elif defined GNULIB_POSIXCHECK -# undef pthread_rwlock_trywrlock -# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYWRLOCK -_GL_WARN_ON_USE (pthread_rwlock_trywrlock, "pthread_rwlock_trywrlock is not portable - " - "use gnulib module pthread-rwlock for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_rwlock_timedrdlock -# define pthread_rwlock_timedrdlock rpl_pthread_rwlock_timedrdlock -# endif -_GL_FUNCDECL_RPL (pthread_rwlock_timedrdlock, int, - (pthread_rwlock_t *restrict lock, - const struct timespec *restrict abstime) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (pthread_rwlock_timedrdlock, int, - (pthread_rwlock_t *restrict lock, - const struct timespec *restrict abstime)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_rwlock_timedrdlock, int, - (pthread_rwlock_t *restrict lock, - const struct timespec *restrict abstime) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (pthread_rwlock_timedrdlock, int, - (pthread_rwlock_t *restrict lock, - const struct timespec *restrict abstime)); -# endif -_GL_CXXALIASWARN (pthread_rwlock_timedrdlock); -#elif defined GNULIB_POSIXCHECK -# undef pthread_rwlock_timedrdlock -# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDRDLOCK -_GL_WARN_ON_USE (pthread_rwlock_timedrdlock, "pthread_rwlock_timedrdlock is not portable - " - "use gnulib module pthread-rwlock for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_rwlock_timedwrlock -# define pthread_rwlock_timedwrlock rpl_pthread_rwlock_timedwrlock -# endif -_GL_FUNCDECL_RPL (pthread_rwlock_timedwrlock, int, - (pthread_rwlock_t *restrict lock, - const struct timespec *restrict abstime) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (pthread_rwlock_timedwrlock, int, - (pthread_rwlock_t *restrict lock, - const struct timespec *restrict abstime)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_rwlock_timedwrlock, int, - (pthread_rwlock_t *restrict lock, - const struct timespec *restrict abstime) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (pthread_rwlock_timedwrlock, int, - (pthread_rwlock_t *restrict lock, - const struct timespec *restrict abstime)); -# endif -_GL_CXXALIASWARN (pthread_rwlock_timedwrlock); -#elif defined GNULIB_POSIXCHECK -# undef pthread_rwlock_timedwrlock -# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDWRLOCK -_GL_WARN_ON_USE (pthread_rwlock_timedwrlock, "pthread_rwlock_timedwrlock is not portable - " - "use gnulib module pthread-rwlock for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_rwlock_unlock -# define pthread_rwlock_unlock rpl_pthread_rwlock_unlock -# endif -_GL_FUNCDECL_RPL (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock)); -# endif -_GL_CXXALIASWARN (pthread_rwlock_unlock); -#elif defined GNULIB_POSIXCHECK -# undef pthread_rwlock_unlock -# if HAVE_RAW_DECL_PTHREAD_RWLOCK_UNLOCK -_GL_WARN_ON_USE (pthread_rwlock_unlock, "pthread_rwlock_unlock is not portable - " - "use gnulib module pthread-rwlock for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_rwlock_destroy -# define pthread_rwlock_destroy rpl_pthread_rwlock_destroy -# endif -_GL_FUNCDECL_RPL (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock)); -# endif -_GL_CXXALIASWARN (pthread_rwlock_destroy); -#elif defined GNULIB_POSIXCHECK -# undef pthread_rwlock_destroy -# if HAVE_RAW_DECL_PTHREAD_RWLOCK_DESTROY -_GL_WARN_ON_USE (pthread_rwlock_destroy, "pthread_rwlock_destroy is not portable - " - "use gnulib module pthread-rwlock for portability"); -# endif -#endif - -/* =========== Condition variable functions =========== */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_cond_init -# define pthread_cond_init rpl_pthread_cond_init -# endif -_GL_FUNCDECL_RPL (pthread_cond_init, int, - (pthread_cond_t *restrict cond, - const pthread_condattr_t *restrict attr) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_cond_init, int, - (pthread_cond_t *restrict cond, - const pthread_condattr_t *restrict attr)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_cond_init, int, - (pthread_cond_t *restrict cond, - const pthread_condattr_t *restrict attr) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_cond_init, int, - (pthread_cond_t *restrict cond, - const pthread_condattr_t *restrict attr)); -# endif -_GL_CXXALIASWARN (pthread_cond_init); -#elif defined GNULIB_POSIXCHECK -# undef pthread_cond_init -# if HAVE_RAW_DECL_PTHREAD_COND_INIT -_GL_WARN_ON_USE (pthread_cond_init, "pthread_cond_init is not portable - " - "use gnulib module pthread-cond for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_condattr_init -# define pthread_condattr_init rpl_pthread_condattr_init -# endif -_GL_FUNCDECL_RPL (pthread_condattr_init, int, (pthread_condattr_t *attr) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_condattr_init, int, (pthread_condattr_t *attr)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_condattr_init, int, (pthread_condattr_t *attr) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_condattr_init, int, (pthread_condattr_t *attr)); -# endif -_GL_CXXALIASWARN (pthread_condattr_init); -#elif defined GNULIB_POSIXCHECK -# undef pthread_condattr_init -# if HAVE_RAW_DECL_PTHREAD_CONDATTR_INIT -_GL_WARN_ON_USE (pthread_condattr_init, "pthread_condattr_init is not portable - " - "use gnulib module pthread-cond for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_condattr_destroy -# define pthread_condattr_destroy rpl_pthread_condattr_destroy -# endif -_GL_FUNCDECL_RPL (pthread_condattr_destroy, int, (pthread_condattr_t *attr) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_condattr_destroy, int, (pthread_condattr_t *attr)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_condattr_destroy, int, (pthread_condattr_t *attr) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_condattr_destroy, int, (pthread_condattr_t *attr)); -# endif -_GL_CXXALIASWARN (pthread_condattr_destroy); -#elif defined GNULIB_POSIXCHECK -# undef pthread_condattr_destroy -# if HAVE_RAW_DECL_PTHREAD_CONDATTR_DESTROY -_GL_WARN_ON_USE (pthread_condattr_destroy, "pthread_condattr_destroy is not portable - " - "use gnulib module pthread-cond for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_cond_wait -# define pthread_cond_wait rpl_pthread_cond_wait -# endif -_GL_FUNCDECL_RPL (pthread_cond_wait, int, - (pthread_cond_t *restrict cond, - pthread_mutex_t *restrict mutex) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (pthread_cond_wait, int, - (pthread_cond_t *restrict cond, - pthread_mutex_t *restrict mutex)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_cond_wait, int, - (pthread_cond_t *restrict cond, - pthread_mutex_t *restrict mutex) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (pthread_cond_wait, int, - (pthread_cond_t *restrict cond, - pthread_mutex_t *restrict mutex)); -# endif -_GL_CXXALIASWARN (pthread_cond_wait); -#elif defined GNULIB_POSIXCHECK -# undef pthread_cond_wait -# if HAVE_RAW_DECL_PTHREAD_COND_WAIT -_GL_WARN_ON_USE (pthread_cond_wait, "pthread_cond_wait is not portable - " - "use gnulib module pthread-cond for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_cond_timedwait -# define pthread_cond_timedwait rpl_pthread_cond_timedwait -# endif -_GL_FUNCDECL_RPL (pthread_cond_timedwait, int, - (pthread_cond_t *restrict cond, - pthread_mutex_t *restrict mutex, - const struct timespec *restrict abstime) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (pthread_cond_timedwait, int, - (pthread_cond_t *restrict cond, - pthread_mutex_t *restrict mutex, - const struct timespec *restrict abstime)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_cond_timedwait, int, - (pthread_cond_t *restrict cond, - pthread_mutex_t *restrict mutex, - const struct timespec *restrict abstime) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (pthread_cond_timedwait, int, - (pthread_cond_t *restrict cond, - pthread_mutex_t *restrict mutex, - const struct timespec *restrict abstime)); -# endif -_GL_CXXALIASWARN (pthread_cond_timedwait); -#elif defined GNULIB_POSIXCHECK -# undef pthread_cond_timedwait -# if HAVE_RAW_DECL_PTHREAD_COND_TIMEDWAIT -_GL_WARN_ON_USE (pthread_cond_timedwait, "pthread_cond_timedwait is not portable - " - "use gnulib module pthread-cond for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_cond_signal -# define pthread_cond_signal rpl_pthread_cond_signal -# endif -_GL_FUNCDECL_RPL (pthread_cond_signal, int, (pthread_cond_t *cond) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_cond_signal, int, (pthread_cond_t *cond)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_cond_signal, int, (pthread_cond_t *cond) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_cond_signal, int, (pthread_cond_t *cond)); -# endif -_GL_CXXALIASWARN (pthread_cond_signal); -#elif defined GNULIB_POSIXCHECK -# undef pthread_cond_signal -# if HAVE_RAW_DECL_PTHREAD_COND_SIGNAL -_GL_WARN_ON_USE (pthread_cond_signal, "pthread_cond_signal is not portable - " - "use gnulib module pthread-cond for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_cond_broadcast -# define pthread_cond_broadcast rpl_pthread_cond_broadcast -# endif -_GL_FUNCDECL_RPL (pthread_cond_broadcast, int, (pthread_cond_t *cond) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_cond_broadcast, int, (pthread_cond_t *cond)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_cond_broadcast, int, (pthread_cond_t *cond) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_cond_broadcast, int, (pthread_cond_t *cond)); -# endif -_GL_CXXALIASWARN (pthread_cond_broadcast); -#elif defined GNULIB_POSIXCHECK -# undef pthread_cond_broadcast -# if HAVE_RAW_DECL_PTHREAD_COND_BROADCAST -_GL_WARN_ON_USE (pthread_cond_broadcast, "pthread_cond_broadcast is not portable - " - "use gnulib module pthread-cond for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_cond_destroy -# define pthread_cond_destroy rpl_pthread_cond_destroy -# endif -_GL_FUNCDECL_RPL (pthread_cond_destroy, int, (pthread_cond_t *cond) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_cond_destroy, int, (pthread_cond_t *cond)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_cond_destroy, int, (pthread_cond_t *cond) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_cond_destroy, int, (pthread_cond_t *cond)); -# endif -_GL_CXXALIASWARN (pthread_cond_destroy); -#elif defined GNULIB_POSIXCHECK -# undef pthread_cond_destroy -# if HAVE_RAW_DECL_PTHREAD_COND_DESTROY -_GL_WARN_ON_USE (pthread_cond_destroy, "pthread_cond_destroy is not portable - " - "use gnulib module pthread-cond for portability"); -# endif -#endif - -/* =========== Thread-specific storage functions =========== */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_key_create -# define pthread_key_create rpl_pthread_key_create -# endif -_GL_FUNCDECL_RPL (pthread_key_create, int, - (pthread_key_t *keyp, void (*destructor) (void *)) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_key_create, int, - (pthread_key_t *keyp, void (*destructor) (void *))); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_key_create, int, - (pthread_key_t *keyp, void (*destructor) (void *)) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS_CAST (pthread_key_create, int, - (pthread_key_t *keyp, void (*destructor) (void *))); -# endif -_GL_CXXALIASWARN (pthread_key_create); -#elif defined GNULIB_POSIXCHECK -# undef pthread_key_create -# if HAVE_RAW_DECL_PTHREAD_KEY_CREATE -_GL_WARN_ON_USE (pthread_key_create, "pthread_key_create is not portable - " - "use gnulib module pthread-tss for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_setspecific -# define pthread_setspecific rpl_pthread_setspecific -# endif -_GL_FUNCDECL_RPL (pthread_setspecific, int, - (pthread_key_t key, const void *value)); -_GL_CXXALIAS_RPL (pthread_setspecific, int, - (pthread_key_t key, const void *value)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_setspecific, int, - (pthread_key_t key, const void *value)); -# endif -_GL_CXXALIAS_SYS (pthread_setspecific, int, - (pthread_key_t key, const void *value)); -# endif -_GL_CXXALIASWARN (pthread_setspecific); -#elif defined GNULIB_POSIXCHECK -# undef pthread_setspecific -# if HAVE_RAW_DECL_PTHREAD_SETSPECIFIC -_GL_WARN_ON_USE (pthread_setspecific, "pthread_setspecific is not portable - " - "use gnulib module pthread-tss for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_getspecific -# define pthread_getspecific rpl_pthread_getspecific -# endif -_GL_FUNCDECL_RPL (pthread_getspecific, void *, (pthread_key_t key)); -_GL_CXXALIAS_RPL (pthread_getspecific, void *, (pthread_key_t key)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_getspecific, void *, (pthread_key_t key)); -# endif -_GL_CXXALIAS_SYS (pthread_getspecific, void *, (pthread_key_t key)); -# endif -_GL_CXXALIASWARN (pthread_getspecific); -#elif defined GNULIB_POSIXCHECK -# undef pthread_getspecific -# if HAVE_RAW_DECL_PTHREAD_GETSPECIFIC -_GL_WARN_ON_USE (pthread_getspecific, "pthread_getspecific is not portable - " - "use gnulib module pthread-tss for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_key_delete -# define pthread_key_delete rpl_pthread_key_delete -# endif -_GL_FUNCDECL_RPL (pthread_key_delete, int, (pthread_key_t key)); -_GL_CXXALIAS_RPL (pthread_key_delete, int, (pthread_key_t key)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_key_delete, int, (pthread_key_t key)); -# endif -_GL_CXXALIAS_SYS (pthread_key_delete, int, (pthread_key_t key)); -# endif -_GL_CXXALIASWARN (pthread_key_delete); -#elif defined GNULIB_POSIXCHECK -# undef pthread_key_delete -# if HAVE_RAW_DECL_PTHREAD_KEY_DELETE -_GL_WARN_ON_USE (pthread_key_delete, "pthread_key_delete is not portable - " - "use gnulib module pthread-tss for portability"); -# endif -#endif - -/* =========== Spinlock functions =========== */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_spin_init -# define pthread_spin_init rpl_pthread_spin_init -# endif -_GL_FUNCDECL_RPL (pthread_spin_init, int, - (pthread_spinlock_t *lock, int shared_across_processes) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_spin_init, int, - (pthread_spinlock_t *lock, int shared_across_processes)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_spin_init, int, - (pthread_spinlock_t *lock, int shared_across_processes) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_spin_init, int, - (pthread_spinlock_t *lock, int shared_across_processes)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (pthread_spin_init); -# endif -#elif defined GNULIB_POSIXCHECK -# undef pthread_spin_init -# if HAVE_RAW_DECL_PTHREAD_SPIN_INIT -_GL_WARN_ON_USE (pthread_spin_init, "pthread_spin_init is not portable - " - "use gnulib module pthread-spin for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_spin_lock -# define pthread_spin_lock rpl_pthread_spin_lock -# endif -_GL_FUNCDECL_RPL (pthread_spin_lock, int, (pthread_spinlock_t *lock) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_spin_lock, int, (pthread_spinlock_t *lock)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (pthread_spin_lock); -# endif -#elif defined GNULIB_POSIXCHECK -# undef pthread_spin_lock -# if HAVE_RAW_DECL_PTHREAD_SPIN_LOCK -_GL_WARN_ON_USE (pthread_spin_lock, "pthread_spin_lock is not portable - " - "use gnulib module pthread-spin for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_spin_trylock -# define pthread_spin_trylock rpl_pthread_spin_trylock -# endif -_GL_FUNCDECL_RPL (pthread_spin_trylock, int, (pthread_spinlock_t *lock) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_spin_trylock, int, (pthread_spinlock_t *lock)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (pthread_spin_trylock); -# endif -#elif defined GNULIB_POSIXCHECK -# undef pthread_spin_trylock -# if HAVE_RAW_DECL_PTHREAD_SPIN_TRYLOCK -_GL_WARN_ON_USE (pthread_spin_trylock, "pthread_spin_trylock is not portable - " - "use gnulib module pthread-spin for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_spin_unlock -# define pthread_spin_unlock rpl_pthread_spin_unlock -# endif -_GL_FUNCDECL_RPL (pthread_spin_unlock, int, (pthread_spinlock_t *lock) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_spin_unlock, int, (pthread_spinlock_t *lock)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (pthread_spin_unlock); -# endif -#elif defined GNULIB_POSIXCHECK -# undef pthread_spin_unlock -# if HAVE_RAW_DECL_PTHREAD_SPIN_UNLOCK -_GL_WARN_ON_USE (pthread_spin_unlock, "pthread_spin_unlock is not portable - " - "use gnulib module pthread-spin for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pthread_spin_destroy -# define pthread_spin_destroy rpl_pthread_spin_destroy -# endif -_GL_FUNCDECL_RPL (pthread_spin_destroy, int, (pthread_spinlock_t *lock) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pthread_spin_destroy, int, (pthread_spinlock_t *lock)); -# else -# if !1 -_GL_FUNCDECL_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (pthread_spin_destroy); -# endif -#elif defined GNULIB_POSIXCHECK -# undef pthread_spin_destroy -# if HAVE_RAW_DECL_PTHREAD_SPIN_DESTROY -_GL_WARN_ON_USE (pthread_spin_destroy, "pthread_spin_destroy is not portable - " - "use gnulib module pthread-spin for portability"); -# endif -#endif - - -#endif /* _GL_PTHREAD_H_ */ -#endif /* _GL_PTHREAD_H_ */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/stdalign.h b/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/stdalign.h deleted file mode 100644 index 9bcf6ed58..000000000 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/gnulib-tests/stdalign.h +++ /dev/null @@ -1,122 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A substitute for ISO C11 . - - Copyright 2011-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Paul Eggert and Bruno Haible. */ - -#ifndef _GL_STDALIGN_H -#define _GL_STDALIGN_H - -/* ISO C11 for platforms that lack it. - - References: - ISO C11 (latest free draft - ) - sections 6.5.3.4, 6.7.5, 7.15. - C++11 (latest free draft - ) - section 18.10. */ - -/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment - requirement of a structure member (i.e., slot or field) that is of - type TYPE, as an integer constant expression. - - This differs from GCC's __alignof__ operator, which can yield a - better-performing alignment for an object of that type. For - example, on x86 with GCC, __alignof__ (double) and __alignof__ - (long long) are 8, whereas alignof (double) and alignof (long long) - are 4 unless the option '-malign-double' is used. - - The result cannot be used as a value for an 'enum' constant, if you - want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. - - Include for offsetof. */ -#include - -/* FreeBSD 9.1 , included by and lots of other - standard headers, defines conflicting implementations of _Alignas - and _Alignof that are no better than ours; override them. */ -#undef _Alignas -#undef _Alignof - -/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 - . */ -#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ - || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9))) -# ifdef __cplusplus -# if 201103 <= __cplusplus -# define _Alignof(type) alignof (type) -# else - template struct __alignof_helper { char __a; __t __b; }; -# define _Alignof(type) offsetof (__alignof_helper, __b) -# endif -# else -# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) -# endif -#endif -#if ! (defined __cplusplus && 201103 <= __cplusplus) -# define alignof _Alignof -#endif -#define __alignof_is_defined 1 - -/* alignas (A), also known as _Alignas (A), aligns a variable or type - to the alignment A, where A is an integer constant expression. For - example: - - int alignas (8) foo; - struct s { int a; int alignas (8) bar; }; - - aligns the address of FOO and the offset of BAR to be multiples of 8. - - A should be a power of two that is at least the type's alignment - and at most the implementation's alignment limit. This limit is - 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable - to MSVC through at least version 10.0, A should be an integer - constant, as MSVC does not support expressions such as 1 << 3. - To be portable to Sun C 5.11, do not align auto variables to - anything stricter than their default alignment. - - The following C11 requirements are not supported here: - - - If A is zero, alignas has no effect. - - alignas can be used multiple times; the strictest one wins. - - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). - - */ - -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 -# if defined __cplusplus && 201103 <= __cplusplus -# define _Alignas(a) alignas (a) -# elif ((defined __APPLE__ && defined __MACH__ \ - ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ - : __GNUC__ && !defined __ibmxl__) \ - || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ - || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__) -# define _Alignas(a) __attribute__ ((__aligned__ (a))) -# elif 1300 <= _MSC_VER -# define _Alignas(a) __declspec (align (a)) -# endif -#endif -#if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \ - || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) -# define alignas _Alignas -#endif -#if defined alignas || (defined __cplusplus && 201103 <= __cplusplus) -# define __alignas_is_defined 1 -#endif - -#endif /* _GL_STDALIGN_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/assert.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/assert.h new file mode 100644 index 000000000..309b55935 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/assert.h @@ -0,0 +1,313 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Substitute for and wrapper around + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Do not guard the include, since is supposed to define + the assert macro each time it is included. */ + +#if __GNUC__ >= 3 + +#endif + + +#include "../ucrt/assert.h" + +#if (_MSC_VER < 1931) +/* The definition of static_assert is copied here. */ +/* Compile-time assert-like macros. + + Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ + +#ifndef _GL_GTPO_STATIC_ASSERT_H +#define _GL_GTPO_STATIC_ASSERT_H + + +/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC) + works as per C11. This is supported by GCC 4.6.0+ and by clang 4+. + + Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as + per C23. This is supported by GCC 9.1+. + + Support compilers claiming conformance to the relevant standard, + and also support GCC when not pedantic. If we were willing to slow + 'configure' down we could also use it with other compilers, but + since this affects only the quality of diagnostics, why bother? */ +#ifndef __cplusplus +# if (201112 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__))) +# define _GL_HAVE__STATIC_ASSERT 1 +# endif +# if (202311 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ && 9 <= __GNUC__)) +# define _GL_HAVE__STATIC_ASSERT1 1 +# endif +#endif + +/* FreeBSD 9.1 , included by and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE__STATIC_ASSERT +# include +# undef _Static_assert +#endif + +/* Each of these macros verifies that its argument R is nonzero. To + be portable, R should be an integer constant expression. Unlike + assert (R), there is no run-time overhead. + + If _Static_assert works, verify (R) uses it directly. Similarly, + _GL_STATIC_ASSERT_TRUE works by packaging a _Static_assert inside a struct + that is an operand of sizeof. + + The code below uses several ideas for C++ compilers, and for C + compilers that do not support _Static_assert: + + * The first step is ((R) ? 1 : -1). Given an expression R, of + integral or boolean or floating-point type, this yields an + expression of integral type, whose value is later verified to be + constant and nonnegative. + + * Next this expression W is wrapped in a type + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: W; + }. + If W is negative, this yields a compile-time error. No compiler can + deal with a bit-field of negative size. + + One might think that an array size check would have the same + effect, that is, that the type struct { unsigned int dummy[W]; } + would work as well. However, inside a function, some compilers + (such as C++ compilers and GNU C) allow local parameters and + variables inside array size expressions. With these compilers, + an array size check would not properly diagnose this misuse of + the verify macro: + + void function (int n) { verify (n < 0); } + + * For the verify macro, the struct _gl_static_assert_type will need to + somehow be embedded into a declaration. To be portable, this + declaration must declare an object, a constant, a function, or a + typedef name. If the declared entity uses the type directly, + such as in + + struct dummy {...}; + typedef struct {...} dummy; + extern struct {...} *dummy; + extern void dummy (struct {...} *); + extern struct {...} *dummy (void); + + two uses of the verify macro would yield colliding declarations + if the entity names are not disambiguated. A workaround is to + attach the current line number to the entity name: + + #define _GL_CONCAT0(x, y) x##y + #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) + extern struct {...} * _GL_CONCAT (dummy, __LINE__); + + But this has the problem that two invocations of verify from + within the same macro would collide, since the __LINE__ value + would be the same for both invocations. (The GCC __COUNTER__ + macro solves this problem, but is not portable.) + + A solution is to use the sizeof operator. It yields a number, + getting rid of the identity of the type. Declarations like + + extern int dummy [sizeof (struct {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + + can be repeated. + + * Should the implementation use a named struct or an unnamed struct? + Which of the following alternatives can be used? + + extern int dummy [sizeof (struct {...})]; + extern int dummy [sizeof (struct _gl_static_assert_type {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern void dummy (int [sizeof (struct _gl_static_assert_type {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + extern int (*dummy (void)) [sizeof (struct _gl_static_assert_type {...})]; + + In the second and sixth case, the struct type is exported to the + outer scope; two such declarations therefore collide. GCC warns + about the first, third, and fourth cases. So the only remaining + possibility is the fifth case: + + extern int (*dummy (void)) [sizeof (struct {...})]; + + * GCC warns about duplicate declarations of the dummy function if + -Wredundant-decls is used. GCC 4.3 and later have a builtin + __COUNTER__ macro that can let us generate unique identifiers for + each dummy function, to suppress this warning. + + * This implementation exploits the fact that older versions of GCC, + which do not support _Static_assert, also do not warn about the + last declaration mentioned above. + + * GCC warns if -Wnested-externs is enabled and 'verify' is used + within a function body; but inside a function, you can always + arrange to use verify_expr instead. + + * In C++, any struct definition inside sizeof is invalid. + Use a template type to work around the problem. */ + +/* Concatenate two preprocessor tokens. */ +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y + +/* _GL_COUNTER is an integer, preferably one that changes each time we + use it. Use __COUNTER__ if it works, falling back on __LINE__ + otherwise. __LINE__ isn't perfect, but it's better than a + constant. */ +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif + +/* Generate a symbol with the given prefix, making it unique if + possible. */ +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) + +/* Verify requirement R at compile-time, as an integer constant expression + that returns 1. If R is false, fail at compile-time, preferably + with a diagnostic that includes the string-literal DIAGNOSTIC. */ + +#define _GL_STATIC_ASSERT_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_STATIC_ASSERT_TYPE (R, DIAGNOSTIC))) + +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_static_assert_type +template + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: w; + }; +# define GNULIB_defined_struct__gl_static_assert_type 1 +# endif +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + _gl_static_assert_type<(R) ? 1 : -1> +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_static_assert_error_if_negative: (R) ? 1 : -1; } +#endif + +/* Verify requirement R at compile-time, as a declaration without a + trailing ';'. If R is false, fail at compile-time. + + This macro requires three or more arguments but uses at most the first + two, so that the _Static_assert macro optionally defined below supports + both the C11 two-argument syntax and the C23 one-argument syntax. + + Unfortunately, unlike C11, this implementation must appear as an + ordinary declaration, and cannot appear inside struct { ... }. */ + +#if 202311 <= __STDC_VERSION__ || 200410 <= __cpp_static_assert +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) static_assert (R, DIAGNOSTIC) +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC) +#else +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) \ + extern int (*_GL_GENSYM (_gl_static_assert_function) (void)) \ + [_GL_STATIC_ASSERT_TRUE (R, DIAGNOSTIC)] +# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Wnested-externs" +# endif +#endif + +/* _GL_GTPO_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ +#ifdef _GL_GTPO_STATIC_ASSERT_H +/* Define _Static_assert if needed. */ +/* With clang ≥ 3.8.0 in C++ mode, _Static_assert already works and accepts + 1 or 2 arguments. We better don't override it, because clang's standard + C++ library uses static_assert inside classes in several places, and our + replacement via _GL_STATIC_ASSERT does not work in these contexts. */ +# if (defined __cplusplus && defined __clang__ \ + && (4 <= __clang_major__ + (8 <= __clang_minor__))) +# if 5 <= __clang_major__ +/* Avoid "warning: 'static_assert' with no message is a C++17 extension". */ +# pragma clang diagnostic ignored "-Wc++17-extensions" +# else +/* Avoid "warning: static_assert with no message is a C++1z extension". */ +# pragma clang diagnostic ignored "-Wc++1z-extensions" +# endif +# elif !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert +# if !defined _MSC_VER || defined __clang__ +# define _Static_assert(...) \ + _GL_STATIC_ASSERT (__VA_ARGS__, "static assertion failed", -) +# else +# if defined __cplusplus && _MSC_VER >= 1910 + /* In MSVC 14.1 or newer, static_assert accepts one or two arguments, + but _Static_assert is not defined. */ +# define _Static_assert static_assert +# else + /* Work around MSVC preprocessor incompatibility with ISO C; see + . */ +# define _Static_assert(R, ...) \ + _GL_STATIC_ASSERT ((R), "static assertion failed", -) +# endif +# endif +# endif +/* Define static_assert if needed. */ +# if (!defined static_assert \ + && __STDC_VERSION__ < 202311 \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6 && _MSC_VER < 1910))) +# if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__ +/* MSVC 14 in C++ mode supports the two-arguments static_assert but not + the one-argument static_assert, and it does not support _Static_assert. + We have to play preprocessor tricks to distinguish the two cases. + Since the MSVC preprocessor is not ISO C compliant (see above),. + the solution is specific to MSVC. */ +# define _GL_EXPAND(x) x +# define _GL_SA1(a1) static_assert ((a1), "static assertion failed") +# define _GL_SA2 static_assert +# define _GL_SA3 static_assert +# define _GL_SA_PICK(x1,x2,x3,x4,...) x4 +# define static_assert(...) _GL_EXPAND(_GL_SA_PICK(__VA_ARGS__,_GL_SA3,_GL_SA2,_GL_SA1)) (__VA_ARGS__) +/* Avoid "fatal error C1189: #error: The C++ Standard Library forbids macroizing keywords." */ +# define _ALLOW_KEYWORD_MACROS 1 +# else +# define static_assert _Static_assert /* C11 requires this #define. */ +# endif +# endif +#endif + + +#endif +#endif \ No newline at end of file diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/libgettextpo/config.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/config.h similarity index 86% rename from gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/libgettextpo/config.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/config.h index 1dd5fe629..f1bbfec58 100644 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/libgettextpo/config.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/config.h @@ -3,6 +3,7 @@ #define GTPO_CONFIG_H #include "../config.h" +#undef REPLACE_FCHDIR #define DEFAULT_TEXT_DOMAIN "gettext-tools" #undef DLL_VARIABLE #define DLL_VARIABLE @@ -22,6 +23,8 @@ #define asnprintf libgettextpo_asnprintf #define asprintf libgettextpo_asprintf #define base_len libgettextpo_base_len +#define c32iscntrl libgettextpo_c32iscntrl +#define c32width libgettextpo_c32width #define c_strcasecmp libgettextpo_c_strcasecmp #define c_strncasecmp libgettextpo_c_strncasecmp #define c_strstr libgettextpo_c_strstr @@ -55,6 +58,9 @@ #define dup_cloexec libgettextpo_dup_cloexec #define error libgettextpo_error #define error_at_line libgettextpo_error_at_line +#define error_message_count libgettextpo_error_message_count +#define error_one_per_line libgettextpo_error_one_per_line +#define error_print_progname libgettextpo_error_print_progname #define error_with_progname libgettextpo_error_with_progname #define execute_all_close_hooks libgettextpo_execute_all_close_hooks #define execute_all_ioctl_hooks libgettextpo_execute_all_ioctl_hooks @@ -68,6 +74,7 @@ #define formatstring_awk libgettextpo_formatstring_awk #define formatstring_boost libgettextpo_formatstring_boost #define formatstring_c libgettextpo_formatstring_c +#define formatstring_cplusplus_brace libgettextpo_formatstring_cplusplus_brace #define formatstring_csharp libgettextpo_formatstring_csharp #define formatstring_elisp libgettextpo_formatstring_elisp #define formatstring_gcc_internal libgettextpo_formatstring_gcc_internal @@ -101,6 +108,7 @@ #define fstrcmp_bounded libgettextpo_fstrcmp_bounded #define fstrcmp_free_resources libgettextpo_fstrcmp_free_resources #define fsync libgettextpo_fsync +#define full_write libgettextpo_full_write #define fuzzy_search_goal_function libgettextpo_fuzzy_search_goal_function #define fwriteerror libgettextpo_fwriteerror #define fwriteerror_no_ebadf libgettextpo_fwriteerror_no_ebadf @@ -157,6 +165,7 @@ #define is_ascii_message_list libgettextpo_is_ascii_message_list #define is_ascii_msgdomain_list libgettextpo_is_ascii_msgdomain_list #define is_ascii_string libgettextpo_is_ascii_string +#define is_ascii_string_desc libgettextpo_is_ascii_string_desc #define is_ascii_string_list libgettextpo_is_ascii_string_list #define last_component libgettextpo_last_component #define lex_end libgettextpo_lex_end @@ -175,6 +184,8 @@ #define mem_cd_iconveh libgettextpo_mem_cd_iconveh #define mem_iconveh libgettextpo_mem_iconveh #define mem_iconveha libgettextpo_mem_iconveha +#define memmem libgettextpo_memmem +#define memrchr libgettextpo_memrchr #define message_alloc libgettextpo_message_alloc #define message_comment_append libgettextpo_message_comment_append #define message_comment_dot_append libgettextpo_message_comment_dot_append @@ -257,6 +268,8 @@ #define po_lex_charset_init libgettextpo_po_lex_charset_init #define po_lex_charset_set libgettextpo_po_lex_charset_set #define po_lex_iconv libgettextpo_po_lex_iconv +#define po_lex_isolate_end libgettextpo_po_lex_isolate_end +#define po_lex_isolate_start libgettextpo_po_lex_isolate_start #define po_lex_pass_comments libgettextpo_po_lex_pass_comments #define po_lex_pass_obsolete_entries libgettextpo_po_lex_pass_obsolete_entries #define po_lex_weird_cjk libgettextpo_po_lex_weird_cjk @@ -265,29 +278,31 @@ #define po_parse_comment_special libgettextpo_po_parse_comment_special #define po_xerror libgettextpo_po_xerror #define po_xerror2 libgettextpo_po_xerror2 +#define pos_filename_has_spaces libgettextpo_pos_filename_has_spaces #define possible_format_p libgettextpo_possible_format_p #define printf_fetchargs libgettextpo_printf_fetchargs #define printf_parse libgettextpo_printf_parse #define rawmemchr libgettextpo_rawmemchr #define read_catalog_file libgettextpo_read_catalog_file #define read_catalog_stream libgettextpo_read_catalog_stream +#define reallocarray libgettextpo_reallocarray #define register_fd_hook libgettextpo_register_fd_hook #define relocate libgettextpo_relocate #define relocate2 libgettextpo_relocate2 +#define rpl_calloc libgettextpo_rpl_calloc #define rpl_close libgettextpo_rpl_close #define rpl_dup2 libgettextpo_rpl_dup2 -#define rpl_error_message_count libgettextpo_rpl_error_message_count -#define rpl_error_one_per_line libgettextpo_rpl_error_one_per_line -#define rpl_error_print_progname libgettextpo_rpl_error_print_progname #define rpl_fdopen libgettextpo_rpl_fdopen #define rpl_fopen libgettextpo_rpl_fopen #define rpl_fprintf libgettextpo_rpl_fprintf #define rpl_fputc libgettextpo_rpl_fputc #define rpl_fputs libgettextpo_rpl_fputs +#define rpl_free libgettextpo_rpl_free #define rpl_fstat libgettextpo_rpl_fstat #define rpl_fwrite libgettextpo_rpl_fwrite #define rpl_getline libgettextpo_rpl_getline #define rpl_malloc libgettextpo_rpl_malloc +#define rpl_mbrtoc32 libgettextpo_rpl_mbrtoc32 #define rpl_mbrtowc libgettextpo_rpl_mbrtowc #define rpl_mbsinit libgettextpo_rpl_mbsinit #define rpl_open libgettextpo_rpl_open @@ -302,6 +317,8 @@ #define rpl_strstr libgettextpo_rpl_strstr #define rpl_vfprintf libgettextpo_rpl_vfprintf #define rpl_vprintf libgettextpo_rpl_vprintf +#define rpl_write libgettextpo_rpl_write +#define safe_write libgettextpo_safe_write #define sentence_end libgettextpo_sentence_end #define sentence_end_required_spaces libgettextpo_sentence_end_required_spaces #define set_cloexec_flag libgettextpo_set_cloexec_flag @@ -326,9 +343,32 @@ #define str_iconveha libgettextpo_str_iconveha #define strchrnul libgettextpo_strchrnul #define strerror_override libgettextpo_strerror_override +#define string_desc_c libgettextpo_string_desc_c +#define string_desc_cmp libgettextpo_string_desc_cmp +#define string_desc_concat libgettextpo_string_desc_concat +#define string_desc_contains libgettextpo_string_desc_contains +#define string_desc_copy libgettextpo_string_desc_copy +#define string_desc_endswith libgettextpo_string_desc_endswith +#define string_desc_equals libgettextpo_string_desc_equals +#define string_desc_fill libgettextpo_string_desc_fill +#define string_desc_free libgettextpo_string_desc_free +#define string_desc_from_c libgettextpo_string_desc_from_c +#define string_desc_fwrite libgettextpo_string_desc_fwrite +#define string_desc_index libgettextpo_string_desc_index +#define string_desc_last_index libgettextpo_string_desc_last_index +#define string_desc_new libgettextpo_string_desc_new +#define string_desc_new_addr libgettextpo_string_desc_new_addr +#define string_desc_new_empty libgettextpo_string_desc_new_empty +#define string_desc_new_filled libgettextpo_string_desc_new_filled +#define string_desc_overwrite libgettextpo_string_desc_overwrite +#define string_desc_set_char_at libgettextpo_string_desc_set_char_at +#define string_desc_startswith libgettextpo_string_desc_startswith +#define string_desc_substring libgettextpo_string_desc_substring +#define string_desc_write libgettextpo_string_desc_write #define string_list_alloc libgettextpo_string_list_alloc #define string_list_append libgettextpo_string_list_append #define string_list_append_unique libgettextpo_string_list_append_unique +#define string_list_append_unique_desc libgettextpo_string_list_append_unique_desc #define string_list_concat libgettextpo_string_list_concat #define string_list_concat_destroy libgettextpo_string_list_concat_destroy #define string_list_destroy libgettextpo_string_list_destroy @@ -336,6 +376,7 @@ #define string_list_init libgettextpo_string_list_init #define string_list_join libgettextpo_string_list_join #define string_list_member libgettextpo_string_list_member +#define string_list_member_desc libgettextpo_string_list_member_desc #define string_list_remove libgettextpo_string_list_remove #define syntax_check_message_list libgettextpo_syntax_check_message_list #define syntax_check_name libgettextpo_syntax_check_name @@ -349,15 +390,18 @@ #define u8_mbtouc_unsafe_aux libgettextpo_u8_mbtouc_unsafe_aux #define u8_mbtoucr libgettextpo_u8_mbtoucr #define u8_next libgettextpo_u8_next -#define u8_possible_linebreaks libgettextpo_u8_possible_linebreaks +#define u8_possible_linebreaks_loop libgettextpo_u8_possible_linebreaks_loop +#define u8_possible_linebreaks_v2 libgettextpo_u8_possible_linebreaks_v2 #define u8_prev libgettextpo_u8_prev #define u8_strmbtouc libgettextpo_u8_strmbtouc #define u8_uctomb_aux libgettextpo_u8_uctomb_aux -#define u8_width_linebreaks libgettextpo_u8_width_linebreaks +#define u8_width_linebreaks_internal libgettextpo_u8_width_linebreaks_internal +#define u8_width_linebreaks_v2 libgettextpo_u8_width_linebreaks_v2 #define uc_is_alpha libgettextpo_uc_is_alpha +#define uc_is_cntrl libgettextpo_uc_is_cntrl #define uc_is_space libgettextpo_uc_is_space #define uc_width libgettextpo_uc_width -#define ulc_width_linebreaks libgettextpo_ulc_width_linebreaks +#define ulc_width_linebreaks_v2 libgettextpo_ulc_width_linebreaks_v2 #define uniconv_register_autodetect libgettextpo_uniconv_register_autodetect #define unilbrk_is_all_ascii libgettextpo_unilbrk_is_all_ascii #define unilbrk_is_utf8_encoding libgettextpo_unilbrk_is_utf8_encoding @@ -368,18 +412,29 @@ #define vasnprintf libgettextpo_vasnprintf #define vasprintf libgettextpo_vasprintf #define wcwidth libgettextpo_wcwidth +#define x2nrealloc libgettextpo_x2nrealloc #define x2realloc libgettextpo_x2realloc #define xalloc_die libgettextpo_xalloc_die #define xasprintf libgettextpo_xasprintf #define xcalloc libgettextpo_xcalloc +#define xcharalloc libgettextpo_xcharalloc #define xconcatenated_filename libgettextpo_xconcatenated_filename +#define xicalloc libgettextpo_xicalloc +#define ximalloc libgettextpo_ximalloc +#define ximemdup libgettextpo_ximemdup +#define ximemdup0 libgettextpo_ximemdup0 +#define xinmalloc libgettextpo_xinmalloc +#define xirealloc libgettextpo_xirealloc +#define xireallocarray libgettextpo_xireallocarray +#define xizalloc libgettextpo_xizalloc #define xmalloc libgettextpo_xmalloc -#define xmalloc_exit_failure libgettextpo_xmalloc_exit_failure #define xmem_cd_iconv libgettextpo_xmem_cd_iconv #define xmemdup libgettextpo_xmemdup #define xmmalloca libgettextpo_xmmalloca #define xnmalloc libgettextpo_xnmalloc +#define xpalloc libgettextpo_xpalloc #define xrealloc libgettextpo_xrealloc +#define xreallocarray libgettextpo_xreallocarray #define xstr_cd_iconv libgettextpo_xstr_cd_iconv #define xstr_iconv libgettextpo_xstr_iconv #define xstrdup libgettextpo_xstrdup diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/errno.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/errno.h index 97ba8767b..f09af41cb 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/errno.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/errno.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A POSIX-like . - Copyright (C) 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_GTPO_ERRNO_H @@ -24,11 +24,7 @@ /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/errno.h" -#else #include "../ucrt/errno.h" -#endif #ifndef _GL_GTPO_ERRNO_H #define _GL_GTPO_ERRNO_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/error.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/error.h new file mode 100644 index 000000000..c9b4803d3 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/error.h @@ -0,0 +1,563 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Declarations for error-reporting functions. + Copyright (C) 1995-1997, 2003, 2006, 2008-2023 Free Software Foundation, + Inc. + This file is part of the GNU C Library. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_GTPO_ERROR_H + +/* No @PRAGMA_SYSTEM_HEADER@ here, because it would prevent + -Wimplicit-fallthrough warnings for missing FALLTHROUGH after error(...) + or error_at_line(...) invocations. */ + +/* The include_next requires a split double-inclusion guard. */ +#if 0 +# include +#endif + +#ifndef _GL_GTPO_ERROR_H +#define _GL_GTPO_ERROR_H + +/* This file uses _GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_FORMAT, + _GL_ATTRIBUTE_MAYBE_UNUSED. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* Get 'unreachable'. */ +#include + +/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM. */ +#include + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +#if GNULIB_VFPRINTF_POSIX +# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD +#else +# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM +#endif + +/* Helper macro for supporting the compiler's control flow analysis better. + It evaluates its arguments only once. + Test case: Compile copy-file.c with "gcc -Wimplicit-fallthrough". */ +#if defined __GNUC__ || defined __clang__ +/* Use 'unreachable' to tell the compiler when the function call does not + return. */ +# define __gl_error_call1(function, status, ...) \ + ((function) (status, __VA_ARGS__), \ + (status) != 0 ? unreachable () : (void) 0) +/* If STATUS is a not a constant, the function call may or may not return; + therefore -Wimplicit-fallthrough will produce a warning. Use a compound + statement in order to evaluate STATUS only once. + If STATUS is a constant, we don't use a compound statement, because that + would trigger a -Wimplicit-fallthrough warning even when STATUS is != 0, + when not optimizing. This causes STATUS to be evaluated twice, but + that's OK since it does not have side effects. */ +# define __gl_error_call(function, status, ...) \ + (__builtin_constant_p (status) \ + ? __gl_error_call1 (function, status, __VA_ARGS__) \ + : __extension__ \ + ({ \ + int const __errstatus = status; \ + __gl_error_call1 (function, __errstatus, __VA_ARGS__); \ + })) +#else +# define __gl_error_call(function, status, ...) \ + (function) (status, __VA_ARGS__) +#endif + +#if GNULIB_REPLACE_ERROR +# undef error_print_progname +# undef error_message_count +# undef error_one_per_line +# define error_print_progname rpl_error_print_progname +# define error_message_count rpl_error_message_count +# define error_one_per_line rpl_error_one_per_line +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Print a message with 'fprintf (stderr, FORMAT, ...)'; + if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). + If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */ +#if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef error +# define error rpl_error +# endif +_GL_FUNCDECL_RPL (error, void, + (int __status, int __errnum, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4))); +_GL_CXXALIAS_RPL (error, void, + (int __status, int __errnum, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# undef error +# define error(status, ...) \ + __gl_error_call (rpl_error, status, __VA_ARGS__) +# endif +#else +# if ! 0 +_GL_FUNCDECL_SYS (error, void, + (int __status, int __errnum, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4))); +# endif +_GL_CXXALIAS_SYS (error, void, + (int __status, int __errnum, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# ifdef error +/* Only gcc ≥ 4.7 has __builtin_va_arg_pack. */ +# if _GL_GNUC_PREREQ (4, 7) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wattributes" +_GL_ATTRIBUTE_MAYBE_UNUSED +static void +_GL_ATTRIBUTE_ALWAYS_INLINE +_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4)) +_gl_inline_error (int __status, int __errnum, const char *__format, ...) +{ + return error (__status, __errnum, __format, __builtin_va_arg_pack ()); +} +# pragma GCC diagnostic pop +# undef error +# define error(status, ...) \ + __gl_error_call (_gl_inline_error, status, __VA_ARGS__) +# endif +# else +# define error(status, ...) \ + __gl_error_call (error, status, __VA_ARGS__) +# endif +# endif +#endif +#if __GLIBC__ >= 2 +_GL_CXXALIASWARN (error); +#endif + +/* Likewise. If FILENAME is non-NULL, include FILENAME:LINENO: in the + message. */ +#if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef error_at_line +# define error_at_line rpl_error_at_line +# endif +_GL_FUNCDECL_RPL (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6))); +_GL_CXXALIAS_RPL (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# undef error_at_line +# define error_at_line(status, ...) \ + __gl_error_call (rpl_error_at_line, status, __VA_ARGS__) +# endif +#else +# if ! 0 +_GL_FUNCDECL_SYS (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6))); +# endif +_GL_CXXALIAS_SYS (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# ifdef error_at_line +/* Only gcc ≥ 4.7 has __builtin_va_arg_pack. */ +# if _GL_GNUC_PREREQ (4, 7) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wattributes" +_GL_ATTRIBUTE_MAYBE_UNUSED +static void +_GL_ATTRIBUTE_ALWAYS_INLINE +_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6)) +_gl_inline_error_at_line (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) +{ + return error_at_line (__status, __errnum, __filename, __lineno, __format, + __builtin_va_arg_pack ()); +} +# pragma GCC diagnostic pop +# undef error_at_line +# define error_at_line(status, ...) \ + __gl_error_call (_gl_inline_error_at_line, status, __VA_ARGS__) +# endif +# else +# define error_at_line(status, ...) \ + __gl_error_call (error_at_line, status, __VA_ARGS__) +# endif +# endif +#endif +_GL_CXXALIASWARN (error_at_line); + +/* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +extern DLL_VARIABLE void (*error_print_progname) (void); + +/* This variable is incremented each time 'error' is called. */ +extern DLL_VARIABLE unsigned int error_message_count; + +/* Sometimes we want to have at most one error per line. This + variable controls whether this mode is selected or not. */ +extern DLL_VARIABLE int error_one_per_line; + +#ifdef __cplusplus +} +#endif + +#endif /* _GL_GTPO_ERROR_H */ +#endif /* _GL_GTPO_ERROR_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/fcntl.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/fcntl.h index fa6a1b0ee..d42689c38 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/fcntl.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/fcntl.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Like , but with non-working flags defined to 0. - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* written by Paul Eggert */ @@ -38,14 +38,10 @@ #if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))) # include #endif -#if (_MSC_VER < 1900) -#include "../include/fcntl.h" -#else #include "../ucrt/fcntl.h" -#endif /* Native Windows platforms declare open(), creat() in . */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || 1 || defined GNULIB_POSIXCHECK) \ +#if (0 || 1 || defined GNULIB_POSIXCHECK) \ && (defined _WIN32 && ! defined __CYGWIN__) # include #endif @@ -68,14 +64,10 @@ # include #endif /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/fcntl.h" -#else #include "../ucrt/fcntl.h" -#endif /* Native Windows platforms declare open(), creat() in . */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || 1 || defined GNULIB_POSIXCHECK) \ +#if (0 || 1 || defined GNULIB_POSIXCHECK) \ && (defined _WIN32 && ! defined __CYGWIN__) # include #endif @@ -83,6 +75,11 @@ #ifndef _GL_GTPO_FCNTL_H #define _GL_GTPO_FCNTL_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ # include #endif @@ -90,19 +87,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -190,6 +187,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -237,6 +240,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -262,6 +275,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -359,7 +380,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -387,9 +408,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -405,26 +426,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -433,19 +454,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -518,13 +539,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -533,27 +561,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -572,7 +606,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use /* Declare overridden functions. */ -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef creat @@ -581,6 +615,12 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use _GL_FUNCDECL_RPL (creat, int, (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (creat, int, (const char *filename, mode_t mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef creat +# define creat _creat +# endif +_GL_CXXALIAS_MDA (creat, int, (const char *filename, mode_t mode)); # else _GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); # endif @@ -590,6 +630,21 @@ _GL_CXXALIASWARN (creat); /* Assume creat is always declared. */ _GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - " "use gnulib module creat for portability"); +#elif 1 +/* On native Windows, map 'creat' to '_creat', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::creat always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef creat +# define creat _creat +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (creat, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (creat); #endif #if 1 @@ -630,6 +685,12 @@ _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef open +# define open _open +# endif +_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); # else _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); # endif @@ -643,6 +704,22 @@ _GL_CXXALIASWARN (open); /* Assume open is always declared. */ _GL_WARN_ON_USE (open, "open is not always POSIX compliant - " "use gnulib module open for portability"); +#elif 1 +/* On native Windows, map 'open' to '_open', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::open always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef open +# define open _open +# endif +_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); +# else +_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); +# endif +# if !defined __hpux +_GL_CXXALIASWARN (open); +# endif #endif #if 0 @@ -657,7 +734,7 @@ _GL_FUNCDECL_RPL (openat, int, _GL_CXXALIAS_RPL (openat, int, (int fd, char const *file, int flags, /* mode_t mode */ ...)); # else -# if !1 +# if !0 _GL_FUNCDECL_SYS (openat, int, (int fd, char const *file, int flags, /* mode_t mode */ ...) _GL_ARG_NONNULL ((2))); @@ -876,6 +953,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " # define AT_EACCESS 4 #endif +/* Ignore this flag if not supported. */ +#ifndef AT_NO_AUTOMOUNT +# define AT_NO_AUTOMOUNT 0 +#endif #endif /* _GL_GTPO_FCNTL_H */ #endif /* _GL_GTPO_FCNTL_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/gettext-po.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/gettext-po.h index 294b4fb25..49b8ee7a9 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/gettext-po.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/gettext-po.h @@ -1,5 +1,5 @@ /* Public API for GNU gettext PO files - contained in libgettextpo. - Copyright (C) 2003-2008, 2010, 2012-2016, 2019-2020 Free Software Foundation, Inc. + Copyright (C) 2003-2008, 2010, 2012-2016, 2019-2023 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software: you can redistribute it and/or modify @@ -24,22 +24,12 @@ extern "C" { #endif -#ifdef _MSC_VER -# ifdef IN_LIBGETTEXTPO -# define LIBGETTEXTPO_DLL_EXPORTED __declspec(dllexport) -# else -# define LIBGETTEXTPO_DLL_EXPORTED __declspec(dllimport) -# endif -#else -# define LIBGETTEXTPO_DLL_EXPORTED -#endif - /* =========================== Meta Information ============================ */ /* Version number: (major<<16) + (minor<<8) + subminor */ -#define LIBGETTEXTPO_VERSION 0x001500 -extern LIBGETTEXTPO_DLL_EXPORTED int libgettextpo_version; +#define LIBGETTEXTPO_VERSION 0x001603 +extern __declspec (dllimport) int libgettextpo_version; /* ================================= Types ================================= */ @@ -138,25 +128,25 @@ typedef const struct po_xerror_handler *po_xerror_handler_t; /* ============================= po_file_t API ============================= */ /* Create an empty PO file representation in memory. */ -extern LIBGETTEXTPO_DLL_EXPORTED po_file_t po_file_create (void); +extern po_file_t po_file_create (void); /* Read a PO file into memory. Return its contents. Upon failure, call function from handler. */ #define po_file_read po_file_read_v3 -extern LIBGETTEXTPO_DLL_EXPORTED po_file_t po_file_read (const char *filename, - po_xerror_handler_t handler); +extern po_file_t po_file_read (const char *filename, + po_xerror_handler_t handler); /* Write an in-memory PO file to a file. Upon failure, call function from handler. */ #define po_file_write po_file_write_v2 -extern LIBGETTEXTPO_DLL_EXPORTED po_file_t po_file_write (po_file_t file, const char *filename, - po_xerror_handler_t handler); +extern po_file_t po_file_write (po_file_t file, const char *filename, + po_xerror_handler_t handler); /* Free a PO file from memory. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_file_free (po_file_t file); +extern void po_file_free (po_file_t file); /* Return the names of the domains covered by a PO file in memory. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * const * po_file_domains (po_file_t file); +extern const char * const * po_file_domains (po_file_t file); /* =========================== Header entry API ============================ */ @@ -164,200 +154,200 @@ extern LIBGETTEXTPO_DLL_EXPORTED const char * const * po_file_domains (po_file_t /* Return the header entry of a domain of a PO file in memory. The domain NULL denotes the default domain. Return NULL if there is no header entry. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_file_domain_header (po_file_t file, const char *domain); +extern const char * po_file_domain_header (po_file_t file, const char *domain); /* Return the value of a field in a header entry. The return value is either a freshly allocated string, to be freed by the caller, or NULL. */ -extern LIBGETTEXTPO_DLL_EXPORTED char * po_header_field (const char *header, const char *field); +extern char * po_header_field (const char *header, const char *field); /* Return the header entry with a given field set to a given value. The field is added if necessary. The return value is a freshly allocated string. */ -extern LIBGETTEXTPO_DLL_EXPORTED char * po_header_set_field (const char *header, const char *field, const char *value); +extern char * po_header_set_field (const char *header, const char *field, const char *value); /* ======================= po_message_iterator_t API ======================= */ /* Create an iterator for traversing a domain of a PO file in memory. The domain NULL denotes the default domain. */ -extern LIBGETTEXTPO_DLL_EXPORTED po_message_iterator_t po_message_iterator (po_file_t file, const char *domain); +extern po_message_iterator_t po_message_iterator (po_file_t file, const char *domain); /* Free an iterator. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_iterator_free (po_message_iterator_t iterator); +extern void po_message_iterator_free (po_message_iterator_t iterator); /* Return the next message, and advance the iterator. Return NULL at the end of the message list. */ -extern LIBGETTEXTPO_DLL_EXPORTED po_message_t po_next_message (po_message_iterator_t iterator); +extern po_message_t po_next_message (po_message_iterator_t iterator); /* Insert a message in a PO file in memory, in the domain and at the position indicated by the iterator. The iterator thereby advances past the freshly inserted message. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_insert (po_message_iterator_t iterator, po_message_t message); +extern void po_message_insert (po_message_iterator_t iterator, po_message_t message); /* =========================== po_message_t API ============================ */ /* Return a freshly constructed message. To finish initializing the message, you must set the msgid and msgstr. */ -extern LIBGETTEXTPO_DLL_EXPORTED po_message_t po_message_create (void); +extern po_message_t po_message_create (void); /* Return the context of a message, or NULL for a message not restricted to a context. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_message_msgctxt (po_message_t message); +extern const char * po_message_msgctxt (po_message_t message); /* Change the context of a message. NULL means a message not restricted to a context. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_msgctxt (po_message_t message, const char *msgctxt); +extern void po_message_set_msgctxt (po_message_t message, const char *msgctxt); /* Return the msgid (untranslated English string) of a message. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_message_msgid (po_message_t message); +extern const char * po_message_msgid (po_message_t message); /* Change the msgid (untranslated English string) of a message. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_msgid (po_message_t message, const char *msgid); +extern void po_message_set_msgid (po_message_t message, const char *msgid); /* Return the msgid_plural (untranslated English plural string) of a message, or NULL for a message without plural. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_message_msgid_plural (po_message_t message); +extern const char * po_message_msgid_plural (po_message_t message); /* Change the msgid_plural (untranslated English plural string) of a message. NULL means a message without plural. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_msgid_plural (po_message_t message, const char *msgid_plural); +extern void po_message_set_msgid_plural (po_message_t message, const char *msgid_plural); /* Return the msgstr (translation) of a message. Return the empty string for an untranslated message. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_message_msgstr (po_message_t message); +extern const char * po_message_msgstr (po_message_t message); /* Change the msgstr (translation) of a message. Use an empty string to denote an untranslated message. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_msgstr (po_message_t message, const char *msgstr); +extern void po_message_set_msgstr (po_message_t message, const char *msgstr); /* Return the msgstr[index] for a message with plural handling, or NULL when the index is out of range or for a message without plural. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_message_msgstr_plural (po_message_t message, int index); +extern const char * po_message_msgstr_plural (po_message_t message, int index); /* Change the msgstr[index] for a message with plural handling. Use a NULL value at the end to reduce the number of plural forms. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_msgstr_plural (po_message_t message, int index, const char *msgstr); +extern void po_message_set_msgstr_plural (po_message_t message, int index, const char *msgstr); /* Return the comments for a message. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_message_comments (po_message_t message); +extern const char * po_message_comments (po_message_t message); /* Change the comments for a message. comments should be a multiline string, ending in a newline, or empty. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_comments (po_message_t message, const char *comments); +extern void po_message_set_comments (po_message_t message, const char *comments); /* Return the extracted comments for a message. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_message_extracted_comments (po_message_t message); +extern const char * po_message_extracted_comments (po_message_t message); /* Change the extracted comments for a message. comments should be a multiline string, ending in a newline, or empty. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_extracted_comments (po_message_t message, const char *comments); +extern void po_message_set_extracted_comments (po_message_t message, const char *comments); /* Return the i-th file position for a message, or NULL if i is out of range. */ -extern LIBGETTEXTPO_DLL_EXPORTED po_filepos_t po_message_filepos (po_message_t message, int i); +extern po_filepos_t po_message_filepos (po_message_t message, int i); /* Remove the i-th file position from a message. The indices of all following file positions for the message are decremented by one. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_remove_filepos (po_message_t message, int i); +extern void po_message_remove_filepos (po_message_t message, int i); /* Add a file position to a message, if it is not already present for the message. file is the file name. start_line is the line number where the string starts, or (size_t)(-1) if no line number is available. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_add_filepos (po_message_t message, const char *file, size_t start_line); +extern void po_message_add_filepos (po_message_t message, const char *file, size_t start_line); /* Return the previous context of a message, or NULL for none. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_message_prev_msgctxt (po_message_t message); +extern const char * po_message_prev_msgctxt (po_message_t message); /* Change the previous context of a message. NULL is allowed. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_prev_msgctxt (po_message_t message, const char *prev_msgctxt); +extern void po_message_set_prev_msgctxt (po_message_t message, const char *prev_msgctxt); /* Return the previous msgid (untranslated English string) of a message, or NULL for none. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_message_prev_msgid (po_message_t message); +extern const char * po_message_prev_msgid (po_message_t message); /* Change the previous msgid (untranslated English string) of a message. NULL is allowed. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_prev_msgid (po_message_t message, const char *prev_msgid); +extern void po_message_set_prev_msgid (po_message_t message, const char *prev_msgid); /* Return the previous msgid_plural (untranslated English plural string) of a message, or NULL for none. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_message_prev_msgid_plural (po_message_t message); +extern const char * po_message_prev_msgid_plural (po_message_t message); /* Change the previous msgid_plural (untranslated English plural string) of a message. NULL is allowed. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_prev_msgid_plural (po_message_t message, const char *prev_msgid_plural); +extern void po_message_set_prev_msgid_plural (po_message_t message, const char *prev_msgid_plural); /* Return true if the message is marked obsolete. */ -extern LIBGETTEXTPO_DLL_EXPORTED int po_message_is_obsolete (po_message_t message); +extern int po_message_is_obsolete (po_message_t message); /* Change the obsolete mark of a message. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_obsolete (po_message_t message, int obsolete); +extern void po_message_set_obsolete (po_message_t message, int obsolete); /* Return true if the message is marked fuzzy. */ -extern LIBGETTEXTPO_DLL_EXPORTED int po_message_is_fuzzy (po_message_t message); +extern int po_message_is_fuzzy (po_message_t message); /* Change the fuzzy mark of a message. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_fuzzy (po_message_t message, int fuzzy); +extern void po_message_set_fuzzy (po_message_t message, int fuzzy); /* Return true if the message is marked as being a format string of the given type (e.g. "c-format"). */ -extern LIBGETTEXTPO_DLL_EXPORTED int po_message_is_format (po_message_t message, const char *format_type); +extern int po_message_is_format (po_message_t message, const char *format_type); /* Change the format string mark for a given type of a message. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_format (po_message_t message, const char *format_type, /*bool*/int value); +extern void po_message_set_format (po_message_t message, const char *format_type, /*bool*/int value); /* If a numeric range of a message is set, return true and store the minimum and maximum value in *MINP and *MAXP. */ -extern LIBGETTEXTPO_DLL_EXPORTED int po_message_is_range (po_message_t message, int *minp, int *maxp); +extern int po_message_is_range (po_message_t message, int *minp, int *maxp); /* Change the numeric range of a message. MIN and MAX must be non-negative, with MIN < MAX. Use MIN = MAX = -1 to remove the numeric range of a message. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_set_range (po_message_t message, int min, int max); +extern void po_message_set_range (po_message_t message, int min, int max); /* =========================== po_filepos_t API ============================ */ /* Return the file name. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_filepos_file (po_filepos_t filepos); +extern const char * po_filepos_file (po_filepos_t filepos); /* Return the line number where the string starts, or (size_t)(-1) if no line number is available. */ -extern LIBGETTEXTPO_DLL_EXPORTED size_t po_filepos_start_line (po_filepos_t filepos); +extern size_t po_filepos_start_line (po_filepos_t filepos); /* ============================ Format type API ============================= */ /* Return a NULL terminated array of the supported format types. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * const * po_format_list (void); +extern const char * const * po_format_list (void); /* Return the pretty name associated with a format type. For example, for "csharp-format", return "C#". Return NULL if the argument is not a supported format type. */ -extern LIBGETTEXTPO_DLL_EXPORTED const char * po_format_pretty_name (const char *format_type); +extern const char * po_format_pretty_name (const char *format_type); /* ============================= Checking API ============================== */ /* Test whether an entire file PO file is valid, like msgfmt does it. If it is invalid, pass the reasons to the handler. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_file_check_all (po_file_t file, po_xerror_handler_t handler); +extern void po_file_check_all (po_file_t file, po_xerror_handler_t handler); /* Test a single message, to be inserted in a PO file in memory, like msgfmt does it. If it is invalid, pass the reasons to the handler. The iterator is not modified by this call; it only specifies the file and the domain. */ -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_check_all (po_message_t message, po_message_iterator_t iterator, po_xerror_handler_t handler); +extern void po_message_check_all (po_message_t message, po_message_iterator_t iterator, po_xerror_handler_t handler); /* Test whether the message translation is a valid format string if the message is marked as being a format string. If it is invalid, pass the reasons to the handler. */ #define po_message_check_format po_message_check_format_v2 -extern LIBGETTEXTPO_DLL_EXPORTED void po_message_check_format (po_message_t message, po_xerror_handler_t handler); +extern void po_message_check_format (po_message_t message, po_xerror_handler_t handler); #ifdef __cplusplus diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/iconv.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/iconv.h index 530896074..2de4d0109 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/iconv.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/iconv.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_GTPO_ICONV_H @@ -29,21 +29,26 @@ #ifndef _GL_GTPO_ICONV_H #define _GL_GTPO_ICONV_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -131,6 +136,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -178,6 +189,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -203,6 +224,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -300,7 +329,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -328,9 +357,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -346,26 +375,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -374,19 +403,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -459,13 +488,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -474,27 +510,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/inttypes.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/inttypes.h index 73307a6d9..ee4cbd1aa 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/inttypes.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/inttypes.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2006-2020 Free Software Foundation, Inc. +/* Copyright (C) 2006-2023 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* @@ -25,6 +25,12 @@ #endif +#ifdef _WIN64 +# define GNULIB_PTR_MOD "ll" +#else +# define GNULIB_PTR_MOD "l" +#endif + /* Include the original if it exists, and if this file has not been included yet or if this file includes gnulib stdint.h @@ -38,11 +44,7 @@ # define __STDC_FORMAT_MACROS 1 # endif -#if (_MSC_VER < 1900) -#include "../include/inttypes.h" -#else -#include "../ucrt/inttypes.h" -#endif +# include "../ucrt/inttypes.h" # define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H # endif @@ -51,6 +53,11 @@ #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H #define INTTYPES_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Include or the gnulib replacement. But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ @@ -69,19 +76,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -169,6 +176,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -216,6 +229,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -241,6 +264,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -338,7 +369,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -366,9 +397,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -384,26 +415,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -412,19 +443,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -497,13 +528,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -512,27 +550,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -956,32 +1000,32 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use #if !defined PRIdPTR # ifdef INTPTR_MAX -# define PRIdPTR "ll" "d" +# define PRIdPTR GNULIB_PTR_MOD "d" # endif #endif #if !defined PRIiPTR # ifdef INTPTR_MAX -# define PRIiPTR "ll" "i" +# define PRIiPTR GNULIB_PTR_MOD "i" # endif #endif #if !defined PRIoPTR # ifdef UINTPTR_MAX -# define PRIoPTR "ll" "o" +# define PRIoPTR GNULIB_PTR_MOD "o" # endif #endif #if !defined PRIuPTR # ifdef UINTPTR_MAX -# define PRIuPTR "ll" "u" +# define PRIuPTR GNULIB_PTR_MOD "u" # endif #endif #if !defined PRIxPTR # ifdef UINTPTR_MAX -# define PRIxPTR "ll" "x" +# define PRIxPTR GNULIB_PTR_MOD "x" # endif #endif #if !defined PRIXPTR # ifdef UINTPTR_MAX -# define PRIXPTR "ll" "X" +# define PRIXPTR GNULIB_PTR_MOD "X" # endif #endif @@ -1352,27 +1396,27 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use #if !defined SCNdPTR # ifdef INTPTR_MAX -# define SCNdPTR "ll" "d" +# define SCNdPTR GNULIB_PTR_MOD "d" # endif #endif #if !defined SCNiPTR # ifdef INTPTR_MAX -# define SCNiPTR "ll" "i" +# define SCNiPTR GNULIB_PTR_MOD "i" # endif #endif #if !defined SCNoPTR # ifdef UINTPTR_MAX -# define SCNoPTR "ll" "o" +# define SCNoPTR GNULIB_PTR_MOD "o" # endif #endif #if !defined SCNuPTR # ifdef UINTPTR_MAX -# define SCNuPTR "ll" "u" +# define SCNuPTR GNULIB_PTR_MOD "u" # endif #endif #if !defined SCNxPTR # ifdef UINTPTR_MAX -# define SCNxPTR "ll" "x" +# define SCNxPTR GNULIB_PTR_MOD "x" # endif #endif @@ -1383,8 +1427,21 @@ extern "C" { #endif #if 0 -# if !1 -extern intmax_t imaxabs (intmax_t); +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxabs +# define imaxabs rpl_imaxabs +# endif +_GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x)); +_GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +_GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxabs); # endif #elif defined GNULIB_POSIXCHECK # undef imaxabs @@ -1401,8 +1458,21 @@ typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; # define GNULIB_defined_imaxdiv_t 1 # endif # endif -# if !1 -extern imaxdiv_t imaxdiv (intmax_t, intmax_t); +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxdiv +# define imaxdiv rpl_imaxdiv +# endif +_GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +_GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +_GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxdiv); # endif #elif defined GNULIB_POSIXCHECK # undef imaxdiv diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/limits.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/limits.h index 5091032e0..2e38f0570 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/limits.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/limits.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright 2016-2020 Free Software Foundation, Inc. + Copyright 2016-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 3, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -100,10 +100,16 @@ # endif #endif -/* Macros specified by ISO/IEC TS 18661-1:2014. */ +/* Assume no multibyte character is longer than 16 bytes. */ +#ifndef MB_LEN_MAX +# define MB_LEN_MAX 16 +#endif + +/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */ #if (! defined ULLONG_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) + && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) # define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) # define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) # define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) @@ -115,7 +121,31 @@ # define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) # define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) # define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) -#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ +#endif + +/* Macros specified by C23. */ + +#if (defined _GNU_SOURCE \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)) +# if ! defined BOOL_WIDTH +# define BOOL_WIDTH 1 +# define BOOL_MAX 1 +# elif ! defined BOOL_MAX +# define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1) +# endif +#endif + +/* Macro specified by POSIX. */ + +/* The maximum ssize_t value. Although it might not be of ssize_t type + as it should be, it's too much trouble to fix this minor detail. */ +#ifndef SSIZE_MAX +# ifdef _WIN64 +# define SSIZE_MAX LLONG_MAX +# else +# define SSIZE_MAX LONG_MAX +# endif +#endif #endif /* _GL_GTPO_LIMITS_H */ #endif /* _GL_GTPO_LIMITS_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/locale.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/locale.h index c0b6e51ab..4d910b175 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/locale.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/locale.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A POSIX . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -28,11 +28,7 @@ - To handle Solaris header files (through Solaris 10) when combined with gettext's libintl.h. */ -#if (_MSC_VER < 1900) -#include "../include/locale.h" -#else #include "../ucrt/locale.h" -#endif #else /* Normal invocation convention. */ @@ -42,17 +38,18 @@ #define _GL_ALREADY_INCLUDING_LOCALE_H /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/locale.h" -#else #include "../ucrt/locale.h" -#endif #undef _GL_ALREADY_INCLUDING_LOCALE_H #ifndef _GL_GTPO_LOCALE_H #define _GL_GTPO_LOCALE_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include @@ -63,19 +60,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -163,6 +160,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -210,6 +213,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -235,6 +248,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -332,7 +353,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -360,9 +381,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -378,26 +399,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -406,19 +427,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -491,13 +512,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -506,27 +534,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -641,7 +675,7 @@ struct lconv }; #endif -#if IN_GETTEXT_TOOLS_LIBGREP +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localeconv @@ -667,7 +701,7 @@ _GL_WARN_ON_USE (localeconv, # endif #endif -#if 1 +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef setlocale @@ -695,8 +729,8 @@ _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " # include "setlocale_null.h" #endif -#if /*@GNULIB_NEWLOCALE@ ||*/ (1 && 0) -# if 0 +#if /*@GNULIB_NEWLOCALE@ ||*/ (0 && 0 && 0) +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef newlocale # define newlocale rpl_newlocale @@ -713,10 +747,10 @@ _GL_CXXALIAS_SYS (newlocale, locale_t, (int category_mask, const char *name, locale_t base)); # endif # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (newlocale); # endif -# if 0 || 0 +# if 0 || 1 # ifndef HAVE_WORKING_NEWLOCALE # define HAVE_WORKING_NEWLOCALE 1 # endif @@ -728,24 +762,24 @@ _GL_WARN_ON_USE (newlocale, "newlocale is not portable"); # endif #endif -#if 0 || (1 && 0) -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef duplocale -# define duplocale rpl_duplocale -# define GNULIB_defined_duplocale 1 -# endif +#if 0 || (0 && 0 && 0) +# if 0 /* locale_t may be undefined if !0. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef duplocale +# define duplocale rpl_duplocale +# define GNULIB_defined_duplocale 1 +# endif _GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); -# else -# if 0 +# else _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); # endif # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (duplocale); # endif -# if 0 || 0 +# if 0 # ifndef HAVE_WORKING_DUPLOCALE # define HAVE_WORKING_DUPLOCALE 1 # endif @@ -758,8 +792,8 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " # endif #endif -#if /*@GNULIB_FREELOCALE@ ||*/ (1 && 0) -# if 0 +#if /*@GNULIB_FREELOCALE@ ||*/ (0 && 0 && 0) +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef freelocale # define freelocale rpl_freelocale @@ -774,7 +808,7 @@ _GL_CXXALIAS_RPL (freelocale, void, (locale_t locale)); _GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale)); # endif # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (freelocale); # endif #elif defined GNULIB_POSIXCHECK diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/signal.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/signal.h index d9725b0d3..f2dcd4bc5 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/signal.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/signal.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -33,11 +33,7 @@ In this situation, some of the functions are not yet declared, therefore we cannot provide the C++ aliases. */ -#if (_MSC_VER < 1900) -#include "../include/signal.h" -#else -#include "../ucrt/signal.h" -#endif +# include "../ucrt/signal.h" #else /* Normal invocation convention. */ @@ -53,43 +49,52 @@ #include /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/signal.h" -#else #include "../ucrt/signal.h" -#endif #undef _GL_ALREADY_INCLUDING_SIGNAL_H #ifndef _GL_GTPO_SIGNAL_H #define _GL_GTPO_SIGNAL_H -/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android - declare pthread_sigmask in , not in . +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* For testing the OpenBSD version. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && defined __OpenBSD__ +# include +#endif + +/* Mac OS X 10.3, FreeBSD < 8.0, OpenBSD < 5.1, OSF/1 4.0, Solaris 2.6, Android, + OS/2 kLIBC declare pthread_sigmask in , not in . But avoid namespace pollution on glibc systems.*/ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ +#if (0 || defined GNULIB_POSIXCHECK) \ && ((defined __APPLE__ && defined __MACH__) \ - || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \ - || defined __sun || defined __ANDROID__) \ + || (defined __FreeBSD__ && __FreeBSD__ < 8) \ + || (defined __OpenBSD__ && OpenBSD < 201205) \ + || defined __osf__ || defined __sun || defined __ANDROID__ \ + || defined __KLIBC__) \ && ! defined __GLIBC__ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -177,6 +182,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -224,6 +235,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -249,6 +270,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -346,7 +375,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -374,9 +403,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -392,26 +421,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -420,19 +449,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -505,13 +534,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -520,27 +556,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -610,7 +652,7 @@ typedef void (*sighandler_t) (int); #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pthread_sigmask @@ -875,7 +917,7 @@ _GL_WARN_ON_USE (sigprocmask, "sigprocmask is unportable - " #endif /* 1 */ -#if 1 +#if 0 # if !0 # if !0 diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdckdint.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdckdint.h new file mode 100644 index 000000000..edcda2982 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdckdint.h @@ -0,0 +1,36 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* stdckdint.h -- checked integer arithmetic + + Copyright 2022-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_STDCKDINT_H +#define _GL_STDCKDINT_H + +#include "intprops-internal.h" + +/* Store into *R the low-order bits of A + B, A - B, A * B, respectively. + Return 1 if the result overflows, 0 otherwise. + A, B, and *R can have any integer type other than char, bool, a + bit-precise integer type, or an enumeration type. + + These are like the standard macros introduced in C23, except that + arguments should not have side effects. */ + +#define ckd_add(r, a, b) ((bool) _GL_INT_ADD_WRAPV (a, b, r)) +#define ckd_sub(r, a, b) ((bool) _GL_INT_SUBTRACT_WRAPV (a, b, r)) +#define ckd_mul(r, a, b) ((bool) _GL_INT_MULTIPLY_WRAPV (a, b, r)) + +#endif /* _GL_STDCKDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stddef.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stddef.h index 5953440e0..1f878524b 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stddef.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stddef.h @@ -1,25 +1,25 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for POSIX 2008 , for platforms that have issues. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake. */ /* - * POSIX 2008 for platforms that have issues. + * POSIX 2008 and ISO C 23 for platforms that have issues. * */ @@ -38,15 +38,18 @@ remember if special invocation has ever been used to obtain wint_t, in which case we need to clean up NULL yet again. */ -# if !(defined _GL_GTPO_STDDEF_H && defined _GL_STDDEF_WINT_T) +# if !(defined _GL_GTPO_STDDEF_H && defined _GL_GTPO_STDDEF_WINT_T) # ifdef __need_wint_t -# define _GL_STDDEF_WINT_T +# define _GL_GTPO_STDDEF_WINT_T # endif -#if (_MSC_VER < 1900) -#include "../include/stddef.h" -#else -#include "../ucrt/stddef.h" -#endif +# include "../ucrt/stddef.h" + /* On TinyCC, make sure that the macros that indicate the special invocation + convention get undefined. */ +# undef __need_wchar_t +# undef __need_size_t +# undef __need_ptrdiff_t +# undef __need_NULL +# undef __need_wint_t # endif #else @@ -54,17 +57,31 @@ # ifndef _GL_GTPO_STDDEF_H +/* On AIX 7.2, with xlc in 64-bit mode, defines max_align_t to a + type with alignment 4, but 'long' has alignment 8. */ +# if defined _AIX && defined __LP64__ && !0 +# if !GNULIB_defined_max_align_t +# ifdef _MAX_ALIGN_T +/* /usr/include/stddef.h has already defined max_align_t. Override it. */ +typedef long rpl_max_align_t; +# define max_align_t rpl_max_align_t +# else +/* Prevent /usr/include/stddef.h from defining max_align_t. */ +typedef long max_align_t; +# define _MAX_ALIGN_T +# endif +# define __CLANG_MAX_ALIGN_T_DEFINED +# define GNULIB_defined_max_align_t 1 +# endif +# endif + /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/stddef.h" -#else -#include "../ucrt/stddef.h" -#endif +# include "../ucrt/stddef.h" /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ # if (0 \ - && (!defined _GL_GTPO_STDDEF_H || defined _GL_STDDEF_WINT_T)) + && (!defined _GL_GTPO_STDDEF_H || defined _GL_GTPO_STDDEF_WINT_T)) # undef NULL # ifdef __cplusplus /* ISO C++ says that the macro NULL must expand to an integer constant @@ -85,6 +102,33 @@ # ifndef _GL_GTPO_STDDEF_H # define _GL_GTPO_STDDEF_H +/* This file uses _Noreturn, _GL_ATTRIBUTE_NOTHROW. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* Some platforms lack wchar_t. */ #if !1 # define wchar_t int @@ -95,18 +139,20 @@ we are currently compiling with gcc. On MSVC, max_align_t is defined only in C++ mode, after was included. Its definition is good since it has an alignment of 8 (on x86 - and x86_64). */ -#if defined _MSC_VER && defined __cplusplus + and x86_64). + Similarly on OS/2 kLIBC. */ +#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \ + && defined __cplusplus # include #else -# if ! (0 || defined _GCC_MAX_ALIGN_T) +# if ! (0 || (defined _GCC_MAX_ALIGN_T && !defined __clang__)) # if !GNULIB_defined_max_align_t /* On the x86, the maximum storage alignment of double, long, etc. is 4, but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, and the C11 standard allows this. Work around this problem by using __alignof__ (which returns 8 for double) rather than _Alignof (which returns 4), and align each union member accordingly. */ -# ifdef __GNUC__ +# if defined __GNUC__ || (__clang_major__ >= 4) # define _GL_STDDEF_ALIGNAS(type) \ __attribute__ ((__aligned__ (__alignof__ (type)))) # else @@ -120,11 +166,49 @@ typedef union long int __i _GL_STDDEF_ALIGNAS (long int); } rpl_max_align_t; # define max_align_t rpl_max_align_t +# define __CLANG_MAX_ALIGN_T_DEFINED # define GNULIB_defined_max_align_t 1 # endif # endif #endif +/* ISO C 23 § 7.21.1 The unreachable macro */ +#ifndef unreachable + +/* Code borrowed from verify.h. */ +# ifndef _GL_HAS_BUILTIN_UNREACHABLE +# if defined __clang_major__ && __clang_major__ < 5 +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__) +# define _GL_HAS_BUILTIN_UNREACHABLE 1 +# elif defined __has_builtin +# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable) +# else +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# endif +# endif + +# if _GL_HAS_BUILTIN_UNREACHABLE +# define unreachable() __builtin_unreachable () +# elif 1200 <= _MSC_VER +# define unreachable() __assume (0) +# else +/* Declare abort(), without including . */ +extern +# if defined __cplusplus +"C" +# endif +_Noreturn +void abort (void) +# if defined __cplusplus && (__GLIBC__ >= 2) +_GL_ATTRIBUTE_NOTHROW +# endif +; +# define unreachable() abort () +# endif + +#endif + # endif /* _GL_GTPO_STDDEF_H */ # endif /* _GL_GTPO_STDDEF_H */ #endif /* __need_XXX */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/libgettextpo/stdint.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdint.h similarity index 95% rename from gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/libgettextpo/stdint.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdint.h index becb64c1c..47382eb1c 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/libgettextpo/stdint.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdint.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2023 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* * ISO C 99 for platforms that lack it. @@ -303,12 +303,11 @@ typedef gl_uint_fast32_t gl_uint_fast16_t; /* kLIBC's defines _INTPTR_T_DECLARED and needs its own definitions of intptr_t and uintptr_t (which use int and unsigned) to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and + Similarly, MinGW WSL-5.4.1 needs its own intptr_t and uintptr_t to avoid conflicting declarations of system functions like _findclose in . */ # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) + || defined __MINGW32__) # undef intptr_t # undef uintptr_t # ifdef _WIN64 @@ -581,11 +580,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) -> -> -> , and the latter includes and assumes its types are already defined. */ # if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H @@ -594,13 +588,13 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # undef WCHAR_MAX # if # define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) + _STDINT_SIGNED_MIN (16, 0) # else # define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) + _STDINT_UNSIGNED_MIN (16, 0) # endif # define WCHAR_MAX \ - _STDINT_MAX (, , 0) + _STDINT_MAX (, 16, 0) /* wint_t limits */ /* If gnulib's or overrides wint_t, is not diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/libgettextpo/stdio.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdio.h similarity index 77% rename from gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/libgettextpo/stdio.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdio.h index 47b0c88e3..6c584cd21 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/libgettextpo/stdio.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdio.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -37,6 +37,12 @@ #ifndef _GL_GTPO_STDIO_H +/* Suppress macOS deprecation warnings for sprintf and vsprintf. */ +#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200809L +# define _GL_DEFINED__POSIX_C_SOURCE +#endif + #define _GL_ALREADY_INCLUDING_STDIO_H /* The include_next requires a split double-inclusion guard. */ @@ -44,9 +50,21 @@ #undef _GL_ALREADY_INCLUDING_STDIO_H +#ifdef _GL_DEFINED__POSIX_C_SOURCE +# undef _GL_DEFINED__POSIX_C_SOURCE +# undef _POSIX_C_SOURCE +#endif + #ifndef _GL_GTPO_STDIO_H #define _GL_GTPO_STDIO_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_FORMAT, + _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Get va_list. Needed on many systems, including glibc 2.8. */ #include @@ -57,6 +75,52 @@ May also define off_t to a 64-bit type on native Windows. */ #include +/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ + && ! defined __GLIBC__ +# include +#endif + +/* Android 4.3 declares renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'perror' in , not in . We must include + it before we #define perror rpl_perror. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'remove' in , not in . We must include + it before we #define remove rpl_remove. */ +/* MSVC declares 'rename' in , not in . We must include + it before we #define rename rpl_rename. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. @@ -64,37 +128,83 @@ gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__ # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) # else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ # endif #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones + standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD */ +/* __gnu_printf__ is supported in GCC >= 4.4. */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__ #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__ #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones of the + system printf(), rather than the ones standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM */ +/* On mingw, Gnulib sets __USE_MINGW_ANSI_STDIO in order to get closer to + the standards. The macro GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU indicates + whether this change is effective. On older mingw, it is not. */ #if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM __printf__ #endif +/* _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD + indicates to GCC that the function takes a format string and arguments, + where the format string directives are the ones standardized by ISO C99 + and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument)) + +/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD, + except that it indicates to GCC that the supported format string directives + are the ones of the system printf(), rather than the ones standardized by + ISO C99 and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, formatstring_parameter, first_argument)) + /* _GL_ATTRIBUTE_FORMAT_SCANF indicates to GCC that the function takes a format string and arguments, where the format string directives are the ones standardized by ISO C99 @@ -114,56 +224,21 @@ #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -251,6 +326,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -298,6 +379,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -323,6 +414,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -420,7 +519,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -448,9 +547,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -466,26 +565,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -494,19 +593,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -579,13 +678,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -594,27 +700,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -644,24 +756,56 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # undef putc_unlocked #endif + +/* Maximum number of characters produced by printing a NaN value. */ +#ifndef _PRINTF_NAN_LEN_MAX +# if defined __FreeBSD__ || defined __DragonFly__ \ + || defined __NetBSD__ \ + || (defined __APPLE__ && defined __MACH__) +/* On BSD systems, a NaN value prints as just "nan", without a sign. */ +# define _PRINTF_NAN_LEN_MAX 3 +# elif (__GLIBC__ >= 2) || MUSL_LIBC || defined __OpenBSD__ || defined __sun || defined __CYGWIN__ +/* glibc, musl libc, OpenBSD, Solaris libc, and Cygwin produce "[-]nan". */ +# define _PRINTF_NAN_LEN_MAX 4 +# elif defined _AIX +/* AIX produces "[-]NaNQ". */ +# define _PRINTF_NAN_LEN_MAX 5 +# elif defined _WIN32 && !defined __CYGWIN__ +/* On native Windows, the output can be: + - with MSVC ucrt: "[-]nan" or "[-]nan(ind)" or "[-]nan(snan)", + - with mingw: "[-]1.#IND" or "[-]1.#QNAN". */ +# define _PRINTF_NAN_LEN_MAX 10 +# elif defined __sgi +/* On IRIX, the output typically is "[-]nan0xNNNNNNNN" with 8 hexadecimal + digits. */ +# define _PRINTF_NAN_LEN_MAX 14 +# else +/* We don't know, but 32 should be a safe maximum. */ +# define _PRINTF_NAN_LEN_MAX 32 +# endif +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dprintf rpl_dprintf # endif _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); # else # if !1 _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (dprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF @@ -672,7 +816,7 @@ _GL_WARN_ON_USE (dprintf, "dprintf is unportable - " #if 0 /* Close STREAM and its underlying file descriptor. */ -# if 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fclose rpl_fclose # endif @@ -691,24 +835,103 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " "use gnulib module fclose for portable POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'fcloseall' to '_fcloseall', so that -loldnames is + not required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcloseall on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcloseall +# define fcloseall _fcloseall +# endif +_GL_CXXALIAS_MDA (fcloseall, int, (void)); +# else +# if 1 +# if defined __FreeBSD__ || defined __DragonFly__ +_GL_CXXALIAS_SYS (fcloseall, void, (void)); +# else +_GL_CXXALIAS_SYS (fcloseall, int, (void)); +# endif +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcloseall); +# endif +#endif + #if 1 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fdopen # define fdopen rpl_fdopen # endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); +_GL_FUNCDECL_RPL (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); # endif _GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen +#else +# if 0 && __GNUC__ >= 11 && !defined fdopen +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef fdopen /* Assume fdopen is always declared. */ _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " "use gnulib module fdopen for portability"); +# elif 1 +/* On native Windows, map 'fdopen' to '_fdopen', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fdopen always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); +# else +_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); +# endif +_GL_CXXALIASWARN (fdopen); +# endif #endif #if 0 @@ -718,7 +941,7 @@ _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compli that is _not_seekable_ or on an update stream that is _not_seekable_ and in which the most recent operation was input. Seekability can be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define fflush rpl_fflush # endif @@ -774,28 +997,60 @@ _GL_CXXALIASWARN (fgets); #endif #if 1 -# if 1 +/* On native Windows, map 'fileno' to '_fileno', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fileno always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fileno +# define fileno _fileno +# endif +_GL_CXXALIAS_MDA (fileno, int, (FILE *restrict stream)); +# else +_GL_CXXALIAS_SYS (fileno, int, (FILE *restrict stream)); +# endif +_GL_CXXALIASWARN (fileno); +#endif + +#if 1 +# if (1 && 1) \ + || (0 && 1) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fopen # define fopen rpl_fopen # endif _GL_FUNCDECL_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif _GL_CXXALIAS_SYS (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (fopen); # endif -#elif defined GNULIB_POSIXCHECK -# undef fopen +#else +# if 0 && __GNUC__ >= 11 && !defined fopen +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif +# if defined GNULIB_POSIXCHECK +# undef fopen /* Assume fopen is always declared. */ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " "use gnulib module fopen for portability"); +# endif #endif #if 0 || 1 @@ -808,7 +1063,7 @@ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX complian # if 0 || 0 _GL_FUNCDECL_RPL (fprintf, int, (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (fprintf, int, @@ -850,7 +1105,7 @@ _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); # else -# if !1 +# if !0 _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); @@ -924,7 +1179,7 @@ _GL_CXXALIASWARN (fread); #endif #if 0 -# if 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef freopen # define freopen rpl_freopen @@ -1010,7 +1265,7 @@ _GL_CXXALIASWARN (fscanf); # define _GL_FSEEK_WARN /* Category 2, above. */ # undef fseek # endif -# if 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fseek # define fseek rpl_fseek @@ -1042,7 +1297,7 @@ _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); # else -# if ! 1 +# if ! 0 _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1))); # endif @@ -1071,7 +1326,7 @@ _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " /* ftell, ftello. See the comments on fseek/fseeko. */ -#if 1 +#if 0 # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 2, above. */ # undef ftell @@ -1091,8 +1346,8 @@ _GL_CXXALIASWARN (ftell); # endif #endif -#if 1 -# if !1 && !defined _GL_NO_LARGE_FILES +#if 0 +# if !0 && !defined _GL_NO_LARGE_FILES # define _GL_FTELL_WARN /* Category 3, above. */ # undef ftell # endif @@ -1242,7 +1497,9 @@ _GL_CXXALIAS_SYS (getdelim, ssize_t, int delimiter, FILE *restrict stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getdelim); +# endif #elif defined GNULIB_POSIXCHECK # undef getdelim # if HAVE_RAW_DECL_GETDELIM @@ -1281,7 +1538,7 @@ _GL_CXXALIAS_SYS (getline, ssize_t, (char **restrict lineptr, size_t *restrict linesize, FILE *restrict stream)); # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (getline); # endif #elif defined GNULIB_POSIXCHECK @@ -1300,6 +1557,30 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif +#if 1 +/* On native Windows, map 'getw' to '_getw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getw +# define getw _getw +# endif +_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getw); +# endif +#endif + #if 0 || 0 struct obstack; /* Grow an obstack with formatted output. Return the number of @@ -1313,7 +1594,7 @@ struct obstack; # endif _GL_FUNCDECL_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...)); @@ -1321,7 +1602,7 @@ _GL_CXXALIAS_RPL (obstack_printf, int, # if !1 _GL_FUNCDECL_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_printf, int, @@ -1334,7 +1615,7 @@ _GL_CXXALIASWARN (obstack_printf); # endif _GL_FUNCDECL_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); @@ -1342,7 +1623,7 @@ _GL_CXXALIAS_RPL (obstack_vprintf, int, # if !1 _GL_FUNCDECL_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_vprintf, int, @@ -1365,7 +1646,7 @@ _GL_WARN_ON_USE (pclose, "pclose is unportable - " # endif #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 /* Print a message to standard error, describing the value of ERRNO, (if STRING is not NULL and not empty) prefixed with STRING and ": ", and terminated with a newline. */ @@ -1394,29 +1675,48 @@ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " # undef popen # define popen rpl_popen # endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +_GL_FUNCDECL_RPL (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); # else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +# if !1 || __GNUC__ >= 11 +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); # endif _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); # endif _GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN +#else +# if 0 && __GNUC__ >= 11 && !defined popen +/* For -Wmismatched-dealloc: Associate popen with pclose or rpl_pclose. */ +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef popen +# if HAVE_RAW_DECL_POPEN _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " "use gnulib module popen or pipe for more portability"); +# endif # endif #endif +#ifdef _WIN64 +# define GNULIB_SYM_PREFIX "" +#else +# define GNULIB_SYM_PREFIX "_" +#endif + #if 0 || 1 # if (0 && 0) \ || (1 && 1 && (0 || 1)) -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ @@ -1424,14 +1724,14 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " # if 0 || 0 _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *restrict format, ...) - __asm__ ("_" + __asm__ (GNULIB_SYM_PREFIX _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *restrict format, ...) - __asm__ ("_" + __asm__ (GNULIB_SYM_PREFIX _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); @@ -1443,7 +1743,7 @@ _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); # endif _GL_FUNCDECL_RPL (printf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); # endif @@ -1513,6 +1813,30 @@ _GL_CXXALIASWARN (puts); # endif #endif +#if 1 +/* On native Windows, map 'putw' to '_putw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putw +# define putw _putw +# endif +_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (putw); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1590,7 +1914,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - " #if 1 # if 0 && 0 -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef scanf /* Don't break __attribute__((format(scanf,M,N))). */ @@ -1598,7 +1922,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - " # endif _GL_FUNCDECL_RPL_1 (__scanf__, int, (const char *restrict format, ...) - __asm__ ("_" + __asm__ (GNULIB_SYM_PREFIX _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) _GL_ARG_NONNULL ((1))); @@ -1621,15 +1945,16 @@ _GL_CXXALIASWARN (scanf); # endif #endif -#if 1 +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif +# define GNULIB_overrides_snprintf 1 _GL_FUNCDECL_RPL (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (snprintf, int, (char *restrict str, size_t size, @@ -1639,14 +1964,16 @@ _GL_CXXALIAS_RPL (snprintf, int, _GL_FUNCDECL_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (snprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef snprintf # if HAVE_RAW_DECL_SNPRINTF @@ -1669,9 +1996,10 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif +# define GNULIB_overrides_sprintf 1 _GL_FUNCDECL_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...)); @@ -1690,24 +2018,56 @@ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " "POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'tempnam' to '_tempnam', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::tempnam always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tempnam +# define tempnam _tempnam +# endif +_GL_CXXALIAS_MDA (tempnam, char *, (const char *dir, const char *prefix)); +# else +_GL_CXXALIAS_SYS (tempnam, char *, (const char *dir, const char *prefix)); +# endif +_GL_CXXALIASWARN (tempnam); +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define tmpfile rpl_tmpfile # endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); +_GL_FUNCDECL_RPL (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (tmpfile); # endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE +#else +# if 0 && __GNUC__ >= 11 && !defined tmpfile +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef tmpfile +# if HAVE_RAW_DECL_TMPFILE _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " "use gnulib module tmpfile for portability"); +# endif # endif #endif @@ -1720,9 +2080,10 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif +# define GNULIB_overrides_asprintf _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (asprintf, int, (char **result, const char *format, ...)); @@ -1730,7 +2091,7 @@ _GL_CXXALIAS_RPL (asprintf, int, # if !0 _GL_FUNCDECL_SYS (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (asprintf, int, @@ -1741,9 +2102,10 @@ _GL_CXXALIASWARN (asprintf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif +# define GNULIB_overrides_vasprintf 1 _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vasprintf, int, (char **result, const char *format, va_list args)); @@ -1751,7 +2113,7 @@ _GL_CXXALIAS_RPL (vasprintf, int, # if !0 _GL_FUNCDECL_SYS (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (vasprintf, int, @@ -1767,7 +2129,7 @@ _GL_CXXALIASWARN (vasprintf); # endif _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args)); @@ -1775,7 +2137,7 @@ _GL_CXXALIAS_RPL (vdprintf, int, # if !1 _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); # endif /* Need to cast, because on Solaris, the third parameter will likely be @@ -1805,7 +2167,7 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " _GL_FUNCDECL_RPL (vfprintf, int, (FILE *restrict fp, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (vfprintf, int, @@ -1858,7 +2220,9 @@ _GL_CXXALIAS_SYS (vfscanf, int, (FILE *restrict stream, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vfscanf); +# endif #endif #if 0 || 1 @@ -1870,7 +2234,7 @@ _GL_CXXALIASWARN (vfscanf); # define GNULIB_overrides_vprintf 1 # if 0 || 0 _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) @@ -1912,18 +2276,21 @@ _GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); # else _GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vscanf); +# endif #endif -#if 1 +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif +# define GNULIB_overrides_vsnprintf 1 _GL_FUNCDECL_RPL (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (vsnprintf, int, (char *restrict str, size_t size, @@ -1933,14 +2300,16 @@ _GL_CXXALIAS_RPL (vsnprintf, int, _GL_FUNCDECL_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vsnprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef vsnprintf # if HAVE_RAW_DECL_VSNPRINTF @@ -1954,10 +2323,11 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif +# define GNULIB_overrides_vsprintf 1 _GL_FUNCDECL_RPL (vsprintf, int, (char *restrict str, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vsprintf, int, (char *restrict str, diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdlib.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdlib.h index 9deac35da..b8972fe15 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdlib.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/stdlib.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2020 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -25,11 +25,7 @@ /* Special invocation conventions inside some gnulib header files, and inside some glibc header files, respectively. */ -#if (_MSC_VER < 1900) -#include "../include/stdlib.h" -#else #include "../ucrt/stdlib.h" -#endif #else /* Normal invocation convention. */ @@ -37,15 +33,18 @@ #ifndef _GL_GTPO_STDLIB_H /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/stdlib.h" -#else #include "../ucrt/stdlib.h" -#endif #ifndef _GL_GTPO_STDLIB_H #define _GL_GTPO_STDLIB_H +/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include @@ -62,8 +61,8 @@ # include #endif -/* Native Windows platforms declare mktemp() in . */ -#if 0 && (defined _WIN32 && ! defined __CYGWIN__) +/* Native Windows platforms declare _mktemp() in . */ +#if defined _WIN32 && !defined __CYGWIN__ # include #endif @@ -76,9 +75,7 @@ # include # endif -# if !1 || 0 || !1 -# include -# endif +# include # if !1 /* Define 'struct random_data'. @@ -108,10 +105,61 @@ struct random_data # include #endif +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ @@ -120,19 +168,19 @@ struct random_data /* The definition of _Noreturn is copied here. */ /* A C macro for declaring that a function does not return. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _Noreturn @@ -147,14 +195,21 @@ struct random_data AIX system header files and several gnulib header files use precisely this syntax with 'extern'. */ # define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) /* _Noreturn works as-is. */ -# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C +# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \ + || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) @@ -165,19 +220,19 @@ struct random_data /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -265,6 +320,12 @@ struct random_data Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -312,6 +373,16 @@ struct random_data _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -337,6 +408,14 @@ struct random_data _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -434,7 +513,7 @@ struct random_data _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -462,9 +541,9 @@ struct random_data _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -480,26 +559,26 @@ struct random_data /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -508,19 +587,19 @@ struct random_data /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -593,13 +672,20 @@ struct random_data # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -608,27 +694,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -662,11 +754,22 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use #if 0 /* Terminate the current process with the given return code, without running the 'atexit' handlers. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef _Exit +# define _Exit rpl__Exit +# endif +_GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status)); +_GL_CXXALIAS_RPL (_Exit, void, (int status)); +# else +# if !1 _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); -# endif +# endif _GL_CXXALIAS_SYS (_Exit, void, (int status)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (_Exit); +# endif #elif defined GNULIB_POSIXCHECK # undef _Exit # if HAVE_RAW_DECL__EXIT @@ -676,6 +779,87 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " #endif +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef free +# define free rpl_free +# endif +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_FUNCDECL_RPL (free, void, (void *ptr) _GL_ATTRIBUTE_NOTHROW); +# else +_GL_FUNCDECL_RPL (free, void, (void *ptr)); +# endif +_GL_CXXALIAS_RPL (free, void, (void *ptr)); +# else +_GL_CXXALIAS_SYS (free, void, (void *ptr)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (free); +# endif +#elif defined GNULIB_POSIXCHECK +# undef free +/* Assume free is always declared. */ +_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - " + "use gnulib module free for portability"); +#endif + + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef aligned_alloc +# define aligned_alloc rpl_aligned_alloc +# endif +_GL_FUNCDECL_RPL (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); +# else +# if 1 +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size)); +# endif +# endif +# if (__GLIBC__ >= 2) && 1 +_GL_CXXALIASWARN (aligned_alloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined aligned_alloc +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef aligned_alloc +# if HAVE_RAW_DECL_ALIGNED_ALLOC +_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " + "use gnulib module aligned_alloc for portability"); +# endif +# endif +#endif + #if 0 /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ @@ -694,39 +878,82 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - " # endif #endif -#if 0 -# if 0 +#if 1 +# if (1 && 1) \ + || (1 && 1) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc # endif -_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); +_GL_FUNCDECL_RPL (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (calloc); # endif -#elif defined GNULIB_POSIXCHECK -# undef calloc +#else +# if 1 && __GNUC__ >= 11 && !defined calloc +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef calloc /* Assume calloc is always declared. */ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " "use gnulib module calloc-posix for portability"); +# endif #endif -#if 1 +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define canonicalize_file_name rpl_canonicalize_file_name # endif -_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); # else -# if !0 -_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); +# if !0 || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); # endif @@ -735,12 +962,97 @@ _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); (!0 || 0) # endif _GL_CXXALIASWARN (canonicalize_file_name); -#elif defined GNULIB_POSIXCHECK -# undef canonicalize_file_name -# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME +#else +# if 1 && __GNUC__ >= 11 && !defined canonicalize_file_name +/* For -Wmismatched-dealloc: Associate canonicalize_file_name with free or + rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef canonicalize_file_name +# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - " "use gnulib module canonicalize-lgpl for portability"); +# endif +# endif +#endif + +#if 1 +/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ecvt +# define ecvt _ecvt +# endif +_GL_CXXALIAS_MDA (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (ecvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcvt +# define fcvt _fcvt +# endif +_GL_CXXALIAS_MDA (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gcvt +# define gcvt _gcvt +# endif +_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf)); +# else +# if 1 +_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (gcvt); # endif #endif @@ -749,12 +1061,24 @@ _GL_WARN_ON_USE (canonicalize_file_name, The three numbers are the load average of the last 1 minute, the last 5 minutes, and the last 15 minutes, respectively. LOADAVG is an array of NELEM numbers. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getloadavg +# define getloadavg rpl_getloadavg +# endif +_GL_FUNCDECL_RPL (getloadavg, int, (double loadavg[], int nelem) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getloadavg, int, (double loadavg[], int nelem)); +# else +# if !1 _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getloadavg); +# endif #elif defined GNULIB_POSIXCHECK # undef getloadavg # if HAVE_RAW_DECL_GETLOADAVG @@ -763,6 +1087,41 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " # endif #endif +#if 1 +/* Return the base name of the executing program. + On native Windows this will usually end in ".exe" or ".EXE". */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getprogname +# define getprogname rpl_getprogname +# endif +# if 0 +_GL_FUNCDECL_RPL (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_RPL (getprogname, const char *, (void)); +# endif +_GL_CXXALIAS_RPL (getprogname, const char *, (void)); +# else +# if !0 +# if 0 +_GL_FUNCDECL_SYS (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_SYS (getprogname, const char *, (void)); +# endif +# endif +_GL_CXXALIAS_SYS (getprogname, const char *, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getprogname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getprogname +# if HAVE_RAW_DECL_GETPROGNAME +_GL_WARN_ON_USE (getprogname, "getprogname is unportable - " + "use gnulib module getprogname for portability"); +# endif +#endif + #if 0 /* Assuming *OPTIONP is a comma separated list of elements of the form "token" or "token=value", getsubopt parses the first of these elements. @@ -775,14 +1134,28 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. For more details see the POSIX specification. https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getsubopt +# define getsubopt rpl_getsubopt +# endif +_GL_FUNCDECL_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep)); +# else +# if !1 _GL_FUNCDECL_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep) _GL_ARG_NONNULL ((1, 2, 3))); -# endif +# endif _GL_CXXALIAS_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getsubopt); +# endif #elif defined GNULIB_POSIXCHECK # undef getsubopt # if HAVE_RAW_DECL_GETSUBOPT @@ -812,29 +1185,105 @@ _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " by never specifying a zero size), so it does not need malloc or realloc to be redefined. */ #if 1 -# if 1 +# if (1 && 1) \ + || (1 && 1) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef malloc # define malloc rpl_malloc # endif -_GL_FUNCDECL_RPL (malloc, void *, (size_t size)); +_GL_FUNCDECL_RPL (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (malloc); # endif -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef malloc +#else +# if 1 && __GNUC__ >= 11 && !defined malloc +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef malloc /* Assume malloc is always declared. */ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " "use gnulib module malloc-posix for portability"); +# endif +#endif + +/* Return maximum number of bytes of a multibyte character. */ +#if 0 +# if !GNULIB_defined_MB_CUR_MAX +static inline +int gl_MB_CUR_MAX (void) +{ + /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ + return MB_CUR_MAX + (MB_CUR_MAX == 3); +} +# undef MB_CUR_MAX +# define MB_CUR_MAX gl_MB_CUR_MAX () +# define GNULIB_defined_MB_CUR_MAX 1 +# endif +#endif + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbstowcs +# define mbstowcs rpl_mbstowcs +# endif +_GL_FUNCDECL_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# else +_GL_CXXALIAS_SYS (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbstowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbstowcs +# if HAVE_RAW_DECL_MBSTOWCS +_GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - " + "use gnulib module mbstowcs for portability"); +# endif #endif /* Convert a multibyte character to a wide character. */ -#if 1 +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbtowc @@ -863,7 +1312,7 @@ _GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " # endif #endif -#if 1 +#if 0 /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. @@ -895,12 +1344,24 @@ _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemp +# define mkostemp rpl_mkostemp +# endif +_GL_FUNCDECL_RPL (mkostemp, int, (char * /*template*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemp, int, (char * /*template*/, int /*flags*/)); +# else +# if !1 _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkostemp); +# endif #elif defined GNULIB_POSIXCHECK # undef mkostemp # if HAVE_RAW_DECL_MKOSTEMP @@ -923,14 +1384,28 @@ _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemps +# define mkostemps rpl_mkostemps +# endif +_GL_FUNCDECL_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# else +# if !1 _GL_FUNCDECL_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkostemps); +# endif #elif defined GNULIB_POSIXCHECK # undef mkostemps # if HAVE_RAW_DECL_MKOSTEMPS @@ -995,14 +1470,70 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " # endif #endif +#if 1 +/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::mktemp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mktemp +# define mktemp _mktemp +# endif +_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/)); +# else +_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/)); +# endif +_GL_CXXALIASWARN (mktemp); +#endif + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_memalign +# define posix_memalign rpl_posix_memalign +# endif +_GL_FUNCDECL_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# else +# if 1 +_GL_CXXALIAS_SYS (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# endif +# endif +# if __GLIBC__ >= 2 && 1 +_GL_CXXALIASWARN (posix_memalign); +# endif +#elif defined GNULIB_POSIXCHECK +# undef posix_memalign +# if HAVE_RAW_DECL_POSIX_MEMALIGN +_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " + "use gnulib module posix_memalign for portability"); +# endif +#endif + #if 0 /* Return an FD open to the master side of a pseudo-terminal. Flags should include O_RDWR, and may also include O_NOCTTY. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_openpt +# define posix_openpt rpl_posix_openpt +# endif +_GL_FUNCDECL_RPL (posix_openpt, int, (int flags)); +_GL_CXXALIAS_RPL (posix_openpt, int, (int flags)); +# else +# if !1 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); -# endif +# endif _GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_openpt); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_openpt # if HAVE_RAW_DECL_POSIX_OPENPT @@ -1065,7 +1596,7 @@ _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " # endif #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef putenv @@ -1073,6 +1604,36 @@ _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " # endif _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (putenv, int, (char *string)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +_GL_CXXALIAS_MDA (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); +# else +_GL_CXXALIAS_SYS (putenv, int, (char *string)); +# endif +_GL_CXXALIASWARN (putenv); +#elif 1 +/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putenv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +/* Need to cast, because on mingw, the parameter is either + 'const char *string' or 'char *string'. */ +_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); # else _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif @@ -1083,29 +1644,35 @@ _GL_CXXALIASWARN (putenv); /* Sort an array of NMEMB elements, starting at address BASE, each element occupying SIZE bytes, in ascending order according to the comparison function COMPARE. */ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_qsort_r_fn_types +typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *); +# define GNULIB_defined_qsort_r_fn_types 1 +# endif +# ifdef __cplusplus +} +# endif # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef qsort_r # define qsort_r rpl_qsort_r # endif _GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # else # if !1 _GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); # endif _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # endif _GL_CXXALIASWARN (qsort_r); @@ -1143,7 +1710,9 @@ _GL_FUNCDECL_SYS (random, long, (void)); int. */ _GL_CXXALIAS_SYS_CAST (random, long, (void)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (random); +# endif #elif defined GNULIB_POSIXCHECK # undef random # if HAVE_RAW_DECL_RANDOM @@ -1168,7 +1737,9 @@ _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); unsigned long seed. */ _GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (srandom); +# endif #elif defined GNULIB_POSIXCHECK # undef srandom # if HAVE_RAW_DECL_SRANDOM @@ -1199,7 +1770,9 @@ _GL_FUNCDECL_SYS (initstate, char *, _GL_CXXALIAS_SYS_CAST (initstate, char *, (unsigned int seed, char *buf, size_t buf_size)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (initstate); +# endif #elif defined GNULIB_POSIXCHECK # undef initstate # if HAVE_RAW_DECL_INITSTATE @@ -1224,7 +1797,9 @@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); is const char *arg_state. */ _GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (setstate); +# endif #elif defined GNULIB_POSIXCHECK # undef setstate # if HAVE_RAW_DECL_SETSTATE @@ -1356,36 +1931,79 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " #if 1 -# if 1 +# if (1 && 1) \ + || (1 && 0) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef realloc # define realloc rpl_realloc # endif -_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); +_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (realloc); # endif -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef realloc +#else +# if 1 && __GNUC__ >= 11 && !defined realloc +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef realloc /* Assume realloc is always declared. */ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " "use gnulib module realloc-posix for portability"); +# endif #endif -#if 0 -# if ! 1 +#if 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef reallocarray +# define reallocarray rpl_reallocarray +# endif +_GL_FUNCDECL_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +_GL_CXXALIAS_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# else +# if ! 0 _GL_FUNCDECL_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); -# endif +# endif _GL_CXXALIAS_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (reallocarray); +# endif #elif defined GNULIB_POSIXCHECK # undef reallocarray # if HAVE_RAW_DECL_REALLOCARRAY @@ -1394,7 +2012,7 @@ _GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " # endif #endif -#if 1 +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define realpath rpl_realpath @@ -1438,7 +2056,7 @@ _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " # endif #endif -#if 1 +#if 0 /* Look up NAME in the environment, returning 0 in insecure situations. */ # if !0 _GL_FUNCDECL_SYS (secure_getenv, char *, @@ -1454,7 +2072,7 @@ _GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " # endif #endif -#if 1 +#if 0 /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ # if 0 @@ -1549,6 +2167,49 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable - " # endif #endif +#if 0 +/* Parse a signed integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is set + to ERANGE. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtol rpl_strtol +# endif +# define GNULIB_defined_strtol_function 1 +_GL_FUNCDECL_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtol); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtol +# if HAVE_RAW_DECL_STRTOL +_GL_WARN_ON_USE (strtol, "strtol is unportable - " + "use gnulib module strtol for portability"); +# endif +#endif + #if 0 /* Parse a signed integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, @@ -1558,15 +2219,29 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable - " stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set to ERANGE. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoll rpl_strtoll +# endif +# define GNULIB_defined_strtoll_function 1 +_GL_FUNCDECL_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 _GL_FUNCDECL_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoll); #elif defined GNULIB_POSIXCHECK # undef strtoll @@ -1576,6 +2251,48 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " # endif #endif +#if 0 +/* Parse an unsigned integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is ULONG_MAX, and errno is set to ERANGE. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoul rpl_strtoul +# endif +# define GNULIB_defined_strtoul_function 1 +_GL_FUNCDECL_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtoul); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtoul +# if HAVE_RAW_DECL_STRTOUL +_GL_WARN_ON_USE (strtoul, "strtoul is unportable - " + "use gnulib module strtoul for portability"); +# endif +#endif + #if 0 /* Parse an unsigned integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, @@ -1585,15 +2302,29 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoull rpl_strtoull +# endif +# define GNULIB_defined_strtoull_function 1 +_GL_FUNCDECL_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 _GL_FUNCDECL_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoull); #elif defined GNULIB_POSIXCHECK # undef strtoull @@ -1619,7 +2350,7 @@ _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " # endif #endif -#if 1 +#if 0 /* Remove the variable NAME from the environment. */ # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1646,7 +2377,7 @@ _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " #endif /* Convert a wide character to a multibyte character. */ -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wctomb diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/string.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/string.h index 0d4da40e9..3fc6528fa 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/string.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/string.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2020 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -28,11 +28,7 @@ In this situation system _chk variants due to -D_FORTIFY_SOURCE might be used after any replacements defined here. */ -#if (_MSC_VER < 1900) -#include "../include/string.h" -#else #include "../ucrt/string.h" -#endif #else /* Normal invocation convention. */ @@ -42,57 +38,127 @@ #define _GL_ALREADY_INCLUDING_STRING_H /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/string.h" -#else #include "../ucrt/string.h" -#endif #undef _GL_ALREADY_INCLUDING_STRING_H #ifndef _GL_GTPO_STRING_H #define _GL_GTPO_STRING_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include /* MirBSD defines mbslen as a macro. */ -#if 1 && defined __MirBSD__ +#if 0 && defined __MirBSD__ # include #endif +/* NetBSD 5.0 declares strsignal in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ + && ! defined __GLIBC__ +# include +#endif + +/* AIX 7.2 and Android 13 declare ffsl and ffsll in , not in + . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if ((0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _AIX || defined __ANDROID__)) \ + && ! defined __GLIBC__ +# include +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ # endif #endif -/* NetBSD 5.0 declares strsignal in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ - && ! defined __GLIBC__ -# include -#endif - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -180,6 +246,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -227,6 +299,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -252,6 +334,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -349,7 +439,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -377,9 +467,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -395,26 +485,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -423,19 +513,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -508,13 +598,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -523,27 +620,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -559,11 +662,54 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif /* Clear a block of memory. The compiler will not delete a call to this function, even if the block is dead after the call. */ -#if 1 -# if ! 0 +#if 0 +# if ! 1 _GL_FUNCDECL_SYS (explicit_bzero, void, (void *__dest, size_t __n) _GL_ARG_NONNULL ((1))); # endif @@ -594,10 +740,18 @@ _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); /* Find the index of the least-significant set bit. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define ffsll rpl_ffsll +# endif +_GL_FUNCDECL_RPL (ffsll, int, (long long int i)); +_GL_CXXALIAS_RPL (ffsll, int, (long long int i)); +# else +# if !1 _GL_FUNCDECL_SYS (ffsll, int, (long long int i)); -# endif +# endif _GL_CXXALIAS_SYS (ffsll, int, (long long int i)); +# endif _GL_CXXALIASWARN (ffsll); #elif defined GNULIB_POSIXCHECK # undef ffsll @@ -607,10 +761,30 @@ _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); #endif +#if 1 +/* On native Windows, map 'memccpy' to '_memccpy', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::memccpy always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memccpy +# define memccpy _memccpy +# endif +_GL_CXXALIAS_MDA (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# else +_GL_CXXALIAS_SYS (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# endif +_GL_CXXALIASWARN (memccpy); +#endif + + /* Return the first instance of C within N bytes of S, or NULL. */ #if 1 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memchr # define memchr rpl_memchr # endif _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) @@ -626,10 +800,14 @@ _GL_CXXALIAS_SYS_CAST2 (memchr, void const *, (void const *__s, int __c, size_t __n)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memchr, void *, + (void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (memchr, void const *, - (void const *__s, int __c, size_t __n)); + (void const *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (memchr); # endif @@ -641,7 +819,7 @@ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " #endif /* Return the first occurrence of NEEDLE in HAYSTACK. */ -#if 0 +#if 1 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define memmem rpl_memmem @@ -655,7 +833,7 @@ _GL_CXXALIAS_RPL (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len)); # else -# if ! 1 +# if ! 0 _GL_FUNCDECL_SYS (memmem, void *, (void const *__haystack, size_t __haystack_len, void const *__needle, size_t __needle_len) @@ -678,17 +856,33 @@ _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ -#if 1 -# if ! 0 +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mempcpy +# define mempcpy rpl_mempcpy +# endif +_GL_FUNCDECL_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n)); +# else +# if !0 _GL_FUNCDECL_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); -# endif +# endif _GL_CXXALIAS_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mempcpy); +# endif #elif defined GNULIB_POSIXCHECK # undef mempcpy # if HAVE_RAW_DECL_MEMPCPY @@ -698,8 +892,8 @@ _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " #endif /* Search backwards through a block for a byte (specified as an int). */ -#if 0 -# if ! 1 +#if 1 +# if ! 0 _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) _GL_ATTRIBUTE_PURE _GL_ARG_NONNULL ((1))); @@ -711,10 +905,15 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr, void *, (void const *, int, size_t), void const *, (void const *, int, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); -_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); -# else + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memrchr, void *, + (void *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (memrchr, void const *, + (void const *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (memrchr); # endif #elif defined GNULIB_POSIXCHECK @@ -725,6 +924,23 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " # endif #endif +/* Overwrite a block of memory. The compiler will not optimize + effects away, even if the block is dead after the call. */ +#if 0 +# if ! 0 +_GL_FUNCDECL_SYS (memset_explicit, void *, + (void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n)); +_GL_CXXALIASWARN (memset_explicit); +#elif defined GNULIB_POSIXCHECK +# undef memset_explicit +# if HAVE_RAW_DECL_MEMSET_EXPLICIT +_GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - " + "use gnulib module memset_explicit for portability"); +# endif +#endif + /* Find the first occurrence of C in S. More efficient than memchr(S,C,N), at the expense of undefined behavior if C does not occur within N bytes. */ @@ -741,9 +957,14 @@ _GL_CXXALIAS_SYS_CAST2 (rawmemchr, void *, (void const *__s, int __c_in), void const *, (void const *__s, int __c_in)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); -_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (rawmemchr, void *, + (void *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (rawmemchr, void const *, + (void const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); # else _GL_CXXALIASWARN (rawmemchr); # endif @@ -757,14 +978,28 @@ _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ #if 1 -# if ! 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef stpcpy +# define stpcpy rpl_stpcpy +# endif +_GL_FUNCDECL_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src)); +# else +# if !0 _GL_FUNCDECL_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src) _GL_ARG_NONNULL ((1, 2))); -# endif +# endif _GL_CXXALIAS_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (stpcpy); +# endif #elif defined GNULIB_POSIXCHECK # undef stpcpy # if HAVE_RAW_DECL_STPCPY @@ -799,7 +1034,9 @@ _GL_CXXALIAS_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (stpncpy); +# endif #elif defined GNULIB_POSIXCHECK # undef stpncpy # if HAVE_RAW_DECL_STPNCPY @@ -813,7 +1050,8 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " GB18030 and the character to be searched is a digit. */ # undef strchr /* Assume strchr is always declared. */ -_GL_WARN_ON_USE_CXX (strchr, const char *, (const char *, int), +_GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), "strchr cannot work correctly on character strings " "in some multibyte locales - " "use mbschr if you care about internationalization"); @@ -844,10 +1082,15 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul, char const *, (char const *__s, int __c_in)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); -_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); -# else + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strchrnul, char *, + (char *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strchrnul, char const *, + (char const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strchrnul); # endif #elif defined GNULIB_POSIXCHECK @@ -860,29 +1103,83 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " /* Duplicate S, returning an identical malloc'd string. */ #if 0 -# if 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strdup # define strdup rpl_strdup # endif -_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup /* strdup exists as a function and as a macro. Get rid of the macro. */ # undef strdup # endif -# if !(1 || defined strdup) -_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); +# if (!1 || __GNUC__ >= 11) && !defined strdup +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); # endif _GL_CXXALIASWARN (strdup); -#elif defined GNULIB_POSIXCHECK -# undef strdup -# if HAVE_RAW_DECL_STRDUP +#else +# if __GNUC__ >= 11 && !defined strdup +/* For -Wmismatched-dealloc: Associate strdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strdup +# if HAVE_RAW_DECL_STRDUP _GL_WARN_ON_USE (strdup, "strdup is unportable - " "use gnulib module strdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'creat' to '_creat', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::strdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); +# else +# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup +# undef strdup +# endif +_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); +# endif +_GL_CXXALIASWARN (strdup); # endif #endif @@ -920,29 +1217,58 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - " # undef strndup # define strndup rpl_strndup # endif -_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); # else -# if ! 1 -_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); +# if !1 || (__GNUC__ >= 11 && !defined strndup) +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); # endif _GL_CXXALIASWARN (strndup); -#elif defined GNULIB_POSIXCHECK -# undef strndup -# if HAVE_RAW_DECL_STRNDUP +#else +# if __GNUC__ >= 11 && !defined strndup +/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strndup +# if HAVE_RAW_DECL_STRNDUP _GL_WARN_ON_USE (strndup, "strndup is unportable - " "use gnulib module strndup for portability"); +# endif # endif #endif /* Find the length (number of bytes) of STRING, but scan at most MAXLEN bytes. If no '\0' terminator is found in that many bytes, return MAXLEN. */ -#if 1 +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strnlen @@ -982,7 +1308,7 @@ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " #endif /* Find the first occurrence in S of any character in ACCEPT. */ -#if 1 +#if 0 # if ! 1 _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) _GL_ATTRIBUTE_PURE @@ -995,10 +1321,14 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk, char *, (char const *__s, char const *__accept), const char *, (char const *__s, char const *__accept)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strpbrk, char *, + (char *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strpbrk, char const *, - (char const *__s, char const *__accept)); + (char const *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strpbrk); # endif @@ -1008,7 +1338,8 @@ _GL_CXXALIASWARN (strpbrk); locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strpbrk -_GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), "strpbrk cannot work correctly on character strings " "in multibyte locales - " "use mbspbrk if you care about internationalization"); @@ -1016,7 +1347,8 @@ _GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), #elif defined GNULIB_POSIXCHECK # undef strpbrk # if HAVE_RAW_DECL_STRPBRK -_GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), "strpbrk is unportable - " "use gnulib module strpbrk for portability"); # endif @@ -1037,7 +1369,8 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " GB18030 and the character to be searched is a digit. */ # undef strrchr /* Assume strrchr is always declared. */ -_GL_WARN_ON_USE_CXX (strrchr, const char *, (const char *, int), +_GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), "strrchr cannot work correctly on character strings " "in some multibyte locales - " "use mbsrchr if you care about internationalization"); @@ -1100,10 +1433,14 @@ _GL_CXXALIAS_SYS_CAST2 (strstr, const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strstr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strstr, const char *, - (const char *haystack, const char *needle)); + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strstr); # endif @@ -1149,11 +1486,15 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr, const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strcasestr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strcasestr, const char *, - (const char *haystack, const char *needle)); -# else + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strcasestr); # endif #elif defined GNULIB_POSIXCHECK @@ -1237,7 +1578,7 @@ _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " /* The following functions are not specified by POSIX. They are gnulib extensions. */ -#if 1 +#if 0 /* Return the number of multibyte characters in the character string STRING. This considers multibyte characters, unlike strlen, which counts bytes. */ # ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ @@ -1257,7 +1598,9 @@ _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbslen); +# endif #endif #if 0 @@ -1312,7 +1655,7 @@ _GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); _GL_CXXALIASWARN (mbsrchr); #endif -#if 1 +#if 0 /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. Unlike strstr(), this function works correctly in multibyte locales with @@ -1483,7 +1826,7 @@ _GL_WARN_ON_USE (strerror, "strerror is unportable - " /* Map any int, typically from errno, into an error message. Multithread-safe. Uses the POSIX declaration, not the glibc declaration. */ -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strerror_r @@ -1499,7 +1842,7 @@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) # endif _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); # endif -# if 0 +# if __GLIBC__ >= 2 && 0 _GL_CXXALIASWARN (strerror_r); # endif #elif defined GNULIB_POSIXCHECK @@ -1510,6 +1853,60 @@ _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " # endif #endif +/* Return the name of the system error code ERRNUM. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerrorname_np +# define strerrorname_np rpl_strerrorname_np +# endif +_GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum)); +_GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum)); +# else +# if !1 +_GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIASWARN (strerrorname_np); +#elif defined GNULIB_POSIXCHECK +# undef strerrorname_np +# if HAVE_RAW_DECL_STRERRORNAME_NP +_GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - " + "use gnulib module strerrorname_np for portability"); +# endif +#endif + +/* Return an abbreviation string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigabbrev_np); +#elif defined GNULIB_POSIXCHECK +# undef sigabbrev_np +# if HAVE_RAW_DECL_SIGABBREV_NP +_GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - " + "use gnulib module sigabbrev_np for portability"); +# endif +#endif + +/* Return an English description string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigdescr_np); +#elif defined GNULIB_POSIXCHECK +# undef sigdescr_np +# if HAVE_RAW_DECL_SIGDESCR_NP +_GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - " + "use gnulib module sigdescr_np for portability"); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/sys/stat.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/sys/stat.h index b9bbd8927..bac6d5981 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/sys/stat.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/sys/stat.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a more complete sys/stat.h header file. - Copyright (C) 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ @@ -26,14 +26,17 @@ #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if defined __need_system_sys_stat_h /* Special invocation convention. */ -#if (_MSC_VER < 1900) -#include "../include/sys/stat.h" -#else #include "../ucrt/sys/stat.h" -#endif #else /* Normal invocation convention. */ @@ -48,30 +51,54 @@ #include /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/sys/stat.h" -#else #include "../ucrt/sys/stat.h" -#endif #ifndef _GL_GTPO_SYS_STAT_H #define _GL_GTPO_SYS_STAT_H +/* This file uses _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -159,6 +186,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -206,6 +239,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -231,6 +274,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -328,7 +379,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -356,9 +407,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -374,26 +425,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -402,19 +453,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -487,13 +538,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -502,27 +560,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -538,6 +602,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif + /* Before doing "#define mknod rpl_mknod" below, we need to include all headers that may declare mknod(). OS/2 kLIBC declares mknod() in , not in . */ @@ -859,11 +924,11 @@ struct stat # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif -/* S_IXUGO is a common extension to POSIX. */ +/* Although S_IXUGO and S_IRWXUGO are not specified by POSIX and are + not implemented in GNU/Linux, some Gnulib-using apps use the macros. */ #if !S_IXUGO # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif - #ifndef S_IRWXUGO # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif @@ -875,6 +940,50 @@ struct stat #endif +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod rpl_chmod +# endif +_GL_FUNCDECL_RPL (chmod, int, (const char *filename, mode_t mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (chmod, int, (const char *filename, mode_t mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod _chmod +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (chmod); +#elif defined GNULIB_POSIXCHECK +# undef chmod +# if HAVE_RAW_DECL_CHMOD +_GL_WARN_ON_USE (chmod, "chmod has portability problems - " + "use gnulib module chmod for portability"); +# endif +#elif 1 +/* On native Windows, map 'chmod' to '_chmod', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chmod always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod _chmod +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (chmod); +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -916,7 +1025,9 @@ _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); # else _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fstat); +# endif #elif 0 # undef fstat # define fstat fstat_used_without_requesting_gnulib_module_fstat @@ -946,7 +1057,7 @@ _GL_CXXALIAS_RPL (fstatat, int, (int fd, char const *restrict name, struct stat *restrict st, int flags)); # else -# if !1 +# if !0 _GL_FUNCDECL_SYS (fstatat, int, (int fd, char const *restrict name, struct stat *restrict st, int flags) @@ -987,7 +1098,7 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (futimens); # endif #elif defined GNULIB_POSIXCHECK @@ -1001,7 +1112,11 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " #if 0 # if !1 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (getumask, mode_t, (void) _GL_ATTRIBUTE_NOTHROW); +# else _GL_FUNCDECL_SYS (getumask, mode_t, (void)); +# endif # endif _GL_CXXALIAS_SYS (getumask, mode_t, (void)); # if 1 @@ -1034,59 +1149,20 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " #endif -#if 1 -# if ! 0 -/* mingw does not support symlinks, therefore it does not have lstat. But - without links, stat does just fine. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lstat stat -# endif -_GL_CXXALIAS_RPL_1 (lstat, stat, int, - (const char *restrict name, struct stat *restrict buf)); -# elif 0 +#if 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lstat -# define lstat rpl_lstat +# undef mkdir +# define mkdir rpl_mkdir # endif -_GL_FUNCDECL_RPL (lstat, int, - (const char *restrict name, struct stat *restrict buf) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (lstat, int, - (const char *restrict name, struct stat *restrict buf)); -# else -_GL_CXXALIAS_SYS (lstat, int, - (const char *restrict name, struct stat *restrict buf)); -# endif -# if 0 -_GL_CXXALIASWARN (lstat); -# endif -#elif 0 -# undef lstat -# define lstat lstat_used_without_requesting_gnulib_module_lstat -#elif defined GNULIB_POSIXCHECK -# undef lstat -# if HAVE_RAW_DECL_LSTAT -_GL_WARN_ON_USE (lstat, "lstat is unportable - " - "use gnulib module lstat for portability"); -# endif -#endif - - -#if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkdir -# define mkdir rpl_mkdir -# endif _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) - _GL_ARG_NONNULL ((1))); + _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -#else +# elif defined _WIN32 && !defined __CYGWIN__ /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes and , which are included above. */ -# if defined _WIN32 && ! defined __CYGWIN__ - # if !GNULIB_defined_rpl_mkdir static int rpl_mkdir (char const *name, mode_t mode) @@ -1095,16 +1171,44 @@ rpl_mkdir (char const *name, mode_t mode) } # define GNULIB_defined_rpl_mkdir 1 # endif - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkdir # define mkdir rpl_mkdir # endif _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); # else _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); # endif -#endif _GL_CXXALIASWARN (mkdir); +#elif defined GNULIB_POSIXCHECK +# undef mkdir +# if HAVE_RAW_DECL_MKDIR +_GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " + "use gnulib module mkdir for portability"); +# endif +#elif 1 +/* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::mkdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !GNULIB_defined_rpl_mkdir +static int +rpl_mkdir (char const *name, mode_t mode) +{ + return _mkdir (name); +} +# define GNULIB_defined_rpl_mkdir 1 +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkdir +# define mkdir rpl_mkdir +# endif +_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); +# else +_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); +# endif +_GL_CXXALIASWARN (mkdir); +#endif #if 0 @@ -1150,12 +1254,24 @@ _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkfifoat +# define mkfifoat rpl_mkfifoat +# endif +_GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)); +# else +# if !1 _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); -# endif +# endif _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkfifoat); +# endif #elif defined GNULIB_POSIXCHECK # undef mkfifoat # if HAVE_RAW_DECL_MKFIFOAT @@ -1193,14 +1309,28 @@ _GL_WARN_ON_USE (mknod, "mknod is not portable - " #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mknodat +# define mknodat rpl_mknodat +# endif +_GL_FUNCDECL_RPL (mknodat, int, + (int fd, char const *file, mode_t mode, dev_t dev) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mknodat, int, + (int fd, char const *file, mode_t mode, dev_t dev)); +# else +# if !1 _GL_FUNCDECL_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((2))); -# endif +# endif _GL_CXXALIAS_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mknodat); +# endif #elif defined GNULIB_POSIXCHECK # undef mknodat # if HAVE_RAW_DECL_MKNODAT @@ -1284,6 +1414,62 @@ _GL_WARN_ON_USE (stat, "stat is unportable - " #endif +#if 0 +# if ! 0 +/* mingw does not support symlinks, therefore it does not have lstat. But + without links, stat does just fine. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define lstat stat +# endif +_GL_CXXALIAS_RPL_1 (lstat, stat, int, + (const char *restrict name, struct stat *restrict buf)); +# elif 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lstat +# define lstat rpl_lstat +# endif +_GL_FUNCDECL_RPL (lstat, int, + (const char *restrict name, struct stat *restrict buf) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (lstat, int, + (const char *restrict name, struct stat *restrict buf)); +# else +_GL_CXXALIAS_SYS (lstat, int, + (const char *restrict name, struct stat *restrict buf)); +# endif +# if 0 +_GL_CXXALIASWARN (lstat); +# endif +#elif 0 +# undef lstat +# define lstat lstat_used_without_requesting_gnulib_module_lstat +#elif defined GNULIB_POSIXCHECK +# undef lstat +# if HAVE_RAW_DECL_LSTAT +_GL_WARN_ON_USE (lstat, "lstat is unportable - " + "use gnulib module lstat for portability"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'umask' to '_umask', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::umask always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef umask +# define umask _umask +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (umask, mode_t, (mode_t mask)); +# else +_GL_CXXALIAS_SYS (umask, mode_t, (mode_t mask)); +# endif +_GL_CXXALIASWARN (umask); +#endif + + #if 0 /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat implementation relies on futimesat, which on Solaris 10 makes an invocation @@ -1308,7 +1494,7 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (utimensat); # endif #elif defined GNULIB_POSIXCHECK diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/sys/types.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/sys/types.h index 70b690705..51a015078 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/sys/types.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/sys/types.h @@ -1,37 +1,40 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a more complete sys/types.h. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if defined _WIN32 && !defined __CYGWIN__ \ && (defined __need_off_t || defined __need___off64_t \ || defined __need_ssize_t || defined __need_time_t) /* Special invocation convention inside mingw header files. */ -#if (_MSC_VER < 1900) -#include "../include/sys/types.h" -#else #include "../ucrt/sys/types.h" -#endif #else /* Normal invocation convention. */ @@ -40,11 +43,7 @@ /* The include_next requires a split double-inclusion guard. */ # define _GL_INCLUDING_SYS_TYPES_H -#if (_MSC_VER < 1900) -#include "../include/sys/types.h" -#else #include "../ucrt/sys/types.h" -#endif # undef _GL_INCLUDING_SYS_TYPES_H #ifndef _GL_GTPO_SYS_TYPES_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/textstyle.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/textstyle.h index 8cf63c797..60d643c44 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/textstyle.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/textstyle.h @@ -1,10 +1,10 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Dummy replacement for part of the public API of the libtextstyle library. - Copyright (C) 2006-2007, 2019-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2019-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -31,9 +31,13 @@ #ifndef _TEXTSTYLE_H #define _TEXTSTYLE_H +/* This file uses _GL_ATTRIBUTE_MAYBE_UNUSED, HAVE_TCDRAIN. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #include #include -#include #include #include #include @@ -43,6 +47,32 @@ # include #endif +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones + standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD */ +/* __gnu_printf__ is supported in GCC >= 4.4. */ +#ifndef _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD +# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__ +# else +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__ +# endif +#endif + +/* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if + the entity is not used. The compiler should not warn if the entity is not + used. */ +#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# if 0 /* no GCC or clang version supports this yet */ +# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# elif defined __GNUC__ || defined __clang__ +# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) +# else +# define _GL_ATTRIBUTE_MAYBE_UNUSED +# endif +#endif + /* ----------------------------- From ostream.h ----------------------------- */ /* Describes the scope of a flush operation. */ @@ -116,8 +146,8 @@ ostream_write_str (ostream_t stream, const char *string) static inline ptrdiff_t ostream_printf (ostream_t stream, const char *format, ...) -#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3 - __attribute__ ((__format__ (__printf__, 2, 3))) +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || defined __clang__ + __attribute__ ((__format__ (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 2, 3))) #endif ; static inline ptrdiff_t @@ -141,8 +171,8 @@ ostream_printf (ostream_t stream, const char *format, ...) static inline ptrdiff_t ostream_vprintf (ostream_t stream, const char *format, va_list args) -#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3 - __attribute__ ((__format__ (__printf__, 2, 0))) +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || defined __clang__ + __attribute__ ((__format__ (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 2, 0))) #endif ; static inline ptrdiff_t @@ -168,41 +198,47 @@ typedef ostream_t styled_ostream_t; #define styled_ostream_free ostream_free static inline void -styled_ostream_begin_use_class (styled_ostream_t stream _GL_UNUSED, - const char *classname _GL_UNUSED) +styled_ostream_begin_use_class (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *classname) { } static inline void -styled_ostream_end_use_class (styled_ostream_t stream _GL_UNUSED, - const char *classname _GL_UNUSED) +styled_ostream_end_use_class (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *classname) { } static inline const char * -styled_ostream_get_hyperlink_ref (styled_ostream_t stream _GL_UNUSED) +styled_ostream_get_hyperlink_ref (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream) { return NULL; } static inline const char * -styled_ostream_get_hyperlink_id (styled_ostream_t stream _GL_UNUSED) +styled_ostream_get_hyperlink_id (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream) { return NULL; } static inline void -styled_ostream_set_hyperlink (styled_ostream_t stream _GL_UNUSED, - const char *ref _GL_UNUSED, - const char *id _GL_UNUSED) +styled_ostream_set_hyperlink (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *ref, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *id) { } static inline void -styled_ostream_flush_to_current_style (styled_ostream_t stream _GL_UNUSED) +styled_ostream_flush_to_current_style (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream) { } +static inline bool +is_instance_of_styled_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream) +{ + return false; +} + /* -------------------------- From file-ostream.h -------------------------- */ typedef ostream_t file_ostream_t; @@ -211,12 +247,24 @@ typedef ostream_t file_ostream_t; #define file_ostream_flush ostream_flush #define file_ostream_free ostream_free +static inline FILE * +file_ostream_get_stdio_stream (file_ostream_t stream) +{ + return stream; +} + static inline file_ostream_t file_ostream_create (FILE *fp) { return fp; } +static inline bool +is_instance_of_file_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream) +{ + return true; +} + /* --------------------------- From fd-ostream.h --------------------------- */ typedef ostream_t fd_ostream_t; @@ -225,9 +273,27 @@ typedef ostream_t fd_ostream_t; #define fd_ostream_flush ostream_flush #define fd_ostream_free ostream_free +static inline int +fd_ostream_get_descriptor (fd_ostream_t stream) +{ + return fileno (stream); +} + +static inline const char * +fd_ostream_get_filename (_GL_ATTRIBUTE_MAYBE_UNUSED fd_ostream_t stream) +{ + return NULL; +} + +static inline bool +fd_ostream_is_buffered (_GL_ATTRIBUTE_MAYBE_UNUSED fd_ostream_t stream) +{ + return false; +} + static inline fd_ostream_t -fd_ostream_create (int fd, const char *filename _GL_UNUSED, - bool buffered _GL_UNUSED) +fd_ostream_create (int fd, _GL_ATTRIBUTE_MAYBE_UNUSED const char *filename, + _GL_ATTRIBUTE_MAYBE_UNUSED bool buffered) { if (fd == 1) return stdout; @@ -237,6 +303,12 @@ fd_ostream_create (int fd, const char *filename _GL_UNUSED, return fdopen (fd, "w"); } +static inline bool +is_instance_of_fd_ostream (ostream_t stream) +{ + return fileno (stream) >= 0; +} + /* -------------------------- From term-ostream.h -------------------------- */ typedef int term_color_t; @@ -266,6 +338,22 @@ typedef enum UNDERLINE_DEFAULT = UNDERLINE_OFF } term_underline_t; +typedef enum +{ + TTYCTL_AUTO = 0, /* Automatic best-possible choice. */ + TTYCTL_NONE, /* No control. + Result: Garbled output can occur, and the terminal can + be left in any state when the program is interrupted. */ + TTYCTL_PARTIAL, /* Signal handling. + Result: Garbled output can occur, but the terminal will + be left in the default state when the program is + interrupted. */ + TTYCTL_FULL /* Signal handling and disabling echo and flush-upon-signal. + Result: No garbled output, and the terminal will + be left in the default state when the program is + interrupted. */ +} ttyctl_t; + typedef ostream_t term_ostream_t; #define term_ostream_write_mem ostream_write_mem @@ -273,81 +361,90 @@ typedef ostream_t term_ostream_t; #define term_ostream_free ostream_free static inline term_color_t -term_ostream_get_color (term_ostream_t stream _GL_UNUSED) +term_ostream_rgb_to_color (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED int red, + _GL_ATTRIBUTE_MAYBE_UNUSED int green, + _GL_ATTRIBUTE_MAYBE_UNUSED int blue) +{ + return COLOR_DEFAULT; +} + +static inline term_color_t +term_ostream_get_color (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream) { return COLOR_DEFAULT; } static inline void -term_ostream_set_color (term_ostream_t stream _GL_UNUSED, - term_color_t color _GL_UNUSED) +term_ostream_set_color (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED term_color_t color) { } static inline term_color_t -term_ostream_get_bgcolor (term_ostream_t stream _GL_UNUSED) +term_ostream_get_bgcolor (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream) { return COLOR_DEFAULT; } static inline void -term_ostream_set_bgcolor (term_ostream_t stream _GL_UNUSED, - term_color_t color _GL_UNUSED) +term_ostream_set_bgcolor (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED term_color_t color) { } static inline term_weight_t -term_ostream_get_weight (term_ostream_t stream _GL_UNUSED) +term_ostream_get_weight (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream) { return WEIGHT_DEFAULT; } static inline void -term_ostream_set_weight (term_ostream_t stream _GL_UNUSED, - term_weight_t weight _GL_UNUSED) +term_ostream_set_weight (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED term_weight_t weight) { } static inline term_posture_t -term_ostream_get_posture (term_ostream_t stream _GL_UNUSED) +term_ostream_get_posture (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream) { return POSTURE_DEFAULT; } static inline void -term_ostream_set_posture (term_ostream_t stream _GL_UNUSED, - term_posture_t posture _GL_UNUSED) +term_ostream_set_posture (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED term_posture_t posture) { } static inline term_underline_t -term_ostream_get_underline (term_ostream_t stream _GL_UNUSED) +term_ostream_get_underline (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream) { return UNDERLINE_DEFAULT; } static inline void -term_ostream_set_underline (term_ostream_t stream _GL_UNUSED, - term_underline_t underline _GL_UNUSED) +term_ostream_set_underline (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED term_underline_t underline) { } static inline const char * -term_ostream_get_hyperlink_ref (term_ostream_t stream _GL_UNUSED) +term_ostream_get_hyperlink_ref (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream) { return NULL; } static inline const char * -term_ostream_get_hyperlink_id (term_ostream_t stream _GL_UNUSED) +term_ostream_get_hyperlink_id (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream) { return NULL; } static inline void -term_ostream_set_hyperlink (term_ostream_t stream _GL_UNUSED, - const char *ref _GL_UNUSED, - const char *id _GL_UNUSED) +term_ostream_set_hyperlink (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *ref, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *id) { } @@ -357,29 +454,117 @@ term_ostream_flush_to_current_style (term_ostream_t stream) fflush (stream); } -typedef enum +#define term_ostream_get_descriptor fd_ostream_get_descriptor +#define term_ostream_get_filename fd_ostream_get_filename + +static inline ttyctl_t +term_ostream_get_tty_control (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream) { - TTYCTL_AUTO = 0, /* Automatic best-possible choice. */ - TTYCTL_NONE, /* No control. - Result: Garbled output can occur, and the terminal can - be left in any state when the program is interrupted. */ - TTYCTL_PARTIAL, /* Signal handling. - Result: Garbled output can occur, but the terminal will - be left in the default state when the program is - interrupted. */ - TTYCTL_FULL /* Signal handling and disabling echo and flush-upon-signal. - Result: No garbled output, and the the terminal will - be left in the default state when the program is - interrupted. */ -} ttyctl_t; + return TTYCTL_NONE; +} + +static inline ttyctl_t +term_ostream_get_effective_tty_control (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream) +{ + return TTYCTL_NONE; +} static inline term_ostream_t term_ostream_create (int fd, const char *filename, - ttyctl_t tty_control _GL_UNUSED) + _GL_ATTRIBUTE_MAYBE_UNUSED ttyctl_t tty_control) { return fd_ostream_create (fd, filename, true); } +#define is_instance_of_term_ostream is_instance_of_fd_ostream + +/* ------------------------- From memory-ostream.h ------------------------- */ + +typedef ostream_t memory_ostream_t; + +#define memory_ostream_write_mem ostream_write_mem +#define memory_ostream_flush ostream_flush +#define memory_ostream_free ostream_free + +static inline void +memory_ostream_contents (_GL_ATTRIBUTE_MAYBE_UNUSED memory_ostream_t stream, + const void **bufp, size_t *buflenp) +{ + *bufp = NULL; + *buflenp = 0; +} + +static inline memory_ostream_t +memory_ostream_create (void) +{ + /* Not supported without the real libtextstyle. */ + abort (); + return NULL; +} + +static inline bool +is_instance_of_memory_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream) +{ + return false; +} + +/* -------------------------- From html-ostream.h -------------------------- */ + +typedef ostream_t html_ostream_t; + +#define html_ostream_write_mem ostream_write_mem +#define html_ostream_flush ostream_flush +#define html_ostream_free ostream_free + +static inline void +html_ostream_begin_span (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *classname) +{ +} + +static inline void +html_ostream_end_span (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *classname) +{ +} + +static inline const char * +html_ostream_get_hyperlink_ref (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream) +{ + return NULL; +} + +static inline void +html_ostream_set_hyperlink_ref (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *ref) +{ +} + +static inline void +html_ostream_flush_to_current_style (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream) +{ +} + +static inline ostream_t +html_ostream_get_destination (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream) +{ + return NULL; +} + +static inline html_ostream_t +html_ostream_create (ostream_t destination) +{ + /* Not supported without the real libtextstyle. */ + abort (); + return NULL; +} + +static inline bool +is_instance_of_html_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream) +{ + return false; +} + /* ----------------------- From term-styled-ostream.h ----------------------- */ typedef styled_ostream_t term_styled_ostream_t; @@ -394,26 +579,116 @@ typedef styled_ostream_t term_styled_ostream_t; #define term_styled_ostream_set_hyperlink styled_ostream_set_hyperlink #define term_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style +static inline term_ostream_t +term_styled_ostream_get_destination (term_styled_ostream_t stream) +{ + return stream; +} + +static inline const char * +term_styled_ostream_get_css_filename (_GL_ATTRIBUTE_MAYBE_UNUSED term_styled_ostream_t stream) +{ + return NULL; +} + static inline term_styled_ostream_t term_styled_ostream_create (int fd, const char *filename, - ttyctl_t tty_control _GL_UNUSED, - const char *css_filename _GL_UNUSED) + _GL_ATTRIBUTE_MAYBE_UNUSED ttyctl_t tty_control, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *css_filename) { return fd_ostream_create (fd, filename, true); } +#define is_instance_of_term_styled_ostream is_instance_of_term_ostream + /* ----------------------- From html-styled-ostream.h ----------------------- */ typedef styled_ostream_t html_styled_ostream_t; +#define html_styled_ostream_write_mem ostream_write_mem +#define html_styled_ostream_flush ostream_flush +#define html_styled_ostream_free ostream_free +#define html_styled_ostream_begin_use_class styled_ostream_begin_use_class +#define html_styled_ostream_end_use_class styled_ostream_end_use_class +#define html_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref +#define html_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id +#define html_styled_ostream_set_hyperlink styled_ostream_set_hyperlink +#define html_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style + +static inline ostream_t +html_styled_ostream_get_destination (_GL_ATTRIBUTE_MAYBE_UNUSED html_styled_ostream_t stream) +{ + return NULL; +} + +static inline html_ostream_t +html_styled_ostream_get_html_destination (_GL_ATTRIBUTE_MAYBE_UNUSED html_styled_ostream_t stream) +{ + return NULL; +} + +static inline const char * +html_styled_ostream_get_css_filename (_GL_ATTRIBUTE_MAYBE_UNUSED html_styled_ostream_t stream) +{ + return NULL; +} + static inline html_styled_ostream_t -html_styled_ostream_create (ostream_t destination _GL_UNUSED, - const char *css_filename _GL_UNUSED) +html_styled_ostream_create (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t destination, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *css_filename) { + /* Not supported without the real libtextstyle. */ abort (); return NULL; } +static inline bool +is_instance_of_html_styled_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream) +{ + return false; +} + +/* ----------------------- From noop-styled-ostream.h ----------------------- */ + +typedef styled_ostream_t noop_styled_ostream_t; + +#define noop_styled_ostream_write_mem ostream_write_mem +#define noop_styled_ostream_flush ostream_flush +#define noop_styled_ostream_free ostream_free +#define noop_styled_ostream_begin_use_class styled_ostream_begin_use_class +#define noop_styled_ostream_end_use_class styled_ostream_end_use_class +#define noop_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref +#define noop_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id +#define noop_styled_ostream_set_hyperlink styled_ostream_set_hyperlink +#define noop_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style + +static inline ostream_t +noop_styled_ostream_get_destination (noop_styled_ostream_t stream) +{ + return stream; +} + +static inline bool +noop_styled_ostream_is_owning_destination (_GL_ATTRIBUTE_MAYBE_UNUSED noop_styled_ostream_t stream) +{ + return true; +} + +static inline noop_styled_ostream_t +noop_styled_ostream_create (ostream_t destination, bool pass_ownership) +{ + if (!pass_ownership) + /* Not supported without the real libtextstyle. */ + abort (); + return destination; +} + +static inline bool +is_instance_of_noop_styled_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream) +{ + return false; +} + /* ------------------------------ From color.h ------------------------------ */ #define color_test_mode false @@ -424,27 +699,28 @@ enum color_option { color_no, color_tty, color_yes, color_html }; #define style_file_name NULL static inline bool -handle_color_option (const char *option _GL_UNUSED) +handle_color_option (_GL_ATTRIBUTE_MAYBE_UNUSED const char *option) { return false; } static inline void -handle_style_option (const char *option _GL_UNUSED) +handle_style_option (_GL_ATTRIBUTE_MAYBE_UNUSED const char *option) { } static inline void print_color_test (void) { + /* Not supported without the real libtextstyle. */ abort (); } static inline void -style_file_prepare (const char *style_file_envvar _GL_UNUSED, - const char *stylesdir_envvar _GL_UNUSED, - const char *stylesdir_after_install _GL_UNUSED, - const char *default_style_file _GL_UNUSED) +style_file_prepare (_GL_ATTRIBUTE_MAYBE_UNUSED const char *style_file_envvar, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *stylesdir_envvar, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *stylesdir_after_install, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *default_style_file) { } @@ -452,14 +728,14 @@ style_file_prepare (const char *style_file_envvar _GL_UNUSED, static inline styled_ostream_t styled_ostream_create (int fd, const char *filename, - ttyctl_t tty_control _GL_UNUSED, - const char *css_filename _GL_UNUSED) + _GL_ATTRIBUTE_MAYBE_UNUSED ttyctl_t tty_control, + _GL_ATTRIBUTE_MAYBE_UNUSED const char *css_filename) { return fd_ostream_create (fd, filename, true); } static inline void -libtextstyle_set_failure_exit_code (int exit_code _GL_UNUSED) +libtextstyle_set_failure_exit_code (_GL_ATTRIBUTE_MAYBE_UNUSED int exit_code) { } diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/time.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/time.h index 9e79cd401..06d852ada 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/time.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/time.h @@ -1,26 +1,33 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A more-standard . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. (However, skip this for MinGW as it treats __need_time_t @@ -32,11 +39,7 @@ && !defined __MINGW32__) \ || defined _GL_GTPO_TIME_H) -#if (_MSC_VER < 1900) -#include "../include/time.h" -#else -#include "../ucrt/time.h" -#endif +# include "../ucrt/time.h" #else @@ -48,30 +51,32 @@ # include # endif -#if (_MSC_VER < 1900) -#include "../include/time.h" -#else -#include "../ucrt/time.h" -#endif +# include "../ucrt/time.h" + +/* This file uses _GL_ATTRIBUTE_DEPRECATED, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +# if !_GL_CONFIG_H_INCLUDED +# error "Please include config.h first." +# endif /* NetBSD 5.0 mis-defines NULL. */ # include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -159,6 +164,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -206,6 +217,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -231,6 +252,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -328,7 +357,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -356,9 +385,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -374,26 +403,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -402,19 +431,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -487,13 +516,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -502,27 +538,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -542,7 +584,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use Or they define it with the wrong member names or define it in (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, but the pthreads-win32 library defines it in . */ -# if ! 0 +# if ! 1 # if 0 # include # elif 0 @@ -585,11 +627,87 @@ struct __time_t_must_be_integral { # define GNULIB_defined_struct_time_t_must_be_integral 1 # endif +/* Define TIME_UTC, a positive integer constant used for timespec_get(). */ +# if ! 1 +# if !GNULIB_defined_TIME_UTC +# define TIME_UTC 1 +# define GNULIB_defined_TIME_UTC 1 +# endif +# endif + +/* Set *TS to the current time, and return BASE. + Upon failure, return 0. */ +# if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef timespec_get +# define timespec_get rpl_timespec_get +# endif +_GL_FUNCDECL_RPL (timespec_get, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (timespec_get, int, (struct timespec *ts, int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (timespec_get); +# endif +# elif defined GNULIB_POSIXCHECK +# undef timespec_get +# if HAVE_RAW_DECL_TIMESPEC_GET +_GL_WARN_ON_USE (timespec_get, "timespec_get is unportable - " + "use gnulib module timespec_get for portability"); +# endif +# endif + +/* Set *TS to the current time resolution, and return BASE. + Upon failure, return 0. */ +# if 0 +# if ! 1 +_GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base)); +_GL_CXXALIASWARN (timespec_getres); +# elif defined GNULIB_POSIXCHECK +# undef timespec_getres +# if HAVE_RAW_DECL_TIMESPEC_GETRES +_GL_WARN_ON_USE (timespec_getres, "timespec_getres is unportable - " + "use gnulib module timespec_getres for portability"); +# endif +# endif + +/* Return the number of seconds that have elapsed since the Epoch. */ +# if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define time rpl_time +# endif +_GL_FUNCDECL_RPL (time, time_t, (time_t *__tp)); +_GL_CXXALIAS_RPL (time, time_t, (time_t *__tp)); +# else +_GL_CXXALIAS_SYS (time, time_t, (time_t *__tp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (time); +# endif +# elif defined GNULIB_POSIXCHECK +# undef time +# if HAVE_RAW_DECL_TIME +_GL_WARN_ON_USE (time, "time has consistency problems - " + "use gnulib module time for portability"); +# endif +# endif + /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ -# if IN_GETTEXT_TOOLS_GNULIB_TESTS -# if GNULIB_PORTCHECK +# if 0 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define nanosleep rpl_nanosleep # endif @@ -608,29 +726,58 @@ _GL_CXXALIAS_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # endif _GL_CXXALIASWARN (nanosleep); +# elif defined GNULIB_POSIXCHECK +# undef nanosleep +# if HAVE_RAW_DECL_NANOSLEEP +_GL_WARN_ON_USE (nanosleep, "nanosleep is unportable - " + "use gnulib module nanosleep for portability"); +# endif # endif /* Initialize time conversion information. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef tzset # define tzset rpl_tzset # endif _GL_FUNCDECL_RPL (tzset, void, (void)); _GL_CXXALIAS_RPL (tzset, void, (void)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tzset +# define tzset _tzset +# endif +_GL_CXXALIAS_MDA (tzset, void, (void)); # else -# if ! 1 -_GL_FUNCDECL_SYS (tzset, void, (void)); +_GL_CXXALIAS_SYS (tzset, void, (void)); +# endif +_GL_CXXALIASWARN (tzset); +# elif 1 +/* On native Windows, map 'tzset' to '_tzset', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::tzset always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tzset +# define tzset _tzset # endif +_GL_CXXALIAS_MDA (tzset, void, (void)); +# else _GL_CXXALIAS_SYS (tzset, void, (void)); # endif _GL_CXXALIASWARN (tzset); +# elif defined GNULIB_POSIXCHECK +# undef tzset +# if HAVE_RAW_DECL_TZSET +_GL_WARN_ON_USE (tzset, "tzset has portability problems - " + "use gnulib module tzset for portability"); +# endif # endif /* Return the 'time_t' representation of TP and normalize TP. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mktime rpl_mktime # endif @@ -642,13 +789,19 @@ _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (mktime); # endif +# elif defined GNULIB_POSIXCHECK +# undef mktime +# if HAVE_RAW_DECL_MKTIME +_GL_WARN_ON_USE (mktime, "mktime has portability problems - " + "use gnulib module mktime for portability"); +# endif # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime_r # define localtime_r rpl_localtime_r @@ -670,7 +823,7 @@ _GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, # if 1 _GL_CXXALIASWARN (localtime_r); # endif -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime_r # define gmtime_r rpl_gmtime_r @@ -692,12 +845,23 @@ _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, # if 1 _GL_CXXALIASWARN (gmtime_r); # endif +# elif defined GNULIB_POSIXCHECK +# undef localtime_r +# if HAVE_RAW_DECL_LOCALTIME_R +_GL_WARN_ON_USE (localtime_r, "localtime_r is unportable - " + "use gnulib module time_r for portability"); +# endif +# undef gmtime_r +# if HAVE_RAW_DECL_GMTIME_R +_GL_WARN_ON_USE (gmtime_r, "gmtime_r is unportable - " + "use gnulib module time_r for portability"); +# endif # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ -# if 1 || 1 +# if 0 || 1 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime @@ -712,6 +876,12 @@ _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (localtime); # endif +# elif defined GNULIB_POSIXCHECK +# undef localtime +# if HAVE_RAW_DECL_LOCALTIME +_GL_WARN_ON_USE (localtime, "localtime has portability problems - " + "use gnulib module localtime for portability"); +# endif # endif # if 0 || 0 @@ -743,15 +913,24 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm)); _GL_CXXALIASWARN (strptime); +# elif defined GNULIB_POSIXCHECK +# undef strptime +# if HAVE_RAW_DECL_STRPTIME +_GL_WARN_ON_USE (strptime, "strptime is unportable - " + "use gnulib module strptime for portability"); +# endif # endif /* Convert *TP to a date and time string. See . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define ctime rpl_ctime # endif +# ifndef __cplusplus +_GL_ATTRIBUTE_DEPRECATED +# endif _GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp)); @@ -761,12 +940,18 @@ _GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (ctime); # endif +# elif defined GNULIB_POSIXCHECK +# undef ctime +# if HAVE_RAW_DECL_CTIME +_GL_WARN_ON_USE (ctime, "ctime has portability problems - " + "use gnulib module ctime for portability"); +# endif # endif /* Convert *TP to a date and time string. See . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strftime rpl_strftime # endif @@ -785,30 +970,74 @@ _GL_CXXALIAS_SYS (strftime, size_t, # if __GLIBC__ >= 2 _GL_CXXALIASWARN (strftime); # endif +# elif defined GNULIB_POSIXCHECK +# undef strftime +# if HAVE_RAW_DECL_STRFTIME +_GL_WARN_ON_USE (strftime, "strftime has portability problems - " + "use gnulib module strftime-fixes for portability"); +# endif # endif # if defined _GNU_SOURCE && 0 && ! 0 +/* Functions that use a first-class time zone data type, instead of + relying on an implicit global time zone. + Inspired by NetBSD. */ + +/* Represents a time zone. + (timezone_t) NULL stands for UTC. */ typedef struct tm_zone *timezone_t; + +/* tzalloc (name) + Returns a time zone object for the given time zone NAME. This object + represents the time zone that other functions would use it the TZ + environment variable was set to NAME. + If NAME is NULL, the result represents the time zone that other functions + would use it the TZ environment variable was unset. + May return NULL if NAME is invalid (this is platform dependent) or + upon memory allocation failure. */ _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); + +/* tzfree (tz) + Frees a time zone object. + The argument must have been returned by tzalloc(). */ _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); + +/* localtime_rz (tz, &t, &result) + Converts an absolute time T to a broken-down time RESULT, assuming the + time zone TZ. + This function is like 'localtime_r', but relies on the argument TZ instead + of an implicit global time zone. */ _GL_FUNCDECL_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result)); + +/* mktime_z (tz, &tm) + Normalizes the broken-down time TM and converts it to an absolute time, + assuming the time zone TZ. Returns the absolute time. + This function is like 'mktime', but relies on the argument TZ instead + of an implicit global time zone. */ _GL_FUNCDECL_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result) + (timezone_t __tz, struct tm *restrict __tm) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result)); + (timezone_t __tz, struct tm *restrict __tm)); + +/* Time zone abbreviation strings (returned by 'localtime_rz' or 'mktime_z' + in the 'tm_zone' member of 'struct tm') are valid as long as + - the 'struct tm' argument is not destroyed or overwritten, + and + - the 'timezone_t' argument is not freed through tzfree(). */ + # endif /* Convert TM to a time_t value, assuming UTC. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef timegm # define timegm rpl_timegm @@ -821,7 +1050,15 @@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (timegm); +# endif +# elif defined GNULIB_POSIXCHECK +# undef timegm +# if HAVE_RAW_DECL_TIMEGM +_GL_WARN_ON_USE (timegm, "timegm is unportable - " + "use gnulib module timegm for portability"); +# endif # endif /* Encourage applications to avoid unsafe functions that can overrun @@ -829,23 +1066,31 @@ _GL_CXXALIASWARN (timegm); applications should use strftime (or even sprintf) instead. */ # if defined GNULIB_POSIXCHECK # undef asctime +# if HAVE_RAW_DECL_ASCTIME _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef asctime_r -_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " +# if HAVE_RAW_DECL_ASCTIME_R +_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef ctime -_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " +# if HAVE_RAW_DECL_CTIME +_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef ctime_r -_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " +# if HAVE_RAW_DECL_CTIME_R +_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uchar.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uchar.h new file mode 100644 index 000000000..86659b278 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uchar.h @@ -0,0 +1,1423 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* substitute - 16-bit and 32-bit wide character types. + Copyright (C) 2019-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2019. */ + +/* + * ISO C 23 for platforms that lack it. + */ + +#ifndef _GL_GTPO_UCHAR_H + +#if __GNUC__ >= 3 + +#endif + + +/* The include_next requires a split double-inclusion guard. */ +#if 1 +# if defined __HAIKU__ +/* Work around . */ +# include +# endif +/* On AIX 7.2 with xlclang++, /usr/include/uchar.h produces compilation errors + because it contains typedef definitions of char16_t and char32_t, however + char16_t and char32_t are keywords in this situation. To work around it, + define char16_t and char32_t as macros. */ +# if defined __cplusplus && defined _AIX && defined __ibmxl__ && defined __clang__ +# define char16_t gl_char16_t +# define char32_t gl_char32_t +# endif +# include "../ucrt/uchar.h" +#endif + +#ifndef _GL_GTPO_UCHAR_H +#define _GL_GTPO_UCHAR_H + +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_BEGIN_C_LINKAGE, + _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* Get uint_least16_t, uint_least32_t. */ +#include + +/* Get mbstate_t, size_t. */ +#include + +/* For the inline functions. */ +#include +#include + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +_GL_INLINE_HEADER_BEGIN + + +#if !(1 || (defined __cplusplus && 0)) + +/* An 8-bit variant of wchar_t. + Note: This type is only mandated by ISO C 23 or newer, and it does + denote UTF-8 units. */ +typedef unsigned char char8_t; + +#elif 1 + +typedef unsigned char gl_char8_t; +# define char8_t gl_char8_t + +#endif + +#if !(1 || (defined __cplusplus && 0)) + +/* A 16-bit variant of wchar_t. + Note: This type is only mandated by ISO C 11 or newer. In ISO C 23 + and newer, it denotes UTF-16 units; in older versions of ISO C it did + so only on platforms on which __STDC_UTF_16__ was defined. */ +typedef uint_least16_t char16_t; + +#elif 0 + +typedef uint_least16_t gl_char16_t; +# define char16_t gl_char16_t + +#endif + +#if !(1 || (defined __cplusplus && 0)) + +/* A 32-bit variant of wchar_t. + Note: This type is only mandated by ISO C 11 or newer. In ISO C 23 + and newer, it denotes UTF-32 code points; in older versions of ISO C + it did so only on platforms on which __STDC_UTF_32__ was defined. + In gnulib, we guarantee that it denotes UTF-32 code points if and + only if the module 'uchar-c23' is in use. */ +typedef uint_least32_t char32_t; + +#elif 0 + +typedef uint_least32_t gl_char32_t; +# define char32_t gl_char32_t + +#endif + +/* Define if a 'char32_t' can hold more characters than a 'wchar_t'. */ +#if 1 /* 32-bit AIX, Cygwin, native Windows */ +# define _GL_SMALL_WCHAR_T 1 +#endif + +/* Define if 'wchar_t', like 'char32_t', + - is a 32-bit type, and + - represents Unicode code points. + For this test, we can use __STDC_ISO_10646__ (defined by glibc, musl libc, + Cygwin) but need to consider _GL_SMALL_WCHAR_T, so as to exclude Cygwin. + We cannot use __STDC_UTF_16__ or __STDC_UTF_32__ + - because these macros provide info about char16_t and char32_t (not + wchar_t!), and + - because GCC >= 4.9 defines these macros on all platforms, even on + FreeBSD and Solaris. + We should better not use __STD_UTF_16__, __STD_UTF_32__ either, because + these macros are misspellings, only defined by Android's . */ +#if defined __STDC_ISO_10646__ && !_GL_SMALL_WCHAR_T +/* glibc, musl libc */ +# define _GL_WCHAR_T_IS_UCS4 1 +#endif +#if _GL_WCHAR_T_IS_UCS4 +static_assert (sizeof (char32_t) == sizeof (wchar_t)); +#endif + + +/* Convert a single-byte character to a 32-bit wide character. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_BTOC32 +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ATTRIBUTE_PURE wint_t +btoc32 (int c) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + btowc (c); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (btoc32, wint_t, (int c) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (btoc32, wint_t, (int c)); +_GL_CXXALIASWARN (btoc32); +#endif + + +/* Test a specific property of a 32-bit wide character. */ +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISALNUM +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isalnum (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswalnum (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isalnum, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isalnum, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isalnum); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISALPHA +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isalpha (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswalpha (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isalpha, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isalpha, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isalpha); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISBLANK +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isblank (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswblank (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isblank, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isblank, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isblank); +#endif +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISCNTRL +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32iscntrl (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswcntrl (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32iscntrl, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32iscntrl, int, (wint_t wc)); +_GL_CXXALIASWARN (c32iscntrl); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISDIGIT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isdigit (wint_t wc) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswdigit (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isdigit, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isdigit, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isdigit); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISGRAPH +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isgraph (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswgraph (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isgraph, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isgraph, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isgraph); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISLOWER +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32islower (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswlower (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32islower, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32islower, int, (wint_t wc)); +_GL_CXXALIASWARN (c32islower); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISPRINT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isprint (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswprint (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isprint, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isprint, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isprint); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISPUNCT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32ispunct (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswpunct (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32ispunct, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32ispunct, int, (wint_t wc)); +_GL_CXXALIASWARN (c32ispunct); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISSPACE +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isspace (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswspace (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isspace, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isspace, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isspace); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISUPPER +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isupper (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswupper (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isupper, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isupper, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isupper); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32ISXDIGIT +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32isxdigit (wint_t wc) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswxdigit (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32isxdigit, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32isxdigit, int, (wint_t wc)); +_GL_CXXALIASWARN (c32isxdigit); +#endif + + +/* Case mapping of a 32-bit wide character. */ +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32TOLOWER +_GL_BEGIN_C_LINKAGE +_GL_INLINE wint_t +c32tolower (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + towlower (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32tolower, wint_t, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32tolower, wint_t, (wint_t wc)); +_GL_CXXALIASWARN (c32tolower); +#endif +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32TOUPPER +_GL_BEGIN_C_LINKAGE +_GL_INLINE wint_t +c32toupper (wint_t wc) +{ + return +# if defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + towupper (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32toupper, wint_t, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32toupper, wint_t, (wint_t wc)); +_GL_CXXALIASWARN (c32toupper); +#endif + + +/* Number of screen columns needed for a 32-bit wide character. */ +#if 1 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32WIDTH +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32width (char32_t wc) +{ + return +# if 1 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcwidth (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32width, int, (char32_t wc)); +# endif +_GL_CXXALIAS_SYS (c32width, int, (char32_t wc)); +_GL_CXXALIASWARN (c32width); +#endif + + +/* Converts a 32-bit wide character to a multibyte character. */ +#if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef c32rtomb +# define c32rtomb rpl_c32rtomb +# endif +_GL_FUNCDECL_RPL (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +_GL_CXXALIAS_RPL (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (c32rtomb, size_t, (char *s, char32_t wc, mbstate_t *ps)); +# endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_CXXALIASWARN (c32rtomb); +# endif +#elif defined GNULIB_POSIXCHECK +# undef c32rtomb +# if HAVE_RAW_DECL_C32RTOMB +_GL_WARN_ON_USE (c32rtomb, "c32rtomb is not portable - " + "use gnulib module c32rtomb for portability"); +# endif +#endif + + +/* Convert a 32-bit wide string to a string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32SNRTOMBS +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +c32snrtombs (char *dest, const char32_t **srcp, size_t srclen, size_t len, + mbstate_t *ps) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcsnrtombs (dest, (const wchar_t **) srcp, srclen, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32snrtombs, size_t, + (char *dest, const char32_t **srcp, size_t srclen, size_t len, + mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32snrtombs, size_t, + (char *dest, const char32_t **srcp, size_t srclen, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (c32snrtombs); +#endif + + +/* Convert a 32-bit wide string to a string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32SRTOMBS +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +c32srtombs (char *dest, const char32_t **srcp, size_t len, mbstate_t *ps) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcsrtombs (dest, (const wchar_t **) srcp, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32srtombs, size_t, + (char *dest, const char32_t **srcp, size_t len, mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32srtombs, size_t, + (char *dest, const char32_t **srcp, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (c32srtombs); +#endif + + +/* Convert a 32-bit wide string to a string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32STOMBS +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +c32stombs (char *dest, const char32_t *src, size_t len) +{ + mbstate_t state; + + mbszero (&state); + return c32srtombs (dest, &src, len, &state); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32stombs, size_t, + (char *dest, const char32_t *src, size_t len) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32stombs, size_t, + (char *dest, const char32_t *src, size_t len)); +_GL_CXXALIASWARN (c32stombs); +#endif + + +/* Number of screen columns needed for a size-bounded 32-bit wide string. */ +#if 0 +# if (_GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t) && !defined IN_C32SWIDTH +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((1)) int +c32swidth (const char32_t *s, size_t n) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wcswidth ((const wchar_t *) s, n); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32swidth, int, (const char32_t *s, size_t n) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (c32swidth, int, (const char32_t *s, size_t n)); +_GL_CXXALIASWARN (c32swidth); +#endif + + +/* Converts a 32-bit wide character to unibyte character. + Returns the single-byte representation of WC if it exists, + or EOF otherwise. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32TOB +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32tob (wint_t wc) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wctob (wc); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32tob, int, (wint_t wc)); +# endif +_GL_CXXALIAS_SYS (c32tob, int, (wint_t wc)); +_GL_CXXALIASWARN (c32tob); +#endif + + +/* Converts a multibyte character to a 32-bit wide character. */ +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrtoc32 +# define mbrtoc32 rpl_mbrtoc32 +# endif +_GL_FUNCDECL_RPL (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbrtoc32, size_t, + (char32_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_CXXALIASWARN (mbrtoc32); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrtoc32 +# if HAVE_RAW_DECL_MBRTOC32 +_GL_WARN_ON_USE (mbrtoc32, "mbrtoc32 is not portable - " + "use gnulib module mbrtoc32 for portability"); +# endif +#endif + + +/* Converts a multibyte character and returns the next 16-bit wide + character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrtoc16 +# define mbrtoc16 rpl_mbrtoc16 +# endif +_GL_FUNCDECL_RPL (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbrtoc16, size_t, + (char16_t *pc, const char *s, size_t n, mbstate_t *ps)); +# endif +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_CXXALIASWARN (mbrtoc16); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrtoc16 +# if HAVE_RAW_DECL_MBRTOC16 +_GL_WARN_ON_USE (mbrtoc16, "mbrtoc16 is not portable - " + "use gnulib module mbrtoc16 for portability"); +# endif +#endif + + +/* Convert a string to a 32-bit wide string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSNRTOC32S +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +mbsnrtoc32s (char32_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + mbsnrtowcs ((wchar_t *) dest, srcp, srclen, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (mbsnrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsnrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (mbsnrtoc32s); +#endif + + +/* Convert a string to a 32-bit wide string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSRTOC32S +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +mbsrtoc32s (char32_t *dest, const char **srcp, size_t len, mbstate_t *ps) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + mbsrtowcs ((wchar_t *) dest, srcp, len, ps); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (mbsrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t len, mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsrtoc32s, size_t, + (char32_t *dest, const char **srcp, size_t len, + mbstate_t *ps)); +_GL_CXXALIASWARN (mbsrtoc32s); +#endif + + +/* Convert a string to a 32-bit wide string. */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_MBSTOC32S +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) size_t +mbstoc32s (char32_t *dest, const char *src, size_t len) +{ + mbstate_t state; + + mbszero (&state); + return mbsrtoc32s (dest, &src, len, &state); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (mbstoc32s, size_t, + (char32_t *dest, const char *src, size_t len) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbstoc32s, size_t, + (char32_t *dest, const char *src, size_t len)); +_GL_CXXALIASWARN (mbstoc32s); +#endif + + +#if 0 || 0 +/* A scalar type. Instances of this type, other than (c32_type_test_t) 0, + represent a character property, sometimes also viewed as a "character class". + It can be applied to 32-bit wide characters. It is the counterpart of + type 'wctype_t' for wide characters. + To test whether a given character has a certain property, use the function + 'c32_apply_type_test'. */ +# if _GL_WCHAR_T_IS_UCS4 +typedef wctype_t c32_type_test_t; +# else +typedef /*bool*/int (*c32_type_test_t) (wint_t wc); +# endif +#endif + +/* Return a character property with the given name, or (c32_type_test_t) 0 + if the designated property does not exist. + This function is the counterpart of function 'wctype' for wide characters. + */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_GET_TYPE_TEST +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((1)) c32_type_test_t +c32_get_type_test (const char *name) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wctype (name); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_get_type_test, c32_type_test_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (c32_get_type_test, c32_type_test_t, (const char *name)); +_GL_CXXALIASWARN (c32_get_type_test); +#endif + +/* Test whether a given 32-bit wide character has the specified character + property. + Return non-zero if true, zero if false or if the argument is WEOF. + This function is the counterpart of function 'iswctype' for wide characters. + */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 +# if !defined IN_C32_APPLY_TYPE_TEST +_GL_BEGIN_C_LINKAGE +_GL_INLINE int +c32_apply_type_test (wint_t wc, c32_type_test_t property) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + iswctype (wc, property); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_apply_type_test, int, + (wint_t wc, c32_type_test_t property)); +# endif +# else +_GL_FUNCDECL_SYS (c32_apply_type_test, int, + (wint_t wc, c32_type_test_t property) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32_apply_type_test, int, + (wint_t wc, c32_type_test_t property)); +_GL_CXXALIASWARN (c32_apply_type_test); +#endif + + +#if 0 || 0 +/* A scalar type. Instances of this type, other than (c32_mapping_t) 0, + represent a character mapping. It can be applied to 32-bit wide characters. + It is the counterpart of type 'wctrans_t' for wide characters. + To apply a certain mapping to a given character, use the function + 'c32_apply_mapping'. */ +# if _GL_WCHAR_T_IS_UCS4 +typedef wctrans_t c32_mapping_t; +# else +typedef wint_t (*c32_mapping_t) (wint_t wc); +# endif +#endif + +/* Return a character mapping with the given name, or (c32_mapping_t) 0 + if the designated mapping does not exist. + This function is the counterpart of function 'wctrans' for wide characters. + */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_GET_MAPPING +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((1)) c32_mapping_t +c32_get_mapping (const char *name) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + wctrans (name); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_get_mapping, c32_mapping_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (c32_get_mapping, c32_mapping_t, (const char *name)); +_GL_CXXALIASWARN (c32_get_mapping); +#endif + +/* Apply the specified character mapping to a given 32-bit wide character. + Return the result of this mapping. Return the WC argument unchanged if it is + WEOF. + This function is the counterpart of function 'towctrans' for wide characters. + */ +#if 0 +# if _GL_WCHAR_T_IS_UCS4 && !defined IN_C32_APPLY_MAPPING +_GL_BEGIN_C_LINKAGE +_GL_INLINE _GL_ARG_NONNULL ((2)) wint_t +c32_apply_mapping (wint_t wc, c32_mapping_t mapping) +{ + return +# if 0 && defined __cplusplus && defined GNULIB_NAMESPACE + GNULIB_NAMESPACE:: +# endif + towctrans (wc, mapping); +} +_GL_END_C_LINKAGE +# else +_GL_FUNCDECL_SYS (c32_apply_mapping, wint_t, + (wint_t wc, c32_mapping_t mapping) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (c32_apply_mapping, wint_t, + (wint_t wc, c32_mapping_t mapping)); +_GL_CXXALIASWARN (c32_apply_mapping); +#endif + + +_GL_INLINE_HEADER_END + +#endif /* _GL_GTPO_UCHAR_H */ +#endif /* _GL_GTPO_UCHAR_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uniconv.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uniconv.h index 2727b8229..c7173a0fd 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uniconv.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uniconv.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Conversions between Unicode and legacy encodings. - Copyright (C) 2002, 2005, 2007, 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2002, 2005, 2007, 2009-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNICONV_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unictype.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unictype.h index 54016658d..d752b8a1d 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unictype.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unictype.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Unicode character classification and properties. - Copyright (C) 2002, 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNICTYPE_H @@ -26,6 +26,12 @@ /* Get size_t. */ #include +#if 0 +# include +#else +# define LIBUNISTRING_DLL_VARIABLE +#endif + #ifdef __cplusplus extern "C" { #endif @@ -102,44 +108,44 @@ enum }; /* Predefined General category values. */ -extern const uc_general_category_t UC_CATEGORY_L; -extern const uc_general_category_t UC_CATEGORY_LC; -extern const uc_general_category_t UC_CATEGORY_Lu; -extern const uc_general_category_t UC_CATEGORY_Ll; -extern const uc_general_category_t UC_CATEGORY_Lt; -extern const uc_general_category_t UC_CATEGORY_Lm; -extern const uc_general_category_t UC_CATEGORY_Lo; -extern const uc_general_category_t UC_CATEGORY_M; -extern const uc_general_category_t UC_CATEGORY_Mn; -extern const uc_general_category_t UC_CATEGORY_Mc; -extern const uc_general_category_t UC_CATEGORY_Me; -extern const uc_general_category_t UC_CATEGORY_N; -extern const uc_general_category_t UC_CATEGORY_Nd; -extern const uc_general_category_t UC_CATEGORY_Nl; -extern const uc_general_category_t UC_CATEGORY_No; -extern const uc_general_category_t UC_CATEGORY_P; -extern const uc_general_category_t UC_CATEGORY_Pc; -extern const uc_general_category_t UC_CATEGORY_Pd; -extern const uc_general_category_t UC_CATEGORY_Ps; -extern const uc_general_category_t UC_CATEGORY_Pe; -extern const uc_general_category_t UC_CATEGORY_Pi; -extern const uc_general_category_t UC_CATEGORY_Pf; -extern const uc_general_category_t UC_CATEGORY_Po; -extern const uc_general_category_t UC_CATEGORY_S; -extern const uc_general_category_t UC_CATEGORY_Sm; -extern const uc_general_category_t UC_CATEGORY_Sc; -extern const uc_general_category_t UC_CATEGORY_Sk; -extern const uc_general_category_t UC_CATEGORY_So; -extern const uc_general_category_t UC_CATEGORY_Z; -extern const uc_general_category_t UC_CATEGORY_Zs; -extern const uc_general_category_t UC_CATEGORY_Zl; -extern const uc_general_category_t UC_CATEGORY_Zp; -extern const uc_general_category_t UC_CATEGORY_C; -extern const uc_general_category_t UC_CATEGORY_Cc; -extern const uc_general_category_t UC_CATEGORY_Cf; -extern const uc_general_category_t UC_CATEGORY_Cs; -extern const uc_general_category_t UC_CATEGORY_Co; -extern const uc_general_category_t UC_CATEGORY_Cn; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_L; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_LC; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lu; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ll; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lt; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lm; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Lo; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_M; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mn; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Mc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Me; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_N; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Nd; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Nl; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_No; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_P; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pd; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Ps; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pe; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pi; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Pf; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Po; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_S; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sm; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Sk; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_So; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Z; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zs; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zl; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Zp; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_C; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cc; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cf; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cs; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Co; +extern LIBUNISTRING_DLL_VARIABLE const uc_general_category_t UC_CATEGORY_Cn; /* Non-public. */ extern const uc_general_category_t _UC_CATEGORY_NONE; @@ -467,95 +473,110 @@ extern int This enumeration may be extended in the future. */ enum { - UC_JOINING_GROUP_NONE, /* No_Joining_Group */ - UC_JOINING_GROUP_AIN, /* Ain */ - UC_JOINING_GROUP_ALAPH, /* Alaph */ - UC_JOINING_GROUP_ALEF, /* Alef */ - UC_JOINING_GROUP_BEH, /* Beh */ - UC_JOINING_GROUP_BETH, /* Beth */ - UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, /* Burushaski_Yeh_Barree */ - UC_JOINING_GROUP_DAL, /* Dal */ - UC_JOINING_GROUP_DALATH_RISH, /* Dalath_Rish */ - UC_JOINING_GROUP_E, /* E */ - UC_JOINING_GROUP_FARSI_YEH, /* Farsi_Yeh */ - UC_JOINING_GROUP_FE, /* Fe */ - UC_JOINING_GROUP_FEH, /* Feh */ - UC_JOINING_GROUP_FINAL_SEMKATH, /* Final_Semkath */ - UC_JOINING_GROUP_GAF, /* Gaf */ - UC_JOINING_GROUP_GAMAL, /* Gamal */ - UC_JOINING_GROUP_HAH, /* Hah */ - UC_JOINING_GROUP_HE, /* He */ - UC_JOINING_GROUP_HEH, /* Heh */ - UC_JOINING_GROUP_HEH_GOAL, /* Heh_Goal */ - UC_JOINING_GROUP_HETH, /* Heth */ - UC_JOINING_GROUP_KAF, /* Kaf */ - UC_JOINING_GROUP_KAPH, /* Kaph */ - UC_JOINING_GROUP_KHAPH, /* Khaph */ - UC_JOINING_GROUP_KNOTTED_HEH, /* Knotted_Heh */ - UC_JOINING_GROUP_LAM, /* Lam */ - UC_JOINING_GROUP_LAMADH, /* Lamadh */ - UC_JOINING_GROUP_MEEM, /* Meem */ - UC_JOINING_GROUP_MIM, /* Mim */ - UC_JOINING_GROUP_NOON, /* Noon */ - UC_JOINING_GROUP_NUN, /* Nun */ - UC_JOINING_GROUP_NYA, /* Nya */ - UC_JOINING_GROUP_PE, /* Pe */ - UC_JOINING_GROUP_QAF, /* Qaf */ - UC_JOINING_GROUP_QAPH, /* Qaph */ - UC_JOINING_GROUP_REH, /* Reh */ - UC_JOINING_GROUP_REVERSED_PE, /* Reversed_Pe */ - UC_JOINING_GROUP_SAD, /* Sad */ - UC_JOINING_GROUP_SADHE, /* Sadhe */ - UC_JOINING_GROUP_SEEN, /* Seen */ - UC_JOINING_GROUP_SEMKATH, /* Semkath */ - UC_JOINING_GROUP_SHIN, /* Shin */ - UC_JOINING_GROUP_SWASH_KAF, /* Swash_Kaf */ - UC_JOINING_GROUP_SYRIAC_WAW, /* Syriac_Waw */ - UC_JOINING_GROUP_TAH, /* Tah */ - UC_JOINING_GROUP_TAW, /* Taw */ - UC_JOINING_GROUP_TEH_MARBUTA, /* Teh_Marbuta */ - UC_JOINING_GROUP_TEH_MARBUTA_GOAL, /* Teh_Marbuta_Goal */ - UC_JOINING_GROUP_TETH, /* Teth */ - UC_JOINING_GROUP_WAW, /* Waw */ - UC_JOINING_GROUP_YEH, /* Yeh */ - UC_JOINING_GROUP_YEH_BARREE, /* Yeh_Barree */ - UC_JOINING_GROUP_YEH_WITH_TAIL, /* Yeh_With_Tail */ - UC_JOINING_GROUP_YUDH, /* Yudh */ - UC_JOINING_GROUP_YUDH_HE, /* Yudh_He */ - UC_JOINING_GROUP_ZAIN, /* Zain */ - UC_JOINING_GROUP_ZHAIN, /* Zhain */ - UC_JOINING_GROUP_ROHINGYA_YEH, /* Rohingya_Yeh */ - UC_JOINING_GROUP_STRAIGHT_WAW, /* Straight_Waw */ - UC_JOINING_GROUP_MANICHAEAN_ALEPH, /* Manichaean_Aleph */ - UC_JOINING_GROUP_MANICHAEAN_BETH, /* Manichaean_Beth */ - UC_JOINING_GROUP_MANICHAEAN_GIMEL, /* Manichaean_Gimel */ - UC_JOINING_GROUP_MANICHAEAN_DALETH, /* Manichaean_Daleth */ - UC_JOINING_GROUP_MANICHAEAN_WAW, /* Manichaean_Waw */ - UC_JOINING_GROUP_MANICHAEAN_ZAYIN, /* Manichaean_Zayin */ - UC_JOINING_GROUP_MANICHAEAN_HETH, /* Manichaean_Heth */ - UC_JOINING_GROUP_MANICHAEAN_TETH, /* Manichaean_Teth */ - UC_JOINING_GROUP_MANICHAEAN_YODH, /* Manichaean_Yodh */ - UC_JOINING_GROUP_MANICHAEAN_KAPH, /* Manichaean_Kaph */ - UC_JOINING_GROUP_MANICHAEAN_LAMEDH, /* Manichaean_Lamedh */ - UC_JOINING_GROUP_MANICHAEAN_DHAMEDH, /* Manichaean_Dhamedh */ - UC_JOINING_GROUP_MANICHAEAN_THAMEDH, /* Manichaean_Thamedh */ - UC_JOINING_GROUP_MANICHAEAN_MEM, /* Manichaean_Mem */ - UC_JOINING_GROUP_MANICHAEAN_NUN, /* Manichaean_Nun */ - UC_JOINING_GROUP_MANICHAEAN_SAMEKH, /* Manichaean_Aleph */ - UC_JOINING_GROUP_MANICHAEAN_AYIN, /* Manichaean_Ayin */ - UC_JOINING_GROUP_MANICHAEAN_PE, /* Manichaean_Pe */ - UC_JOINING_GROUP_MANICHAEAN_SADHE, /* Manichaean_Sadhe */ - UC_JOINING_GROUP_MANICHAEAN_QOPH, /* Manichaean_Qoph */ - UC_JOINING_GROUP_MANICHAEAN_RESH, /* Manichaean_Resh */ - UC_JOINING_GROUP_MANICHAEAN_TAW, /* Manichaean_Taw */ - UC_JOINING_GROUP_MANICHAEAN_ONE, /* Manichaean_One */ - UC_JOINING_GROUP_MANICHAEAN_FIVE, /* Manichaean_Five */ - UC_JOINING_GROUP_MANICHAEAN_TEN, /* Manichaean_Ten */ - UC_JOINING_GROUP_MANICHAEAN_TWENTY, /* Manichaean_Twenty */ - UC_JOINING_GROUP_MANICHAEAN_HUNDRED, /* Manichaean_Hundred */ - UC_JOINING_GROUP_AFRICAN_FEH, /* African_Feh */ - UC_JOINING_GROUP_AFRICAN_QAF, /* African_Qaf */ - UC_JOINING_GROUP_AFRICAN_NOON /* African_Noon */ + UC_JOINING_GROUP_NONE, /* No_Joining_Group */ + UC_JOINING_GROUP_AIN, /* Ain */ + UC_JOINING_GROUP_ALAPH, /* Alaph */ + UC_JOINING_GROUP_ALEF, /* Alef */ + UC_JOINING_GROUP_BEH, /* Beh */ + UC_JOINING_GROUP_BETH, /* Beth */ + UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE, /* Burushaski_Yeh_Barree */ + UC_JOINING_GROUP_DAL, /* Dal */ + UC_JOINING_GROUP_DALATH_RISH, /* Dalath_Rish */ + UC_JOINING_GROUP_E, /* E */ + UC_JOINING_GROUP_FARSI_YEH, /* Farsi_Yeh */ + UC_JOINING_GROUP_FE, /* Fe */ + UC_JOINING_GROUP_FEH, /* Feh */ + UC_JOINING_GROUP_FINAL_SEMKATH, /* Final_Semkath */ + UC_JOINING_GROUP_GAF, /* Gaf */ + UC_JOINING_GROUP_GAMAL, /* Gamal */ + UC_JOINING_GROUP_HAH, /* Hah */ + UC_JOINING_GROUP_HE, /* He */ + UC_JOINING_GROUP_HEH, /* Heh */ + UC_JOINING_GROUP_HEH_GOAL, /* Heh_Goal */ + UC_JOINING_GROUP_HETH, /* Heth */ + UC_JOINING_GROUP_KAF, /* Kaf */ + UC_JOINING_GROUP_KAPH, /* Kaph */ + UC_JOINING_GROUP_KHAPH, /* Khaph */ + UC_JOINING_GROUP_KNOTTED_HEH, /* Knotted_Heh */ + UC_JOINING_GROUP_LAM, /* Lam */ + UC_JOINING_GROUP_LAMADH, /* Lamadh */ + UC_JOINING_GROUP_MEEM, /* Meem */ + UC_JOINING_GROUP_MIM, /* Mim */ + UC_JOINING_GROUP_NOON, /* Noon */ + UC_JOINING_GROUP_NUN, /* Nun */ + UC_JOINING_GROUP_NYA, /* Nya */ + UC_JOINING_GROUP_PE, /* Pe */ + UC_JOINING_GROUP_QAF, /* Qaf */ + UC_JOINING_GROUP_QAPH, /* Qaph */ + UC_JOINING_GROUP_REH, /* Reh */ + UC_JOINING_GROUP_REVERSED_PE, /* Reversed_Pe */ + UC_JOINING_GROUP_SAD, /* Sad */ + UC_JOINING_GROUP_SADHE, /* Sadhe */ + UC_JOINING_GROUP_SEEN, /* Seen */ + UC_JOINING_GROUP_SEMKATH, /* Semkath */ + UC_JOINING_GROUP_SHIN, /* Shin */ + UC_JOINING_GROUP_SWASH_KAF, /* Swash_Kaf */ + UC_JOINING_GROUP_SYRIAC_WAW, /* Syriac_Waw */ + UC_JOINING_GROUP_TAH, /* Tah */ + UC_JOINING_GROUP_TAW, /* Taw */ + UC_JOINING_GROUP_TEH_MARBUTA, /* Teh_Marbuta */ + UC_JOINING_GROUP_TEH_MARBUTA_GOAL, /* Teh_Marbuta_Goal */ + UC_JOINING_GROUP_TETH, /* Teth */ + UC_JOINING_GROUP_WAW, /* Waw */ + UC_JOINING_GROUP_YEH, /* Yeh */ + UC_JOINING_GROUP_YEH_BARREE, /* Yeh_Barree */ + UC_JOINING_GROUP_YEH_WITH_TAIL, /* Yeh_With_Tail */ + UC_JOINING_GROUP_YUDH, /* Yudh */ + UC_JOINING_GROUP_YUDH_HE, /* Yudh_He */ + UC_JOINING_GROUP_ZAIN, /* Zain */ + UC_JOINING_GROUP_ZHAIN, /* Zhain */ + UC_JOINING_GROUP_ROHINGYA_YEH, /* Rohingya_Yeh */ + UC_JOINING_GROUP_STRAIGHT_WAW, /* Straight_Waw */ + UC_JOINING_GROUP_MANICHAEAN_ALEPH, /* Manichaean_Aleph */ + UC_JOINING_GROUP_MANICHAEAN_BETH, /* Manichaean_Beth */ + UC_JOINING_GROUP_MANICHAEAN_GIMEL, /* Manichaean_Gimel */ + UC_JOINING_GROUP_MANICHAEAN_DALETH, /* Manichaean_Daleth */ + UC_JOINING_GROUP_MANICHAEAN_WAW, /* Manichaean_Waw */ + UC_JOINING_GROUP_MANICHAEAN_ZAYIN, /* Manichaean_Zayin */ + UC_JOINING_GROUP_MANICHAEAN_HETH, /* Manichaean_Heth */ + UC_JOINING_GROUP_MANICHAEAN_TETH, /* Manichaean_Teth */ + UC_JOINING_GROUP_MANICHAEAN_YODH, /* Manichaean_Yodh */ + UC_JOINING_GROUP_MANICHAEAN_KAPH, /* Manichaean_Kaph */ + UC_JOINING_GROUP_MANICHAEAN_LAMEDH, /* Manichaean_Lamedh */ + UC_JOINING_GROUP_MANICHAEAN_DHAMEDH, /* Manichaean_Dhamedh */ + UC_JOINING_GROUP_MANICHAEAN_THAMEDH, /* Manichaean_Thamedh */ + UC_JOINING_GROUP_MANICHAEAN_MEM, /* Manichaean_Mem */ + UC_JOINING_GROUP_MANICHAEAN_NUN, /* Manichaean_Nun */ + UC_JOINING_GROUP_MANICHAEAN_SAMEKH, /* Manichaean_Aleph */ + UC_JOINING_GROUP_MANICHAEAN_AYIN, /* Manichaean_Ayin */ + UC_JOINING_GROUP_MANICHAEAN_PE, /* Manichaean_Pe */ + UC_JOINING_GROUP_MANICHAEAN_SADHE, /* Manichaean_Sadhe */ + UC_JOINING_GROUP_MANICHAEAN_QOPH, /* Manichaean_Qoph */ + UC_JOINING_GROUP_MANICHAEAN_RESH, /* Manichaean_Resh */ + UC_JOINING_GROUP_MANICHAEAN_TAW, /* Manichaean_Taw */ + UC_JOINING_GROUP_MANICHAEAN_ONE, /* Manichaean_One */ + UC_JOINING_GROUP_MANICHAEAN_FIVE, /* Manichaean_Five */ + UC_JOINING_GROUP_MANICHAEAN_TEN, /* Manichaean_Ten */ + UC_JOINING_GROUP_MANICHAEAN_TWENTY, /* Manichaean_Twenty */ + UC_JOINING_GROUP_MANICHAEAN_HUNDRED, /* Manichaean_Hundred */ + UC_JOINING_GROUP_AFRICAN_FEH, /* African_Feh */ + UC_JOINING_GROUP_AFRICAN_QAF, /* African_Qaf */ + UC_JOINING_GROUP_AFRICAN_NOON, /* African_Noon */ + UC_JOINING_GROUP_MALAYALAM_NGA, /* Malayalam_Nga */ + UC_JOINING_GROUP_MALAYALAM_JA, /* Malayalam_Ja */ + UC_JOINING_GROUP_MALAYALAM_NYA, /* Malayalam_Nya */ + UC_JOINING_GROUP_MALAYALAM_TTA, /* Malayalam_Tta */ + UC_JOINING_GROUP_MALAYALAM_NNA, /* Malayalam_Nna */ + UC_JOINING_GROUP_MALAYALAM_NNNA, /* Malayalam_Nnna */ + UC_JOINING_GROUP_MALAYALAM_BHA, /* Malayalam_Bha */ + UC_JOINING_GROUP_MALAYALAM_RA, /* Malayalam_Ra */ + UC_JOINING_GROUP_MALAYALAM_LLA, /* Malayalam_Lla */ + UC_JOINING_GROUP_MALAYALAM_LLLA, /* Malayalam_Llla */ + UC_JOINING_GROUP_MALAYALAM_SSA, /* Malayalam_Ssa */ + UC_JOINING_GROUP_HANIFI_ROHINGYA_PA, /* Hanifi_Rohingya_Pa */ + UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA, /* Hanifi_Rohingya_Kinna_Ya */ + UC_JOINING_GROUP_THIN_YEH, /* Thin_Yeh */ + UC_JOINING_GROUP_VERTICAL_TAIL /* Vertical_Tail */ }; /* Return the name of a joining group. */ @@ -588,99 +609,107 @@ uc_property_t; /* Predefined properties. */ /* General. */ -extern const uc_property_t UC_PROPERTY_WHITE_SPACE; -extern const uc_property_t UC_PROPERTY_ALPHABETIC; -extern const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC; -extern const uc_property_t UC_PROPERTY_NOT_A_CHARACTER; -extern const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT; -extern const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; -extern const uc_property_t UC_PROPERTY_DEPRECATED; -extern const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION; -extern const uc_property_t UC_PROPERTY_VARIATION_SELECTOR; -extern const uc_property_t UC_PROPERTY_PRIVATE_USE; -extern const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_WHITE_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ALPHABETIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NOT_A_CHARACTER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DEPRECATED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_VARIATION_SELECTOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PRIVATE_USE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE; /* Case. */ -extern const uc_property_t UC_PROPERTY_UPPERCASE; -extern const uc_property_t UC_PROPERTY_OTHER_UPPERCASE; -extern const uc_property_t UC_PROPERTY_LOWERCASE; -extern const uc_property_t UC_PROPERTY_OTHER_LOWERCASE; -extern const uc_property_t UC_PROPERTY_TITLECASE; -extern const uc_property_t UC_PROPERTY_CASED; -extern const uc_property_t UC_PROPERTY_CASE_IGNORABLE; -extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_LOWERCASED; -extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_UPPERCASED; -extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_TITLECASED; -extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEFOLDED; -extern const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED; -extern const uc_property_t UC_PROPERTY_SOFT_DOTTED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UPPERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_UPPERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LOWERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_LOWERCASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TITLECASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CASE_IGNORABLE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_LOWERCASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_UPPERCASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_TITLECASED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEFOLDED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SOFT_DOTTED; /* Identifiers. */ -extern const uc_property_t UC_PROPERTY_ID_START; -extern const uc_property_t UC_PROPERTY_OTHER_ID_START; -extern const uc_property_t UC_PROPERTY_ID_CONTINUE; -extern const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE; -extern const uc_property_t UC_PROPERTY_XID_START; -extern const uc_property_t UC_PROPERTY_XID_CONTINUE; -extern const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE; -extern const uc_property_t UC_PROPERTY_PATTERN_SYNTAX; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_START; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_XID_CONTINUE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PATTERN_SYNTAX; /* Shaping and rendering. */ -extern const uc_property_t UC_PROPERTY_JOIN_CONTROL; -extern const uc_property_t UC_PROPERTY_GRAPHEME_BASE; -extern const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND; -extern const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND; -extern const uc_property_t UC_PROPERTY_GRAPHEME_LINK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_JOIN_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_BASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_GRAPHEME_LINK; /* Bidi. */ -extern const uc_property_t UC_PROPERTY_BIDI_CONTROL; -extern const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT; -extern const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT; -extern const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT; -extern const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT; -extern const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR; -extern const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR; -extern const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT; -extern const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR; -extern const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR; -extern const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR; -extern const uc_property_t UC_PROPERTY_BIDI_WHITESPACE; -extern const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK; -extern const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL; -extern const uc_property_t UC_PROPERTY_BIDI_PDF; -extern const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE; -extern const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_WHITESPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_PDF; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL; /* Numeric. */ -extern const uc_property_t UC_PROPERTY_HEX_DIGIT; -extern const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_HEX_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT; /* CJK. */ -extern const uc_property_t UC_PROPERTY_IDEOGRAPHIC; -extern const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH; -extern const uc_property_t UC_PROPERTY_RADICAL; -extern const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR; -extern const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDEOGRAPHIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_RADICAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR; +/* Emoji. */ +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_PRESENTATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_MODIFIER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_MODIFIER_BASE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EMOJI_COMPONENT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EXTENDED_PICTOGRAPHIC; /* Misc. */ -extern const uc_property_t UC_PROPERTY_ZERO_WIDTH; -extern const uc_property_t UC_PROPERTY_SPACE; -extern const uc_property_t UC_PROPERTY_NON_BREAK; -extern const uc_property_t UC_PROPERTY_ISO_CONTROL; -extern const uc_property_t UC_PROPERTY_FORMAT_CONTROL; -extern const uc_property_t UC_PROPERTY_DASH; -extern const uc_property_t UC_PROPERTY_HYPHEN; -extern const uc_property_t UC_PROPERTY_PUNCTUATION; -extern const uc_property_t UC_PROPERTY_LINE_SEPARATOR; -extern const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR; -extern const uc_property_t UC_PROPERTY_QUOTATION_MARK; -extern const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL; -extern const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION; -extern const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL; -extern const uc_property_t UC_PROPERTY_MATH; -extern const uc_property_t UC_PROPERTY_OTHER_MATH; -extern const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION; -extern const uc_property_t UC_PROPERTY_LEFT_OF_PAIR; -extern const uc_property_t UC_PROPERTY_COMBINING; -extern const uc_property_t UC_PROPERTY_COMPOSITE; -extern const uc_property_t UC_PROPERTY_DECIMAL_DIGIT; -extern const uc_property_t UC_PROPERTY_NUMERIC; -extern const uc_property_t UC_PROPERTY_DIACRITIC; -extern const uc_property_t UC_PROPERTY_EXTENDER; -extern const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ZERO_WIDTH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SPACE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NON_BREAK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_ISO_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_FORMAT_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DASH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_HYPHEN; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LINE_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_QUOTATION_MARK; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_MATH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_OTHER_MATH; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_LEFT_OF_PAIR; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_COMBINING; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_COMPOSITE; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DECIMAL_DIGIT; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_NUMERIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_DIACRITIC; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_EXTENDER; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL; +extern LIBUNISTRING_DLL_VARIABLE const uc_property_t UC_PROPERTY_REGIONAL_INDICATOR; /* Return the property given by name, e.g. "White space". */ extern uc_property_t @@ -814,6 +843,18 @@ extern bool uc_is_property_ids_binary_operator (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_ids_trinary_operator (ucs4_t uc) _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_presentation (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_modifier (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_modifier_base (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_emoji_component (ucs4_t uc) + _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_extended_pictographic (ucs4_t uc) + _UC_ATTRIBUTE_CONST; extern bool uc_is_property_zero_width (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_space (ucs4_t uc) @@ -864,6 +905,8 @@ extern bool uc_is_property_extender (ucs4_t uc) _UC_ATTRIBUTE_CONST; extern bool uc_is_property_ignorable_control (ucs4_t uc) _UC_ATTRIBUTE_CONST; +extern bool uc_is_property_regional_indicator (ucs4_t uc) + _UC_ATTRIBUTE_CONST; /* ========================================================================= */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unilbrk.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unilbrk.h index 50f63afb2..cf4702ab5 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unilbrk.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unilbrk.h @@ -1,20 +1,28 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Line breaking of Unicode strings. - Copyright (C) 2001-2003, 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2023 Free Software Foundation, Inc. Written by Bruno Haible , 2001. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, + This file is free software. + It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". + You can redistribute it and/or modify it under either + - the terms of the GNU Lesser General Public License as published + by the Free Software Foundation, either version 3, or (at your + option) any later version, or + - the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) + any later version, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License and the GNU General Public License + for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + You should have received a copy of the GNU Lesser General Public + License and of the GNU General Public License along with this + program. If not, see . */ #ifndef _UNILBRK_H #define _UNILBRK_H @@ -45,11 +53,14 @@ enum UC_BREAK_PROHIBITED, UC_BREAK_POSSIBLE, UC_BREAK_MANDATORY, - UC_BREAK_HYPHENATION + UC_BREAK_HYPHENATION, + UC_BREAK_CR_BEFORE_LF /* only used in _v2 or later */ }; /* Determine the line break points in S, and store the result at p[0..n-1]. p[i] = UC_BREAK_MANDATORY means that s[i] is a line break character. + p[i] = UC_BREAK_CR_BEFORE_LF means that s[i] and s[i+1] is the CR-LF + character sequence. (Only used in _v2 or later.) p[i] = UC_BREAK_POSSIBLE means that a line break may be inserted between s[i-1] and s[i]. p[i] = UC_BREAK_HYPHENATION means that a hyphen and a line break may be @@ -60,15 +71,34 @@ enum extern void u8_possible_linebreaks (const uint8_t *s, size_t n, const char *encoding, char *_UC_RESTRICT p); +extern void + u8_possible_linebreaks_v2 (const uint8_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define u8_possible_linebreaks u8_possible_linebreaks_v2 + extern void u16_possible_linebreaks (const uint16_t *s, size_t n, const char *encoding, char *_UC_RESTRICT p); +extern void + u16_possible_linebreaks_v2 (const uint16_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define u16_possible_linebreaks u16_possible_linebreaks_v2 + extern void u32_possible_linebreaks (const uint32_t *s, size_t n, const char *encoding, char *_UC_RESTRICT p); +extern void + u32_possible_linebreaks_v2 (const uint32_t *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define u32_possible_linebreaks u32_possible_linebreaks_v2 + extern void ulc_possible_linebreaks (const char *s, size_t n, const char *encoding, char *_UC_RESTRICT p); +extern void + ulc_possible_linebreaks_v2 (const char *s, size_t n, + const char *encoding, char *_UC_RESTRICT p); +#define ulc_possible_linebreaks ulc_possible_linebreaks_v2 /* Choose the best line breaks, assuming the uc_width function. The string is s[0..n-1]. The maximum number of columns per line is given @@ -86,21 +116,48 @@ extern int int start_column, int at_end_columns, const char *o, const char *encoding, char *_UC_RESTRICT p); +extern int + u8_width_linebreaks_v2 (const uint8_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define u8_width_linebreaks u8_width_linebreaks_v2 + extern int u16_width_linebreaks (const uint16_t *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *_UC_RESTRICT p); +extern int + u16_width_linebreaks_v2 (const uint16_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define u16_width_linebreaks u16_width_linebreaks_v2 + extern int u32_width_linebreaks (const uint32_t *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *_UC_RESTRICT p); +extern int + u32_width_linebreaks_v2 (const uint32_t *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define u32_width_linebreaks u32_width_linebreaks_v2 + extern int ulc_width_linebreaks (const char *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *_UC_RESTRICT p); +extern int + ulc_width_linebreaks_v2 (const char *s, size_t n, int width, + int start_column, int at_end_columns, + const char *o, const char *encoding, + char *_UC_RESTRICT p); +#define ulc_width_linebreaks ulc_width_linebreaks_v2 #ifdef __cplusplus diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unistd.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unistd.h index 70010b710..5379dd677 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unistd.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unistd.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for and wrapper around . - Copyright (C) 2003-2020 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_GTPO_UNISTD_H @@ -41,6 +41,24 @@ # undef _GL_INCLUDING_UNISTD_H #endif +/* Avoid lseek bugs in FreeBSD, macOS . + This bug is fixed after FreeBSD 13; see . + Use macOS "9999" to stand for a future fixed macOS version. */ +#if defined __FreeBSD__ && __FreeBSD__ < 14 +# undef SEEK_DATA +# undef SEEK_HOLE +#elif defined __APPLE__ && defined __MACH__ && defined SEEK_DATA +# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ +# include +# endif +# if (!defined MAC_OS_X_VERSION_MIN_REQUIRED \ + || MAC_OS_X_VERSION_MIN_REQUIRED < 99990000) +# include /* It also defines the two macros. */ +# undef SEEK_DATA +# undef SEEK_HOLE +# endif +#endif + /* Get all possible declarations of gethostname(). */ #if 0 && 1 \ && !defined _GL_INCLUDING_WINSOCK2_H @@ -52,6 +70,12 @@ #if !defined _GL_GTPO_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H #define _GL_GTPO_UNISTD_H +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ /* But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ @@ -64,7 +88,7 @@ /* Cygwin 1.7.1 declares symlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ - || ((1 || defined GNULIB_POSIXCHECK) \ + || ((0 || defined GNULIB_POSIXCHECK) \ && (defined _WIN32 && ! defined __CYGWIN__)) \ || ((0 || defined GNULIB_POSIXCHECK) \ && defined __CYGWIN__)) \ @@ -94,20 +118,18 @@ # undef __need_system_stdlib_h #endif -/* Native Windows platforms declare chdir, getcwd, rmdir in +/* Native Windows platforms declare _chdir, _getcwd, _rmdir in and/or , not in . - They also declare access(), chmod(), close(), dup(), dup2(), isatty(), - lseek(), read(), unlink(), write() in . */ -#if ((0 || IN_GETTEXT_TOOLS_GNULIB_TESTS || 1 \ - || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__)) -# include /* mingw32, mingw64 */ -# include /* mingw64, MSVC 9 */ -#elif (1 || IN_GETTEXT_TOOLS_GNULIB_TESTS || 1 || 0 \ - || 1 || 1 || 1 || 1 \ - || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) + They also declare _access(), _chmod(), _close(), _dup(), _dup2(), _isatty(), + _lseek(), _read(), _unlink(), _write() in . */ +#if defined _WIN32 && !defined __CYGWIN__ # include +# include +#endif + +/* Native Windows platforms declare _execl*, _execv* in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include #endif /* AIX and OSF/1 5.1 declare getdomainname in , not in . @@ -139,27 +161,24 @@ /* MSVC defines off_t in . May also define off_t to a 64-bit type on native Windows. */ -/* But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -/* Get off_t, ssize_t. */ -# include -#endif +/* Get off_t, ssize_t, mode_t. */ +#include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -247,6 +266,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -294,6 +319,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -319,6 +354,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -416,7 +459,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -444,9 +487,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -462,26 +505,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -490,19 +533,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -575,13 +618,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -590,27 +640,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -632,14 +688,11 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use the getopt module only in gettext-tools/gnulib-lib/, not in gettext-tools/libgettextpo/, but there is only a single GNULIB_UNISTD_H_GETOPT variable for both. */ -#if 1 && 0 && !defined GTPO_CONFIG_H && !defined _GL_SYSTEM_GETOPT +#if 0 && 00 && !defined GTPO_CONFIG_H && !defined _GL_SYSTEM_GETOPT # include # include #endif -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_UNISTD_INLINE # define _GL_UNISTD_INLINE _GL_INLINE @@ -744,7 +797,7 @@ _GL_INLINE_HEADER_BEGIN /* Declare overridden functions. */ -#if 1 +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef access @@ -753,6 +806,12 @@ _GL_INLINE_HEADER_BEGIN _GL_FUNCDECL_RPL (access, int, (const char *file, int mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); # else _GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); # endif @@ -766,11 +825,33 @@ _GL_WARN_ON_USE (access, "access does not always support X_OK - " "also, this function is a security risk - " "use the gnulib module faccessat instead"); # endif +#elif 1 +/* On native Windows, map 'access' to '_access', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::access always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); #endif #if 0 +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIASWARN (chdir); #elif defined GNULIB_POSIXCHECK # undef chdir @@ -778,6 +859,20 @@ _GL_CXXALIASWARN (chdir); _GL_WARN_ON_USE (chown, "chdir is not always in - " "use gnulib module chdir for portability"); # endif +#elif 1 +/* On native Windows, map 'chdir' to '_chdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIASWARN (chdir); #endif @@ -822,6 +917,12 @@ _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " # endif _GL_FUNCDECL_RPL (close, int, (int fd)); _GL_CXXALIAS_RPL (close, int, (int fd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close _close +# endif +_GL_CXXALIAS_MDA (close, int, (int fd)); # else _GL_CXXALIAS_SYS (close, int, (int fd)); # endif @@ -834,34 +935,69 @@ _GL_CXXALIASWARN (close); /* Assume close is always declared. */ _GL_WARN_ON_USE (close, "close does not portably work on sockets - " "use gnulib module close for portability"); +#elif 1 +/* On native Windows, map 'close' to '_close', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::close always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close _close +# endif +_GL_CXXALIAS_MDA (close, int, (int fd)); +# else +_GL_CXXALIAS_SYS (close, int, (int fd)); +# endif +_GL_CXXALIASWARN (close); #endif -#if 1 -# if !0 +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef copy_file_range +# define copy_file_range rpl_copy_file_range +# endif +_GL_FUNCDECL_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +_GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +# else +# if !0 _GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); +# endif _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); # endif _GL_CXXALIASWARN (copy_file_range); #elif defined GNULIB_POSIXCHECK -/* Assume copy_file_range is always declared. */ +# undef copy_file_range +# if HAVE_RAW_DECL_COPY_FILE_RANGE _GL_WARN_ON_USE (copy_file_range, "copy_file_range is unportable - " "use gnulib module copy_file_range for portability"); +# endif #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup rpl_dup # endif _GL_FUNCDECL_RPL (dup, int, (int oldfd)); _GL_CXXALIAS_RPL (dup, int, (int oldfd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup +# define dup _dup +# endif +_GL_CXXALIAS_MDA (dup, int, (int oldfd)); # else _GL_CXXALIAS_SYS (dup, int, (int oldfd)); # endif @@ -872,6 +1008,20 @@ _GL_CXXALIASWARN (dup); _GL_WARN_ON_USE (dup, "dup is unportable - " "use gnulib module dup for portability"); # endif +#elif 1 +/* On native Windows, map 'dup' to '_dup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup +# define dup _dup +# endif +_GL_CXXALIAS_MDA (dup, int, (int oldfd)); +# else +_GL_CXXALIAS_SYS (dup, int, (int oldfd)); +# endif +_GL_CXXALIASWARN (dup); #endif @@ -887,6 +1037,12 @@ _GL_WARN_ON_USE (dup, "dup is unportable - " # endif _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); # else _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); # endif @@ -897,6 +1053,20 @@ _GL_CXXALIASWARN (dup2); _GL_WARN_ON_USE (dup2, "dup2 is unportable - " "use gnulib module dup2 for portability"); # endif +#elif 1 +/* On native Windows, map 'dup2' to '_dup2', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup2 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); +# else +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); #endif @@ -909,17 +1079,22 @@ _GL_WARN_ON_USE (dup2, "dup2 is unportable - " Return newfd if successful, otherwise -1 and errno set. See the Linux man page at . */ -# if 1 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup3 # define dup3 rpl_dup3 # endif _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); # else +# if !1 _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (dup3); +# endif #elif defined GNULIB_POSIXCHECK # undef dup3 # if HAVE_RAW_DECL_DUP3 @@ -929,7 +1104,7 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - " #endif -#if 1 +#if 0 # if defined __CYGWIN__ && !defined __i386__ /* The 'environ' variable is defined in a DLL. Therefore its declaration needs the '__declspec(dllimport)' attribute, but the system's lacks it. @@ -997,6 +1172,284 @@ _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " #endif +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl rpl_execl +# endif +_GL_FUNCDECL_RPL (execl, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execl, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#elif defined GNULIB_POSIXCHECK +# undef execl +# if HAVE_RAW_DECL_EXECL +_GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - " + "use gnulib module execl for portability"); +# endif +#elif 1 +/* On native Windows, map 'execl' to '_execl', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execl always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl _execl +# endif +_GL_CXXALIAS_MDA (execl, intptr_t, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle rpl_execle +# endif +_GL_FUNCDECL_RPL (execle, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execle, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#elif defined GNULIB_POSIXCHECK +# undef execle +# if HAVE_RAW_DECL_EXECLE +_GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - " + "use gnulib module execle for portability"); +# endif +#elif 1 +/* On native Windows, map 'execle' to '_execle', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execle always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle _execle +# endif +_GL_CXXALIAS_MDA (execle, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp rpl_execlp +# endif +_GL_FUNCDECL_RPL (execlp, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execlp, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#elif defined GNULIB_POSIXCHECK +# undef execlp +# if HAVE_RAW_DECL_EXECLP +_GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - " + "use gnulib module execlp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execlp' to '_execlp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execlp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp _execlp +# endif +_GL_CXXALIAS_MDA (execlp, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv rpl_execv +# endif +_GL_FUNCDECL_RPL (execv, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execv, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#elif defined GNULIB_POSIXCHECK +# undef execv +# if HAVE_RAW_DECL_EXECV +_GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - " + "use gnulib module execv for portability"); +# endif +#elif 1 +/* On native Windows, map 'execv' to '_execv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv _execv +# endif +_GL_CXXALIAS_MDA_CAST (execv, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve rpl_execve +# endif +_GL_FUNCDECL_RPL (execve, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execve, int, + (const char *program, char * const *argv, char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#elif defined GNULIB_POSIXCHECK +# undef execve +# if HAVE_RAW_DECL_EXECVE +_GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - " + "use gnulib module execve for portability"); +# endif +#elif 1 +/* On native Windows, map 'execve' to '_execve', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execve always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve _execve +# endif +_GL_CXXALIAS_MDA_CAST (execve, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp rpl_execvp +# endif +_GL_FUNCDECL_RPL (execvp, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvp, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#elif defined GNULIB_POSIXCHECK +# undef execvp +# if HAVE_RAW_DECL_EXECVP +_GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - " + "use gnulib module execvp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvp' to '_execvp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp _execvp +# endif +_GL_CXXALIAS_MDA_CAST (execvp, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe rpl_execvpe +# endif +_GL_FUNCDECL_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# else +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (execvpe); +# endif +#elif defined GNULIB_POSIXCHECK +# undef execvpe +# if HAVE_RAW_DECL_EXECVPE +_GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - " + "use gnulib module execvpe for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvpe' to '_execvpe', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvpe on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe _execvpe +# endif +_GL_CXXALIAS_MDA_CAST (execvpe, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# elif 1 +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (execvpe); +# endif +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1017,7 +1470,9 @@ _GL_FUNCDECL_SYS (faccessat, int, _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (faccessat); +# endif #elif defined GNULIB_POSIXCHECK # undef faccessat # if HAVE_RAW_DECL_FACCESSAT @@ -1033,23 +1488,28 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification . */ -# if ! 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchdir +# define fchdir rpl_fchdir +# endif +_GL_FUNCDECL_RPL (fchdir, int, (int /*fd*/)); +_GL_CXXALIAS_RPL (fchdir, int, (int /*fd*/)); +# else +# if !0 || !0 _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); - +# endif +_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); +# endif +_GL_CXXALIASWARN (fchdir); +# if 0 || !0 /* Gnulib internal hooks needed to maintain the fchdir metadata. */ _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) _GL_ARG_NONNULL ((2)); _GL_EXTERN_C void _gl_unregister_fd (int fd); _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); _GL_EXTERN_C const char *_gl_directory_name (int fd); - -# else -# if !1 -_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); -# endif # endif -_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); -_GL_CXXALIASWARN (fchdir); #elif defined GNULIB_POSIXCHECK # undef fchdir # if HAVE_RAW_DECL_FCHDIR @@ -1084,7 +1544,7 @@ _GL_CXXALIASWARN (fchownat); # undef fchownat # if HAVE_RAW_DECL_FCHOWNAT _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " - "use gnulib module openat for portability"); + "use gnulib module fchownat for portability"); # endif #endif @@ -1094,11 +1554,22 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification . */ -# if !1 || !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdatasync +# define fdatasync rpl_fdatasync +# endif +_GL_FUNCDECL_RPL (fdatasync, int, (int fd)); +_GL_CXXALIAS_RPL (fdatasync, int, (int fd)); +# else +# if !1|| !1 _GL_FUNCDECL_SYS (fdatasync, int, (int fd)); -# endif +# endif _GL_CXXALIAS_SYS (fdatasync, int, (int fd)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fdatasync); +# endif #elif defined GNULIB_POSIXCHECK # undef fdatasync # if HAVE_RAW_DECL_FDATASYNC @@ -1127,7 +1598,7 @@ _GL_WARN_ON_USE (fsync, "fsync is unportable - " #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 /* Change the size of the file to which FD is opened to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification @@ -1145,7 +1616,9 @@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); # endif _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ftruncate); +# endif #elif defined GNULIB_POSIXCHECK # undef ftruncate # if HAVE_RAW_DECL_FTRUNCATE @@ -1155,23 +1628,29 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 /* Get the name of the current working directory, and put it in SIZE bytes of BUF. Return BUF if successful, or NULL if the directory couldn't be determined or SIZE was too small. See the POSIX:2008 specification . - Additionally, the gnulib module 'getcwd' guarantees the following GNU - extension: If BUF is NULL, an array is allocated with 'malloc'; the array - is SIZE bytes long, unless SIZE == 0, in which case it is as big as - necessary. */ + Additionally, the gnulib module 'getcwd' or 'getcwd-lgpl' guarantees the + following GNU extension: If BUF is NULL, an array is allocated with + 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case + it is as big as necessary. */ # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getcwd rpl_getcwd # endif _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +_GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size)); # else /* Need to cast, because on mingw, the second parameter is int size. */ @@ -1184,6 +1663,22 @@ _GL_CXXALIASWARN (getcwd); _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " "use gnulib module getcwd for portability"); # endif +#elif 1 +/* On native Windows, map 'getcwd' to '_getcwd', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getcwd always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +/* Need to cast, because on mingw, the second parameter is either + 'int size' or 'size_t size'. */ +_GL_CXXALIAS_MDA_CAST (getcwd, char *, (char *buf, size_t size)); +# else +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); #endif @@ -1213,7 +1708,9 @@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) # endif _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getdomainname); +# endif #elif defined GNULIB_POSIXCHECK # undef getdomainname # if HAVE_RAW_DECL_GETDOMAINNAME @@ -1253,11 +1750,22 @@ _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " #if 0 /* Fill a buffer with random bytes. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getentropy +# define getentropy rpl_getentropy +# endif +_GL_FUNCDECL_RPL (getentropy, int, (void *buffer, size_t length)); +_GL_CXXALIAS_RPL (getentropy, int, (void *buffer, size_t length)); +# else +# if !1 _GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length)); -# endif +# endif _GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getentropy); +# endif #elif defined GNULIB_POSIXCHECK # undef getentropy # if HAVE_RAW_DECL_GETENTROPY @@ -1391,7 +1899,9 @@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) int size. */ _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getlogin_r); +# endif #elif defined GNULIB_POSIXCHECK # undef getlogin_r # if HAVE_RAW_DECL_GETLOGIN_R @@ -1401,7 +1911,7 @@ _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getpagesize rpl_getpagesize @@ -1493,7 +2003,8 @@ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " Read a password from /dev/tty or stdin. Function getpass() from module 'getpass-gnu': Read a password of arbitrary length from /dev/tty or stdin. */ -# if 0 +# if (0 && 0) \ + || (0 && 0) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getpass # define getpass rpl_getpass @@ -1518,6 +2029,23 @@ _GL_WARN_ON_USE (getpass, "getpass is unportable - " #endif +#if 1 +/* On native Windows, map 'getpid' to '_getpid', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getpid always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpid +# define getpid _getpid +# endif +_GL_CXXALIAS_MDA (getpid, int, (void)); +# else +_GL_CXXALIAS_SYS (getpid, pid_t, (void)); +# endif +_GL_CXXALIASWARN (getpid); +#endif + + #if 0 /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ @@ -1588,8 +2116,15 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - " # undef isatty # define isatty rpl_isatty # endif +# define GNULIB_defined_isatty 1 _GL_FUNCDECL_RPL (isatty, int, (int fd)); _GL_CXXALIAS_RPL (isatty, int, (int fd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); # else _GL_CXXALIAS_SYS (isatty, int, (int fd)); # endif @@ -1600,6 +2135,20 @@ _GL_CXXALIASWARN (isatty); _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " "use gnulib module isatty for portability"); # endif +#elif 1 +/* On native Windows, map 'isatty' to '_isatty', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::isatty always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); #endif @@ -1690,7 +2239,9 @@ _GL_CXXALIAS_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (linkat); +# endif #elif defined GNULIB_POSIXCHECK # undef linkat # if HAVE_RAW_DECL_LINKAT @@ -1700,7 +2251,7 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - " #endif -#if 1 +#if 0 /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. Return the new offset if successful, otherwise -1 and errno set. See the POSIX:2008 specification @@ -1711,6 +2262,12 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - " # endif _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence)); # else _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); # endif @@ -1721,10 +2278,24 @@ _GL_CXXALIASWARN (lseek); _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " "systems - use gnulib module lseek for portability"); # endif +#elif 1 +/* On native Windows, map 'lseek' to '_lseek', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::lseek always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, long, (int fd, long offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 /* Create a pipe, defaulting to O_BINARY mode. Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. */ @@ -1742,7 +2313,7 @@ _GL_WARN_ON_USE (pipe, "pipe is unportable - " #endif -#if 1 +#if 0 /* Create a pipe, applying the given flags when opening the read-end of the pipe and the write-end of the pipe. The flags are a bitmask, possibly including O_CLOEXEC (defined in ) @@ -1753,6 +2324,7 @@ _GL_WARN_ON_USE (pipe, "pipe is unportable - " . */ # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pipe2 # define pipe2 rpl_pipe2 # endif _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); @@ -1761,7 +2333,9 @@ _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pipe2); +# endif #elif defined GNULIB_POSIXCHECK # undef pipe2 # if HAVE_RAW_DECL_PIPE2 @@ -1796,7 +2370,9 @@ _GL_FUNCDECL_SYS (pread, ssize_t, _GL_CXXALIAS_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pread); +# endif #elif defined GNULIB_POSIXCHECK # undef pread # if HAVE_RAW_DECL_PREAD @@ -1831,7 +2407,9 @@ _GL_FUNCDECL_SYS (pwrite, ssize_t, _GL_CXXALIAS_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pwrite); +# endif #elif defined GNULIB_POSIXCHECK # undef pwrite # if HAVE_RAW_DECL_PWRITE @@ -1841,7 +2419,7 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " #endif -#if 1 +#if 0 /* Read up to COUNT bytes from file descriptor FD into the buffer starting at BUF. See the POSIX:2008 specification . */ @@ -1853,17 +2431,38 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count)); # else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (read); +#elif 1 +/* On native Windows, map 'read' to '_read', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::read always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count)); +# endif +# else +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); # endif _GL_CXXALIASWARN (read); #endif -#if 1 +#if 0 /* Read the contents of the symbolic link FILE and place the first BUFSIZE bytes of it into BUF. Return the number of bytes placed into BUF if successful, otherwise -1 and errno set. @@ -1924,7 +2523,9 @@ _GL_CXXALIAS_SYS (readlinkat, ssize_t, (int fd, char const *restrict file, char *restrict buf, size_t len)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (readlinkat); +# endif #elif defined GNULIB_POSIXCHECK # undef readlinkat # if HAVE_RAW_DECL_READLINKAT @@ -1934,7 +2535,7 @@ _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " #endif -#if 1 +#if 0 /* Remove the directory DIR. */ # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1942,6 +2543,12 @@ _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " # endif _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (rmdir, int, (char const *name)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); # else _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); # endif @@ -1952,6 +2559,20 @@ _GL_CXXALIASWARN (rmdir); _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " "use gnulib module rmdir for portability"); # endif +#elif 1 +/* On native Windows, map 'rmdir' to '_rmdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::rmdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); #endif @@ -1964,15 +2585,27 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " Platforms with no ability to set the hostname return -1 and set errno = ENOSYS. */ -# if !1 || !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sethostname +# define sethostname rpl_sethostname +# endif +_GL_FUNCDECL_RPL (sethostname, int, (const char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (sethostname, int, (const char *name, size_t len)); +# else +# if !1 || !1 _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) _GL_ARG_NONNULL ((1))); -# endif +# endif /* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 and FreeBSD 6.4 the second parameter is int. On Solaris 11 2011-10, the first parameter is not const. */ _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sethostname); +# endif #elif defined GNULIB_POSIXCHECK # undef sethostname # if HAVE_RAW_DECL_SETHOSTNAME @@ -1982,7 +2615,7 @@ _GL_WARN_ON_USE (sethostname, "sethostname is unportable - " #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 /* Pause the execution of the current thread for N seconds. Returns the number of seconds left to sleep. See the POSIX:2008 specification @@ -2010,7 +2643,32 @@ _GL_WARN_ON_USE (sleep, "sleep is unportable - " #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 1 +/* On native Windows, map 'swab' to '_swab', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::swab always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef swab +# define swab _swab +# endif +/* Need to cast, because in old mingw the arguments are + (const char *from, char *to, size_t n). */ +_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n)); +# else +# if defined __hpux /* HP-UX */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n)); +# elif defined __sun && (defined __SunOS_5_10 || defined __XOPEN_OR_POSIX) && !defined _XPG4 /* Solaris */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n)); +# else +_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n)); +# endif +# endif +_GL_CXXALIASWARN (swab); +#endif + + +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef symlink @@ -2056,7 +2714,9 @@ _GL_FUNCDECL_SYS (symlinkat, int, _GL_CXXALIAS_SYS (symlinkat, int, (char const *contents, int fd, char const *file)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (symlinkat); +# endif #elif defined GNULIB_POSIXCHECK # undef symlinkat # if HAVE_RAW_DECL_SYMLINKAT @@ -2086,7 +2746,9 @@ _GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) # endif _GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (truncate); +# endif #elif defined GNULIB_POSIXCHECK # undef truncate # if HAVE_RAW_DECL_TRUNCATE @@ -2116,7 +2778,9 @@ _GL_FUNCDECL_SYS (ttyname_r, int, _GL_CXXALIAS_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ttyname_r); +# endif #elif defined GNULIB_POSIXCHECK # undef ttyname_r # if HAVE_RAW_DECL_TTYNAME_R @@ -2126,7 +2790,7 @@ _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " #endif -#if 1 +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef unlink @@ -2134,6 +2798,12 @@ _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " # endif _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unlink, int, (char const *file)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); # else _GL_CXXALIAS_SYS (unlink, int, (char const *file)); # endif @@ -2144,6 +2814,20 @@ _GL_CXXALIASWARN (unlink); _GL_WARN_ON_USE (unlink, "unlink is not portable - " "use gnulib module unlink for portability"); # endif +#elif 1 +/* On native Windows, map 'unlink' to '_unlink', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::unlink always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); #endif @@ -2168,12 +2852,12 @@ _GL_CXXALIASWARN (unlinkat); # undef unlinkat # if HAVE_RAW_DECL_UNLINKAT _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " - "use gnulib module openat for portability"); + "use gnulib module unlinkat for portability"); # endif #endif -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 /* Pause the execution of the current thread for N microseconds. Returns 0 on completion, or -1 on range error. See the POSIX:2001 specification @@ -2215,11 +2899,32 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - " _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#elif 1 +/* On native Windows, map 'write' to '_write', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::write always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count)); +# endif # else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); # endif _GL_CXXALIASWARN (write); #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unistr.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unistr.h index 7b4d3f108..1ca6c20d5 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unistr.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unistr.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Elementary Unicode string functions. - Copyright (C) 2001-2002, 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2005-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNISTR_H @@ -20,15 +20,15 @@ #include "unitypes.h" -/* Get common macros for C. */ -#include "unused-parameter.h" - /* Get bool. */ #include -/* Get size_t. */ +/* Get size_t, ptrdiff_t. */ #include +/* Get free(). */ +#include + #ifdef __cplusplus extern "C" { #endif @@ -194,7 +194,7 @@ extern int # else static inline int u32_mbtouc_unsafe (ucs4_t *puc, - const uint32_t *s, size_t n _GL_UNUSED_PARAMETER) + const uint32_t *s, _GL_ATTRIBUTE_MAYBE_UNUSED size_t n) { uint32_t c = *s; @@ -260,7 +260,8 @@ extern int u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n); # else static inline int -u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER) +u32_mbtouc (ucs4_t *puc, const uint32_t *s, + _GL_ATTRIBUTE_MAYBE_UNUSED size_t n) { uint32_t c = *s; @@ -306,13 +307,13 @@ extern int #if GNULIB_UNISTR_U8_UCTOMB || HAVE_LIBUNISTRING /* Auxiliary function, also used by u8_chr, u8_strchr, u8_strrchr. */ extern int - u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n); + u8_uctomb_aux (uint8_t *s, ucs4_t uc, ptrdiff_t n); # if !HAVE_INLINE extern int - u8_uctomb (uint8_t *s, ucs4_t uc, int n); + u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u8_uctomb (uint8_t *s, ucs4_t uc, int n) +u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0x80 && n > 0) { @@ -328,13 +329,13 @@ u8_uctomb (uint8_t *s, ucs4_t uc, int n) #if GNULIB_UNISTR_U16_UCTOMB || HAVE_LIBUNISTRING /* Auxiliary function, also used by u16_chr, u16_strchr, u16_strrchr. */ extern int - u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n); + u16_uctomb_aux (uint16_t *s, ucs4_t uc, ptrdiff_t n); # if !HAVE_INLINE extern int - u16_uctomb (uint16_t *s, ucs4_t uc, int n); + u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u16_uctomb (uint16_t *s, ucs4_t uc, int n) +u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0xd800 && n > 0) { @@ -350,10 +351,10 @@ u16_uctomb (uint16_t *s, ucs4_t uc, int n) #if GNULIB_UNISTR_U32_UCTOMB || HAVE_LIBUNISTRING # if !HAVE_INLINE extern int - u32_uctomb (uint32_t *s, ucs4_t uc, int n); + u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u32_uctomb (uint32_t *s, ucs4_t uc, int n) +u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000)) { @@ -380,6 +381,15 @@ extern uint16_t * extern uint32_t * u32_cpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); +/* Copy N units from SRC to DEST, returning pointer after last written unit. */ +/* Similar to mempcpy(). */ +extern uint8_t * + u8_pcpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n); +extern uint16_t * + u16_pcpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n); +extern uint32_t * + u32_pcpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); + /* Copy N units from SRC to DEST, guaranteeing correct behavior for overlapping memory areas. */ /* Similar to memmove(). */ @@ -627,11 +637,14 @@ extern int /* Duplicate S, returning an identical malloc'd string. */ /* Similar to strdup(), wcsdup(). */ extern uint8_t * - u8_strdup (const uint8_t *s); + u8_strdup (const uint8_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; extern uint16_t * - u16_strdup (const uint16_t *s); + u16_strdup (const uint16_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; extern uint32_t * - u32_strdup (const uint32_t *s); + u32_strdup (const uint32_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; /* Find the first occurrence of UC in STR. */ /* Similar to strchr(), wcschr(). */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unitypes.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unitypes.h index b277a0858..cd57d2721 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unitypes.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/unitypes.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Elementary types and macros for the GNU UniString library. - Copyright (C) 2002, 2005-2006, 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNITYPES_H @@ -27,7 +27,7 @@ typedef uint32_t ucs4_t; /* Attribute of a function whose result depends only on the arguments (not pointers!) and which has no side effects. */ #ifndef _UC_ATTRIBUTE_CONST -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__ # define _UC_ATTRIBUTE_CONST __attribute__ ((__const__)) # else # define _UC_ATTRIBUTE_CONST @@ -37,7 +37,7 @@ typedef uint32_t ucs4_t; /* Attribute of a function whose result depends only on the arguments (possibly pointers) and global memory, and which has no side effects. */ #ifndef _UC_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _UC_ATTRIBUTE_PURE @@ -48,7 +48,9 @@ typedef uint32_t ucs4_t; pass a pointer to a different object in the specified pointer argument than in the other pointer arguments. */ #ifndef _UC_RESTRICT -# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) +# if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 # define _UC_RESTRICT __restrict # elif 199901L <= __STDC_VERSION__ || defined restrict # define _UC_RESTRICT restrict diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uniwidth.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uniwidth.h index b28898b54..0ff97ac4f 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uniwidth.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/uniwidth.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Display width functions. - Copyright (C) 2001-2002, 2005, 2007, 2009-2020 Free Software Foundation, + Copyright (C) 2001-2002, 2005, 2007, 2009-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNIWIDTH_H diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/wchar.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/wchar.h index 6a8dc3046..d2ff401b0 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/wchar.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/wchar.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake. */ @@ -53,11 +53,7 @@ the latter includes . But here, we have no way to detect whether is completely included or is still being included. */ -#if (_MSC_VER < 1900) -#include "../include/wchar.h" -#else #include "../ucrt/wchar.h" -#endif #else /* Normal invocation convention. */ @@ -70,30 +66,18 @@ # include /* for __GLIBC__ */ #endif -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . - In some builds of uClibc, is nonexistent and wchar_t is defined +/* In some builds of uClibc, is nonexistent and wchar_t is defined by . But avoid namespace pollution on glibc systems. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include #endif -#ifndef __GLIBC__ -# include -# include -#endif /* Include the original if it exists. Some builds of uClibc lack it. */ /* The include_next requires a split double-inclusion guard. */ #if 1 -#if (_MSC_VER < 1900) -#include "../include/wchar.h" -#else -#include "../ucrt/wchar.h" -#endif +# include "../ucrt/wchar.h" #endif #undef _GL_ALREADY_INCLUDING_WCHAR_H @@ -101,31 +85,96 @@ #ifndef _GL_GTPO_WCHAR_H #define _GL_GTPO_WCHAR_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ # endif #endif +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -213,6 +262,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -260,6 +315,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -285,6 +350,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -382,7 +455,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -410,9 +483,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -428,26 +501,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -456,19 +529,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -541,13 +614,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -556,27 +636,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -638,9 +724,59 @@ typedef int rpl_mbstate_t; # endif #endif +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif + -/* Convert a single-byte character to a wide character. */ #if 1 +/* Get memset(). */ +# include +#endif + + +/* Convert a single-byte character to a wide character. */ +#if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef btowc @@ -668,7 +804,7 @@ _GL_WARN_ON_USE (btowc, "btowc is unportable - " /* Convert a wide character to a single-byte character. */ -#if IN_GETTEXT_TOOLS_GNULIB_TESTS +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wctob @@ -695,7 +831,7 @@ _GL_WARN_ON_USE (wctob, "wctob is unportable - " #endif -/* Test whether *PS is in the initial state. */ +/* Test whether *PS is in an initial state. */ #if 1 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -722,6 +858,208 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " #endif +/* Put *PS into an initial state. */ +#if 1 +/* ISO C 23 § 7.31.6.(3) says that zeroing an mbstate_t is a way to put the + mbstate_t into an initial state. However, on many platforms an mbstate_t + is large, and it is possible - as an optimization - to get away with zeroing + only part of it. So, instead of + + mbstate_t state = { 0 }; + + or + + mbstate_t state; + memset (&state, 0, sizeof (mbstate_t)); + + we can write this faster code: + + mbstate_t state; + mbszero (&state); + */ +/* _GL_MBSTATE_INIT_SIZE describes how mbsinit() behaves: It is the number of + bytes at the beginning of an mbstate_t that need to be zero, for mbsinit() + to return true. + _GL_MBSTATE_ZERO_SIZE is the number of bytes at the beginning of an mbstate_t + that need to be zero, + - for mbsinit() to return true, and + - for all other multibyte-aware functions to operate properly. + 0 < _GL_MBSTATE_INIT_SIZE <= _GL_MBSTATE_ZERO_SIZE <= sizeof (mbstate_t). + These values are determined by source code inspection, where possible, and + by running the gnulib unit tests. + We need _GL_MBSTATE_INIT_SIZE because if we define _GL_MBSTATE_ZERO_SIZE + without considering what mbsinit() does, we get test failures such as + assertion "mbsinit (&iter->state)" failed + */ +# if GNULIB_defined_mbstate_t /* AIX, IRIX */ +/* mbstate_t has at least 4 bytes. They are used as coded in + gnulib/lib/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 1 +/* define _GL_MBSTATE_ZERO_SIZE 4 + does not work: it causes test failures. + So, use the safe fallback value, below. */ +# elif __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 /* glibc */ +/* mbstate_t is defined in . + For more details, see glibc/iconv/skeleton.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (((mbstate_t) {0}).__count) */ +# define _GL_MBSTATE_ZERO_SIZE /* 8 */ sizeof (mbstate_t) +# elif defined MUSL_LIBC /* musl libc */ +/* mbstate_t is defined in . + It is an opaque aligned 8-byte struct, of which at most the first + 4 bytes are used. + For more details, see src/multibyte/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (unsigned) */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __APPLE__ && defined __MACH__ /* macOS */ +/* On macOS, mbstate_t is defined in . + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + Libc-/locale/FreeBSD/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8,utf2}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 10 + utf2.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __FreeBSD__ /* FreeBSD */ +/* On FreeBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + src/lib/libc/locale/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __NetBSD__ /* NetBSD */ +/* On NetBSD, mbstate_t is defined in src/sys/sys/ansi.h. + It is an opaque aligned 128-byte struct, of which at most the first + 28 bytes are used. + For more details, see the *State types in + src/lib/libc/citrus/modules/citrus_*.c + (ignoring citrus_{hz,iso2022,utf7,viqr,zw}.c, since these implement + stateful encodings, not usable as locale encodings). */ +/* File ZERO_SIZE + citrus/citrus_none.c 0 + citrus/modules/citrus_euc.c 8 + citrus/modules/citrus_euctw.c 8 + citrus/modules/citrus_mskanji.c 8 + citrus/modules/citrus_big5.c 8 + citrus/modules/citrus_gbk2k.c 8 + citrus/modules/citrus_dechanyu.c 8 + citrus/modules/citrus_johab.c 6 + citrus/modules/citrus_utf8.c 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 28. */ +# define _GL_MBSTATE_ZERO_SIZE 28 +# elif defined __OpenBSD__ /* OpenBSD */ +/* On OpenBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see src/lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 + citrus_utf8.c 12 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __minix /* Minix */ +/* On Minix, mbstate_t is defined in sys/sys/ansi.h. + It is an opaque aligned 128-byte struct. + For more details, see the *State types in + lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 */ +/* But 1 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 4. */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __sun /* Solaris */ +/* On Solaris, mbstate_t is defined in . + It is an opaque aligned 24-byte or 32-byte struct, of which at most the first + 20 or 28 bytes are used. + For more details on OpenSolaris derivatives, see the *State types in + illumos-gate/usr/src/lib/libc/port/locale/ + {none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 12 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures + - in OpenIndiana and OmniOS: for values < 16, + - in Solaris 10 and 11: for values < 20 (in 32-bit mode) + or < 28 (in 64-bit mode). + Since we don't have a good way to distinguish the OpenSolaris derivatives + from the proprietary Solaris versions, and can't inspect the Solaris source + code, use the safe fallback values, below. */ +# elif defined __CYGWIN__ /* Cygwin */ +/* On Cygwin, mbstate_t is defined in . + For more details, see newlib/libc/stdlib/mbtowc_r.c and + winsup/cygwin/strfuncs.cc. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (int) */ +# define _GL_MBSTATE_ZERO_SIZE 8 +# elif defined _WIN32 && !defined __CYGWIN__ /* Native Windows. */ +/* MSVC defines 'mbstate_t' as an aligned 8-byte struct. + On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined + as an aligned 8-byte struct, of which the first 4 bytes matter. + Use the safe values, below. */ +# elif defined __ANDROID__ /* Android */ +/* Android defines 'mbstate_t' in . + It is an opaque 4-byte or 8-byte struct. + For more details, see + bionic/libc/private/bionic_mbstate.h + bionic/libc/bionic/mbrtoc32.cpp + bionic/libc/bionic/mbrtoc16.cpp + */ +# define _GL_MBSTATE_INIT_SIZE 4 +# define _GL_MBSTATE_ZERO_SIZE 4 +# endif +/* Use safe values as defaults. */ +# ifndef _GL_MBSTATE_INIT_SIZE +# define _GL_MBSTATE_INIT_SIZE sizeof (mbstate_t) +# endif +# ifndef _GL_MBSTATE_ZERO_SIZE +# define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t) +# endif +_GL_BEGIN_C_LINKAGE +# if defined IN_MBSZERO +_GL_EXTERN_INLINE +# else +_GL_INLINE +# endif +_GL_ARG_NONNULL ((1)) void +mbszero (mbstate_t *ps) +{ + memset (ps, 0, _GL_MBSTATE_ZERO_SIZE); +} +_GL_END_C_LINKAGE +_GL_CXXALIAS_SYS (mbszero, void, (mbstate_t *ps)); +_GL_CXXALIASWARN (mbszero); +#endif + + /* Convert a multibyte character to a wide character. */ #if 1 # if 1 @@ -758,7 +1096,7 @@ _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " /* Recognize a multibyte character. */ -#if IN_GETTEXT_TOOLS_LIBGREP +#if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbrlen @@ -789,8 +1127,8 @@ _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " /* Convert a string to a wide string. */ -#if 1 -# if (_MSC_VER >= 1900) && defined (_M_ARM64) +#if 0 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef mbsrtowcs # define mbsrtowcs rpl_mbsrtowcs @@ -858,7 +1196,9 @@ _GL_CXXALIAS_SYS (mbsnrtowcs, size_t, const char **restrict srcp, size_t srclen, size_t len, mbstate_t *restrict ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbsnrtowcs); +# endif #elif defined GNULIB_POSIXCHECK # undef mbsnrtowcs # if HAVE_RAW_DECL_MBSNRTOWCS @@ -869,8 +1209,8 @@ _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " /* Convert a wide character to a multibyte character. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || IN_GETTEXT_TOOLS_LIBGREP) -# if (_MSC_VER >= 1900) +#if 0 +# if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef wcrtomb # define wcrtomb rpl_wcrtomb @@ -1014,7 +1354,7 @@ _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " /* Search N wide characters of S for C. */ -#if 1 +#if 0 # if !1 _GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n) _GL_ATTRIBUTE_PURE); @@ -1046,13 +1386,25 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " /* Compare N wide characters of S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmemcmp +# define wmemcmp rpl_wmemcmp +# endif +_GL_FUNCDECL_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 _GL_FUNCDECL_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmemcmp); # endif @@ -1110,15 +1462,28 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " /* Copy N wide characters of SRC to DEST. Return pointer to wide characters after the last written wide character. */ -#if 1 -# if !0 +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmempcpy +# define wmempcpy rpl_wmempcpy +# endif +_GL_FUNCDECL_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +_GL_CXXALIAS_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# else +# if !0 _GL_FUNCDECL_SYS (wmempcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); -# endif +# endif _GL_CXXALIAS_SYS (wmempcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmempcpy); # endif @@ -1169,7 +1534,10 @@ _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " /* Return the number of wide characters in S, but at most MAXLEN. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) _GL_ATTRIBUTE_PURE); # endif @@ -1206,7 +1574,10 @@ _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src)); # endif @@ -1247,7 +1618,10 @@ _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcpncpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); @@ -1309,11 +1683,21 @@ _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " /* Compare S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcscmp +# define wcscmp rpl_wcscmp +# endif +_GL_FUNCDECL_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# else +# if !1 _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcscmp); # endif @@ -1328,13 +1712,25 @@ _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " /* Compare no more than N wide characters of S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsncmp +# define wcsncmp rpl_wcsncmp +# endif +_GL_FUNCDECL_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 _GL_FUNCDECL_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsncmp); # endif @@ -1349,7 +1745,10 @@ _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " /* Compare S1 and S2, ignoring case. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) _GL_ATTRIBUTE_PURE); # endif @@ -1366,7 +1765,10 @@ _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " /* Compare no more than N chars of S1 and S2, ignoring case. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcsncasecmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); @@ -1426,16 +1828,79 @@ _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " /* Duplicate S, returning an identical malloc'd string. */ #if 0 -# if !1 -_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s)); -# endif +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif _GL_CXXALIASWARN (wcsdup); -#elif defined GNULIB_POSIXCHECK -# undef wcsdup -# if HAVE_RAW_DECL_WCSDUP +#else +# if __GNUC__ >= 11 && !defined wcsdup +/* For -Wmismatched-dealloc: Associate wcsdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef wcsdup +# if HAVE_RAW_DECL_WCSDUP _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " "use gnulib module wcsdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'wcsdup' to '_wcsdup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::wcsdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# if 1 +_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (wcsdup); +# endif # endif #endif @@ -1500,7 +1965,7 @@ _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " #endif -/* Return the length of the initial segmet of WCS which consists entirely +/* Return the length of the initial segment of WCS which consists entirely of wide characters not in REJECT. */ #if 0 # if !1 @@ -1520,7 +1985,7 @@ _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " #endif -/* Return the length of the initial segmet of WCS which consists entirely +/* Return the length of the initial segment of WCS which consists entirely of wide characters in ACCEPT. */ #if 0 # if !1 @@ -1575,12 +2040,25 @@ _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " /* Find the first occurrence of NEEDLE in HAYSTACK. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsstr +# define wcsstr rpl_wcsstr +# endif +_GL_FUNCDECL_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle)); +# else +# if !1 _GL_FUNCDECL_SYS (wcsstr, wchar_t *, (const wchar_t *restrict haystack, const wchar_t *restrict needle) _GL_ATTRIBUTE_PURE); -# endif +# endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); @@ -1591,6 +2069,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcsstr, (const wchar_t *restrict, const wchar_t *restrict), const wchar_t *, (const wchar_t *restrict, const wchar_t *restrict)); +# endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcsstr, wchar_t *, @@ -1718,6 +2197,24 @@ _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " #endif +#if 0 && (defined _WIN32 && !defined __CYGWIN__) +/* Gets the name of the current working directory. + (a) If BUF is non-NULL, it is assumed to have room for SIZE wide characters. + This function stores the working directory (NUL-terminated) in BUF and + returns BUF. + (b) If BUF is NULL, an array is allocated with 'malloc'. The array is SIZE + wide characters long, unless SIZE == 0, in which case it is as big as + necessary. + If the directory couldn't be determined or SIZE was too small, this function + returns NULL and sets errno. For a directory of length LEN, SIZE should be + >= LEN + 3 in case (a) or >= LEN + 1 in case (b). + Possible errno values include: + - ERANGE if SIZE is too small. + - ENOMEM if the memory could no be allocated. */ +_GL_FUNCDECL_SYS (wgetcwd, wchar_t *, (wchar_t *buf, size_t size)); +#endif + + #endif /* _GL_GTPO_WCHAR_H */ #endif /* _GL_GTPO_WCHAR_H */ #endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/wctype.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/wctype.h index 25c19c202..6eb1f9408 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/wctype.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgettextpo/wctype.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 , for platforms that lack it. - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Bruno Haible and Paul Eggert. */ @@ -38,26 +38,21 @@ is being processed, which doesn't include the idempotency guard. */ -#if (_MSC_VER < 1900) -#include "../include/wctype.h" -#else #include "../ucrt/wctype.h" -#endif #else /* Normal invocation convention. */ #ifndef _GL_GTPO_WCTYPE_H +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if 1 -/* Solaris 2.5 has a bug: must be included before . - Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include +/* Solaris 2.5 has a bug: must be included before . */ # include #endif @@ -74,19 +69,12 @@ BeOS 5 has the functions but no . */ /* The include_next requires a split double-inclusion guard. */ #if 1 -#if (_MSC_VER < 1900) -#include "../include/wctype.h" -#else -#include "../ucrt/wctype.h" -#endif +# include "../ucrt/wctype.h" #endif #ifndef _GL_GTPO_WCTYPE_H #define _GL_GTPO_WCTYPE_H -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_WCTYPE_INLINE # define _GL_WCTYPE_INLINE _GL_INLINE @@ -94,19 +82,19 @@ _GL_INLINE_HEADER_BEGIN /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -194,6 +182,12 @@ _GL_INLINE_HEADER_BEGIN Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -241,6 +235,16 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -266,6 +270,14 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -363,7 +375,7 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -391,9 +403,9 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -407,21 +419,49 @@ _GL_INLINE_HEADER_BEGIN #endif /* _GL_CXXDEFS_H */ +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -494,13 +534,20 @@ _GL_INLINE_HEADER_BEGIN # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -509,27 +556,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -592,7 +645,8 @@ typedef unsigned int rpl_wint_t; /* FreeBSD 4.4 to 4.11 has but lacks the functions. Linux libc5 has and the functions but they are broken. mingw and MSVC have and the functions but they take a wchar_t - as argument, not an rpl_wint_t. + as argument, not an rpl_wint_t. Additionally, the mingw iswprint function + and the Android iswpunct function are broken. Assume all 11 functions (all isw* except iswblank) are implemented the same way, or not at all. */ # if ! 1 || 1 @@ -644,7 +698,11 @@ rpl_iswlower (wint_t wc) _GL_WCTYPE_INLINE int rpl_iswprint (wint_t wc) { +# ifdef __MINGW32__ + return ((wchar_t) wc == wc ? wc == ' ' || iswgraph ((wchar_t) wc) : 0); +# else return ((wchar_t) wc == wc ? iswprint ((wchar_t) wc) : 0); +# endif } _GL_WCTYPE_INLINE int @@ -927,7 +985,7 @@ towupper # else /* Only some of the functions are missing or broken. */ -# if 1 && (_MSC_VER < 1800) +# if 0 && (! 1 || 0) /* Only the iswblank function is missing. */ # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -939,7 +997,7 @@ _GL_FUNCDECL_SYS (iswblank, int, (wint_t wc)); # endif # endif -# if 1 +# if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef iswdigit @@ -949,7 +1007,17 @@ _GL_FUNCDECL_RPL (iswdigit, int, (wint_t wc)); # endif # endif -# if 1 +# if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef iswpunct +# define iswpunct rpl_iswpunct +# endif +_GL_FUNCDECL_RPL (iswpunct, int, (wint_t wc)); +# endif +# endif + +# if 0 # if 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef iswxdigit @@ -1014,7 +1082,7 @@ _GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc)); #else _GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc)); #endif -#if 1 +#if 0 # if 1 _GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc)); # else @@ -1051,7 +1119,7 @@ _GL_CXXALIAS_RPL (iswupper, int, (wint_t wc)); #else _GL_CXXALIAS_SYS (iswupper, int, (wint_t wc)); #endif -#if 1 +#if 0 # if 1 _GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc)); # else @@ -1072,7 +1140,7 @@ _GL_CXXALIASWARN (iswupper); _GL_CXXALIASWARN (iswxdigit); #endif -#if 1 +#if 0 # if 1 || 0 _GL_CXXALIAS_RPL (iswblank, int, (wint_t wc)); # else @@ -1088,14 +1156,32 @@ _GL_CXXALIASWARN (iswblank); typedef void * wctype_t; # define GNULIB_defined_wctype_t 1 # endif +#elif 1 +# if !GNULIB_defined_wctype_t +typedef void *rpl_wctype_t; +# undef wctype_t +# define wctype_t rpl_wctype_t +# define GNULIB_defined_wctype_t 1 +# endif #endif /* Get a descriptor for a wide character property. */ #if 0 -# if !1 -_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)); -# endif +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctype +# define wctype rpl_wctype +# endif +_GL_FUNCDECL_RPL (wctype, wctype_t, (const char *name) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (wctype, wctype_t, (const char *name)); +# else +# if !1 +_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wctype); # endif @@ -1111,7 +1197,7 @@ _GL_WARN_ON_USE (wctype, "wctype is unportable - " The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctype() function. */ #if 0 -# if 1 +# if 1 || 1 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef iswctype # define iswctype rpl_iswctype @@ -1152,14 +1238,32 @@ _GL_CXXALIASWARN (towupper); typedef void * wctrans_t; # define GNULIB_defined_wctrans_t 1 # endif +#elif 0 +# if !GNULIB_defined_wctrans_t +typedef void *rpl_wctrans_t; +# undef wctrans_t +# define wctrans_t rpl_wctrans_t +# define GNULIB_defined_wctrans_t 1 +# endif #endif /* Get a descriptor for a wide character case conversion. */ #if 0 -# if !1 -_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)); -# endif +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctrans +# define wctrans rpl_wctrans +# endif +_GL_FUNCDECL_RPL (wctrans, wctrans_t, (const char *name) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (wctrans, wctrans_t, (const char *name)); +# else +# if !1 +_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wctrans); # endif @@ -1175,10 +1279,19 @@ _GL_WARN_ON_USE (wctrans, "wctrans is unportable - " The argument WC must be either a wchar_t value or WEOF. The argument DESC must have been returned by the wctrans() function. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef towctrans +# define towctrans rpl_towctrans +# endif +_GL_FUNCDECL_RPL (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +_GL_CXXALIAS_RPL (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +# else +# if !1 _GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); -# endif +# endif _GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (towctrans); # endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/inttypes.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/inttypes.h new file mode 100644 index 000000000..ee4cbd1aa --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/inttypes.h @@ -0,0 +1,1552 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Copyright (C) 2006-2023 Free Software Foundation, Inc. + Written by Paul Eggert, Bruno Haible, Derek Price. + This file is part of gnulib. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* + * ISO C 99 for platforms that lack it. + * + */ + +#if __GNUC__ >= 3 + +#endif + +#ifdef _WIN64 +# define GNULIB_PTR_MOD "ll" +#else +# define GNULIB_PTR_MOD "l" +#endif + + +/* Include the original if it exists, and if this file + has not been included yet or if this file includes gnulib stdint.h + which in turn includes this file. + The include_next requires a split double-inclusion guard. */ +#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +# if 1 + + /* Some pre-C++11 implementations need this. */ +# if defined __cplusplus && ! defined __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS 1 +# endif + +# include "../ucrt/inttypes.h" + +# define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H +# endif +#endif + +#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +#define INTTYPES_H + +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* Include or the gnulib replacement. + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif +/* Get CHAR_BIT, INT_MAX, LONG_MAX, etc. */ +#include +/* On mingw, __USE_MINGW_ANSI_STDIO only works if is also included */ +#if defined _WIN32 && ! defined __CYGWIN__ +# include +#endif + +#if !(INT_MAX == 0x7fffffff && INT_MIN + INT_MAX == -1) +# error "This file assumes that 'int' is 32-bit two's complement. Please report your platform and compiler to ." +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + +/* 7.8.1 Macros for format specifiers */ + +#if defined _TNS_R_TARGET + /* Tandem NonStop R series and compatible platforms released before + July 2005 support %Ld but not %lld. */ +# define _LONG_LONG_FORMAT_PREFIX "L" +#else +# define _LONG_LONG_FORMAT_PREFIX "ll" +#endif + +#if !defined PRId8 +# ifdef INT8_MAX +# define PRId8 "d" +# endif +#endif +#if !defined PRIi8 +# ifdef INT8_MAX +# define PRIi8 "i" +# endif +#endif +#if !defined PRIo8 +# ifdef UINT8_MAX +# define PRIo8 "o" +# endif +#endif +#if !defined PRIu8 +# ifdef UINT8_MAX +# define PRIu8 "u" +# endif +#endif +#if !defined PRIx8 +# ifdef UINT8_MAX +# define PRIx8 "x" +# endif +#endif +#if !defined PRIX8 +# ifdef UINT8_MAX +# define PRIX8 "X" +# endif +#endif +#if !defined PRId16 +# ifdef INT16_MAX +# define PRId16 "d" +# endif +#endif +#if !defined PRIi16 +# ifdef INT16_MAX +# define PRIi16 "i" +# endif +#endif +#if !defined PRIo16 +# ifdef UINT16_MAX +# define PRIo16 "o" +# endif +#endif +#if !defined PRIu16 +# ifdef UINT16_MAX +# define PRIu16 "u" +# endif +#endif +#if !defined PRIx16 +# ifdef UINT16_MAX +# define PRIx16 "x" +# endif +#endif +#if !defined PRIX16 +# ifdef UINT16_MAX +# define PRIX16 "X" +# endif +#endif +#if !defined PRId32 +# ifdef INT32_MAX +# define PRId32 "d" +# endif +#endif +#if !defined PRIi32 +# ifdef INT32_MAX +# define PRIi32 "i" +# endif +#endif +#if !defined PRIo32 +# ifdef UINT32_MAX +# define PRIo32 "o" +# endif +#endif +#if !defined PRIu32 +# ifdef UINT32_MAX +# define PRIu32 "u" +# endif +#endif +#if !defined PRIx32 +# ifdef UINT32_MAX +# define PRIx32 "x" +# endif +#endif +#if !defined PRIX32 +# ifdef UINT32_MAX +# define PRIX32 "X" +# endif +#endif +#ifdef INT64_MAX +# if (0 ? defined _LP64 : 0) +# define _PRI64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRI64_PREFIX "I64" +# elif LONG_MAX >> 30 == 1 +# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRId64 +# define PRId64 _PRI64_PREFIX "d" +# endif +# if !defined PRIi64 +# define PRIi64 _PRI64_PREFIX "i" +# endif +#endif +#ifdef UINT64_MAX +# if (0 ? defined _LP64 : 0) +# define _PRIu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRIu64_PREFIX "I64" +# elif ULONG_MAX >> 31 == 1 +# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRIo64 +# define PRIo64 _PRIu64_PREFIX "o" +# endif +# if !defined PRIu64 +# define PRIu64 _PRIu64_PREFIX "u" +# endif +# if !defined PRIx64 +# define PRIx64 _PRIu64_PREFIX "x" +# endif +# if !defined PRIX64 +# define PRIX64 _PRIu64_PREFIX "X" +# endif +#endif + +#if !defined PRIdLEAST8 +# define PRIdLEAST8 "d" +#endif +#if !defined PRIiLEAST8 +# define PRIiLEAST8 "i" +#endif +#if !defined PRIoLEAST8 +# define PRIoLEAST8 "o" +#endif +#if !defined PRIuLEAST8 +# define PRIuLEAST8 "u" +#endif +#if !defined PRIxLEAST8 +# define PRIxLEAST8 "x" +#endif +#if !defined PRIXLEAST8 +# define PRIXLEAST8 "X" +#endif +#if !defined PRIdLEAST16 +# define PRIdLEAST16 "d" +#endif +#if !defined PRIiLEAST16 +# define PRIiLEAST16 "i" +#endif +#if !defined PRIoLEAST16 +# define PRIoLEAST16 "o" +#endif +#if !defined PRIuLEAST16 +# define PRIuLEAST16 "u" +#endif +#if !defined PRIxLEAST16 +# define PRIxLEAST16 "x" +#endif +#if !defined PRIXLEAST16 +# define PRIXLEAST16 "X" +#endif +#if !defined PRIdLEAST32 +# define PRIdLEAST32 "d" +#endif +#if !defined PRIiLEAST32 +# define PRIiLEAST32 "i" +#endif +#if !defined PRIoLEAST32 +# define PRIoLEAST32 "o" +#endif +#if !defined PRIuLEAST32 +# define PRIuLEAST32 "u" +#endif +#if !defined PRIxLEAST32 +# define PRIxLEAST32 "x" +#endif +#if !defined PRIXLEAST32 +# define PRIXLEAST32 "X" +#endif +#ifdef INT64_MAX +# if !defined PRIdLEAST64 +# define PRIdLEAST64 PRId64 +# endif +# if !defined PRIiLEAST64 +# define PRIiLEAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoLEAST64 +# define PRIoLEAST64 PRIo64 +# endif +# if !defined PRIuLEAST64 +# define PRIuLEAST64 PRIu64 +# endif +# if !defined PRIxLEAST64 +# define PRIxLEAST64 PRIx64 +# endif +# if !defined PRIXLEAST64 +# define PRIXLEAST64 PRIX64 +# endif +#endif + +#if !defined PRIdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIdFAST8 PRId64 +# else +# define PRIdFAST8 "d" +# endif +#endif +#if !defined PRIiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIiFAST8 PRIi64 +# else +# define PRIiFAST8 "i" +# endif +#endif +#if !defined PRIoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIoFAST8 PRIo64 +# else +# define PRIoFAST8 "o" +# endif +#endif +#if !defined PRIuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIuFAST8 PRIu64 +# else +# define PRIuFAST8 "u" +# endif +#endif +#if !defined PRIxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIxFAST8 PRIx64 +# else +# define PRIxFAST8 "x" +# endif +#endif +#if !defined PRIXFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIXFAST8 PRIX64 +# else +# define PRIXFAST8 "X" +# endif +#endif +#if !defined PRIdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIdFAST16 PRId64 +# else +# define PRIdFAST16 "d" +# endif +#endif +#if !defined PRIiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIiFAST16 PRIi64 +# else +# define PRIiFAST16 "i" +# endif +#endif +#if !defined PRIoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIoFAST16 PRIo64 +# else +# define PRIoFAST16 "o" +# endif +#endif +#if !defined PRIuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIuFAST16 PRIu64 +# else +# define PRIuFAST16 "u" +# endif +#endif +#if !defined PRIxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIxFAST16 PRIx64 +# else +# define PRIxFAST16 "x" +# endif +#endif +#if !defined PRIXFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIXFAST16 PRIX64 +# else +# define PRIXFAST16 "X" +# endif +#endif +#if !defined PRIdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIdFAST32 PRId64 +# else +# define PRIdFAST32 "d" +# endif +#endif +#if !defined PRIiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIiFAST32 PRIi64 +# else +# define PRIiFAST32 "i" +# endif +#endif +#if !defined PRIoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIoFAST32 PRIo64 +# else +# define PRIoFAST32 "o" +# endif +#endif +#if !defined PRIuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIuFAST32 PRIu64 +# else +# define PRIuFAST32 "u" +# endif +#endif +#if !defined PRIxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIxFAST32 PRIx64 +# else +# define PRIxFAST32 "x" +# endif +#endif +#if !defined PRIXFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIXFAST32 PRIX64 +# else +# define PRIXFAST32 "X" +# endif +#endif +#ifdef INT64_MAX +# if !defined PRIdFAST64 +# define PRIdFAST64 PRId64 +# endif +# if !defined PRIiFAST64 +# define PRIiFAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoFAST64 +# define PRIoFAST64 PRIo64 +# endif +# if !defined PRIuFAST64 +# define PRIuFAST64 PRIu64 +# endif +# if !defined PRIxFAST64 +# define PRIxFAST64 PRIx64 +# endif +# if !defined PRIXFAST64 +# define PRIXFAST64 PRIX64 +# endif +#endif + +#if !defined PRIdMAX +# if 1 +# define PRIdMAX PRId64 +# else +# define PRIdMAX "ld" +# endif +#endif +#if !defined PRIiMAX +# if 1 +# define PRIiMAX PRIi64 +# else +# define PRIiMAX "li" +# endif +#endif +#if !defined PRIoMAX +# if 1 +# define PRIoMAX PRIo64 +# else +# define PRIoMAX "lo" +# endif +#endif +#if !defined PRIuMAX +# if 1 +# define PRIuMAX PRIu64 +# else +# define PRIuMAX "lu" +# endif +#endif +#if !defined PRIxMAX +# if 1 +# define PRIxMAX PRIx64 +# else +# define PRIxMAX "lx" +# endif +#endif +#if !defined PRIXMAX +# if 1 +# define PRIXMAX PRIX64 +# else +# define PRIXMAX "lX" +# endif +#endif + +#if !defined PRIdPTR +# ifdef INTPTR_MAX +# define PRIdPTR GNULIB_PTR_MOD "d" +# endif +#endif +#if !defined PRIiPTR +# ifdef INTPTR_MAX +# define PRIiPTR GNULIB_PTR_MOD "i" +# endif +#endif +#if !defined PRIoPTR +# ifdef UINTPTR_MAX +# define PRIoPTR GNULIB_PTR_MOD "o" +# endif +#endif +#if !defined PRIuPTR +# ifdef UINTPTR_MAX +# define PRIuPTR GNULIB_PTR_MOD "u" +# endif +#endif +#if !defined PRIxPTR +# ifdef UINTPTR_MAX +# define PRIxPTR GNULIB_PTR_MOD "x" +# endif +#endif +#if !defined PRIXPTR +# ifdef UINTPTR_MAX +# define PRIXPTR GNULIB_PTR_MOD "X" +# endif +#endif + +#if !defined SCNd8 +# ifdef INT8_MAX +# define SCNd8 "hhd" +# endif +#endif +#if !defined SCNi8 +# ifdef INT8_MAX +# define SCNi8 "hhi" +# endif +#endif +#if !defined SCNo8 +# ifdef UINT8_MAX +# define SCNo8 "hho" +# endif +#endif +#if !defined SCNu8 +# ifdef UINT8_MAX +# define SCNu8 "hhu" +# endif +#endif +#if !defined SCNx8 +# ifdef UINT8_MAX +# define SCNx8 "hhx" +# endif +#endif +#if !defined SCNd16 +# ifdef INT16_MAX +# define SCNd16 "hd" +# endif +#endif +#if !defined SCNi16 +# ifdef INT16_MAX +# define SCNi16 "hi" +# endif +#endif +#if !defined SCNo16 +# ifdef UINT16_MAX +# define SCNo16 "ho" +# endif +#endif +#if !defined SCNu16 +# ifdef UINT16_MAX +# define SCNu16 "hu" +# endif +#endif +#if !defined SCNx16 +# ifdef UINT16_MAX +# define SCNx16 "hx" +# endif +#endif +#if !defined SCNd32 +# ifdef INT32_MAX +# define SCNd32 "d" +# endif +#endif +#if !defined SCNi32 +# ifdef INT32_MAX +# define SCNi32 "i" +# endif +#endif +#if !defined SCNo32 +# ifdef UINT32_MAX +# define SCNo32 "o" +# endif +#endif +#if !defined SCNu32 +# ifdef UINT32_MAX +# define SCNu32 "u" +# endif +#endif +#if !defined SCNx32 +# ifdef UINT32_MAX +# define SCNx32 "x" +# endif +#endif +#ifdef INT64_MAX +# if (0 ? defined _LP64 : 0) +# define _SCN64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCN64_PREFIX "I64" +# elif LONG_MAX >> 30 == 1 +# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNd64 +# define SCNd64 _SCN64_PREFIX "d" +# endif +# if !defined SCNi64 +# define SCNi64 _SCN64_PREFIX "i" +# endif +#endif +#ifdef UINT64_MAX +# if (0 ? defined _LP64 : 0) +# define _SCNu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCNu64_PREFIX "I64" +# elif ULONG_MAX >> 31 == 1 +# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNo64 +# define SCNo64 _SCNu64_PREFIX "o" +# endif +# if !defined SCNu64 +# define SCNu64 _SCNu64_PREFIX "u" +# endif +# if !defined SCNx64 +# define SCNx64 _SCNu64_PREFIX "x" +# endif +#endif + +#if !defined SCNdLEAST8 +# define SCNdLEAST8 "hhd" +#endif +#if !defined SCNiLEAST8 +# define SCNiLEAST8 "hhi" +#endif +#if !defined SCNoLEAST8 +# define SCNoLEAST8 "hho" +#endif +#if !defined SCNuLEAST8 +# define SCNuLEAST8 "hhu" +#endif +#if !defined SCNxLEAST8 +# define SCNxLEAST8 "hhx" +#endif +#if !defined SCNdLEAST16 +# define SCNdLEAST16 "hd" +#endif +#if !defined SCNiLEAST16 +# define SCNiLEAST16 "hi" +#endif +#if !defined SCNoLEAST16 +# define SCNoLEAST16 "ho" +#endif +#if !defined SCNuLEAST16 +# define SCNuLEAST16 "hu" +#endif +#if !defined SCNxLEAST16 +# define SCNxLEAST16 "hx" +#endif +#if !defined SCNdLEAST32 +# define SCNdLEAST32 "d" +#endif +#if !defined SCNiLEAST32 +# define SCNiLEAST32 "i" +#endif +#if !defined SCNoLEAST32 +# define SCNoLEAST32 "o" +#endif +#if !defined SCNuLEAST32 +# define SCNuLEAST32 "u" +#endif +#if !defined SCNxLEAST32 +# define SCNxLEAST32 "x" +#endif +#ifdef INT64_MAX +# if !defined SCNdLEAST64 +# define SCNdLEAST64 SCNd64 +# endif +# if !defined SCNiLEAST64 +# define SCNiLEAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoLEAST64 +# define SCNoLEAST64 SCNo64 +# endif +# if !defined SCNuLEAST64 +# define SCNuLEAST64 SCNu64 +# endif +# if !defined SCNxLEAST64 +# define SCNxLEAST64 SCNx64 +# endif +#endif + +#if !defined SCNdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNdFAST8 SCNd64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNdFAST8 "hd" +# elif INT_FAST8_MAX == 0x7f +# define SCNdFAST8 "hhd" +# else +# define SCNdFAST8 "d" +# endif +#endif +#if !defined SCNiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNiFAST8 SCNi64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNiFAST8 "hi" +# elif INT_FAST8_MAX == 0x7f +# define SCNiFAST8 "hhi" +# else +# define SCNiFAST8 "i" +# endif +#endif +#if !defined SCNoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNoFAST8 SCNo64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNoFAST8 "ho" +# elif UINT_FAST8_MAX == 0xff +# define SCNoFAST8 "hho" +# else +# define SCNoFAST8 "o" +# endif +#endif +#if !defined SCNuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNuFAST8 SCNu64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNuFAST8 "hu" +# elif UINT_FAST8_MAX == 0xff +# define SCNuFAST8 "hhu" +# else +# define SCNuFAST8 "u" +# endif +#endif +#if !defined SCNxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNxFAST8 SCNx64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNxFAST8 "hx" +# elif UINT_FAST8_MAX == 0xff +# define SCNxFAST8 "hhx" +# else +# define SCNxFAST8 "x" +# endif +#endif +#if !defined SCNdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNdFAST16 SCNd64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNdFAST16 "hd" +# else +# define SCNdFAST16 "d" +# endif +#endif +#if !defined SCNiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNiFAST16 SCNi64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNiFAST16 "hi" +# else +# define SCNiFAST16 "i" +# endif +#endif +#if !defined SCNoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNoFAST16 SCNo64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNoFAST16 "ho" +# else +# define SCNoFAST16 "o" +# endif +#endif +#if !defined SCNuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNuFAST16 SCNu64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNuFAST16 "hu" +# else +# define SCNuFAST16 "u" +# endif +#endif +#if !defined SCNxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNxFAST16 SCNx64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNxFAST16 "hx" +# else +# define SCNxFAST16 "x" +# endif +#endif +#if !defined SCNdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNdFAST32 SCNd64 +# else +# define SCNdFAST32 "d" +# endif +#endif +#if !defined SCNiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNiFAST32 SCNi64 +# else +# define SCNiFAST32 "i" +# endif +#endif +#if !defined SCNoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNoFAST32 SCNo64 +# else +# define SCNoFAST32 "o" +# endif +#endif +#if !defined SCNuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNuFAST32 SCNu64 +# else +# define SCNuFAST32 "u" +# endif +#endif +#if !defined SCNxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNxFAST32 SCNx64 +# else +# define SCNxFAST32 "x" +# endif +#endif +#ifdef INT64_MAX +# if !defined SCNdFAST64 +# define SCNdFAST64 SCNd64 +# endif +# if !defined SCNiFAST64 +# define SCNiFAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoFAST64 +# define SCNoFAST64 SCNo64 +# endif +# if !defined SCNuFAST64 +# define SCNuFAST64 SCNu64 +# endif +# if !defined SCNxFAST64 +# define SCNxFAST64 SCNx64 +# endif +#endif + +#if !defined SCNdMAX +# if 1 +# define SCNdMAX SCNd64 +# else +# define SCNdMAX "ld" +# endif +#endif +#if !defined SCNiMAX +# if 1 +# define SCNiMAX SCNi64 +# else +# define SCNiMAX "li" +# endif +#endif +#if !defined SCNoMAX +# if 1 +# define SCNoMAX SCNo64 +# else +# define SCNoMAX "lo" +# endif +#endif +#if !defined SCNuMAX +# if 1 +# define SCNuMAX SCNu64 +# else +# define SCNuMAX "lu" +# endif +#endif +#if !defined SCNxMAX +# if 1 +# define SCNxMAX SCNx64 +# else +# define SCNxMAX "lx" +# endif +#endif + +#if !defined SCNdPTR +# ifdef INTPTR_MAX +# define SCNdPTR GNULIB_PTR_MOD "d" +# endif +#endif +#if !defined SCNiPTR +# ifdef INTPTR_MAX +# define SCNiPTR GNULIB_PTR_MOD "i" +# endif +#endif +#if !defined SCNoPTR +# ifdef UINTPTR_MAX +# define SCNoPTR GNULIB_PTR_MOD "o" +# endif +#endif +#if !defined SCNuPTR +# ifdef UINTPTR_MAX +# define SCNuPTR GNULIB_PTR_MOD "u" +# endif +#endif +#if !defined SCNxPTR +# ifdef UINTPTR_MAX +# define SCNxPTR GNULIB_PTR_MOD "x" +# endif +#endif + +/* 7.8.2 Functions for greatest-width integer types */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxabs +# define imaxabs rpl_imaxabs +# endif +_GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x)); +_GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +_GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxabs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef imaxabs +# if HAVE_RAW_DECL_IMAXABS +_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " + "use gnulib module imaxabs for portability"); +# endif +#endif + +#if 0 +# if !1 +# if !GNULIB_defined_imaxdiv_t +typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; +# define GNULIB_defined_imaxdiv_t 1 +# endif +# endif +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxdiv +# define imaxdiv rpl_imaxdiv +# endif +_GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +_GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +_GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxdiv); +# endif +#elif defined GNULIB_POSIXCHECK +# undef imaxdiv +# if HAVE_RAW_DECL_IMAXDIV +_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " + "use gnulib module imaxdiv for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoimax +# define strtoimax rpl_strtoimax +# endif +_GL_FUNCDECL_RPL (strtoimax, intmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoimax, intmax_t, + (const char *restrict, char **restrict, int)); +# else +# if !1 +# undef strtoimax +_GL_FUNCDECL_SYS (strtoimax, intmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoimax, intmax_t, + (const char *restrict, char **restrict, int)); +# endif +_GL_CXXALIASWARN (strtoimax); +#elif defined GNULIB_POSIXCHECK +# undef strtoimax +# if HAVE_RAW_DECL_STRTOIMAX +_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " + "use gnulib module strtoimax for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoumax +# define strtoumax rpl_strtoumax +# endif +_GL_FUNCDECL_RPL (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int)); +# else +# if !1 +# undef strtoumax +_GL_FUNCDECL_SYS (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoumax, uintmax_t, + (const char *restrict, char **restrict, int)); +# endif +_GL_CXXALIASWARN (strtoumax); +#elif defined GNULIB_POSIXCHECK +# undef strtoumax +# if HAVE_RAW_DECL_STRTOUMAX +_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " + "use gnulib module strtoumax for portability"); +# endif +#endif + +/* Don't bother defining or declaring wcstoimax and wcstoumax, since + wide-character functions like this are hardly ever useful. */ + +#ifdef __cplusplus +} +#endif + +#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/langinfo.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/langinfo.h index 2e2235eb9..b1f7010c0 100644 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/langinfo.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/langinfo.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for and wrapper around . - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* * POSIX for platforms that lack it or have an incomplete one. @@ -35,6 +35,11 @@ #ifndef _GL_GRGL_LANGINFO_H #define _GL_GRGL_LANGINFO_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if !0 @@ -186,19 +191,19 @@ typedef int nl_item; /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -286,6 +291,12 @@ typedef int nl_item; Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -333,6 +344,16 @@ typedef int nl_item; _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -358,6 +379,14 @@ typedef int nl_item; _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -455,7 +484,7 @@ typedef int nl_item; _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -483,9 +512,9 @@ typedef int nl_item; _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -501,19 +530,19 @@ typedef int nl_item; /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -586,13 +615,20 @@ typedef int nl_item; # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -601,27 +637,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -658,7 +700,9 @@ _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); # endif _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (nl_langinfo); +# endif #elif defined GNULIB_POSIXCHECK # undef nl_langinfo # if HAVE_RAW_DECL_NL_LANGINFO diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/limits.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/limits.h new file mode 100644 index 000000000..2b6f68814 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/limits.h @@ -0,0 +1,152 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A GNU-like . + + Copyright 2016-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +#if defined _GL_ALREADY_INCLUDING_LIMITS_H +/* Special invocation convention: + On Haiku/x86_64, we have a sequence of nested includes + -> -> . + In this situation, LONG_MAX and INT_MAX are not yet defined, + therefore we should not attempt to define LONG_BIT. */ + +#include "../include/limits.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_GRGL_LIMITS_H + +# define _GL_ALREADY_INCLUDING_LIMITS_H + +/* The include_next requires a split double-inclusion guard. */ +# include "../include/limits.h" + +# undef _GL_ALREADY_INCLUDING_LIMITS_H + +#ifndef _GL_GRGL_LIMITS_H +#define _GL_GRGL_LIMITS_H + +#ifndef LLONG_MIN +# if defined LONG_LONG_MIN /* HP-UX 11.31 */ +# define LLONG_MIN LONG_LONG_MIN +# elif defined LONGLONG_MIN /* IRIX 6.5 */ +# define LLONG_MIN LONGLONG_MIN +# elif defined __GNUC__ +# define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL) +# endif +#endif +#ifndef LLONG_MAX +# if defined LONG_LONG_MAX /* HP-UX 11.31 */ +# define LLONG_MAX LONG_LONG_MAX +# elif defined LONGLONG_MAX /* IRIX 6.5 */ +# define LLONG_MAX LONGLONG_MAX +# elif defined __GNUC__ +# define LLONG_MAX __LONG_LONG_MAX__ +# endif +#endif +#ifndef ULLONG_MAX +# if defined ULONG_LONG_MAX /* HP-UX 11.31 */ +# define ULLONG_MAX ULONG_LONG_MAX +# elif defined ULONGLONG_MAX /* IRIX 6.5 */ +# define ULLONG_MAX ULONGLONG_MAX +# elif defined __GNUC__ +# define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL) +# endif +#endif + +/* The number of usable bits in an unsigned or signed integer type + with minimum value MIN and maximum value MAX, as an int expression + suitable in #if. Cover all known practical hosts. This + implementation exploits the fact that MAX is 1 less than a power of + 2, and merely counts the number of 1 bits in MAX; "COBn" means + "count the number of 1 bits in the low-order n bits"). */ +#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max)) +#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n)) +#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n)) +#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n)) +#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n)) +#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n)) +#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1)) + +#ifndef WORD_BIT +/* Assume 'int' is 32 bits wide. */ +# define WORD_BIT 32 +#endif +#ifndef LONG_BIT +/* Assume 'long' is 32 or 64 bits wide. */ +# if LONG_MAX == INT_MAX +# define LONG_BIT 32 +# else +# define LONG_BIT 64 +# endif +#endif + +/* Assume no multibyte character is longer than 16 bytes. */ +#ifndef MB_LEN_MAX +# define MB_LEN_MAX 16 +#endif + +/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */ + +#if (! defined ULLONG_WIDTH \ + && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) +# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) +# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) +# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) +# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX) +# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX) +# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX) +# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX) +# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX) +# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) +# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) +# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) +#endif + +/* Macros specified by C23. */ + +#if (defined _GNU_SOURCE \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)) +# if ! defined BOOL_WIDTH +# define BOOL_WIDTH 1 +# define BOOL_MAX 1 +# elif ! defined BOOL_MAX +# define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1) +# endif +#endif + +/* Macro specified by POSIX. */ + +/* The maximum ssize_t value. Although it might not be of ssize_t type + as it should be, it's too much trouble to fix this minor detail. */ +#ifndef SSIZE_MAX +# ifdef _WIN64 +# define SSIZE_MAX LLONG_MAX +# else +# define SSIZE_MAX LONG_MAX +# endif +#endif + +#endif /* _GL_GRGL_LIMITS_H */ +#endif /* _GL_GRGL_LIMITS_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/locale.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/locale.h new file mode 100644 index 000000000..b75e8c359 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/locale.h @@ -0,0 +1,823 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A POSIX . + Copyright (C) 2007-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +#if (defined _WIN32 && !defined __CYGWIN__ && defined __need_locale_t) \ + || defined _GL_ALREADY_INCLUDING_LOCALE_H + +/* Special invocation convention: + - Inside mingw header files, + - To handle Solaris header files (through Solaris 10) when combined + with gettext's libintl.h. */ + +#include "../ucrt/locale.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_GRGL_LOCALE_H + +#define _GL_ALREADY_INCLUDING_LOCALE_H + +/* The include_next requires a split double-inclusion guard. */ +#include "../ucrt/locale.h" + +#undef _GL_ALREADY_INCLUDING_LOCALE_H + +#ifndef _GL_GRGL_LOCALE_H +#define _GL_GRGL_LOCALE_H + +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* NetBSD 5.0 mis-defines NULL. */ +#include + +/* Mac OS X 10.5 defines the locale_t type in . */ +#if 0 +# include +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + +/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C. + On systems that don't define it, use the same value as GNU libintl. */ +#if !defined LC_MESSAGES +# define LC_MESSAGES 1729 +#endif + +/* On native Windows with MSVC, 'struct lconv' lacks the members int_p_* and + int_n_*. Instead of overriding 'struct lconv', merely define these member + names as macros. This avoids trouble in C++ mode. */ +#if defined _MSC_VER +# define int_p_cs_precedes p_cs_precedes +# define int_p_sign_posn p_sign_posn +# define int_p_sep_by_space p_sep_by_space +# define int_n_cs_precedes n_cs_precedes +# define int_n_sign_posn n_sign_posn +# define int_n_sep_by_space n_sep_by_space +#endif + +/* Bionic libc's 'struct lconv' is just a dummy. */ +#if 0 +# define lconv rpl_lconv +struct lconv +{ + /* All 'char *' are actually 'const char *'. */ + + /* Members that depend on the LC_NUMERIC category of the locale. See + */ + + /* Symbol used as decimal point. */ + char *decimal_point; + /* Symbol used to separate groups of digits to the left of the decimal + point. */ + char *thousands_sep; + /* Definition of the size of groups of digits to the left of the decimal + point. */ + char *grouping; + + /* Members that depend on the LC_MONETARY category of the locale. See + */ + + /* Symbol used as decimal point. */ + char *mon_decimal_point; + /* Symbol used to separate groups of digits to the left of the decimal + point. */ + char *mon_thousands_sep; + /* Definition of the size of groups of digits to the left of the decimal + point. */ + char *mon_grouping; + /* Sign used to indicate a value >= 0. */ + char *positive_sign; + /* Sign used to indicate a value < 0. */ + char *negative_sign; + + /* For formatting local currency. */ + /* Currency symbol (3 characters) followed by separator (1 character). */ + char *currency_symbol; + /* Number of digits after the decimal point. */ + char frac_digits; + /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char p_cs_precedes; + /* For values >= 0: Position of the sign. */ + char p_sign_posn; + /* For values >= 0: Placement of spaces between currency symbol, sign, and + number. */ + char p_sep_by_space; + /* For values < 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char n_cs_precedes; + /* For values < 0: Position of the sign. */ + char n_sign_posn; + /* For values < 0: Placement of spaces between currency symbol, sign, and + number. */ + char n_sep_by_space; + + /* For formatting international currency. */ + /* Currency symbol (3 characters) followed by separator (1 character). */ + char *int_curr_symbol; + /* Number of digits after the decimal point. */ + char int_frac_digits; + /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char int_p_cs_precedes; + /* For values >= 0: Position of the sign. */ + char int_p_sign_posn; + /* For values >= 0: Placement of spaces between currency symbol, sign, and + number. */ + char int_p_sep_by_space; + /* For values < 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char int_n_cs_precedes; + /* For values < 0: Position of the sign. */ + char int_n_sign_posn; + /* For values < 0: Placement of spaces between currency symbol, sign, and + number. */ + char int_n_sep_by_space; +}; +#endif + +#if IN_GETTEXT_TOOLS_LIBGREP +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef localeconv +# define localeconv rpl_localeconv +# endif +_GL_FUNCDECL_RPL (localeconv, struct lconv *, (void)); +_GL_CXXALIAS_RPL (localeconv, struct lconv *, (void)); +# else +_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (localeconv); +# endif +#elif 0 +# undef localeconv +# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv +#elif defined GNULIB_POSIXCHECK +# undef localeconv +# if HAVE_RAW_DECL_LOCALECONV +_GL_WARN_ON_USE (localeconv, + "localeconv returns too few information on some platforms - " + "use gnulib module localeconv for portability"); +# endif +#endif + +#if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setlocale +# define setlocale rpl_setlocale +# define GNULIB_defined_setlocale 1 +# endif +_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale)); +_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale)); +# else +_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (setlocale); +# endif +#elif defined GNULIB_POSIXCHECK +# undef setlocale +# if HAVE_RAW_DECL_SETLOCALE +_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " + "use gnulib module setlocale for portability"); +# endif +#endif + +#if 1 +/* Included here for convenience. */ +# include "setlocale_null.h" +#endif + +#if /*@GNULIB_NEWLOCALE@ ||*/ (0 && 0 && 0) +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef newlocale +# define newlocale rpl_newlocale +# define GNULIB_defined_newlocale 1 +# endif +_GL_FUNCDECL_RPL (newlocale, locale_t, + (int category_mask, const char *name, locale_t base) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (newlocale, locale_t, + (int category_mask, const char *name, locale_t base)); +# else +# if 0 +_GL_CXXALIAS_SYS (newlocale, locale_t, + (int category_mask, const char *name, locale_t base)); +# endif +# endif +# if __GLIBC__ >= 2 && 0 +_GL_CXXALIASWARN (newlocale); +# endif +# if 0 || 1 +# ifndef HAVE_WORKING_NEWLOCALE +# define HAVE_WORKING_NEWLOCALE 1 +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# undef newlocale +# if HAVE_RAW_DECL_NEWLOCALE +_GL_WARN_ON_USE (newlocale, "newlocale is not portable"); +# endif +#endif + +#if 0 || (0 && 0 && 0) +# if 0 /* locale_t may be undefined if !0. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef duplocale +# define duplocale rpl_duplocale +# define GNULIB_defined_duplocale 1 +# endif +_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); +# else +_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); +# endif +# endif +# if __GLIBC__ >= 2 && 0 +_GL_CXXALIASWARN (duplocale); +# endif +# if 0 +# ifndef HAVE_WORKING_DUPLOCALE +# define HAVE_WORKING_DUPLOCALE 1 +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# undef duplocale +# if HAVE_RAW_DECL_DUPLOCALE +_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " + "use gnulib module duplocale for portability"); +# endif +#endif + +#if /*@GNULIB_FREELOCALE@ ||*/ (0 && 0 && 0) +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef freelocale +# define freelocale rpl_freelocale +# define GNULIB_defined_freelocale 1 +# endif +_GL_FUNCDECL_RPL (freelocale, void, (locale_t locale) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (freelocale, void, (locale_t locale)); +# else +# if 0 +/* Need to cast, because on FreeBSD and Mac OS X 10.13, the return type is + int. */ +_GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale)); +# endif +# endif +# if __GLIBC__ >= 2 && 0 +_GL_CXXALIASWARN (freelocale); +# endif +#elif defined GNULIB_POSIXCHECK +# undef freelocale +# if HAVE_RAW_DECL_FREELOCALE +_GL_WARN_ON_USE (freelocale, "freelocale is not portable"); +# endif +#endif + +#endif /* _GL_GRGL_LOCALE_H */ +#endif /* _GL_GRGL_LOCALE_H */ +#endif /* !(__need_locale_t || _GL_ALREADY_INCLUDING_LOCALE_H) */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/malloc/dynarray-skeleton.gl.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/malloc/dynarray-skeleton.gl.h new file mode 100644 index 000000000..af95414fd --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/malloc/dynarray-skeleton.gl.h @@ -0,0 +1,529 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Type-safe arrays which grow dynamically. + Copyright (C) 2017-2023 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* Pre-processor macros which act as parameters: + + DYNARRAY_STRUCT + The struct tag of dynamic array to be defined. + DYNARRAY_ELEMENT + The type name of the element type. Elements are copied + as if by memcpy, and can change address as the dynamic + array grows. + DYNARRAY_PREFIX + The prefix of the functions which are defined. + + The following parameters are optional: + + DYNARRAY_ELEMENT_FREE + DYNARRAY_ELEMENT_FREE (E) is evaluated to deallocate the + contents of elements. E is of type DYNARRAY_ELEMENT *. + DYNARRAY_ELEMENT_INIT + DYNARRAY_ELEMENT_INIT (E) is evaluated to initialize a new + element. E is of type DYNARRAY_ELEMENT *. + If DYNARRAY_ELEMENT_FREE but not DYNARRAY_ELEMENT_INIT is + defined, new elements are automatically zero-initialized. + Otherwise, new elements have undefined contents. + DYNARRAY_INITIAL_SIZE + The size of the statically allocated array (default: + at least 2, more elements if they fit into 128 bytes). + Must be a preprocessor constant. If DYNARRAY_INITIAL_SIZE is 0, + there is no statically allocated array at, and all non-empty + arrays are heap-allocated. + DYNARRAY_FINAL_TYPE + The name of the type which holds the final array. If not + defined, is PREFIX##finalize not provided. DYNARRAY_FINAL_TYPE + must be a struct type, with members of type DYNARRAY_ELEMENT and + size_t at the start (in this order). + + These macros are undefined after this header file has been + included. + + The following types are provided (their members are private to the + dynarray implementation): + + struct DYNARRAY_STRUCT + + The following functions are provided: + + void DYNARRAY_PREFIX##init (struct DYNARRAY_STRUCT *); + void DYNARRAY_PREFIX##free (struct DYNARRAY_STRUCT *); + bool DYNARRAY_PREFIX##has_failed (const struct DYNARRAY_STRUCT *); + void DYNARRAY_PREFIX##mark_failed (struct DYNARRAY_STRUCT *); + size_t DYNARRAY_PREFIX##size (const struct DYNARRAY_STRUCT *); + DYNARRAY_ELEMENT *DYNARRAY_PREFIX##begin (const struct DYNARRAY_STRUCT *); + DYNARRAY_ELEMENT *DYNARRAY_PREFIX##end (const struct DYNARRAY_STRUCT *); + DYNARRAY_ELEMENT *DYNARRAY_PREFIX##at (struct DYNARRAY_STRUCT *, size_t); + void DYNARRAY_PREFIX##add (struct DYNARRAY_STRUCT *, DYNARRAY_ELEMENT); + DYNARRAY_ELEMENT *DYNARRAY_PREFIX##emplace (struct DYNARRAY_STRUCT *); + bool DYNARRAY_PREFIX##resize (struct DYNARRAY_STRUCT *, size_t); + void DYNARRAY_PREFIX##remove_last (struct DYNARRAY_STRUCT *); + void DYNARRAY_PREFIX##clear (struct DYNARRAY_STRUCT *); + + The following functions are provided are provided if the + prerequisites are met: + + bool DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *, + DYNARRAY_FINAL_TYPE *); + (if DYNARRAY_FINAL_TYPE is defined) + DYNARRAY_ELEMENT *DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *, + size_t *); + (if DYNARRAY_FINAL_TYPE is not defined) +*/ + +#include + +#include +#include +#include + +#ifndef DYNARRAY_STRUCT +# error "DYNARRAY_STRUCT must be defined" +#endif + +#ifndef DYNARRAY_ELEMENT +# error "DYNARRAY_ELEMENT must be defined" +#endif + +#ifndef DYNARRAY_PREFIX +# error "DYNARRAY_PREFIX must be defined" +#endif + +#ifdef DYNARRAY_INITIAL_SIZE +# if DYNARRAY_INITIAL_SIZE < 0 +# error "DYNARRAY_INITIAL_SIZE must be non-negative" +# endif +# if DYNARRAY_INITIAL_SIZE > 0 +# define DYNARRAY_HAVE_SCRATCH 1 +# else +# define DYNARRAY_HAVE_SCRATCH 0 +# endif +#else +/* Provide a reasonable default which limits the size of + DYNARRAY_STRUCT. */ +# define DYNARRAY_INITIAL_SIZE \ + (sizeof (DYNARRAY_ELEMENT) > 64 ? 2 : 128 / sizeof (DYNARRAY_ELEMENT)) +# define DYNARRAY_HAVE_SCRATCH 1 +#endif + +/* Public type definitions. */ + +/* All fields of this struct are private to the implementation. */ +struct DYNARRAY_STRUCT +{ + union + { + struct dynarray_header dynarray_abstract; + struct + { + /* These fields must match struct dynarray_header. */ + size_t used; + size_t allocated; + DYNARRAY_ELEMENT *array; + } dynarray_header; + } u; + +#if DYNARRAY_HAVE_SCRATCH + /* Initial inline allocation. */ + DYNARRAY_ELEMENT scratch[DYNARRAY_INITIAL_SIZE]; +#endif +}; + +/* Internal use only: Helper macros. */ + +/* Ensure macro-expansion of DYNARRAY_PREFIX. */ +#define DYNARRAY_CONCAT0(prefix, name) prefix##name +#define DYNARRAY_CONCAT1(prefix, name) DYNARRAY_CONCAT0(prefix, name) +#define DYNARRAY_NAME(name) DYNARRAY_CONCAT1(DYNARRAY_PREFIX, name) + +/* Use DYNARRAY_FREE instead of DYNARRAY_NAME (free), + so that Gnulib does not change 'free' to 'rpl_free'. */ +#define DYNARRAY_FREE DYNARRAY_CONCAT1 (DYNARRAY_NAME (f), ree) + +/* Address of the scratch buffer if any. */ +#if DYNARRAY_HAVE_SCRATCH +# define DYNARRAY_SCRATCH(list) (list)->scratch +#else +# define DYNARRAY_SCRATCH(list) NULL +#endif + +/* Internal use only: Helper functions. */ + +/* Internal function. Call DYNARRAY_ELEMENT_FREE with the array + elements. Name mangling needed due to the DYNARRAY_ELEMENT_FREE + macro expansion. */ +static inline void +DYNARRAY_NAME (free__elements__) (DYNARRAY_ELEMENT *__dynarray_array, + size_t __dynarray_used) +{ +#ifdef DYNARRAY_ELEMENT_FREE + for (size_t __dynarray_i = 0; __dynarray_i < __dynarray_used; ++__dynarray_i) + DYNARRAY_ELEMENT_FREE (&__dynarray_array[__dynarray_i]); +#endif /* DYNARRAY_ELEMENT_FREE */ +} + +/* Internal function. Free the non-scratch array allocation. */ +static inline void +DYNARRAY_NAME (free__array__) (struct DYNARRAY_STRUCT *list) +{ +#if DYNARRAY_HAVE_SCRATCH + if (list->u.dynarray_header.array != list->scratch) + free (list->u.dynarray_header.array); +#else + free (list->u.dynarray_header.array); +#endif +} + +/* Public functions. */ + +/* Initialize a dynamic array object. This must be called before any + use of the object. */ +_GL_ATTRIBUTE_NONNULL ((1)) +static void +DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) +{ + list->u.dynarray_header.used = 0; + list->u.dynarray_header.allocated = DYNARRAY_INITIAL_SIZE; + list->u.dynarray_header.array = DYNARRAY_SCRATCH (list); +} + +/* Deallocate the dynamic array and its elements. */ +_GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NONNULL ((1)) +static void +DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) +{ + DYNARRAY_NAME (free__elements__) + (list->u.dynarray_header.array, list->u.dynarray_header.used); + DYNARRAY_NAME (free__array__) (list); + DYNARRAY_NAME (init) (list); +} + +/* Return true if the dynamic array is in an error state. */ +_GL_ATTRIBUTE_NONNULL ((1)) +static inline bool +DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list) +{ + return list->u.dynarray_header.allocated == __dynarray_error_marker (); +} + +/* Mark the dynamic array as failed. All elements are deallocated as + a side effect. */ +_GL_ATTRIBUTE_NONNULL ((1)) +static void +DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list) +{ + DYNARRAY_NAME (free__elements__) + (list->u.dynarray_header.array, list->u.dynarray_header.used); + DYNARRAY_NAME (free__array__) (list); + list->u.dynarray_header.array = DYNARRAY_SCRATCH (list); + list->u.dynarray_header.used = 0; + list->u.dynarray_header.allocated = __dynarray_error_marker (); +} + +/* Return the number of elements which have been added to the dynamic + array. */ +_GL_ATTRIBUTE_NONNULL ((1)) +static inline size_t +DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) +{ + return list->u.dynarray_header.used; +} + +/* Return a pointer to the array element at INDEX. Terminate the + process if INDEX is out of bounds. */ +_GL_ATTRIBUTE_NONNULL ((1)) +static inline DYNARRAY_ELEMENT * +DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index) +{ + if (_GL_UNLIKELY (index >= DYNARRAY_NAME (size) (list))) + __libc_dynarray_at_failure (DYNARRAY_NAME (size) (list), index); + return list->u.dynarray_header.array + index; +} + +/* Return a pointer to the first array element, if any. For a + zero-length array, the pointer can be NULL even though the dynamic + array has not entered the failure state. */ +_GL_ATTRIBUTE_NONNULL ((1)) +static inline DYNARRAY_ELEMENT * +DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) +{ + return list->u.dynarray_header.array; +} + +/* Return a pointer one element past the last array element. For a + zero-length array, the pointer can be NULL even though the dynamic + array has not entered the failure state. */ +_GL_ATTRIBUTE_NONNULL ((1)) +static inline DYNARRAY_ELEMENT * +DYNARRAY_NAME (end) (struct DYNARRAY_STRUCT *list) +{ + return list->u.dynarray_header.array + list->u.dynarray_header.used; +} + +/* Internal function. Slow path for the add function below. */ +static void +DYNARRAY_NAME (add__) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item) +{ + if (_GL_UNLIKELY + (!__libc_dynarray_emplace_enlarge (&list->u.dynarray_abstract, + DYNARRAY_SCRATCH (list), + sizeof (DYNARRAY_ELEMENT)))) + { + DYNARRAY_NAME (mark_failed) (list); + return; + } + + /* Copy the new element and increase the array length. */ + list->u.dynarray_header.array[list->u.dynarray_header.used++] = item; +} + +/* Add ITEM at the end of the array, enlarging it by one element. + Mark *LIST as failed if the dynamic array allocation size cannot be + increased. */ +_GL_ATTRIBUTE_NONNULL ((1)) +static inline void +DYNARRAY_NAME (add) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item) +{ + /* Do nothing in case of previous error. */ + if (DYNARRAY_NAME (has_failed) (list)) + return; + + /* Enlarge the array if necessary. */ + if (_GL_UNLIKELY (list->u.dynarray_header.used + == list->u.dynarray_header.allocated)) + { + DYNARRAY_NAME (add__) (list, item); + return; + } + + /* Copy the new element and increase the array length. */ + list->u.dynarray_header.array[list->u.dynarray_header.used++] = item; +} + +/* Internal function. Building block for the emplace functions below. + Assumes space for one more element in *LIST. */ +static inline DYNARRAY_ELEMENT * +DYNARRAY_NAME (emplace__tail__) (struct DYNARRAY_STRUCT *list) +{ + DYNARRAY_ELEMENT *result + = &list->u.dynarray_header.array[list->u.dynarray_header.used]; + ++list->u.dynarray_header.used; +#if defined (DYNARRAY_ELEMENT_INIT) + DYNARRAY_ELEMENT_INIT (result); +#elif defined (DYNARRAY_ELEMENT_FREE) + memset (result, 0, sizeof (*result)); +#endif + return result; +} + +/* Internal function. Slow path for the emplace function below. */ +static DYNARRAY_ELEMENT * +DYNARRAY_NAME (emplace__) (struct DYNARRAY_STRUCT *list) +{ + if (_GL_UNLIKELY + (!__libc_dynarray_emplace_enlarge (&list->u.dynarray_abstract, + DYNARRAY_SCRATCH (list), + sizeof (DYNARRAY_ELEMENT)))) + { + DYNARRAY_NAME (mark_failed) (list); + return NULL; + } + return DYNARRAY_NAME (emplace__tail__) (list); +} + +/* Allocate a place for a new element in *LIST and return a pointer to + it. The pointer can be NULL if the dynamic array cannot be + enlarged due to a memory allocation failure. */ +_GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NODISCARD +_GL_ATTRIBUTE_NONNULL ((1)) +static +/* Avoid inlining with the larger initialization code. */ +#if !(defined (DYNARRAY_ELEMENT_INIT) || defined (DYNARRAY_ELEMENT_FREE)) +inline +#endif +DYNARRAY_ELEMENT * +DYNARRAY_NAME (emplace) (struct DYNARRAY_STRUCT *list) +{ + /* Do nothing in case of previous error. */ + if (DYNARRAY_NAME (has_failed) (list)) + return NULL; + + /* Enlarge the array if necessary. */ + if (_GL_UNLIKELY (list->u.dynarray_header.used + == list->u.dynarray_header.allocated)) + return (DYNARRAY_NAME (emplace__) (list)); + return DYNARRAY_NAME (emplace__tail__) (list); +} + +/* Change the size of *LIST to SIZE. If SIZE is larger than the + existing size, new elements are added (which can be initialized). + Otherwise, the list is truncated, and elements are freed. Return + false on memory allocation failure (and mark *LIST as failed). */ +_GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NONNULL ((1)) +static bool +DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) +{ + if (size > list->u.dynarray_header.used) + { + bool ok; +#if defined (DYNARRAY_ELEMENT_INIT) + /* The new elements have to be initialized. */ + size_t old_size = list->u.dynarray_header.used; + ok = __libc_dynarray_resize (&list->u.dynarray_abstract, + size, DYNARRAY_SCRATCH (list), + sizeof (DYNARRAY_ELEMENT)); + if (ok) + for (size_t i = old_size; i < size; ++i) + { + DYNARRAY_ELEMENT_INIT (&list->u.dynarray_header.array[i]); + } +#elif defined (DYNARRAY_ELEMENT_FREE) + /* Zero initialization is needed so that the elements can be + safely freed. */ + ok = __libc_dynarray_resize_clear + (&list->u.dynarray_abstract, size, + DYNARRAY_SCRATCH (list), sizeof (DYNARRAY_ELEMENT)); +#else + ok = __libc_dynarray_resize (&list->u.dynarray_abstract, + size, DYNARRAY_SCRATCH (list), + sizeof (DYNARRAY_ELEMENT)); +#endif + if (_GL_UNLIKELY (!ok)) + DYNARRAY_NAME (mark_failed) (list); + return ok; + } + else + { + /* The list has shrunk in size. Free the removed elements. */ + DYNARRAY_NAME (free__elements__) + (list->u.dynarray_header.array + size, + list->u.dynarray_header.used - size); + list->u.dynarray_header.used = size; + return true; + } +} + +/* Remove the last element of LIST if it is present. */ +_GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NONNULL ((1)) +static void +DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list) +{ + /* used > 0 implies that the array is the non-failed state. */ + if (list->u.dynarray_header.used > 0) + { + size_t new_length = list->u.dynarray_header.used - 1; +#ifdef DYNARRAY_ELEMENT_FREE + DYNARRAY_ELEMENT_FREE (&list->u.dynarray_header.array[new_length]); +#endif + list->u.dynarray_header.used = new_length; + } +} + +/* Remove all elements from the list. The elements are freed, but the + list itself is not. */ +_GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NONNULL ((1)) +static void +DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) +{ + /* free__elements__ does nothing if the list is in the failed + state. */ + DYNARRAY_NAME (free__elements__) + (list->u.dynarray_header.array, list->u.dynarray_header.used); + list->u.dynarray_header.used = 0; +} + +#ifdef DYNARRAY_FINAL_TYPE +/* Transfer the dynamic array to a permanent location at *RESULT. + Returns true on success on false on allocation failure. In either + case, *LIST is re-initialized and can be reused. A NULL pointer is + stored in *RESULT if LIST refers to an empty list. On success, the + pointer in *RESULT is heap-allocated and must be deallocated using + free. */ +_GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NODISCARD +_GL_ATTRIBUTE_NONNULL ((1, 2)) +static bool +DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, + DYNARRAY_FINAL_TYPE *result) +{ + struct dynarray_finalize_result res; + if (__libc_dynarray_finalize (&list->u.dynarray_abstract, + DYNARRAY_SCRATCH (list), + sizeof (DYNARRAY_ELEMENT), &res)) + { + /* On success, the result owns all the data. */ + DYNARRAY_NAME (init) (list); + *result = (DYNARRAY_FINAL_TYPE) { res.array, res.length }; + return true; + } + else + { + /* On error, we need to free all data. */ + DYNARRAY_FREE (list); + errno = ENOMEM; + return false; + } +} +#else /* !DYNARRAY_FINAL_TYPE */ +/* Transfer the dynamic array to a heap-allocated array and return a + pointer to it. The pointer is NULL if memory allocation fails, or + if the array is empty, so this function should be used only for + arrays which are known not be empty (usually because they always + have a sentinel at the end). If LENGTHP is not NULL, the array + length is written to *LENGTHP. *LIST is re-initialized and can be + reused. */ +_GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NODISCARD +_GL_ATTRIBUTE_NONNULL ((1)) +static DYNARRAY_ELEMENT * +DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, size_t *lengthp) +{ + struct dynarray_finalize_result res; + if (__libc_dynarray_finalize (&list->u.dynarray_abstract, + DYNARRAY_SCRATCH (list), + sizeof (DYNARRAY_ELEMENT), &res)) + { + /* On success, the result owns all the data. */ + DYNARRAY_NAME (init) (list); + if (lengthp != NULL) + *lengthp = res.length; + return res.array; + } + else + { + /* On error, we need to free all data. */ + DYNARRAY_FREE (list); + errno = ENOMEM; + return NULL; + } +} +#endif /* !DYNARRAY_FINAL_TYPE */ + +/* Undo macro definitions. */ + +#undef DYNARRAY_CONCAT0 +#undef DYNARRAY_CONCAT1 +#undef DYNARRAY_NAME +#undef DYNARRAY_SCRATCH +#undef DYNARRAY_HAVE_SCRATCH + +#undef DYNARRAY_STRUCT +#undef DYNARRAY_ELEMENT +#undef DYNARRAY_PREFIX +#undef DYNARRAY_ELEMENT_FREE +#undef DYNARRAY_ELEMENT_INIT +#undef DYNARRAY_INITIAL_SIZE +#undef DYNARRAY_FINAL_TYPE diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/malloc/dynarray.gl.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/malloc/dynarray.gl.h new file mode 100644 index 000000000..34987e79e --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/malloc/dynarray.gl.h @@ -0,0 +1,173 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Type-safe arrays which grow dynamically. Shared definitions. + Copyright (C) 2017-2023 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* To use the dynarray facility, you need to include + and define the parameter macros + documented in that file. + + A minimal example which provides a growing list of integers can be + defined like this: + + struct int_array + { + // Pointer to result array followed by its length, + // as required by DYNARRAY_FINAL_TYPE. + int *array; + size_t length; + }; + + #define DYNARRAY_STRUCT dynarray_int + #define DYNARRAY_ELEMENT int + #define DYNARRAY_PREFIX dynarray_int_ + #define DYNARRAY_FINAL_TYPE struct int_array + #include + + To create a three-element array with elements 1, 2, 3, use this + code: + + struct dynarray_int dyn; + dynarray_int_init (&dyn); + for (int i = 1; i <= 3; ++i) + { + int *place = dynarray_int_emplace (&dyn); + assert (place != NULL); + *place = i; + } + struct int_array result; + bool ok = dynarray_int_finalize (&dyn, &result); + assert (ok); + assert (result.length == 3); + assert (result.array[0] == 1); + assert (result.array[1] == 2); + assert (result.array[2] == 3); + free (result.array); + + If the elements contain resources which must be freed, define + DYNARRAY_ELEMENT_FREE appropriately, like this: + + struct str_array + { + char **array; + size_t length; + }; + + #define DYNARRAY_STRUCT dynarray_str + #define DYNARRAY_ELEMENT char * + #define DYNARRAY_ELEMENT_FREE(ptr) free (*ptr) + #define DYNARRAY_PREFIX dynarray_str_ + #define DYNARRAY_FINAL_TYPE struct str_array + #include + + Compared to scratch buffers, dynamic arrays have the following + features: + + - They have an element type, and are not just an untyped buffer of + bytes. + + - When growing, previously stored elements are preserved. (It is + expected that scratch_buffer_grow_preserve and + scratch_buffer_set_array_size eventually go away because all + current users are moved to dynamic arrays.) + + - Scratch buffers have a more aggressive growth policy because + growing them typically means a retry of an operation (across an + NSS service module boundary), which is expensive. + + - For the same reason, scratch buffers have a much larger initial + stack allocation. */ + +#ifndef _DYNARRAY_H +#define _DYNARRAY_H + +#include +#include + +struct dynarray_header +{ + size_t used; + size_t allocated; + void *array; +}; + +/* Marker used in the allocated member to indicate that an error was + encountered. */ +static inline size_t +__dynarray_error_marker (void) +{ + return -1; +} + +/* Internal function. See the has_failed function in + dynarray-skeleton.c. */ +static inline bool +__dynarray_error (struct dynarray_header *list) +{ + return list->allocated == __dynarray_error_marker (); +} + +/* Internal function. Enlarge the dynamically allocated area of the + array to make room for one more element. SCRATCH is a pointer to + the scratch area (which is not heap-allocated and must not be + freed). ELEMENT_SIZE is the size, in bytes, of one element. + Return false on failure, true on success. */ +bool __libc_dynarray_emplace_enlarge (struct dynarray_header *, + void *scratch, size_t element_size); + +/* Internal function. Enlarge the dynamically allocated area of the + array to make room for at least SIZE elements (which must be larger + than the existing used part of the dynamic array). SCRATCH is a + pointer to the scratch area (which is not heap-allocated and must + not be freed). ELEMENT_SIZE is the size, in bytes, of one element. + Return false on failure, true on success. */ +bool __libc_dynarray_resize (struct dynarray_header *, size_t size, + void *scratch, size_t element_size); + +/* Internal function. Like __libc_dynarray_resize, but clear the new + part of the dynamic array. */ +bool __libc_dynarray_resize_clear (struct dynarray_header *, size_t size, + void *scratch, size_t element_size); + +/* Internal type. */ +struct dynarray_finalize_result +{ + void *array; + size_t length; +}; + +/* Internal function. Copy the dynamically-allocated area to an + explicitly-sized heap allocation. SCRATCH is a pointer to the + embedded scratch space. ELEMENT_SIZE is the size, in bytes, of the + element type. On success, true is returned, and pointer and length + are written to *RESULT. On failure, false is returned. The caller + has to take care of some of the memory management; this function is + expected to be called from dynarray-skeleton.c. */ +bool __libc_dynarray_finalize (struct dynarray_header *list, void *scratch, + size_t element_size, + struct dynarray_finalize_result *result); + + +/* Internal function. Terminate the process after an index error. + SIZE is the number of elements of the dynamic array. INDEX is the + lookup index which triggered the failure. */ +_Noreturn void __libc_dynarray_at_failure (size_t size, size_t index); + +#ifndef _ISOMAC +#endif + +#endif /* _DYNARRAY_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stdckdint.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stdckdint.h new file mode 100644 index 000000000..edcda2982 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stdckdint.h @@ -0,0 +1,36 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* stdckdint.h -- checked integer arithmetic + + Copyright 2022-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_STDCKDINT_H +#define _GL_STDCKDINT_H + +#include "intprops-internal.h" + +/* Store into *R the low-order bits of A + B, A - B, A * B, respectively. + Return 1 if the result overflows, 0 otherwise. + A, B, and *R can have any integer type other than char, bool, a + bit-precise integer type, or an enumeration type. + + These are like the standard macros introduced in C23, except that + arguments should not have side effects. */ + +#define ckd_add(r, a, b) ((bool) _GL_INT_ADD_WRAPV (a, b, r)) +#define ckd_sub(r, a, b) ((bool) _GL_INT_SUBTRACT_WRAPV (a, b, r)) +#define ckd_mul(r, a, b) ((bool) _GL_INT_MULTIPLY_WRAPV (a, b, r)) + +#endif /* _GL_STDCKDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stddef.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stddef.h new file mode 100644 index 000000000..18882285d --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stddef.h @@ -0,0 +1,214 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A substitute for POSIX 2008 , for platforms that have issues. + + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake. */ + +/* + * POSIX 2008 and ISO C 23 for platforms that have issues. + * + */ + +#if __GNUC__ >= 3 + +#endif + + +#if defined __need_wchar_t || defined __need_size_t \ + || defined __need_ptrdiff_t || defined __need_NULL \ + || defined __need_wint_t +/* Special invocation convention inside gcc header files. In + particular, gcc provides a version of that blindly + redefines NULL even when __need_wint_t was defined, even though + wint_t is not normally provided by . Hence, we must + remember if special invocation has ever been used to obtain wint_t, + in which case we need to clean up NULL yet again. */ + +# if !(defined _GL_GRGL_STDDEF_H && defined _GL_GRGL_STDDEF_WINT_T) +# ifdef __need_wint_t +# define _GL_GRGL_STDDEF_WINT_T +# endif +# include "../ucrt/stddef.h" + /* On TinyCC, make sure that the macros that indicate the special invocation + convention get undefined. */ +# undef __need_wchar_t +# undef __need_size_t +# undef __need_ptrdiff_t +# undef __need_NULL +# undef __need_wint_t +# endif + +#else +/* Normal invocation convention. */ + +# ifndef _GL_GRGL_STDDEF_H + +/* On AIX 7.2, with xlc in 64-bit mode, defines max_align_t to a + type with alignment 4, but 'long' has alignment 8. */ +# if defined _AIX && defined __LP64__ && !0 +# if !GNULIB_defined_max_align_t +# ifdef _MAX_ALIGN_T +/* /usr/include/stddef.h has already defined max_align_t. Override it. */ +typedef long rpl_max_align_t; +# define max_align_t rpl_max_align_t +# else +/* Prevent /usr/include/stddef.h from defining max_align_t. */ +typedef long max_align_t; +# define _MAX_ALIGN_T +# endif +# define __CLANG_MAX_ALIGN_T_DEFINED +# define GNULIB_defined_max_align_t 1 +# endif +# endif + +/* The include_next requires a split double-inclusion guard. */ + +# include "../ucrt/stddef.h" + +/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ +# if (0 \ + && (!defined _GL_GRGL_STDDEF_H || defined _GL_GRGL_STDDEF_WINT_T)) +# undef NULL +# ifdef __cplusplus + /* ISO C++ says that the macro NULL must expand to an integer constant + expression, hence '((void *) 0)' is not allowed in C++. */ +# if __GNUG__ >= 3 + /* GNU C++ has a __null macro that behaves like an integer ('int' or + 'long') but has the same size as a pointer. Use that, to avoid + warnings. */ +# define NULL __null +# else +# define NULL 0L +# endif +# else +# define NULL ((void *) 0) +# endif +# endif + +# ifndef _GL_GRGL_STDDEF_H +# define _GL_GRGL_STDDEF_H + +/* This file uses _Noreturn, _GL_ATTRIBUTE_NOTHROW. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* Some platforms lack wchar_t. */ +#if !1 +# define wchar_t int +#endif + +/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is + a hack in case the configure-time test was done with g++ even though + we are currently compiling with gcc. + On MSVC, max_align_t is defined only in C++ mode, after was + included. Its definition is good since it has an alignment of 8 (on x86 + and x86_64). + Similarly on OS/2 kLIBC. */ +#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \ + && defined __cplusplus +# include +#else +# if ! (0 || (defined _GCC_MAX_ALIGN_T && !defined __clang__)) +# if !GNULIB_defined_max_align_t +/* On the x86, the maximum storage alignment of double, long, etc. is 4, + but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, + and the C11 standard allows this. Work around this problem by + using __alignof__ (which returns 8 for double) rather than _Alignof + (which returns 4), and align each union member accordingly. */ +# if defined __GNUC__ || (__clang_major__ >= 4) +# define _GL_STDDEF_ALIGNAS(type) \ + __attribute__ ((__aligned__ (__alignof__ (type)))) +# else +# define _GL_STDDEF_ALIGNAS(type) /* */ +# endif +typedef union +{ + char *__p _GL_STDDEF_ALIGNAS (char *); + double __d _GL_STDDEF_ALIGNAS (double); + long double __ld _GL_STDDEF_ALIGNAS (long double); + long int __i _GL_STDDEF_ALIGNAS (long int); +} rpl_max_align_t; +# define max_align_t rpl_max_align_t +# define __CLANG_MAX_ALIGN_T_DEFINED +# define GNULIB_defined_max_align_t 1 +# endif +# endif +#endif + +/* ISO C 23 § 7.21.1 The unreachable macro */ +#ifndef unreachable + +/* Code borrowed from verify.h. */ +# ifndef _GL_HAS_BUILTIN_UNREACHABLE +# if defined __clang_major__ && __clang_major__ < 5 +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__) +# define _GL_HAS_BUILTIN_UNREACHABLE 1 +# elif defined __has_builtin +# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable) +# else +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# endif +# endif + +# if _GL_HAS_BUILTIN_UNREACHABLE +# define unreachable() __builtin_unreachable () +# elif 1200 <= _MSC_VER +# define unreachable() __assume (0) +# else +/* Declare abort(), without including . */ +extern +# if defined __cplusplus +"C" +# endif +_Noreturn +void abort (void) +# if defined __cplusplus && (__GLIBC__ >= 2) +_GL_ATTRIBUTE_NOTHROW +# endif +; +# define unreachable() abort () +# endif + +#endif + +# endif /* _GL_GRGL_STDDEF_H */ +# endif /* _GL_GRGL_STDDEF_H */ +#endif /* __need_XXX */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/libgettextpo/stdint.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stdint.h similarity index 94% rename from gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/libgettextpo/stdint.h rename to gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stdint.h index becb64c1c..4b8405fd4 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/libgettextpo/stdint.h +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stdint.h @@ -1,27 +1,27 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2023 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* * ISO C 99 for platforms that lack it. * */ -#ifndef _GL_GTPO_STDINT_H +#ifndef _GL_GRGL_STDINT_H #if __GNUC__ >= 3 @@ -72,13 +72,13 @@ /* Other systems may have an incomplete or buggy . Include it before , since any "#include " in would reinclude us, skipping our contents because - _GL_GTPO_STDINT_H is defined. + _GL_GRGL_STDINT_H is defined. The include_next requires a split double-inclusion guard. */ # include "../include/stdint.h" #endif -#if ! defined _GL_GTPO_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_GTPO_STDINT_H +#if ! defined _GL_GRGL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H +#define _GL_GRGL_STDINT_H /* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ @@ -303,12 +303,11 @@ typedef gl_uint_fast32_t gl_uint_fast16_t; /* kLIBC's defines _INTPTR_T_DECLARED and needs its own definitions of intptr_t and uintptr_t (which use int and unsigned) to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and + Similarly, MinGW WSL-5.4.1 needs its own intptr_t and uintptr_t to avoid conflicting declarations of system functions like _findclose in . */ # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) + || defined __MINGW32__) # undef intptr_t # undef uintptr_t # ifdef _WIN64 @@ -581,11 +580,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) -> -> -> , and the latter includes and assumes its types are already defined. */ # if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H @@ -594,13 +588,13 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # undef WCHAR_MAX # if # define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) + _STDINT_SIGNED_MIN (16, 0) # else # define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) + _STDINT_UNSIGNED_MIN (16, 0) # endif # define WCHAR_MAX \ - _STDINT_MAX (, , 0) + _STDINT_MAX (, 16, 0) /* wint_t limits */ /* If gnulib's or overrides wint_t, is not @@ -742,6 +736,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # endif #endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ -#endif /* _GL_GTPO_STDINT_H */ +#endif /* _GL_GRGL_STDINT_H */ #endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _GL_GTPO_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ +#endif /* !defined _GL_GRGL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stdlib.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stdlib.h new file mode 100644 index 000000000..1c57e6f27 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/stdlib.h @@ -0,0 +1,2399 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A GNU-like . + + Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc +/* Special invocation conventions inside some gnulib header files, + and inside some glibc header files, respectively. */ + +#include "../ucrt/stdlib.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_GRGL_STDLIB_H + +/* The include_next requires a split double-inclusion guard. */ +#include "../ucrt/stdlib.h" + +#ifndef _GL_GRGL_STDLIB_H +#define _GL_GRGL_STDLIB_H + +/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* NetBSD 5.0 mis-defines NULL. */ +#include + +/* MirBSD 10 defines WEXITSTATUS in , not in . */ +#if 0 && !defined WEXITSTATUS +# include +#endif + +/* Solaris declares getloadavg() in . */ +#if (0 || defined GNULIB_POSIXCHECK) && 0 +/* OpenIndiana has a bug: must be included before + . */ +# include +# include +#endif + +/* Native Windows platforms declare _mktemp() in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include +#endif + +#if 0 + +/* OSF/1 5.1 declares 'struct random_data' in , which is included + from if _REENTRANT is defined. Include it whenever we need + 'struct random_data'. */ +# if 1 +# include +# endif + +# include + +# if !1 +/* Define 'struct random_data'. + But allow multiple gnulib generated replacements to coexist. */ +# if !GNULIB_defined_struct_random_data +struct random_data +{ + int32_t *fptr; /* Front pointer. */ + int32_t *rptr; /* Rear pointer. */ + int32_t *state; /* Array of state values. */ + int rand_type; /* Type of random number generator. */ + int rand_deg; /* Degree of random number generator. */ + int rand_sep; /* Distance between front and rear. */ + int32_t *end_ptr; /* Pointer behind state table. */ +}; +# define GNULIB_defined_struct_random_data 1 +# endif +# endif +#endif + +#if (0 || 0 || 0 || 0 || 0 || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__) +/* On Mac OS X 10.3, only declares mkstemp. */ +/* On Mac OS X 10.5, only declares mkstemps. */ +/* On Mac OS X 10.13, only declares mkostemp and mkostemps. */ +/* On Cygwin 1.7.1, only declares getsubopt. */ +/* But avoid namespace pollution on glibc systems and native Windows. */ +# include +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + +/* The definition of _Noreturn is copied here. */ +/* A C macro for declaring that a function does not return. + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _Noreturn +# if (defined __cplusplus \ + && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ + || (defined _MSC_VER && 1900 <= _MSC_VER)) \ + && 0) + /* [[noreturn]] is not practically usable, because with it the syntax + extern _Noreturn void func (...); + would not be valid; such a declaration would only be valid with 'extern' + and '_Noreturn' swapped, or without the 'extern' keyword. However, some + AIX system header files and several gnulib header files use precisely + this syntax with 'extern'. */ +# define _Noreturn [[noreturn]] +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) + /* _Noreturn works as-is. */ +# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ +#ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +#endif +/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere + with proper operation of xargs. */ +#ifndef EXIT_FAILURE +# define EXIT_FAILURE 1 +#elif EXIT_FAILURE != 1 +# undef EXIT_FAILURE +# define EXIT_FAILURE 1 +#endif + + +#if 0 +/* Terminate the current process with the given return code, without running + the 'atexit' handlers. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef _Exit +# define _Exit rpl__Exit +# endif +_GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status)); +_GL_CXXALIAS_RPL (_Exit, void, (int status)); +# else +# if !1 +_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); +# endif +_GL_CXXALIAS_SYS (_Exit, void, (int status)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (_Exit); +# endif +#elif defined GNULIB_POSIXCHECK +# undef _Exit +# if HAVE_RAW_DECL__EXIT +_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " + "use gnulib module _Exit for portability"); +# endif +#endif + + +#if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef free +# define free rpl_free +# endif +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_FUNCDECL_RPL (free, void, (void *ptr) _GL_ATTRIBUTE_NOTHROW); +# else +_GL_FUNCDECL_RPL (free, void, (void *ptr)); +# endif +_GL_CXXALIAS_RPL (free, void, (void *ptr)); +# else +_GL_CXXALIAS_SYS (free, void, (void *ptr)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (free); +# endif +#elif defined GNULIB_POSIXCHECK +# undef free +/* Assume free is always declared. */ +_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - " + "use gnulib module free for portability"); +#endif + + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef aligned_alloc +# define aligned_alloc rpl_aligned_alloc +# endif +_GL_FUNCDECL_RPL (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); +# else +# if 1 +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size)); +# endif +# endif +# if (__GLIBC__ >= 2) && 1 +_GL_CXXALIASWARN (aligned_alloc); +# endif +#else +# if 0 && __GNUC__ >= 11 && !defined aligned_alloc +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef aligned_alloc +# if HAVE_RAW_DECL_ALIGNED_ALLOC +_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " + "use gnulib module aligned_alloc for portability"); +# endif +# endif +#endif + +#if 0 +/* Parse a signed decimal integer. + Returns the value of the integer. Errors are not detected. */ +# if !1 +_GL_FUNCDECL_SYS (atoll, long long, (const char *string) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (atoll, long long, (const char *string)); +_GL_CXXALIASWARN (atoll); +#elif defined GNULIB_POSIXCHECK +# undef atoll +# if HAVE_RAW_DECL_ATOLL +_GL_WARN_ON_USE (atoll, "atoll is unportable - " + "use gnulib module atoll for portability"); +# endif +#endif + +#if 0 +# if (0 && 1) \ + || (0 && 1) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef calloc +# define calloc rpl_calloc +# endif +_GL_FUNCDECL_RPL (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); +# else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (calloc); +# endif +#else +# if 0 && __GNUC__ >= 11 && !defined calloc +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef calloc +/* Assume calloc is always declared. */ +_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " + "use gnulib module calloc-posix for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define canonicalize_file_name rpl_canonicalize_file_name +# endif +_GL_FUNCDECL_RPL (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); +# else +# if !0 || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); +# endif +# ifndef GNULIB_defined_canonicalize_file_name +# define GNULIB_defined_canonicalize_file_name \ + (!0 || 0) +# endif +_GL_CXXALIASWARN (canonicalize_file_name); +#else +# if 0 && __GNUC__ >= 11 && !defined canonicalize_file_name +/* For -Wmismatched-dealloc: Associate canonicalize_file_name with free or + rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef canonicalize_file_name +# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME +_GL_WARN_ON_USE (canonicalize_file_name, + "canonicalize_file_name is unportable - " + "use gnulib module canonicalize-lgpl for portability"); +# endif +# endif +#endif + +#if 1 +/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ecvt +# define ecvt _ecvt +# endif +_GL_CXXALIAS_MDA (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (ecvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcvt +# define fcvt _fcvt +# endif +_GL_CXXALIAS_MDA (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gcvt +# define gcvt _gcvt +# endif +_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf)); +# else +# if 1 +_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (gcvt); +# endif +#endif + +#if 0 +/* Store max(NELEM,3) load average numbers in LOADAVG[]. + The three numbers are the load average of the last 1 minute, the last 5 + minutes, and the last 15 minutes, respectively. + LOADAVG is an array of NELEM numbers. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getloadavg +# define getloadavg rpl_getloadavg +# endif +_GL_FUNCDECL_RPL (getloadavg, int, (double loadavg[], int nelem) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getloadavg, int, (double loadavg[], int nelem)); +# else +# if !1 +_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getloadavg); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getloadavg +# if HAVE_RAW_DECL_GETLOADAVG +_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " + "use gnulib module getloadavg for portability"); +# endif +#endif + +#if 0 +/* Return the base name of the executing program. + On native Windows this will usually end in ".exe" or ".EXE". */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getprogname +# define getprogname rpl_getprogname +# endif +# if 0 +_GL_FUNCDECL_RPL (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_RPL (getprogname, const char *, (void)); +# endif +_GL_CXXALIAS_RPL (getprogname, const char *, (void)); +# else +# if !0 +# if 0 +_GL_FUNCDECL_SYS (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_SYS (getprogname, const char *, (void)); +# endif +# endif +_GL_CXXALIAS_SYS (getprogname, const char *, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getprogname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getprogname +# if HAVE_RAW_DECL_GETPROGNAME +_GL_WARN_ON_USE (getprogname, "getprogname is unportable - " + "use gnulib module getprogname for portability"); +# endif +#endif + +#if 0 +/* Assuming *OPTIONP is a comma separated list of elements of the form + "token" or "token=value", getsubopt parses the first of these elements. + If the first element refers to a "token" that is member of the given + NULL-terminated array of tokens: + - It replaces the comma with a NUL byte, updates *OPTIONP to point past + the first option and the comma, sets *VALUEP to the value of the + element (or NULL if it doesn't contain an "=" sign), + - It returns the index of the "token" in the given array of tokens. + Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. + For more details see the POSIX specification. + https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getsubopt +# define getsubopt rpl_getsubopt +# endif +_GL_FUNCDECL_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep)); +# else +# if !1 +_GL_FUNCDECL_SYS (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep) + _GL_ARG_NONNULL ((1, 2, 3))); +# endif +_GL_CXXALIAS_SYS (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getsubopt); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getsubopt +# if HAVE_RAW_DECL_GETSUBOPT +_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " + "use gnulib module getsubopt for portability"); +# endif +#endif + +#if 0 +/* Change the ownership and access permission of the slave side of the + pseudo-terminal whose master side is specified by FD. */ +# if !1 +_GL_FUNCDECL_SYS (grantpt, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (grantpt, int, (int fd)); +_GL_CXXALIASWARN (grantpt); +#elif defined GNULIB_POSIXCHECK +# undef grantpt +# if HAVE_RAW_DECL_GRANTPT +_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " + "use gnulib module grantpt for portability"); +# endif +#endif + +/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not + rely on GNU or POSIX semantics for malloc and realloc (for example, + by never specifying a zero size), so it does not need malloc or + realloc to be redefined. */ +#if 0 +# if (0 && 1) \ + || (0 && 1) +# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ + || _GL_USE_STDLIB_ALLOC) +# undef malloc +# define malloc rpl_malloc +# endif +_GL_FUNCDECL_RPL (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (malloc, void *, (size_t size)); +# else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (malloc, void *, (size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (malloc); +# endif +#else +# if 0 && __GNUC__ >= 11 && !defined malloc +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef malloc +/* Assume malloc is always declared. */ +_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " + "use gnulib module malloc-posix for portability"); +# endif +#endif + +/* Return maximum number of bytes of a multibyte character. */ +#if 0 +# if !GNULIB_defined_MB_CUR_MAX +static inline +int gl_MB_CUR_MAX (void) +{ + /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ + return MB_CUR_MAX + (MB_CUR_MAX == 3); +} +# undef MB_CUR_MAX +# define MB_CUR_MAX gl_MB_CUR_MAX () +# define GNULIB_defined_MB_CUR_MAX 1 +# endif +#endif + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbstowcs +# define mbstowcs rpl_mbstowcs +# endif +_GL_FUNCDECL_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# else +_GL_CXXALIAS_SYS (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbstowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbstowcs +# if HAVE_RAW_DECL_MBSTOWCS +_GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - " + "use gnulib module mbstowcs for portability"); +# endif +#endif + +/* Convert a multibyte character to a wide character. */ +#if IN_GETTEXT_TOOLS_LIBGREP +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbtowc +# define mbtowc rpl_mbtowc +# endif +_GL_FUNCDECL_RPL (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +_GL_CXXALIAS_RPL (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +# endif +_GL_CXXALIAS_SYS (mbtowc, int, + (wchar_t *restrict pwc, const char *restrict s, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbtowc); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbtowc +# if HAVE_RAW_DECL_MBTOWC +_GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - " + "use gnulib module mbtowc for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary directory from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the directory name unique. + Returns TEMPLATE, or a null pointer if it cannot get a unique name. + The directory is created mode 700. */ +# if !0 +_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); +_GL_CXXALIASWARN (mkdtemp); +#elif defined GNULIB_POSIXCHECK +# undef mkdtemp +# if HAVE_RAW_DECL_MKDTEMP +_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " + "use gnulib module mkdtemp for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + The file is then created, with the specified flags, ensuring it didn't exist + before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemp +# define mkostemp rpl_mkostemp +# endif +_GL_FUNCDECL_RPL (mkostemp, int, (char * /*template*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemp, int, (char * /*template*/, int /*flags*/)); +# else +# if !1 +_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mkostemp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mkostemp +# if HAVE_RAW_DECL_MKOSTEMP +_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " + "use gnulib module mkostemp for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE before a suffix of length + SUFFIXLEN must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + The file is then created, with the specified flags, ensuring it didn't exist + before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemps +# define mkostemps rpl_mkostemps +# endif +_GL_FUNCDECL_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# else +# if !1 +_GL_FUNCDECL_SYS (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mkostemps); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mkostemps +# if HAVE_RAW_DECL_MKOSTEMPS +_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " + "use gnulib module mkostemps for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The file is then created, ensuring it didn't exist before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mkstemp rpl_mkstemp +# endif +_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); +# else +# if ! 1 +_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); +# endif +_GL_CXXALIASWARN (mkstemp); +#elif defined GNULIB_POSIXCHECK +# undef mkstemp +# if HAVE_RAW_DECL_MKSTEMP +_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " + "use gnulib module mkstemp for portability"); +# endif +#endif + +#if 0 +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE prior to a suffix of length + SUFFIXLEN must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The file is then created, ensuring it didn't exist before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if !1 +_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); +_GL_CXXALIASWARN (mkstemps); +#elif defined GNULIB_POSIXCHECK +# undef mkstemps +# if HAVE_RAW_DECL_MKSTEMPS +_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " + "use gnulib module mkstemps for portability"); +# endif +#endif + +#if 1 +/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::mktemp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mktemp +# define mktemp _mktemp +# endif +_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/)); +# else +_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/)); +# endif +_GL_CXXALIASWARN (mktemp); +#endif + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_memalign +# define posix_memalign rpl_posix_memalign +# endif +_GL_FUNCDECL_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# else +# if 1 +_GL_CXXALIAS_SYS (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# endif +# endif +# if __GLIBC__ >= 2 && 1 +_GL_CXXALIASWARN (posix_memalign); +# endif +#elif defined GNULIB_POSIXCHECK +# undef posix_memalign +# if HAVE_RAW_DECL_POSIX_MEMALIGN +_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " + "use gnulib module posix_memalign for portability"); +# endif +#endif + +#if 0 +/* Return an FD open to the master side of a pseudo-terminal. Flags should + include O_RDWR, and may also include O_NOCTTY. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_openpt +# define posix_openpt rpl_posix_openpt +# endif +_GL_FUNCDECL_RPL (posix_openpt, int, (int flags)); +_GL_CXXALIAS_RPL (posix_openpt, int, (int flags)); +# else +# if !1 +_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); +# endif +_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (posix_openpt); +# endif +#elif defined GNULIB_POSIXCHECK +# undef posix_openpt +# if HAVE_RAW_DECL_POSIX_OPENPT +_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " + "use gnulib module posix_openpt for portability"); +# endif +#endif + +#if 0 +/* Return the pathname of the pseudo-terminal slave associated with + the master FD is open on, or NULL on errors. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ptsname +# define ptsname rpl_ptsname +# endif +_GL_FUNCDECL_RPL (ptsname, char *, (int fd)); +_GL_CXXALIAS_RPL (ptsname, char *, (int fd)); +# else +# if !1 +_GL_FUNCDECL_SYS (ptsname, char *, (int fd)); +# endif +_GL_CXXALIAS_SYS (ptsname, char *, (int fd)); +# endif +_GL_CXXALIASWARN (ptsname); +#elif defined GNULIB_POSIXCHECK +# undef ptsname +# if HAVE_RAW_DECL_PTSNAME +_GL_WARN_ON_USE (ptsname, "ptsname is not portable - " + "use gnulib module ptsname for portability"); +# endif +#endif + +#if 0 +/* Set the pathname of the pseudo-terminal slave associated with + the master FD is open on and return 0, or set errno and return + non-zero on errors. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ptsname_r +# define ptsname_r rpl_ptsname_r +# endif +_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +# ifndef GNULIB_defined_ptsname_r +# define GNULIB_defined_ptsname_r (!1 || 0) +# endif +_GL_CXXALIASWARN (ptsname_r); +#elif defined GNULIB_POSIXCHECK +# undef ptsname_r +# if HAVE_RAW_DECL_PTSNAME_R +_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " + "use gnulib module ptsname_r for portability"); +# endif +#endif + +#if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv rpl_putenv +# endif +_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (putenv, int, (char *string)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +_GL_CXXALIAS_MDA (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); +# else +_GL_CXXALIAS_SYS (putenv, int, (char *string)); +# endif +_GL_CXXALIASWARN (putenv); +#elif 1 +/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putenv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +/* Need to cast, because on mingw, the parameter is either + 'const char *string' or 'char *string'. */ +_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); +# else +_GL_CXXALIAS_SYS (putenv, int, (char *string)); +# endif +_GL_CXXALIASWARN (putenv); +#endif + +#if 0 +/* Sort an array of NMEMB elements, starting at address BASE, each element + occupying SIZE bytes, in ascending order according to the comparison + function COMPARE. */ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_qsort_r_fn_types +typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *); +# define GNULIB_defined_qsort_r_fn_types 1 +# endif +# ifdef __cplusplus +} +# endif +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef qsort_r +# define qsort_r rpl_qsort_r +# endif +_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg) _GL_ARG_NONNULL ((1, 4))); +_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg)); +# else +# if !1 +_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg) _GL_ARG_NONNULL ((1, 4))); +# endif +_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, + _gl_qsort_r_compar_fn compare, + void *arg)); +# endif +_GL_CXXALIASWARN (qsort_r); +#elif defined GNULIB_POSIXCHECK +# undef qsort_r +# if HAVE_RAW_DECL_QSORT_R +_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " + "use gnulib module qsort_r for portability"); +# endif +#endif + + +#if 0 +# if !1 +# ifndef RAND_MAX +# define RAND_MAX 2147483647 +# endif +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef random +# define random rpl_random +# endif +_GL_FUNCDECL_RPL (random, long, (void)); +_GL_CXXALIAS_RPL (random, long, (void)); +# else +# if !1 +_GL_FUNCDECL_SYS (random, long, (void)); +# endif +/* Need to cast, because on Haiku, the return type is + int. */ +_GL_CXXALIAS_SYS_CAST (random, long, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (random); +# endif +#elif defined GNULIB_POSIXCHECK +# undef random +# if HAVE_RAW_DECL_RANDOM +_GL_WARN_ON_USE (random, "random is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef srandom +# define srandom rpl_srandom +# endif +_GL_FUNCDECL_RPL (srandom, void, (unsigned int seed)); +_GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); +# else +# if !1 +_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); +# endif +/* Need to cast, because on FreeBSD, the first parameter is + unsigned long seed. */ +_GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (srandom); +# endif +#elif defined GNULIB_POSIXCHECK +# undef srandom +# if HAVE_RAW_DECL_SRANDOM +_GL_WARN_ON_USE (srandom, "srandom is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef initstate +# define initstate rpl_initstate +# endif +_GL_FUNCDECL_RPL (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size)); +# else +# if !1 || !1 +_GL_FUNCDECL_SYS (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size) + _GL_ARG_NONNULL ((2))); +# endif +/* Need to cast, because on FreeBSD, the first parameter is + unsigned long seed. */ +_GL_CXXALIAS_SYS_CAST (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (initstate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef initstate +# if HAVE_RAW_DECL_INITSTATE +_GL_WARN_ON_USE (initstate, "initstate is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setstate +# define setstate rpl_setstate +# endif +_GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (setstate, char *, (char *arg_state)); +# else +# if !1 || !1 +_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Mac OS X 10.13, HP-UX, Solaris the first parameter + is const char *arg_state. */ +_GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (setstate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef setstate +# if HAVE_RAW_DECL_SETSTATE +_GL_WARN_ON_USE (setstate, "setstate is unportable - " + "use gnulib module random for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef random_r +# define random_r rpl_random_r +# endif +_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result)); +# else +# if !1 +_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); +# endif +_GL_CXXALIASWARN (random_r); +#elif defined GNULIB_POSIXCHECK +# undef random_r +# if HAVE_RAW_DECL_RANDOM_R +_GL_WARN_ON_USE (random_r, "random_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef srandom_r +# define srandom_r rpl_srandom_r +# endif +_GL_FUNCDECL_RPL (srandom_r, int, + (unsigned int seed, struct random_data *rand_state) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (srandom_r, int, + (unsigned int seed, struct random_data *rand_state)); +# else +# if !1 +_GL_FUNCDECL_SYS (srandom_r, int, + (unsigned int seed, struct random_data *rand_state) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (srandom_r, int, + (unsigned int seed, struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (srandom_r); +#elif defined GNULIB_POSIXCHECK +# undef srandom_r +# if HAVE_RAW_DECL_SRANDOM_R +_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef initstate_r +# define initstate_r rpl_initstate_r +# endif +_GL_FUNCDECL_RPL (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state) + _GL_ARG_NONNULL ((2, 4))); +_GL_CXXALIAS_RPL (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state)); +# else +# if !1 +_GL_FUNCDECL_SYS (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state) + _GL_ARG_NONNULL ((2, 4))); +# endif +/* Need to cast, because on Haiku, the third parameter is + unsigned long buf_size. */ +_GL_CXXALIAS_SYS_CAST (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (initstate_r); +#elif defined GNULIB_POSIXCHECK +# undef initstate_r +# if HAVE_RAW_DECL_INITSTATE_R +_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setstate_r +# define setstate_r rpl_setstate_r +# endif +_GL_FUNCDECL_RPL (setstate_r, int, + (char *arg_state, struct random_data *rand_state) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (setstate_r, int, + (char *arg_state, struct random_data *rand_state)); +# else +# if !1 +_GL_FUNCDECL_SYS (setstate_r, int, + (char *arg_state, struct random_data *rand_state) + _GL_ARG_NONNULL ((1, 2))); +# endif +/* Need to cast, because on Haiku, the first parameter is + void *arg_state. */ +_GL_CXXALIAS_SYS_CAST (setstate_r, int, + (char *arg_state, struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (setstate_r); +#elif defined GNULIB_POSIXCHECK +# undef setstate_r +# if HAVE_RAW_DECL_SETSTATE_R +_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + + +#if 0 +# if (0 && 1) \ + || (0 && 0) +# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ + || _GL_USE_STDLIB_ALLOC) +# undef realloc +# define realloc rpl_realloc +# endif +_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); +# else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (realloc); +# endif +#else +# if 0 && __GNUC__ >= 11 && !defined realloc +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef realloc +/* Assume realloc is always declared. */ +_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " + "use gnulib module realloc-posix for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef reallocarray +# define reallocarray rpl_reallocarray +# endif +_GL_FUNCDECL_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +_GL_CXXALIAS_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# else +# if ! 0 +_GL_FUNCDECL_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# endif +_GL_CXXALIAS_SYS (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (reallocarray); +# endif +#elif defined GNULIB_POSIXCHECK +# undef reallocarray +# if HAVE_RAW_DECL_REALLOCARRAY +_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " + "use gnulib module reallocarray for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define realpath rpl_realpath +# endif +_GL_FUNCDECL_RPL (realpath, char *, + (const char *restrict name, char *restrict resolved) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (realpath, char *, + (const char *restrict name, char *restrict resolved)); +# else +# if !0 +_GL_FUNCDECL_SYS (realpath, char *, + (const char *restrict name, char *restrict resolved) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (realpath, char *, + (const char *restrict name, char *restrict resolved)); +# endif +_GL_CXXALIASWARN (realpath); +#elif defined GNULIB_POSIXCHECK +# undef realpath +# if HAVE_RAW_DECL_REALPATH +_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " + "canonicalize or canonicalize-lgpl for portability"); +# endif +#endif + +#if 0 +/* Test a user response to a question. + Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ +# if !1 +_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); +_GL_CXXALIASWARN (rpmatch); +#elif defined GNULIB_POSIXCHECK +# undef rpmatch +# if HAVE_RAW_DECL_RPMATCH +_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " + "use gnulib module rpmatch for portability"); +# endif +#endif + +#if 0 +/* Look up NAME in the environment, returning 0 in insecure situations. */ +# if !0 +_GL_FUNCDECL_SYS (secure_getenv, char *, + (char const *name) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); +_GL_CXXALIASWARN (secure_getenv); +#elif defined GNULIB_POSIXCHECK +# undef secure_getenv +# if HAVE_RAW_DECL_SECURE_GETENV +_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " + "use gnulib module secure_getenv for portability"); +# endif +#endif + +#if 0 +/* Set NAME to VALUE in the environment. + If REPLACE is nonzero, overwrite an existing value. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setenv +# define setenv rpl_setenv +# endif +_GL_FUNCDECL_RPL (setenv, int, + (const char *name, const char *value, int replace) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (setenv, int, + (const char *name, const char *value, int replace)); +# else +# if !0 +_GL_FUNCDECL_SYS (setenv, int, + (const char *name, const char *value, int replace) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (setenv, int, + (const char *name, const char *value, int replace)); +# endif +# if !(0 && !0) +_GL_CXXALIASWARN (setenv); +# endif +#elif defined GNULIB_POSIXCHECK +# undef setenv +# if HAVE_RAW_DECL_SETENV +_GL_WARN_ON_USE (setenv, "setenv is unportable - " + "use gnulib module setenv for portability"); +# endif +#endif + +#if 0 + /* Parse a double from STRING, updating ENDP if appropriate. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtod rpl_strtod +# endif +# define GNULIB_defined_strtod_function 1 +_GL_FUNCDECL_RPL (strtod, double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtod, double, + (const char *restrict str, char **restrict endp)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtod, double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtod, double, + (const char *restrict str, char **restrict endp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtod); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtod +# if HAVE_RAW_DECL_STRTOD +_GL_WARN_ON_USE (strtod, "strtod is unportable - " + "use gnulib module strtod for portability"); +# endif +#endif + +#if 0 + /* Parse a 'long double' from STRING, updating ENDP if appropriate. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtold rpl_strtold +# endif +# define GNULIB_defined_strtold_function 1 +_GL_FUNCDECL_RPL (strtold, long double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtold, long double, + (const char *restrict str, char **restrict endp)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtold, long double, + (const char *restrict str, char **restrict endp) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtold, long double, + (const char *restrict str, char **restrict endp)); +# endif +_GL_CXXALIASWARN (strtold); +#elif defined GNULIB_POSIXCHECK +# undef strtold +# if HAVE_RAW_DECL_STRTOLD +_GL_WARN_ON_USE (strtold, "strtold is unportable - " + "use gnulib module strtold for portability"); +# endif +#endif + +#if 0 +/* Parse a signed integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is set + to ERANGE. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtol rpl_strtol +# endif +# define GNULIB_defined_strtol_function 1 +_GL_FUNCDECL_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtol); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtol +# if HAVE_RAW_DECL_STRTOL +_GL_WARN_ON_USE (strtol, "strtol is unportable - " + "use gnulib module strtol for portability"); +# endif +#endif + +#if 0 +/* Parse a signed integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set + to ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoll rpl_strtoll +# endif +# define GNULIB_defined_strtoll_function 1 +_GL_FUNCDECL_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +_GL_CXXALIASWARN (strtoll); +#elif defined GNULIB_POSIXCHECK +# undef strtoll +# if HAVE_RAW_DECL_STRTOLL +_GL_WARN_ON_USE (strtoll, "strtoll is unportable - " + "use gnulib module strtoll for portability"); +# endif +#endif + +#if 0 +/* Parse an unsigned integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is ULONG_MAX, and errno is set to ERANGE. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoul rpl_strtoul +# endif +# define GNULIB_defined_strtoul_function 1 +_GL_FUNCDECL_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtoul); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtoul +# if HAVE_RAW_DECL_STRTOUL +_GL_WARN_ON_USE (strtoul, "strtoul is unportable - " + "use gnulib module strtoul for portability"); +# endif +#endif + +#if 0 +/* Parse an unsigned integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is ULLONG_MAX, and errno is set to + ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoull rpl_strtoull +# endif +# define GNULIB_defined_strtoull_function 1 +_GL_FUNCDECL_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +_GL_CXXALIASWARN (strtoull); +#elif defined GNULIB_POSIXCHECK +# undef strtoull +# if HAVE_RAW_DECL_STRTOULL +_GL_WARN_ON_USE (strtoull, "strtoull is unportable - " + "use gnulib module strtoull for portability"); +# endif +#endif + +#if 0 +/* Unlock the slave side of the pseudo-terminal whose master side is specified + by FD, so that it can be opened. */ +# if !1 +_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); +_GL_CXXALIASWARN (unlockpt); +#elif defined GNULIB_POSIXCHECK +# undef unlockpt +# if HAVE_RAW_DECL_UNLOCKPT +_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " + "use gnulib module unlockpt for portability"); +# endif +#endif + +#if 0 +/* Remove the variable NAME from the environment. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unsetenv +# define unsetenv rpl_unsetenv +# endif +_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); +# else +# if !0 +_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); +# endif +# if !(0 && !0) +_GL_CXXALIASWARN (unsetenv); +# endif +#elif defined GNULIB_POSIXCHECK +# undef unsetenv +# if HAVE_RAW_DECL_UNSETENV +_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " + "use gnulib module unsetenv for portability"); +# endif +#endif + +/* Convert a wide character to a multibyte character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctomb +# define wctomb rpl_wctomb +# endif +_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); +_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); +# else +_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wctomb); +# endif +#endif + + +#endif /* _GL_GRGL_STDLIB_H */ +#endif /* _GL_GRGL_STDLIB_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/sys/types.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/sys/types.h new file mode 100644 index 000000000..389987966 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/sys/types.h @@ -0,0 +1,114 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Provide a more complete sys/types.h. + + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 + +#endif + + +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +#if defined _WIN32 && !defined __CYGWIN__ \ + && (defined __need_off_t || defined __need___off64_t \ + || defined __need_ssize_t || defined __need_time_t) + +/* Special invocation convention inside mingw header files. */ + +#include "../ucrt/sys/types.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_GRGL_SYS_TYPES_H + +/* The include_next requires a split double-inclusion guard. */ +# define _GL_INCLUDING_SYS_TYPES_H +#include "../ucrt/sys/types.h" +# undef _GL_INCLUDING_SYS_TYPES_H + +#ifndef _GL_GRGL_SYS_TYPES_H +#define _GL_GRGL_SYS_TYPES_H + +/* Override off_t if Large File Support is requested on native Windows. */ +#if 1 +/* Same as int64_t in . */ +# if defined _MSC_VER +# define off_t __int64 +# else +# define off_t long long int +# endif +/* Indicator, for gnulib internal purposes. */ +# define _GL_WINDOWS_64_BIT_OFF_T 1 +#endif + +/* Override dev_t and ino_t if distinguishable inodes support is requested + on native Windows. */ +#if 0 + +# if 0 == 2 +/* Experimental, not useful in Windows 10. */ + +/* Define dev_t to a 64-bit type. */ +# if !defined GNULIB_defined_dev_t +typedef unsigned long long int rpl_dev_t; +# undef dev_t +# define dev_t rpl_dev_t +# define GNULIB_defined_dev_t 1 +# endif + +/* Define ino_t to a 128-bit type. */ +# if !defined GNULIB_defined_ino_t +/* MSVC does not have a 128-bit integer type. + GCC has a 128-bit integer type __int128, but only on 64-bit targets. */ +typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t; +# undef ino_t +# define ino_t rpl_ino_t +# define GNULIB_defined_ino_t 1 +# endif + +# else /* 0 == 1 */ + +/* Define ino_t to a 64-bit type. */ +# if !defined GNULIB_defined_ino_t +typedef unsigned long long int rpl_ino_t; +# undef ino_t +# define ino_t rpl_ino_t +# define GNULIB_defined_ino_t 1 +# endif + +# endif + +/* Indicator, for gnulib internal purposes. */ +# define _GL_WINDOWS_STAT_INODES 0 + +#endif + +/* MSVC 9 defines size_t in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (defined _WIN32 && ! defined __CYGWIN__) && ! defined __GLIBC__ +# include +#endif + +#endif /* _GL_GRGL_SYS_TYPES_H */ +#endif /* _GL_GRGL_SYS_TYPES_H */ +#endif /* __need_XXX */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/unistd.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/unistd.h new file mode 100644 index 000000000..b91769dc1 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/unistd.h @@ -0,0 +1,2936 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Substitute for and wrapper around . + Copyright (C) 2003-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_GRGL_UNISTD_H + +#if __GNUC__ >= 3 + +#endif + + +#if 0 && defined _GL_INCLUDING_UNISTD_H +/* Special invocation convention: + - On Mac OS X 10.3.9 we have a sequence of nested includes + -> -> -> + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. */ + +#include + +#else +/* Normal invocation convention. */ + +/* The include_next requires a split double-inclusion guard. */ +#if 0 +# define _GL_INCLUDING_UNISTD_H +# include +# undef _GL_INCLUDING_UNISTD_H +#endif + +/* Avoid lseek bugs in FreeBSD, macOS . + This bug is fixed after FreeBSD 13; see . + Use macOS "9999" to stand for a future fixed macOS version. */ +#if defined __FreeBSD__ && __FreeBSD__ < 14 +# undef SEEK_DATA +# undef SEEK_HOLE +#elif defined __APPLE__ && defined __MACH__ && defined SEEK_DATA +# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ +# include +# endif +# if (!defined MAC_OS_X_VERSION_MIN_REQUIRED \ + || MAC_OS_X_VERSION_MIN_REQUIRED < 99990000) +# include /* It also defines the two macros. */ +# undef SEEK_DATA +# undef SEEK_HOLE +# endif +#endif + +/* Get all possible declarations of gethostname(). */ +#if 0 && 1 \ + && !defined _GL_INCLUDING_WINSOCK2_H +# define _GL_INCLUDING_WINSOCK2_H +# include +# undef _GL_INCLUDING_WINSOCK2_H +#endif + +#if !defined _GL_GRGL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H +#define _GL_GRGL_UNISTD_H + +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* NetBSD 5.0 mis-defines NULL. Also get size_t. */ +/* But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif + +/* mingw doesn't define the SEEK_* or *_FILENO macros in . */ +/* MSVC declares 'unlink' in , not in . We must include + it before we #define unlink rpl_unlink. */ +/* Cygwin 1.7.1 declares symlinkat in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ + || ((0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__)) \ + || ((0 || defined GNULIB_POSIXCHECK) \ + && defined __CYGWIN__)) \ + && ! defined __GLIBC__ +# include +#endif + +/* Cygwin 1.7.1 and Android 4.3 declare unlinkat in , not in + . */ +/* But avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && (defined __CYGWIN__ || defined __ANDROID__) \ + && ! defined __GLIBC__ +# include +#endif + +/* mingw fails to declare _exit in . */ +/* mingw, MSVC, BeOS, Haiku declare environ in , not in + . */ +/* Solaris declares getcwd not only in but also in . */ +/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system is + included here. */ +/* But avoid namespace pollution on glibc systems. */ +#if !defined __GLIBC__ && !defined __osf__ +# define __need_system_stdlib_h +# include +# undef __need_system_stdlib_h +#endif + +/* Native Windows platforms declare _chdir, _getcwd, _rmdir in + and/or , not in . + They also declare _access(), _chmod(), _close(), _dup(), _dup2(), _isatty(), + _lseek(), _read(), _unlink(), _write() in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include +# include +#endif + +/* Native Windows platforms declare _execl*, _execv* in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include +#endif + +/* AIX and OSF/1 5.1 declare getdomainname in , not in . + NonStop Kernel declares gethostname in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if ((0 && (defined _AIX || defined __osf__)) \ + || (0 && defined __TANDEM)) \ + && !defined __GLIBC__ +# include +#endif + +/* Mac OS X 10.13, Solaris 11.4, and Android 9.0 declare getentropy in + , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && ((defined __APPLE__ && defined __MACH__) || defined __sun \ + || defined __ANDROID__) \ + && 0 \ + && !defined __GLIBC__ +# include +#endif + +/* Android 4.3 declares fchownat in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ + && !defined __GLIBC__ +# include +#endif + +/* MSVC defines off_t in . + May also define off_t to a 64-bit type on native Windows. */ +/* Get off_t, ssize_t, mode_t. */ +#include + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +/* Get getopt(), optarg, optind, opterr, optopt. */ +/* Also, don't include inside libgettextpo, because we use + the getopt module only in gettext-tools/gnulib-lib/, not in + gettext-tools/libgettextpo/, but there is only a single + GNULIB_UNISTD_H_GETOPT variable for both. */ +#if 0 && 00 && !defined GTPO_CONFIG_H && !defined _GL_SYSTEM_GETOPT +# include +# include +#endif + +_GL_INLINE_HEADER_BEGIN +#ifndef _GL_UNISTD_INLINE +# define _GL_UNISTD_INLINE _GL_INLINE +#endif + +/* Hide some function declarations from . */ + +#if 0 && 1 +# if !defined _GL_GRGL_SYS_SOCKET_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef socket +# define socket socket_used_without_including_sys_socket_h +# undef connect +# define connect connect_used_without_including_sys_socket_h +# undef accept +# define accept accept_used_without_including_sys_socket_h +# undef bind +# define bind bind_used_without_including_sys_socket_h +# undef getpeername +# define getpeername getpeername_used_without_including_sys_socket_h +# undef getsockname +# define getsockname getsockname_used_without_including_sys_socket_h +# undef getsockopt +# define getsockopt getsockopt_used_without_including_sys_socket_h +# undef listen +# define listen listen_used_without_including_sys_socket_h +# undef recv +# define recv recv_used_without_including_sys_socket_h +# undef send +# define send send_used_without_including_sys_socket_h +# undef recvfrom +# define recvfrom recvfrom_used_without_including_sys_socket_h +# undef sendto +# define sendto sendto_used_without_including_sys_socket_h +# undef setsockopt +# define setsockopt setsockopt_used_without_including_sys_socket_h +# undef shutdown +# define shutdown shutdown_used_without_including_sys_socket_h +# else + _GL_WARN_ON_USE (socket, + "socket() used without including "); + _GL_WARN_ON_USE (connect, + "connect() used without including "); + _GL_WARN_ON_USE (accept, + "accept() used without including "); + _GL_WARN_ON_USE (bind, + "bind() used without including "); + _GL_WARN_ON_USE (getpeername, + "getpeername() used without including "); + _GL_WARN_ON_USE (getsockname, + "getsockname() used without including "); + _GL_WARN_ON_USE (getsockopt, + "getsockopt() used without including "); + _GL_WARN_ON_USE (listen, + "listen() used without including "); + _GL_WARN_ON_USE (recv, + "recv() used without including "); + _GL_WARN_ON_USE (send, + "send() used without including "); + _GL_WARN_ON_USE (recvfrom, + "recvfrom() used without including "); + _GL_WARN_ON_USE (sendto, + "sendto() used without including "); + _GL_WARN_ON_USE (setsockopt, + "setsockopt() used without including "); + _GL_WARN_ON_USE (shutdown, + "shutdown() used without including "); +# endif +# endif +# if !defined _GL_GRGL_SYS_SELECT_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef select +# define select select_used_without_including_sys_select_h +# else + _GL_WARN_ON_USE (select, + "select() used without including "); +# endif +# endif +#endif + + +/* OS/2 EMX lacks these macros. */ +#ifndef STDIN_FILENO +# define STDIN_FILENO 0 +#endif +#ifndef STDOUT_FILENO +# define STDOUT_FILENO 1 +#endif +#ifndef STDERR_FILENO +# define STDERR_FILENO 2 +#endif + +/* Ensure *_OK macros exist. */ +#ifndef F_OK +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 +#endif + + +/* Declare overridden functions. */ + + +#if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access rpl_access +# endif +_GL_FUNCDECL_RPL (access, int, (const char *file, int mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); +#elif defined GNULIB_POSIXCHECK +# undef access +# if HAVE_RAW_DECL_ACCESS +/* The access() function is a security risk. */ +_GL_WARN_ON_USE (access, "access does not always support X_OK - " + "use gnulib module access for portability; " + "also, this function is a security risk - " + "use the gnulib module faccessat instead"); +# endif +#elif 1 +/* On native Windows, map 'access' to '_access', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::access always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); +#endif + + +#if 0 +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIASWARN (chdir); +#elif defined GNULIB_POSIXCHECK +# undef chdir +# if HAVE_RAW_DECL_CHDIR +_GL_WARN_ON_USE (chown, "chdir is not always in - " + "use gnulib module chdir for portability"); +# endif +#elif 1 +/* On native Windows, map 'chdir' to '_chdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIASWARN (chdir); +#endif + + +#if 0 +/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE + to GID (if GID is not -1). Follow symbolic links. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define dup2 rpl_dup2 +# endif +_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); +_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); +# else +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); +#elif defined GNULIB_POSIXCHECK +# undef dup2 +# if HAVE_RAW_DECL_DUP2 +_GL_WARN_ON_USE (dup2, "dup2 is unportable - " + "use gnulib module dup2 for portability"); +# endif +#elif 1 +/* On native Windows, map 'dup2' to '_dup2', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup2 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); +# else +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); +#endif + + +#if 0 +/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the + specified flags. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + Close NEWFD first if it is open. + Return newfd if successful, otherwise -1 and errno set. + See the Linux man page at + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup3 +# define dup3 rpl_dup3 +# endif +_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); +_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); +# else +# if !1 +_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif +_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (dup3); +# endif +#elif defined GNULIB_POSIXCHECK +# undef dup3 +# if HAVE_RAW_DECL_DUP3 +_GL_WARN_ON_USE (dup3, "dup3 is unportable - " + "use gnulib module dup3 for portability"); +# endif +#endif + + +#if 0 +# if defined __CYGWIN__ && !defined __i386__ +/* The 'environ' variable is defined in a DLL. Therefore its declaration needs + the '__declspec(dllimport)' attribute, but the system's lacks it. + This leads to a link error on 64-bit Cygwin when the option + -Wl,--disable-auto-import is in use. */ +_GL_EXTERN_C __declspec(dllimport) char **environ; +# endif +# if !1 +/* Set of environment variables and values. An array of strings of the form + "VARIABLE=VALUE", terminated with a NULL. */ +# if defined __APPLE__ && defined __MACH__ +# include +# if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR +# define _GL_USE_CRT_EXTERNS +# endif +# endif +# ifdef _GL_USE_CRT_EXTERNS +# include +# define environ (*_NSGetEnviron ()) +# else +# ifdef __cplusplus +extern "C" { +# endif +extern char **environ; +# ifdef __cplusplus +} +# endif +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# if HAVE_RAW_DECL_ENVIRON +_GL_UNISTD_INLINE char *** +_GL_WARN_ON_USE_ATTRIBUTE ("environ is unportable - " + "use gnulib module environ for portability") +rpl_environ (void) +{ + return &environ; +} +# undef environ +# define environ (*rpl_environ ()) +# endif +#endif + + +#if 0 +/* Like access(), except that it uses the effective user id and group id of + the current process. */ +# if !1 +_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); +_GL_CXXALIASWARN (euidaccess); +# if defined GNULIB_POSIXCHECK +/* Like access(), this function is a security risk. */ +_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " + "use the gnulib module faccessat instead"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef euidaccess +# if HAVE_RAW_DECL_EUIDACCESS +_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " + "use gnulib module euidaccess for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl rpl_execl +# endif +_GL_FUNCDECL_RPL (execl, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execl, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#elif defined GNULIB_POSIXCHECK +# undef execl +# if HAVE_RAW_DECL_EXECL +_GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - " + "use gnulib module execl for portability"); +# endif +#elif 1 +/* On native Windows, map 'execl' to '_execl', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execl always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl _execl +# endif +_GL_CXXALIAS_MDA (execl, intptr_t, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle rpl_execle +# endif +_GL_FUNCDECL_RPL (execle, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execle, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#elif defined GNULIB_POSIXCHECK +# undef execle +# if HAVE_RAW_DECL_EXECLE +_GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - " + "use gnulib module execle for portability"); +# endif +#elif 1 +/* On native Windows, map 'execle' to '_execle', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execle always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle _execle +# endif +_GL_CXXALIAS_MDA (execle, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp rpl_execlp +# endif +_GL_FUNCDECL_RPL (execlp, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execlp, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#elif defined GNULIB_POSIXCHECK +# undef execlp +# if HAVE_RAW_DECL_EXECLP +_GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - " + "use gnulib module execlp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execlp' to '_execlp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execlp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp _execlp +# endif +_GL_CXXALIAS_MDA (execlp, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv rpl_execv +# endif +_GL_FUNCDECL_RPL (execv, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execv, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#elif defined GNULIB_POSIXCHECK +# undef execv +# if HAVE_RAW_DECL_EXECV +_GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - " + "use gnulib module execv for portability"); +# endif +#elif 1 +/* On native Windows, map 'execv' to '_execv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv _execv +# endif +_GL_CXXALIAS_MDA_CAST (execv, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve rpl_execve +# endif +_GL_FUNCDECL_RPL (execve, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execve, int, + (const char *program, char * const *argv, char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#elif defined GNULIB_POSIXCHECK +# undef execve +# if HAVE_RAW_DECL_EXECVE +_GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - " + "use gnulib module execve for portability"); +# endif +#elif 1 +/* On native Windows, map 'execve' to '_execve', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execve always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve _execve +# endif +_GL_CXXALIAS_MDA_CAST (execve, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp rpl_execvp +# endif +_GL_FUNCDECL_RPL (execvp, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvp, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#elif defined GNULIB_POSIXCHECK +# undef execvp +# if HAVE_RAW_DECL_EXECVP +_GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - " + "use gnulib module execvp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvp' to '_execvp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp _execvp +# endif +_GL_CXXALIAS_MDA_CAST (execvp, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe rpl_execvpe +# endif +_GL_FUNCDECL_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# else +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (execvpe); +# endif +#elif defined GNULIB_POSIXCHECK +# undef execvpe +# if HAVE_RAW_DECL_EXECVPE +_GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - " + "use gnulib module execvpe for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvpe' to '_execvpe', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvpe on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe _execvpe +# endif +_GL_CXXALIAS_MDA_CAST (execvpe, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# elif 1 +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (execvpe); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef faccessat +# define faccessat rpl_faccessat +# endif +_GL_FUNCDECL_RPL (faccessat, int, + (int fd, char const *name, int mode, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (faccessat, int, + (int fd, char const *name, int mode, int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (faccessat, int, + (int fd, char const *file, int mode, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (faccessat, int, + (int fd, char const *file, int mode, int flag)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (faccessat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef faccessat +# if HAVE_RAW_DECL_FACCESSAT +_GL_WARN_ON_USE (faccessat, "faccessat is not portable - " + "use gnulib module faccessat for portability"); +# endif +#endif + + +#if 0 +/* Change the process' current working directory to the directory on which + the given file descriptor is open. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchdir +# define fchdir rpl_fchdir +# endif +_GL_FUNCDECL_RPL (fchdir, int, (int /*fd*/)); +_GL_CXXALIAS_RPL (fchdir, int, (int /*fd*/)); +# else +# if !0 || !0 +_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); +# endif +_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); +# endif +_GL_CXXALIASWARN (fchdir); +# if 0 || !0 +/* Gnulib internal hooks needed to maintain the fchdir metadata. */ +_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) + _GL_ARG_NONNULL ((2)); +_GL_EXTERN_C void _gl_unregister_fd (int fd); +_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); +_GL_EXTERN_C const char *_gl_directory_name (int fd); +# endif +#elif defined GNULIB_POSIXCHECK +# undef fchdir +# if HAVE_RAW_DECL_FCHDIR +_GL_WARN_ON_USE (fchdir, "fchdir is unportable - " + "use gnulib module fchdir for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchownat +# define fchownat rpl_fchownat +# endif +_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag)); +# endif +_GL_CXXALIASWARN (fchownat); +#elif defined GNULIB_POSIXCHECK +# undef fchownat +# if HAVE_RAW_DECL_FCHOWNAT +_GL_WARN_ON_USE (fchownat, "fchownat is not portable - " + "use gnulib module fchownat for portability"); +# endif +#endif + + +#if 0 +/* Synchronize changes to a file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdatasync +# define fdatasync rpl_fdatasync +# endif +_GL_FUNCDECL_RPL (fdatasync, int, (int fd)); +_GL_CXXALIAS_RPL (fdatasync, int, (int fd)); +# else +# if !1|| !1 +_GL_FUNCDECL_SYS (fdatasync, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (fdatasync, int, (int fd)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (fdatasync); +# endif +#elif defined GNULIB_POSIXCHECK +# undef fdatasync +# if HAVE_RAW_DECL_FDATASYNC +_GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " + "use gnulib module fdatasync for portability"); +# endif +#endif + + +#if 0 +/* Synchronize changes, including metadata, to a file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if !0 +_GL_FUNCDECL_SYS (fsync, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (fsync, int, (int fd)); +_GL_CXXALIASWARN (fsync); +#elif defined GNULIB_POSIXCHECK +# undef fsync +# if HAVE_RAW_DECL_FSYNC +_GL_WARN_ON_USE (fsync, "fsync is unportable - " + "use gnulib module fsync for portability"); +# endif +#endif + + +#if 0 +/* Change the size of the file to which FD is opened to become equal to LENGTH. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ftruncate +# define ftruncate rpl_ftruncate +# endif +_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length)); +_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length)); +# else +# if !0 +_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); +# endif +_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (ftruncate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef ftruncate +# if HAVE_RAW_DECL_FTRUNCATE +_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " + "use gnulib module ftruncate for portability"); +# endif +#endif + + +#if 0 +/* Get the name of the current working directory, and put it in SIZE bytes + of BUF. + Return BUF if successful, or NULL if the directory couldn't be determined + or SIZE was too small. + See the POSIX:2008 specification + . + Additionally, the gnulib module 'getcwd' or 'getcwd-lgpl' guarantees the + following GNU extension: If BUF is NULL, an array is allocated with + 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case + it is as big as necessary. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getcwd rpl_getcwd +# endif +_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); +_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +_GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size)); +# else +/* Need to cast, because on mingw, the second parameter is + int size. */ +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); +#elif defined GNULIB_POSIXCHECK +# undef getcwd +# if HAVE_RAW_DECL_GETCWD +_GL_WARN_ON_USE (getcwd, "getcwd is unportable - " + "use gnulib module getcwd for portability"); +# endif +#elif 1 +/* On native Windows, map 'getcwd' to '_getcwd', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getcwd always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +/* Need to cast, because on mingw, the second parameter is either + 'int size' or 'size_t size'. */ +_GL_CXXALIAS_MDA_CAST (getcwd, char *, (char *buf, size_t size)); +# else +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); +#endif + + +#if 0 +/* Return the NIS domain name of the machine. + WARNING! The NIS domain name is unrelated to the fully qualified host name + of the machine. It is also unrelated to email addresses. + WARNING! The NIS domain name is usually the empty string or "(none)" when + not using NIS. + + Put up to LEN bytes of the NIS domain name into NAME. + Null terminate it if the name is shorter than LEN. + If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. + Return 0 if successful, otherwise set errno and return -1. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdomainname +# define getdomainname rpl_getdomainname +# endif +_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getdomainname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getdomainname +# if HAVE_RAW_DECL_GETDOMAINNAME +_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " + "use gnulib module getdomainname for portability"); +# endif +#endif + + +#if 0 +/* Return the maximum number of file descriptors in the current process. + In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdtablesize +# define getdtablesize rpl_getdtablesize +# endif +_GL_FUNCDECL_RPL (getdtablesize, int, (void)); +_GL_CXXALIAS_RPL (getdtablesize, int, (void)); +# else +# if !0 +_GL_FUNCDECL_SYS (getdtablesize, int, (void)); +# endif +/* Need to cast, because on AIX, the parameter list is + (...). */ +_GL_CXXALIAS_SYS_CAST (getdtablesize, int, (void)); +# endif +_GL_CXXALIASWARN (getdtablesize); +#elif defined GNULIB_POSIXCHECK +# undef getdtablesize +# if HAVE_RAW_DECL_GETDTABLESIZE +_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " + "use gnulib module getdtablesize for portability"); +# endif +#endif + + +#if 0 +/* Fill a buffer with random bytes. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getentropy +# define getentropy rpl_getentropy +# endif +_GL_FUNCDECL_RPL (getentropy, int, (void *buffer, size_t length)); +_GL_CXXALIAS_RPL (getentropy, int, (void *buffer, size_t length)); +# else +# if !1 +_GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length)); +# endif +_GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getentropy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getentropy +# if HAVE_RAW_DECL_GETENTROPY +_GL_WARN_ON_USE (getentropy, "getentropy is unportable - " + "use gnulib module getentropy for portability"); +# endif +#endif + + +#if 0 +/* Return the supplemental groups that the current process belongs to. + It is unspecified whether the effective group id is in the list. + If N is 0, return the group count; otherwise, N describes how many + entries are available in GROUPS. Return -1 and set errno if N is + not 0 and not large enough. Fails with ENOSYS on some systems. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getgroups +# define getgroups rpl_getgroups +# endif +_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); +_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); +# else +# if !1 +_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); +# endif +_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); +# endif +_GL_CXXALIASWARN (getgroups); +#elif defined GNULIB_POSIXCHECK +# undef getgroups +# if HAVE_RAW_DECL_GETGROUPS +_GL_WARN_ON_USE (getgroups, "getgroups is unportable - " + "use gnulib module getgroups for portability"); +# endif +#endif + + +#if 0 +/* Return the standard host name of the machine. + WARNING! The host name may or may not be fully qualified. + + Put up to LEN bytes of the host name into NAME. + Null terminate it if the name is shorter than LEN. + If the host name is longer than LEN, set errno = EINVAL and return -1. + Return 0 if successful, otherwise set errno and return -1. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gethostname +# define gethostname rpl_gethostname +# endif +_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second + parameter is + int len. */ +_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); +# endif +_GL_CXXALIASWARN (gethostname); +#elif 1 +# undef gethostname +# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname +#elif defined GNULIB_POSIXCHECK +# undef gethostname +# if HAVE_RAW_DECL_GETHOSTNAME +_GL_WARN_ON_USE (gethostname, "gethostname is unportable - " + "use gnulib module gethostname for portability"); +# endif +#endif + + +#if 0 +/* Returns the user's login name, or NULL if it cannot be found. Upon error, + returns NULL with errno set. + + See . + + Most programs don't need to use this function, because the information is + available through environment variables: + ${LOGNAME-$USER} on Unix platforms, + $USERNAME on native Windows platforms. + */ +# if !1 +_GL_FUNCDECL_SYS (getlogin, char *, (void)); +# endif +_GL_CXXALIAS_SYS (getlogin, char *, (void)); +_GL_CXXALIASWARN (getlogin); +#elif defined GNULIB_POSIXCHECK +# undef getlogin +# if HAVE_RAW_DECL_GETLOGIN +_GL_WARN_ON_USE (getlogin, "getlogin is unportable - " + "use gnulib module getlogin for portability"); +# endif +#endif + + +#if 0 +/* Copies the user's login name to NAME. + The array pointed to by NAME has room for SIZE bytes. + + Returns 0 if successful. Upon error, an error number is returned, or -1 in + the case that the login name cannot be found but no specific error is + provided (this case is hopefully rare but is left open by the POSIX spec). + + See . + + Most programs don't need to use this function, because the information is + available through environment variables: + ${LOGNAME-$USER} on Unix platforms, + $USERNAME on native Windows platforms. + */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getlogin_r rpl_getlogin_r +# endif +_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); +# else +# if !1 +_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 10 systems, the second argument is + int size. */ +_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getlogin_r); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getlogin_r +# if HAVE_RAW_DECL_GETLOGIN_R +_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " + "use gnulib module getlogin_r for portability"); +# endif +#endif + + +#if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getpagesize rpl_getpagesize +# endif +_GL_FUNCDECL_RPL (getpagesize, int, (void)); +_GL_CXXALIAS_RPL (getpagesize, int, (void)); +# else +/* On HP-UX, getpagesize exists, but it is not declared in even if + the compiler options -D_HPUX_SOURCE -D_XOPEN_SOURCE=600 are used. */ +# if defined __hpux +_GL_FUNCDECL_SYS (getpagesize, int, (void)); +# endif +# if !0 +# if !defined getpagesize +/* This is for POSIX systems. */ +# if !defined _gl_getpagesize && defined _SC_PAGESIZE +# if ! (defined __VMS && __VMS_VER < 70000000) +# define _gl_getpagesize() sysconf (_SC_PAGESIZE) +# endif +# endif +/* This is for older VMS. */ +# if !defined _gl_getpagesize && defined __VMS +# ifdef __ALPHA +# define _gl_getpagesize() 8192 +# else +# define _gl_getpagesize() 512 +# endif +# endif +/* This is for BeOS. */ +# if !defined _gl_getpagesize && 0 +# include +# if defined B_PAGE_SIZE +# define _gl_getpagesize() B_PAGE_SIZE +# endif +# endif +/* This is for AmigaOS4.0. */ +# if !defined _gl_getpagesize && defined __amigaos4__ +# define _gl_getpagesize() 2048 +# endif +/* This is for older Unix systems. */ +# if !defined _gl_getpagesize && 0 +# include +# ifdef EXEC_PAGESIZE +# define _gl_getpagesize() EXEC_PAGESIZE +# else +# ifdef NBPG +# ifndef CLSIZE +# define CLSIZE 1 +# endif +# define _gl_getpagesize() (NBPG * CLSIZE) +# else +# ifdef NBPC +# define _gl_getpagesize() NBPC +# endif +# endif +# endif +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getpagesize() _gl_getpagesize () +# else +# if !GNULIB_defined_getpagesize_function +_GL_UNISTD_INLINE int +getpagesize () +{ + return _gl_getpagesize (); +} +# define GNULIB_defined_getpagesize_function 1 +# endif +# endif +# endif +# endif +/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ +_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); +# endif +# if 0 +_GL_CXXALIASWARN (getpagesize); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getpagesize +# if HAVE_RAW_DECL_GETPAGESIZE +_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " + "use gnulib module getpagesize for portability"); +# endif +#endif + + +#if 0 +/* Function getpass() from module 'getpass': + Read a password from /dev/tty or stdin. + Function getpass() from module 'getpass-gnu': + Read a password of arbitrary length from /dev/tty or stdin. */ +# if (0 && 0) \ + || (0 && 0) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpass +# define getpass rpl_getpass +# endif +_GL_FUNCDECL_RPL (getpass, char *, (const char *prompt) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getpass, char *, (const char *prompt)); +# else +# if !1 +_GL_FUNCDECL_SYS (getpass, char *, (const char *prompt) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getpass, char *, (const char *prompt)); +# endif +_GL_CXXALIASWARN (getpass); +#elif defined GNULIB_POSIXCHECK +# undef getpass +# if HAVE_RAW_DECL_GETPASS +_GL_WARN_ON_USE (getpass, "getpass is unportable - " + "use gnulib module getpass or getpass-gnu for portability"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'getpid' to '_getpid', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getpid always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpid +# define getpid _getpid +# endif +_GL_CXXALIAS_MDA (getpid, int, (void)); +# else +_GL_CXXALIAS_SYS (getpid, pid_t, (void)); +# endif +_GL_CXXALIASWARN (getpid); +#endif + + +#if 0 +/* Return the next valid login shell on the system, or NULL when the end of + the list has been reached. */ +# if !1 +_GL_FUNCDECL_SYS (getusershell, char *, (void)); +# endif +_GL_CXXALIAS_SYS (getusershell, char *, (void)); +_GL_CXXALIASWARN (getusershell); +#elif defined GNULIB_POSIXCHECK +# undef getusershell +# if HAVE_RAW_DECL_GETUSERSHELL +_GL_WARN_ON_USE (getusershell, "getusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + +#if 0 +/* Rewind to pointer that is advanced at each getusershell() call. */ +# if !1 +_GL_FUNCDECL_SYS (setusershell, void, (void)); +# endif +_GL_CXXALIAS_SYS (setusershell, void, (void)); +_GL_CXXALIASWARN (setusershell); +#elif defined GNULIB_POSIXCHECK +# undef setusershell +# if HAVE_RAW_DECL_SETUSERSHELL +_GL_WARN_ON_USE (setusershell, "setusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + +#if 0 +/* Free the pointer that is advanced at each getusershell() call and + associated resources. */ +# if !1 +_GL_FUNCDECL_SYS (endusershell, void, (void)); +# endif +_GL_CXXALIAS_SYS (endusershell, void, (void)); +_GL_CXXALIASWARN (endusershell); +#elif defined GNULIB_POSIXCHECK +# undef endusershell +# if HAVE_RAW_DECL_ENDUSERSHELL +_GL_WARN_ON_USE (endusershell, "endusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + + +#if 0 +/* Determine whether group id is in calling user's group list. */ +# if !1 +_GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); +# endif +_GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); +_GL_CXXALIASWARN (group_member); +#elif defined GNULIB_POSIXCHECK +# undef group_member +# if HAVE_RAW_DECL_GROUP_MEMBER +_GL_WARN_ON_USE (group_member, "group_member is unportable - " + "use gnulib module group-member for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty rpl_isatty +# endif +# define GNULIB_defined_isatty 1 +_GL_FUNCDECL_RPL (isatty, int, (int fd)); +_GL_CXXALIAS_RPL (isatty, int, (int fd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); +#elif defined GNULIB_POSIXCHECK +# undef isatty +# if HAVE_RAW_DECL_ISATTY +_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " + "use gnulib module isatty for portability"); +# endif +#elif 1 +/* On native Windows, map 'isatty' to '_isatty', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::isatty always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); +#endif + + +#if 0 +/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE + to GID (if GID is not -1). Do not follow symbolic links. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lchown +# define lchown rpl_lchown +# endif +_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); +# else +# if !1 +_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); +# endif +_GL_CXXALIASWARN (lchown); +#elif defined GNULIB_POSIXCHECK +# undef lchown +# if HAVE_RAW_DECL_LCHOWN +_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " + "use gnulib module lchown for portability"); +# endif +#endif + + +#if 0 +/* Create a new hard link for an existing file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define link rpl_link +# endif +_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); +# else +# if !1 +_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); +# endif +_GL_CXXALIASWARN (link); +#elif defined GNULIB_POSIXCHECK +# undef link +# if HAVE_RAW_DECL_LINK +_GL_WARN_ON_USE (link, "link is unportable - " + "use gnulib module link for portability"); +# endif +#endif + + +#if 0 +/* Create a new hard link for an existing file, relative to two + directories. FLAG controls whether symlinks are followed. + Return 0 if successful, otherwise -1 and errno set. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef linkat +# define linkat rpl_linkat +# endif +_GL_FUNCDECL_RPL (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag) + _GL_ARG_NONNULL ((2, 4))); +_GL_CXXALIAS_RPL (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag) + _GL_ARG_NONNULL ((2, 4))); +# endif +_GL_CXXALIAS_SYS (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (linkat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef linkat +# if HAVE_RAW_DECL_LINKAT +_GL_WARN_ON_USE (linkat, "linkat is unportable - " + "use gnulib module linkat for portability"); +# endif +#endif + + +#if 0 +/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. + Return the new offset if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define lseek rpl_lseek +# endif +_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); +#elif defined GNULIB_POSIXCHECK +# undef lseek +# if HAVE_RAW_DECL_LSEEK +_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " + "systems - use gnulib module lseek for portability"); +# endif +#elif 1 +/* On native Windows, map 'lseek' to '_lseek', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::lseek always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, long, (int fd, long offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); +#endif + + +#if 0 +/* Create a pipe, defaulting to O_BINARY mode. + Store the read-end as fd[0] and the write-end as fd[1]. + Return 0 upon success, or -1 with errno set upon failure. */ +# if !0 +_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (pipe, int, (int fd[2])); +_GL_CXXALIASWARN (pipe); +#elif defined GNULIB_POSIXCHECK +# undef pipe +# if HAVE_RAW_DECL_PIPE +_GL_WARN_ON_USE (pipe, "pipe is unportable - " + "use gnulib module pipe-posix for portability"); +# endif +#endif + + +#if 0 +/* Create a pipe, applying the given flags when opening the read-end of the + pipe and the write-end of the pipe. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + Store the read-end as fd[0] and the write-end as fd[1]. + Return 0 upon success, or -1 with errno set upon failure. + See also the Linux man page at + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pipe2 +# define pipe2 rpl_pipe2 +# endif +_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); +# else +_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (pipe2); +# endif +#elif defined GNULIB_POSIXCHECK +# undef pipe2 +# if HAVE_RAW_DECL_PIPE2 +_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " + "use gnulib module pipe2 for portability"); +# endif +#endif + + +#if 0 +/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. + Return the number of bytes placed into BUF if successful, otherwise + set errno and return -1. 0 indicates EOF. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pread +# define pread rpl_pread +# endif +_GL_FUNCDECL_RPL (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset)); +# else +# if !1 +_GL_FUNCDECL_SYS (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (pread); +# endif +#elif defined GNULIB_POSIXCHECK +# undef pread +# if HAVE_RAW_DECL_PREAD +_GL_WARN_ON_USE (pread, "pread is unportable - " + "use gnulib module pread for portability"); +# endif +#endif + + +#if 0 +/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. + Return the number of bytes written if successful, otherwise + set errno and return -1. 0 indicates nothing written. See the + POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pwrite +# define pwrite rpl_pwrite +# endif +_GL_FUNCDECL_RPL (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset)); +# else +# if !1 +_GL_FUNCDECL_SYS (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (pwrite); +# endif +#elif defined GNULIB_POSIXCHECK +# undef pwrite +# if HAVE_RAW_DECL_PWRITE +_GL_WARN_ON_USE (pwrite, "pwrite is unportable - " + "use gnulib module pwrite for portability"); +# endif +#endif + + +#if 0 +/* Read up to COUNT bytes from file descriptor FD into the buffer starting + at BUF. See the POSIX:2008 specification + . */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read rpl_read +# endif +_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (read); +#elif 1 +/* On native Windows, map 'read' to '_read', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::read always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count)); +# endif +# else +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (read); +#endif + + +#if 0 +/* Read the contents of the symbolic link FILE and place the first BUFSIZE + bytes of it into BUF. Return the number of bytes placed into BUF if + successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define readlink rpl_readlink +# endif +_GL_FUNCDECL_RPL (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize)); +# else +# if !0 +_GL_FUNCDECL_SYS (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (readlink, ssize_t, + (const char *restrict file, + char *restrict buf, size_t bufsize)); +# endif +_GL_CXXALIASWARN (readlink); +#elif defined GNULIB_POSIXCHECK +# undef readlink +# if HAVE_RAW_DECL_READLINK +_GL_WARN_ON_USE (readlink, "readlink is unportable - " + "use gnulib module readlink for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define readlinkat rpl_readlinkat +# endif +_GL_FUNCDECL_RPL (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len)); +# else +# if !1 +_GL_FUNCDECL_SYS (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len) + _GL_ARG_NONNULL ((2, 3))); +# endif +_GL_CXXALIAS_SYS (readlinkat, ssize_t, + (int fd, char const *restrict file, + char *restrict buf, size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (readlinkat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef readlinkat +# if HAVE_RAW_DECL_READLINKAT +_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " + "use gnulib module readlinkat for portability"); +# endif +#endif + + +#if 0 +/* Remove the directory DIR. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define rmdir rpl_rmdir +# endif +_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (rmdir, int, (char const *name)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); +#elif defined GNULIB_POSIXCHECK +# undef rmdir +# if HAVE_RAW_DECL_RMDIR +_GL_WARN_ON_USE (rmdir, "rmdir is unportable - " + "use gnulib module rmdir for portability"); +# endif +#elif 1 +/* On native Windows, map 'rmdir' to '_rmdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::rmdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); +#endif + + +#if 0 +/* Set the host name of the machine. + The host name may or may not be fully qualified. + + Put LEN bytes of NAME into the host name. + Return 0 if successful, otherwise, set errno and return -1. + + Platforms with no ability to set the hostname return -1 and set + errno = ENOSYS. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sethostname +# define sethostname rpl_sethostname +# endif +_GL_FUNCDECL_RPL (sethostname, int, (const char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (sethostname, int, (const char *name, size_t len)); +# else +# if !1 || !1 +_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 + and FreeBSD 6.4 the second parameter is int. On Solaris 11 + 2011-10, the first parameter is not const. */ +_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (sethostname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef sethostname +# if HAVE_RAW_DECL_SETHOSTNAME +_GL_WARN_ON_USE (sethostname, "sethostname is unportable - " + "use gnulib module sethostname for portability"); +# endif +#endif + + +#if 0 +/* Pause the execution of the current thread for N seconds. + Returns the number of seconds left to sleep. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sleep +# define sleep rpl_sleep +# endif +_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); +_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); +# else +# if !0 +_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); +# endif +_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); +# endif +_GL_CXXALIASWARN (sleep); +#elif defined GNULIB_POSIXCHECK +# undef sleep +# if HAVE_RAW_DECL_SLEEP +_GL_WARN_ON_USE (sleep, "sleep is unportable - " + "use gnulib module sleep for portability"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'swab' to '_swab', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::swab always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef swab +# define swab _swab +# endif +/* Need to cast, because in old mingw the arguments are + (const char *from, char *to, size_t n). */ +_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n)); +# else +# if defined __hpux /* HP-UX */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n)); +# elif defined __sun && (defined __SunOS_5_10 || defined __XOPEN_OR_POSIX) && !defined _XPG4 /* Solaris */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n)); +# else +_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n)); +# endif +# endif +_GL_CXXALIASWARN (swab); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef symlink +# define symlink rpl_symlink +# endif +_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); +# else +# if !0 +_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); +# endif +_GL_CXXALIASWARN (symlink); +#elif defined GNULIB_POSIXCHECK +# undef symlink +# if HAVE_RAW_DECL_SYMLINK +_GL_WARN_ON_USE (symlink, "symlink is not portable - " + "use gnulib module symlink for portability"); +# endif +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef symlinkat +# define symlinkat rpl_symlinkat +# endif +_GL_FUNCDECL_RPL (symlinkat, int, + (char const *contents, int fd, char const *file) + _GL_ARG_NONNULL ((1, 3))); +_GL_CXXALIAS_RPL (symlinkat, int, + (char const *contents, int fd, char const *file)); +# else +# if !1 +_GL_FUNCDECL_SYS (symlinkat, int, + (char const *contents, int fd, char const *file) + _GL_ARG_NONNULL ((1, 3))); +# endif +_GL_CXXALIAS_SYS (symlinkat, int, + (char const *contents, int fd, char const *file)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (symlinkat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef symlinkat +# if HAVE_RAW_DECL_SYMLINKAT +_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " + "use gnulib module symlinkat for portability"); +# endif +#endif + + +#if 0 +/* Change the size of the file designated by FILENAME to become equal to LENGTH. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef truncate +# define truncate rpl_truncate +# endif +_GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length)); +# else +# if !1 +_GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (truncate); +# endif +#elif defined GNULIB_POSIXCHECK +# undef truncate +# if HAVE_RAW_DECL_TRUNCATE +_GL_WARN_ON_USE (truncate, "truncate is unportable - " + "use gnulib module truncate for portability"); +# endif +#endif + + +#if 0 +/* Store at most BUFLEN characters of the pathname of the terminal FD is + open on in BUF. Return 0 on success, otherwise an error number. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ttyname_r +# define ttyname_r rpl_ttyname_r +# endif +_GL_FUNCDECL_RPL (ttyname_r, int, + (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (ttyname_r, int, + (int fd, char *buf, size_t buflen)); +# else +# if !1 +_GL_FUNCDECL_SYS (ttyname_r, int, + (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (ttyname_r, int, + (int fd, char *buf, size_t buflen)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (ttyname_r); +# endif +#elif defined GNULIB_POSIXCHECK +# undef ttyname_r +# if HAVE_RAW_DECL_TTYNAME_R +_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " + "use gnulib module ttyname_r for portability"); +# endif +#endif + + +#if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink rpl_unlink +# endif +_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (unlink, int, (char const *file)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); +#elif defined GNULIB_POSIXCHECK +# undef unlink +# if HAVE_RAW_DECL_UNLINK +_GL_WARN_ON_USE (unlink, "unlink is not portable - " + "use gnulib module unlink for portability"); +# endif +#elif 1 +/* On native Windows, map 'unlink' to '_unlink', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::unlink always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlinkat +# define unlinkat rpl_unlinkat +# endif +_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); +# else +# if !1 +_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); +# endif +_GL_CXXALIASWARN (unlinkat); +#elif defined GNULIB_POSIXCHECK +# undef unlinkat +# if HAVE_RAW_DECL_UNLINKAT +_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " + "use gnulib module unlinkat for portability"); +# endif +#endif + + +#if 0 +/* Pause the execution of the current thread for N microseconds. + Returns 0 on completion, or -1 on range error. + See the POSIX:2001 specification + . */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef usleep +# define usleep rpl_usleep +# endif +_GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); +_GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); +# else +# if !0 +_GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); +# endif +/* Need to cast, because on Haiku, the first parameter is + unsigned int n. */ +_GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n)); +# endif +_GL_CXXALIASWARN (usleep); +#elif defined GNULIB_POSIXCHECK +# undef usleep +# if HAVE_RAW_DECL_USLEEP +_GL_WARN_ON_USE (usleep, "usleep is unportable - " + "use gnulib module usleep for portability"); +# endif +#endif + + +#if 0 +/* Write up to COUNT bytes starting at BUF to file descriptor FD. + See the POSIX:2008 specification + . */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write rpl_write +# endif +_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#elif 1 +/* On native Windows, map 'write' to '_write', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::write always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count)); +# endif +# else +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#endif + +_GL_INLINE_HEADER_END + +#endif /* _GL_GRGL_UNISTD_H */ +#endif /* _GL_INCLUDING_UNISTD_H */ +#endif /* _GL_GRGL_UNISTD_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/wchar.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/wchar.h new file mode 100644 index 000000000..d7ad25b7f --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/wchar.h @@ -0,0 +1,2220 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A substitute for ISO C99 , for platforms that have issues. + + Copyright (C) 2007-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake. */ + +/* + * ISO C 99 for platforms that have issues. + * + * + * For now, this just ensures proper prerequisite inclusion order and + * the declaration of wcwidth(). + */ + +#if __GNUC__ >= 3 + +#endif + + +#if (((defined __need_mbstate_t || defined __need_wint_t) \ + && !defined __MINGW32__) \ + || (defined __hpux \ + && ((defined _INTTYPES_INCLUDED \ + && !defined _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H) \ + || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ + || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \ + || defined _GL_ALREADY_INCLUDING_WCHAR_H) +/* Special invocation convention: + - Inside glibc and uClibc header files, but not MinGW. + - On HP-UX 11.00 we have a sequence of nested includes + -> -> , and the latter includes , + once indirectly -> -> -> + and once directly. In both situations 'wint_t' is not yet defined, + therefore we cannot provide the function overrides; instead include only + the system's . + - With MinGW 3.22, when includes , only some part of + is actually processed, and that doesn't include 'mbstate_t'. + - On IRIX 6.5, similarly, we have an include -> , and + the latter includes . But here, we have no way to detect whether + is completely included or is still being included. */ + +#include "../ucrt/wchar.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_GRGL_WCHAR_H + +#define _GL_ALREADY_INCLUDING_WCHAR_H + +#if 0 +# include /* for __GLIBC__ */ +#endif + +/* In some builds of uClibc, is nonexistent and wchar_t is defined + by . + But avoid namespace pollution on glibc systems. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +#endif + +/* Include the original if it exists. + Some builds of uClibc lack it. */ +/* The include_next requires a split double-inclusion guard. */ +#if 1 +# include "../ucrt/wchar.h" +#endif + +#undef _GL_ALREADY_INCLUDING_WCHAR_H + +#ifndef _GL_GRGL_WCHAR_H +#define _GL_GRGL_WCHAR_H + +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#ifndef _GL_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE /* empty */ +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +/* Define wint_t and WEOF. (Also done in wctype.in.h.) */ +#if !1 && !defined wint_t +# define wint_t int +# ifndef WEOF +# define WEOF -1 +# endif +#else +/* mingw and MSVC define wint_t as 'unsigned short' in or + . This is too small: ISO C 99 section 7.24.1.(2) says that + wint_t must be "unchanged by default argument promotions". Override it. */ +# if 1 +# if !GNULIB_defined_wint_t +# if 1 +# include +# else +# include +# endif +typedef unsigned int rpl_wint_t; +# undef wint_t +# define wint_t rpl_wint_t +# define GNULIB_defined_wint_t 1 +# endif +# endif +# ifndef WEOF +# define WEOF ((wint_t) -1) +# endif +#endif + + +/* Override mbstate_t if it is too small. + On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for + implementing mbrtowc for encodings like UTF-8. + On AIX and MSVC, mbrtowc needs to be overridden, but mbstate_t exists and is + large enough and overriding it would cause problems in C++ mode. */ +#if !(((defined _WIN32 && !defined __CYGWIN__) || 0) && 1) || 0 +# if !GNULIB_defined_mbstate_t +# if !(defined _AIX || defined _MSC_VER) +typedef int rpl_mbstate_t; +# undef mbstate_t +# define mbstate_t rpl_mbstate_t +# endif +# define GNULIB_defined_mbstate_t 1 +# endif +#endif + +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 0 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif + + +#if IN_GETTEXT_TOOLS_LIBGREP +/* Get memset(). */ +# include +#endif + + +/* Convert a single-byte character to a wide character. */ +#if IN_GETTEXT_TOOLS_LIBGREP +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef btowc +# define btowc rpl_btowc +# endif +_GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (btowc, wint_t, (int c)); +# else +# if !1 +_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); +# endif +/* Need to cast, because on mingw, the return type is 'unsigned short'. */ +_GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (btowc); +# endif +#elif defined GNULIB_POSIXCHECK +# undef btowc +# if HAVE_RAW_DECL_BTOWC +_GL_WARN_ON_USE (btowc, "btowc is unportable - " + "use gnulib module btowc for portability"); +# endif +#endif + + +/* Convert a wide character to a single-byte character. */ +#if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctob +# define wctob rpl_wctob +# endif +_GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); +# else +# if !defined wctob && !1 +/* wctob is provided by gnulib, or wctob exists but is not declared. */ +_GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wctob); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wctob +# if HAVE_RAW_DECL_WCTOB +_GL_WARN_ON_USE (wctob, "wctob is unportable - " + "use gnulib module wctob for portability"); +# endif +#endif + + +/* Test whether *PS is in an initial state. */ +#if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsinit +# define mbsinit rpl_mbsinit +# endif +_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); +# else +# if !0 +_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbsinit); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbsinit +# if HAVE_RAW_DECL_MBSINIT +_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " + "use gnulib module mbsinit for portability"); +# endif +#endif + + +/* Put *PS into an initial state. */ +#if IN_GETTEXT_TOOLS_LIBGREP +/* ISO C 23 § 7.31.6.(3) says that zeroing an mbstate_t is a way to put the + mbstate_t into an initial state. However, on many platforms an mbstate_t + is large, and it is possible - as an optimization - to get away with zeroing + only part of it. So, instead of + + mbstate_t state = { 0 }; + + or + + mbstate_t state; + memset (&state, 0, sizeof (mbstate_t)); + + we can write this faster code: + + mbstate_t state; + mbszero (&state); + */ +/* _GL_MBSTATE_INIT_SIZE describes how mbsinit() behaves: It is the number of + bytes at the beginning of an mbstate_t that need to be zero, for mbsinit() + to return true. + _GL_MBSTATE_ZERO_SIZE is the number of bytes at the beginning of an mbstate_t + that need to be zero, + - for mbsinit() to return true, and + - for all other multibyte-aware functions to operate properly. + 0 < _GL_MBSTATE_INIT_SIZE <= _GL_MBSTATE_ZERO_SIZE <= sizeof (mbstate_t). + These values are determined by source code inspection, where possible, and + by running the gnulib unit tests. + We need _GL_MBSTATE_INIT_SIZE because if we define _GL_MBSTATE_ZERO_SIZE + without considering what mbsinit() does, we get test failures such as + assertion "mbsinit (&iter->state)" failed + */ +# if GNULIB_defined_mbstate_t /* AIX, IRIX */ +/* mbstate_t has at least 4 bytes. They are used as coded in + gnulib/lib/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 1 +/* define _GL_MBSTATE_ZERO_SIZE 4 + does not work: it causes test failures. + So, use the safe fallback value, below. */ +# elif __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 /* glibc */ +/* mbstate_t is defined in . + For more details, see glibc/iconv/skeleton.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (((mbstate_t) {0}).__count) */ +# define _GL_MBSTATE_ZERO_SIZE /* 8 */ sizeof (mbstate_t) +# elif defined MUSL_LIBC /* musl libc */ +/* mbstate_t is defined in . + It is an opaque aligned 8-byte struct, of which at most the first + 4 bytes are used. + For more details, see src/multibyte/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (unsigned) */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __APPLE__ && defined __MACH__ /* macOS */ +/* On macOS, mbstate_t is defined in . + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + Libc-/locale/FreeBSD/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8,utf2}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 10 + utf2.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __FreeBSD__ /* FreeBSD */ +/* On FreeBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + src/lib/libc/locale/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __NetBSD__ /* NetBSD */ +/* On NetBSD, mbstate_t is defined in src/sys/sys/ansi.h. + It is an opaque aligned 128-byte struct, of which at most the first + 28 bytes are used. + For more details, see the *State types in + src/lib/libc/citrus/modules/citrus_*.c + (ignoring citrus_{hz,iso2022,utf7,viqr,zw}.c, since these implement + stateful encodings, not usable as locale encodings). */ +/* File ZERO_SIZE + citrus/citrus_none.c 0 + citrus/modules/citrus_euc.c 8 + citrus/modules/citrus_euctw.c 8 + citrus/modules/citrus_mskanji.c 8 + citrus/modules/citrus_big5.c 8 + citrus/modules/citrus_gbk2k.c 8 + citrus/modules/citrus_dechanyu.c 8 + citrus/modules/citrus_johab.c 6 + citrus/modules/citrus_utf8.c 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 28. */ +# define _GL_MBSTATE_ZERO_SIZE 28 +# elif defined __OpenBSD__ /* OpenBSD */ +/* On OpenBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see src/lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 + citrus_utf8.c 12 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __minix /* Minix */ +/* On Minix, mbstate_t is defined in sys/sys/ansi.h. + It is an opaque aligned 128-byte struct. + For more details, see the *State types in + lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 */ +/* But 1 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 4. */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __sun /* Solaris */ +/* On Solaris, mbstate_t is defined in . + It is an opaque aligned 24-byte or 32-byte struct, of which at most the first + 20 or 28 bytes are used. + For more details on OpenSolaris derivatives, see the *State types in + illumos-gate/usr/src/lib/libc/port/locale/ + {none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 12 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures + - in OpenIndiana and OmniOS: for values < 16, + - in Solaris 10 and 11: for values < 20 (in 32-bit mode) + or < 28 (in 64-bit mode). + Since we don't have a good way to distinguish the OpenSolaris derivatives + from the proprietary Solaris versions, and can't inspect the Solaris source + code, use the safe fallback values, below. */ +# elif defined __CYGWIN__ /* Cygwin */ +/* On Cygwin, mbstate_t is defined in . + For more details, see newlib/libc/stdlib/mbtowc_r.c and + winsup/cygwin/strfuncs.cc. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (int) */ +# define _GL_MBSTATE_ZERO_SIZE 8 +# elif defined _WIN32 && !defined __CYGWIN__ /* Native Windows. */ +/* MSVC defines 'mbstate_t' as an aligned 8-byte struct. + On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined + as an aligned 8-byte struct, of which the first 4 bytes matter. + Use the safe values, below. */ +# elif defined __ANDROID__ /* Android */ +/* Android defines 'mbstate_t' in . + It is an opaque 4-byte or 8-byte struct. + For more details, see + bionic/libc/private/bionic_mbstate.h + bionic/libc/bionic/mbrtoc32.cpp + bionic/libc/bionic/mbrtoc16.cpp + */ +# define _GL_MBSTATE_INIT_SIZE 4 +# define _GL_MBSTATE_ZERO_SIZE 4 +# endif +/* Use safe values as defaults. */ +# ifndef _GL_MBSTATE_INIT_SIZE +# define _GL_MBSTATE_INIT_SIZE sizeof (mbstate_t) +# endif +# ifndef _GL_MBSTATE_ZERO_SIZE +# define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t) +# endif +_GL_BEGIN_C_LINKAGE +# if defined IN_MBSZERO +_GL_EXTERN_INLINE +# else +_GL_INLINE +# endif +_GL_ARG_NONNULL ((1)) void +mbszero (mbstate_t *ps) +{ + memset (ps, 0, _GL_MBSTATE_ZERO_SIZE); +} +_GL_END_C_LINKAGE +_GL_CXXALIAS_SYS (mbszero, void, (mbstate_t *ps)); +_GL_CXXALIASWARN (mbszero); +#endif + + +/* Convert a multibyte character to a wide character. */ +#if 0 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrtowc +# define mbrtowc rpl_mbrtowc +# endif +_GL_FUNCDECL_RPL (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +_GL_CXXALIAS_RPL (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +# endif +_GL_CXXALIAS_SYS (mbrtowc, size_t, + (wchar_t *restrict pwc, const char *restrict s, size_t n, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbrtowc); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrtowc +# if HAVE_RAW_DECL_MBRTOWC +_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " + "use gnulib module mbrtowc for portability"); +# endif +#endif + + +/* Recognize a multibyte character. */ +#if IN_GETTEXT_TOOLS_LIBGREP +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrlen +# define mbrlen rpl_mbrlen +# endif +_GL_FUNCDECL_RPL (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +_GL_CXXALIAS_RPL (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +# endif +_GL_CXXALIAS_SYS (mbrlen, size_t, + (const char *restrict s, size_t n, mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbrlen); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbrlen +# if HAVE_RAW_DECL_MBRLEN +_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " + "use gnulib module mbrlen for portability"); +# endif +#endif + + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsrtowcs +# define mbsrtowcs rpl_mbsrtowcs +# endif +_GL_FUNCDECL_RPL (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbsrtowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbsrtowcs +# if HAVE_RAW_DECL_MBSRTOWCS +_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " + "use gnulib module mbsrtowcs for portability"); +# endif +#endif + + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsnrtowcs +# define mbsnrtowcs rpl_mbsnrtowcs +# endif +_GL_FUNCDECL_RPL (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsnrtowcs, size_t, + (wchar_t *restrict dest, + const char **restrict srcp, size_t srclen, size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbsnrtowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbsnrtowcs +# if HAVE_RAW_DECL_MBSNRTOWCS +_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " + "use gnulib module mbsnrtowcs for portability"); +# endif +#endif + + +/* Convert a wide character to a multibyte character. */ +#if IN_GETTEXT_TOOLS_LIBGREP +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcrtomb +# define wcrtomb rpl_wcrtomb +# endif +_GL_FUNCDECL_RPL (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +_GL_CXXALIAS_RPL (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +# endif +_GL_CXXALIAS_SYS (wcrtomb, size_t, + (char *restrict s, wchar_t wc, mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcrtomb); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcrtomb +# if HAVE_RAW_DECL_WCRTOMB +_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " + "use gnulib module wcrtomb for portability"); +# endif +#endif + + +/* Convert a wide string to a string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsrtombs +# define wcsrtombs rpl_wcsrtombs +# endif +_GL_FUNCDECL_RPL (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (wcsrtombs, size_t, + (char *restrict dest, const wchar_t **restrict srcp, + size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsrtombs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsrtombs +# if HAVE_RAW_DECL_WCSRTOMBS +_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " + "use gnulib module wcsrtombs for portability"); +# endif +#endif + + +/* Convert a wide string to a string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsnrtombs +# define wcsnrtombs rpl_wcsnrtombs +# endif +_GL_FUNCDECL_RPL (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps)); +# else +# if !1 || (defined __cplusplus && defined __sun) +_GL_FUNCDECL_SYS (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (wcsnrtombs, size_t, + (char *restrict dest, + const wchar_t **restrict srcp, size_t srclen, + size_t len, + mbstate_t *restrict ps)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsnrtombs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsnrtombs +# if HAVE_RAW_DECL_WCSNRTOMBS +_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " + "use gnulib module wcsnrtombs for portability"); +# endif +#endif + + +/* Return the number of screen columns needed for WC. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcwidth +# define wcwidth rpl_wcwidth +# endif +_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); +# else +# if !0 +/* wcwidth exists but is not declared. */ +_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcwidth); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcwidth +# if HAVE_RAW_DECL_WCWIDTH +_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " + "use gnulib module wcwidth for portability"); +# endif +#endif + + +/* Search N wide characters of S for C. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t); + wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wmemchr, + wchar_t *, (const wchar_t *, wchar_t, size_t), + const wchar_t *, (const wchar_t *, wchar_t, size_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +_GL_CXXALIASWARN1 (wmemchr, const wchar_t *, + (const wchar_t *s, wchar_t c, size_t n)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemchr +# if HAVE_RAW_DECL_WMEMCHR +_GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " + "use gnulib module wmemchr for portability"); +# endif +#endif + + +/* Compare N wide characters of S1 and S2. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmemcmp +# define wmemcmp rpl_wmemcmp +# endif +_GL_FUNCDECL_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemcmp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemcmp +# if HAVE_RAW_DECL_WMEMCMP +_GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " + "use gnulib module wmemcmp for portability"); +# endif +#endif + + +/* Copy N wide characters of SRC to DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wmemcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemcpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemcpy +# if HAVE_RAW_DECL_WMEMCPY +_GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " + "use gnulib module wmemcpy for portability"); +# endif +#endif + + +/* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for + overlapping memory areas. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wmemmove, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemmove, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemmove); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemmove +# if HAVE_RAW_DECL_WMEMMOVE +_GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " + "use gnulib module wmemmove for portability"); +# endif +#endif + + +/* Copy N wide characters of SRC to DEST. + Return pointer to wide characters after the last written wide character. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmempcpy +# define wmempcpy rpl_wmempcpy +# endif +_GL_FUNCDECL_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +_GL_CXXALIAS_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# else +# if !0 +_GL_FUNCDECL_SYS (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmempcpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmempcpy +# if HAVE_RAW_DECL_WMEMPCPY +_GL_WARN_ON_USE (wmempcpy, "wmempcpy is unportable - " + "use gnulib module wmempcpy for portability"); +# endif +#endif + + +/* Set N wide characters of S to C. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wmemset); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemset +# if HAVE_RAW_DECL_WMEMSET +_GL_WARN_ON_USE (wmemset, "wmemset is unportable - " + "use gnulib module wmemset for portability"); +# endif +#endif + + +/* Return the number of wide characters in S. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcslen); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcslen +# if HAVE_RAW_DECL_WCSLEN +_GL_WARN_ON_USE (wcslen, "wcslen is unportable - " + "use gnulib module wcslen for portability"); +# endif +#endif + + +/* Return the number of wide characters in S, but at most MAXLEN. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); +_GL_CXXALIASWARN (wcsnlen); +#elif defined GNULIB_POSIXCHECK +# undef wcsnlen +# if HAVE_RAW_DECL_WCSNLEN +_GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " + "use gnulib module wcsnlen for portability"); +# endif +#endif + + +/* Copy SRC to DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# endif +_GL_CXXALIAS_SYS (wcscpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscpy +# if HAVE_RAW_DECL_WCSCPY +_GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " + "use gnulib module wcscpy for portability"); +# endif +#endif + + +/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcpcpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# endif +_GL_CXXALIAS_SYS (wcpcpy, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +_GL_CXXALIASWARN (wcpcpy); +#elif defined GNULIB_POSIXCHECK +# undef wcpcpy +# if HAVE_RAW_DECL_WCPCPY +_GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " + "use gnulib module wcpcpy for portability"); +# endif +#endif + + +/* Copy no more than N wide characters of SRC to DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsncpy); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsncpy +# if HAVE_RAW_DECL_WCSNCPY +_GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " + "use gnulib module wcsncpy for portability"); +# endif +#endif + + +/* Copy no more than N characters of SRC to DEST, returning the address of + the last character written into DEST. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcpncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcpncpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +_GL_CXXALIASWARN (wcpncpy); +#elif defined GNULIB_POSIXCHECK +# undef wcpncpy +# if HAVE_RAW_DECL_WCPNCPY +_GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " + "use gnulib module wcpncpy for portability"); +# endif +#endif + + +/* Append SRC onto DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# endif +_GL_CXXALIAS_SYS (wcscat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscat +# if HAVE_RAW_DECL_WCSCAT +_GL_WARN_ON_USE (wcscat, "wcscat is unportable - " + "use gnulib module wcscat for portability"); +# endif +#endif + + +/* Append no more than N wide characters of SRC onto DEST. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsncat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src, + size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsncat, wchar_t *, + (wchar_t *restrict dest, const wchar_t *restrict src, + size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsncat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsncat +# if HAVE_RAW_DECL_WCSNCAT +_GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " + "use gnulib module wcsncat for portability"); +# endif +#endif + + +/* Compare S1 and S2. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcscmp +# define wcscmp rpl_wcscmp +# endif +_GL_FUNCDECL_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscmp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscmp +# if HAVE_RAW_DECL_WCSCMP +_GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " + "use gnulib module wcscmp for portability"); +# endif +#endif + + +/* Compare no more than N wide characters of S1 and S2. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsncmp +# define wcsncmp rpl_wcsncmp +# endif +_GL_FUNCDECL_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsncmp); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsncmp +# if HAVE_RAW_DECL_WCSNCMP +_GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " + "use gnulib module wcsncmp for portability"); +# endif +#endif + + +/* Compare S1 and S2, ignoring case. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); +_GL_CXXALIASWARN (wcscasecmp); +#elif defined GNULIB_POSIXCHECK +# undef wcscasecmp +# if HAVE_RAW_DECL_WCSCASECMP +_GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " + "use gnulib module wcscasecmp for portability"); +# endif +#endif + + +/* Compare no more than N chars of S1 and S2, ignoring case. */ +#if 0 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) +_GL_FUNCDECL_SYS (wcsncasecmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsncasecmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +_GL_CXXALIASWARN (wcsncasecmp); +#elif defined GNULIB_POSIXCHECK +# undef wcsncasecmp +# if HAVE_RAW_DECL_WCSNCASECMP +_GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " + "use gnulib module wcsncasecmp for portability"); +# endif +#endif + + +/* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE + category of the current locale. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); +# endif +_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscoll); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscoll +# if HAVE_RAW_DECL_WCSCOLL +_GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " + "use gnulib module wcscoll for portability"); +# endif +#endif + + +/* Transform S2 into array pointed to by S1 such that if wcscmp is applied + to two transformed strings the result is the as applying 'wcscoll' to the + original strings. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsxfrm, size_t, + (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsxfrm, size_t, + (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsxfrm); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsxfrm +# if HAVE_RAW_DECL_WCSXFRM +_GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " + "use gnulib module wcsxfrm for portability"); +# endif +#endif + + +/* Duplicate S, returning an identical malloc'd string. */ +#if 0 +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif +_GL_CXXALIASWARN (wcsdup); +#else +# if __GNUC__ >= 11 && !defined wcsdup +/* For -Wmismatched-dealloc: Associate wcsdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef wcsdup +# if HAVE_RAW_DECL_WCSDUP +_GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " + "use gnulib module wcsdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'wcsdup' to '_wcsdup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::wcsdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# if 1 +_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (wcsdup); +# endif +# endif +#endif + + +/* Find the first occurrence of WC in WCS. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcschr (const wchar_t *, wchar_t); + wchar_t * std::wcschr (wchar_t *, wchar_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcschr, + wchar_t *, (const wchar_t *, wchar_t), + const wchar_t *, (const wchar_t *, wchar_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc)); +_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcschr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcschr +# if HAVE_RAW_DECL_WCSCHR +_GL_WARN_ON_USE (wcschr, "wcschr is unportable - " + "use gnulib module wcschr for portability"); +# endif +#endif + + +/* Find the last occurrence of WC in WCS. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcsrchr (const wchar_t *, wchar_t); + wchar_t * std::wcsrchr (wchar_t *, wchar_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcsrchr, + wchar_t *, (const wchar_t *, wchar_t), + const wchar_t *, (const wchar_t *, wchar_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc)); +_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsrchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsrchr +# if HAVE_RAW_DECL_WCSRCHR +_GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " + "use gnulib module wcsrchr for portability"); +# endif +#endif + + +/* Return the length of the initial segment of WCS which consists entirely + of wide characters not in REJECT. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcscspn); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcscspn +# if HAVE_RAW_DECL_WCSCSPN +_GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " + "use gnulib module wcscspn for portability"); +# endif +#endif + + +/* Return the length of the initial segment of WCS which consists entirely + of wide characters in ACCEPT. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsspn); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsspn +# if HAVE_RAW_DECL_WCSSPN +_GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " + "use gnulib module wcsspn for portability"); +# endif +#endif + + +/* Find the first occurrence in WCS of any character in ACCEPT. */ +#if 0 +# if !1 +_GL_FUNCDECL_SYS (wcspbrk, wchar_t *, + (const wchar_t *wcs, const wchar_t *accept) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *); + wchar_t * std::wcspbrk (wchar_t *, const wchar_t *); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcspbrk, + wchar_t *, (const wchar_t *, const wchar_t *), + const wchar_t *, (const wchar_t *, const wchar_t *)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcspbrk, wchar_t *, + (wchar_t *wcs, const wchar_t *accept)); +_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, + (const wchar_t *wcs, const wchar_t *accept)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcspbrk); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcspbrk +# if HAVE_RAW_DECL_WCSPBRK +_GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " + "use gnulib module wcspbrk for portability"); +# endif +#endif + + +/* Find the first occurrence of NEEDLE in HAYSTACK. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsstr +# define wcsstr rpl_wcsstr +# endif +_GL_FUNCDECL_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); + wchar_t * std::wcsstr (wchar_t *, const wchar_t *); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcsstr, + wchar_t *, + (const wchar_t *restrict, const wchar_t *restrict), + const wchar_t *, + (const wchar_t *restrict, const wchar_t *restrict)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcsstr, wchar_t *, + (wchar_t *restrict haystack, + const wchar_t *restrict needle)); +_GL_CXXALIASWARN1 (wcsstr, const wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle)); +# elif __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsstr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsstr +# if HAVE_RAW_DECL_WCSSTR +_GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " + "use gnulib module wcsstr for portability"); +# endif +#endif + + +/* Divide WCS into tokens separated by characters in DELIM. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcstok +# define wcstok rpl_wcstok +# endif +_GL_FUNCDECL_RPL (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +_GL_CXXALIAS_RPL (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +# endif +_GL_CXXALIAS_SYS (wcstok, wchar_t *, + (wchar_t *restrict wcs, const wchar_t *restrict delim, + wchar_t **restrict ptr)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcstok); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcstok +# if HAVE_RAW_DECL_WCSTOK +_GL_WARN_ON_USE (wcstok, "wcstok is unportable - " + "use gnulib module wcstok for portability"); +# endif +#endif + + +/* Determine number of column positions required for first N wide + characters (or fewer if S ends before this) in S. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcswidth +# define wcswidth rpl_wcswidth +# endif +_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcswidth); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcswidth +# if HAVE_RAW_DECL_WCSWIDTH +_GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " + "use gnulib module wcswidth for portability"); +# endif +#endif + + +/* Convert *TP to a date and time wide string. See + . */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsftime +# define wcsftime rpl_wcsftime +# endif +_GL_FUNCDECL_RPL (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp) + _GL_ARG_NONNULL ((1, 3, 4))); +_GL_CXXALIAS_RPL (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp)); +# else +# if !1 +_GL_FUNCDECL_SYS (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp) + _GL_ARG_NONNULL ((1, 3, 4))); +# endif +_GL_CXXALIAS_SYS (wcsftime, size_t, + (wchar_t *restrict __buf, size_t __bufsize, + const wchar_t *restrict __fmt, + const struct tm *restrict __tp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wcsftime); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsftime +# if HAVE_RAW_DECL_WCSFTIME +_GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " + "use gnulib module wcsftime for portability"); +# endif +#endif + + +#if 0 && (defined _WIN32 && !defined __CYGWIN__) +/* Gets the name of the current working directory. + (a) If BUF is non-NULL, it is assumed to have room for SIZE wide characters. + This function stores the working directory (NUL-terminated) in BUF and + returns BUF. + (b) If BUF is NULL, an array is allocated with 'malloc'. The array is SIZE + wide characters long, unless SIZE == 0, in which case it is as big as + necessary. + If the directory couldn't be determined or SIZE was too small, this function + returns NULL and sets errno. For a directory of length LEN, SIZE should be + >= LEN + 3 in case (a) or >= LEN + 1 in case (b). + Possible errno values include: + - ERANGE if SIZE is too small. + - ENOMEM if the memory could no be allocated. */ +_GL_FUNCDECL_SYS (wgetcwd, wchar_t *, (wchar_t *buf, size_t size)); +#endif + + +#endif /* _GL_GRGL_WCHAR_H */ +#endif /* _GL_GRGL_WCHAR_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/wctype.h b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/wctype.h new file mode 100644 index 000000000..44113c525 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/gettext-tools/libgrep/wctype.h @@ -0,0 +1,1310 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* A substitute for ISO C99 , for platforms that lack it. + + Copyright (C) 2006-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible and Paul Eggert. */ + +/* + * ISO C 99 for platforms that lack it. + * + * + * iswctype, towctrans, towlower, towupper, wctrans, wctype, + * wctrans_t, and wctype_t are not yet implemented. + */ + +#if __GNUC__ >= 3 + +#endif + + +#if (defined __MINGW32__ && defined __CTYPE_H_SOURCED__) + +/* Special invocation convention: + - With MinGW 3.22, when includes , only some part of + is being processed, which doesn't include the idempotency + guard. */ + +#include "../ucrt/wctype.h" + +#else +/* Normal invocation convention. */ + +#ifndef _GL_GRGL_WCTYPE_H + +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +#if 1 +/* Solaris 2.5 has a bug: must be included before . */ +# include +#endif + +/* Native Windows (mingw, MSVC) have declarations of towupper, towlower, and + isw* functions in , as well as in . Include + , in advance to avoid rpl_ prefix being added to the + declarations. */ +#if defined _WIN32 && ! defined __CYGWIN__ +# include +# include +#endif + +/* Include the original if it exists. + BeOS 5 has the functions but no . */ +/* The include_next requires a split double-inclusion guard. */ +#if 1 +# include "../ucrt/wctype.h" +#endif + +#ifndef _GL_GRGL_WCTYPE_H +#define _GL_GRGL_WCTYPE_H + +_GL_INLINE_HEADER_BEGIN +#ifndef _GL_WCTYPE_INLINE +# define _GL_WCTYPE_INLINE _GL_INLINE +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the + attribute used in _GL_WARN_ON_USE. If the compiler does not support + this feature, it expands to empty. + + These macros are useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. + _GL_WARN_ON_USE is for functions with 'extern' linkage. + _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' + linkage. + + However, one of the reasons that a function is a portability trap is + if it has the wrong signature. Declaring FUNCTION with a different + signature in C is a compilation error, so this macro must use the + same type as any existing declaration so that programs that avoid + the problematic FUNCTION do not fail to compile merely because they + included a header that poisoned the function. But this implies that + _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already + have a declaration. Use of this macro implies that there must not + be any other macro hiding the declaration of FUNCTION; but + undefining FUNCTION first is part of the poisoning process anyway + (although for symbols that are provided only via a macro, the result + is a compilation error rather than a warning containing + "literal string"). Also note that in C++, it is only safe to use if + FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + rather than issue the nice warning, but the end result of informing + the developer about their portability problem is still achieved): + #if HAVE_RAW_DECL_ENVIRON + static char *** + rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + or better (avoiding contradictory use of 'static' and 'extern'): + #if HAVE_RAW_DECL_ENVIRON + static char *** + _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") + rpl_environ (void) { return &environ; } + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# define _GL_WARN_ON_USE_ATTRIBUTE(message) +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the + function is declared with the given prototype, consisting of return type, + parameters, and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if !defined __cplusplus +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ + _GL_WARN_ON_USE (function, msg) +# else +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + +/* Solaris 2.6 includes which includes which + #defines a number of identifiers in the application namespace. Revert + these #defines. */ +#ifdef __sun +# undef multibyte +# undef eucw1 +# undef eucw2 +# undef eucw3 +# undef scrw1 +# undef scrw2 +# undef scrw3 +#endif + +/* Define wint_t and WEOF. (Also done in wchar.in.h.) */ +#if !1 && !defined wint_t +# define wint_t int +# ifndef WEOF +# define WEOF -1 +# endif +#else +/* mingw and MSVC define wint_t as 'unsigned short' in or + . This is too small: ISO C 99 section 7.24.1.(2) says that + wint_t must be "unchanged by default argument promotions". Override it. */ +# if 1 +# if !GNULIB_defined_wint_t +# if 1 +# include +# else +# include +# endif +typedef unsigned int rpl_wint_t; +# undef wint_t +# define wint_t rpl_wint_t +# define GNULIB_defined_wint_t 1 +# endif +# endif +# ifndef WEOF +# define WEOF ((wint_t) -1) +# endif +#endif + + +#if !GNULIB_defined_wctype_functions + +/* FreeBSD 4.4 to 4.11 has but lacks the functions. + Linux libc5 has and the functions but they are broken. + mingw and MSVC have and the functions but they take a wchar_t + as argument, not an rpl_wint_t. Additionally, the mingw iswprint function + and the Android iswpunct function are broken. + Assume all 11 functions (all isw* except iswblank) are implemented the + same way, or not at all. */ +# if ! 1 || 1 + +# if 1 /* implies 1 */ + +_GL_WCTYPE_INLINE int +rpl_iswalnum (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswalnum ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswalpha (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswalpha ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswblank (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswblank ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswcntrl (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswcntrl ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswdigit (wint_t wc) +{ + return ((wchar_t) wc == wc ? wc >= '0' && wc <= '9' : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswgraph (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswgraph ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswlower (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswlower ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswprint (wint_t wc) +{ +# ifdef __MINGW32__ + return ((wchar_t) wc == wc ? wc == ' ' || iswgraph ((wchar_t) wc) : 0); +# else + return ((wchar_t) wc == wc ? iswprint ((wchar_t) wc) : 0); +# endif +} + +_GL_WCTYPE_INLINE int +rpl_iswpunct (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswpunct ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswspace (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswspace ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswupper (wint_t wc) +{ + return ((wchar_t) wc == wc ? iswupper ((wchar_t) wc) : 0); +} + +_GL_WCTYPE_INLINE int +rpl_iswxdigit (wint_t wc) +{ + return ((wchar_t) wc == wc + ? (wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F') + : 0); +} + +_GL_WCTYPE_INLINE wint_t +rpl_towlower (wint_t wc) +{ + return ((wchar_t) wc == wc ? (wchar_t) towlower ((wchar_t) wc) : wc); +} + +_GL_WCTYPE_INLINE wint_t +rpl_towupper (wint_t wc) +{ + return ((wchar_t) wc == wc ? (wchar_t) towupper ((wchar_t) wc) : wc); +} + +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef iswalnum +# undef iswalpha +# undef iswblank +# undef iswcntrl +# undef iswdigit +# undef iswgraph +# undef iswlower +# undef iswprint +# undef iswpunct +# undef iswspace +# undef iswupper +# undef iswxdigit +# undef towlower +# undef towupper +# define iswalnum rpl_iswalnum +# define iswalpha rpl_iswalpha +# define iswblank rpl_iswblank +# define iswcntrl rpl_iswcntrl +# define iswdigit rpl_iswdigit +# define iswgraph rpl_iswgraph +# define iswlower rpl_iswlower +# define iswprint rpl_iswprint +# define iswpunct rpl_iswpunct +# define iswspace rpl_iswspace +# define iswupper rpl_iswupper +# define iswxdigit rpl_iswxdigit +# define towlower rpl_towlower +# define towupper rpl_towupper +# endif + +# else + +/* IRIX 5.3 has macros but no functions, its isw* macros refer to an + undefined variable _ctmp_ and to macros like _P, and they + refer to system functions like _iswctype that are not in the + standard C library. Rather than try to get ancient buggy + implementations like this to work, just disable them. */ +# undef iswalnum +# undef iswalpha +# undef iswblank +# undef iswcntrl +# undef iswdigit +# undef iswgraph +# undef iswlower +# undef iswprint +# undef iswpunct +# undef iswspace +# undef iswupper +# undef iswxdigit +# undef towlower +# undef towupper + +/* Linux libc5 has and the functions but they are broken. */ +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define iswalnum rpl_iswalnum +# define iswalpha rpl_iswalpha +# define iswblank rpl_iswblank +# define iswcntrl rpl_iswcntrl +# define iswdigit rpl_iswdigit +# define iswgraph rpl_iswgraph +# define iswlower rpl_iswlower +# define iswprint rpl_iswprint +# define iswpunct rpl_iswpunct +# define iswspace rpl_iswspace +# define iswupper rpl_iswupper +# define iswxdigit rpl_iswxdigit +# endif +# endif +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define towlower rpl_towlower +# define towupper rpl_towupper +# endif +# endif + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswalnum +# else +iswalnum +# endif + (wint_t wc) +{ + return ((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); +} + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswalpha +# else +iswalpha +# endif + (wint_t wc) +{ + return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; +} + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswblank +# else +iswblank +# endif + (wint_t wc) +{ + return wc == ' ' || wc == '\t'; +} + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswcntrl +# else +iswcntrl +# endif + (wint_t wc) +{ + return (wc & ~0x1f) == 0 || wc == 0x7f; +} + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswdigit +# else +iswdigit +# endif + (wint_t wc) +{ + return wc >= '0' && wc <= '9'; +} + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswgraph +# else +iswgraph +# endif + (wint_t wc) +{ + return wc >= '!' && wc <= '~'; +} + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswlower +# else +iswlower +# endif + (wint_t wc) +{ + return wc >= 'a' && wc <= 'z'; +} + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswprint +# else +iswprint +# endif + (wint_t wc) +{ + return wc >= ' ' && wc <= '~'; +} + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswpunct +# else +iswpunct +# endif + (wint_t wc) +{ + return (wc >= '!' && wc <= '~' + && !((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); +} + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswspace +# else +iswspace +# endif + (wint_t wc) +{ + return (wc == ' ' || wc == '\t' + || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); +} + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswupper +# else +iswupper +# endif + (wint_t wc) +{ + return wc >= 'A' && wc <= 'Z'; +} + +_GL_WCTYPE_INLINE int +# if 1 +rpl_iswxdigit +# else +iswxdigit +# endif + (wint_t wc) +{ + return ((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); +} + +_GL_WCTYPE_INLINE wint_t +# if 1 +rpl_towlower +# else +towlower +# endif + (wint_t wc) +{ + return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc); +} + +_GL_WCTYPE_INLINE wint_t +# if 1 +rpl_towupper +# else +towupper +# endif + (wint_t wc) +{ + return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc); +} + +# endif + +# else +/* Only some of the functions are missing or broken. */ + +# if IN_GETTEXT_TOOLS_LIBGREP && (! 1 || 0) +/* Only the iswblank function is missing. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define iswblank rpl_iswblank +# endif +_GL_FUNCDECL_RPL (iswblank, int, (wint_t wc)); +# else +_GL_FUNCDECL_SYS (iswblank, int, (wint_t wc)); +# endif +# endif + +# if IN_GETTEXT_TOOLS_LIBGREP +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef iswdigit +# define iswdigit rpl_iswdigit +# endif +_GL_FUNCDECL_RPL (iswdigit, int, (wint_t wc)); +# endif +# endif + +# if IN_GETTEXT_TOOLS_LIBGREP +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef iswpunct +# define iswpunct rpl_iswpunct +# endif +_GL_FUNCDECL_RPL (iswpunct, int, (wint_t wc)); +# endif +# endif + +# if IN_GETTEXT_TOOLS_LIBGREP +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef iswxdigit +# define iswxdigit rpl_iswxdigit +# endif +_GL_FUNCDECL_RPL (iswxdigit, int, (wint_t wc)); +# endif +# endif + +# endif + +# if defined __MINGW32__ && !1 + +/* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t. + The functions towlower and towupper are implemented in the MSVCRT library + to take a wchar_t argument and return a wchar_t result. mingw declares + these functions to take a wint_t argument and return a wint_t result. + This means that: + 1. When the user passes an argument outside the range 0x0000..0xFFFF, the + function will look only at the lower 16 bits. This is allowed according + to POSIX. + 2. The return value is returned in the lower 16 bits of the result register. + The upper 16 bits are random: whatever happened to be in that part of the + result register. We need to fix this by adding a zero-extend from + wchar_t to wint_t after the call. */ + +_GL_WCTYPE_INLINE wint_t +rpl_towlower (wint_t wc) +{ + return (wint_t) (wchar_t) towlower (wc); +} +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define towlower rpl_towlower +# endif + +_GL_WCTYPE_INLINE wint_t +rpl_towupper (wint_t wc) +{ + return (wint_t) (wchar_t) towupper (wc); +} +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define towupper rpl_towupper +# endif + +# endif /* __MINGW32__ && !1 */ + +# define GNULIB_defined_wctype_functions 1 +#endif + +#if 1 +_GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc)); +#endif +#if 1 +_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc)); +#endif +#if 1 +_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc)); +#endif +#if IN_GETTEXT_TOOLS_LIBGREP +# if 1 +_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc)); +# else +_GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc)); +# endif +#endif +#if 1 +_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc)); +#endif +#if 1 +_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (iswlower, int, (wint_t wc)); +#endif +#if 1 +_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (iswprint, int, (wint_t wc)); +#endif +#if 1 +_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc)); +#endif +#if 1 +_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (iswspace, int, (wint_t wc)); +#endif +#if 1 +_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (iswupper, int, (wint_t wc)); +#endif +#if IN_GETTEXT_TOOLS_LIBGREP +# if 1 +_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc)); +# else +_GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc)); +# endif +#endif +#if __GLIBC__ >= 2 +_GL_CXXALIASWARN (iswalnum); +_GL_CXXALIASWARN (iswalpha); +_GL_CXXALIASWARN (iswcntrl); +_GL_CXXALIASWARN (iswdigit); +_GL_CXXALIASWARN (iswgraph); +_GL_CXXALIASWARN (iswlower); +_GL_CXXALIASWARN (iswprint); +_GL_CXXALIASWARN (iswpunct); +_GL_CXXALIASWARN (iswspace); +_GL_CXXALIASWARN (iswupper); +_GL_CXXALIASWARN (iswxdigit); +#endif + +#if IN_GETTEXT_TOOLS_LIBGREP +# if 1 || 0 +_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc)); +# else +_GL_CXXALIAS_SYS (iswblank, int, (wint_t wc)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (iswblank); +# endif +#endif + +#if !1 +# if !GNULIB_defined_wctype_t +typedef void * wctype_t; +# define GNULIB_defined_wctype_t 1 +# endif +#elif 1 +# if !GNULIB_defined_wctype_t +typedef void *rpl_wctype_t; +# undef wctype_t +# define wctype_t rpl_wctype_t +# define GNULIB_defined_wctype_t 1 +# endif +#endif + +/* Get a descriptor for a wide character property. */ +#if IN_GETTEXT_TOOLS_LIBGREP +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctype +# define wctype rpl_wctype +# endif +_GL_FUNCDECL_RPL (wctype, wctype_t, (const char *name) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (wctype, wctype_t, (const char *name)); +# else +# if !1 +_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wctype); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wctype +# if HAVE_RAW_DECL_WCTYPE +_GL_WARN_ON_USE (wctype, "wctype is unportable - " + "use gnulib module wctype for portability"); +# endif +#endif + +/* Test whether a wide character has a given property. + The argument WC must be either a wchar_t value or WEOF. + The argument DESC must have been returned by the wctype() function. */ +#if IN_GETTEXT_TOOLS_LIBGREP +# if 1 || 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef iswctype +# define iswctype rpl_iswctype +# endif +_GL_FUNCDECL_RPL (iswctype, int, (wint_t wc, wctype_t desc)); +_GL_CXXALIAS_RPL (iswctype, int, (wint_t wc, wctype_t desc)); +# else +# if !1 +_GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc)); +# endif +_GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (iswctype); +# endif +#elif defined GNULIB_POSIXCHECK +# undef iswctype +# if HAVE_RAW_DECL_ISWCTYPE +_GL_WARN_ON_USE (iswctype, "iswctype is unportable - " + "use gnulib module iswctype for portability"); +# endif +#endif + +#if 1 || defined __MINGW32__ +_GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc)); +_GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc)); +_GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc)); +#endif +#if __GLIBC__ >= 2 +_GL_CXXALIASWARN (towlower); +_GL_CXXALIASWARN (towupper); +#endif + +#if !1 +# if !GNULIB_defined_wctrans_t +typedef void * wctrans_t; +# define GNULIB_defined_wctrans_t 1 +# endif +#elif 0 +# if !GNULIB_defined_wctrans_t +typedef void *rpl_wctrans_t; +# undef wctrans_t +# define wctrans_t rpl_wctrans_t +# define GNULIB_defined_wctrans_t 1 +# endif +#endif + +/* Get a descriptor for a wide character case conversion. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctrans +# define wctrans rpl_wctrans +# endif +_GL_FUNCDECL_RPL (wctrans, wctrans_t, (const char *name) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (wctrans, wctrans_t, (const char *name)); +# else +# if !1 +_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (wctrans); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wctrans +# if HAVE_RAW_DECL_WCTRANS +_GL_WARN_ON_USE (wctrans, "wctrans is unportable - " + "use gnulib module wctrans for portability"); +# endif +#endif + +/* Perform a given case conversion on a wide character. + The argument WC must be either a wchar_t value or WEOF. + The argument DESC must have been returned by the wctrans() function. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef towctrans +# define towctrans rpl_towctrans +# endif +_GL_FUNCDECL_RPL (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +_GL_CXXALIAS_RPL (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +# else +# if !1 +_GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +# endif +_GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (towctrans); +# endif +#elif defined GNULIB_POSIXCHECK +# undef towctrans +# if HAVE_RAW_DECL_TOWCTRANS +_GL_WARN_ON_USE (towctrans, "towctrans is unportable - " + "use gnulib module towctrans for portability"); +# endif +#endif + +_GL_INLINE_HEADER_END + +#endif /* _GL_GRGL_WCTYPE_H */ +#endif /* _GL_GRGL_WCTYPE_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle.h b/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle.h deleted file mode 100644 index c1b381db7..000000000 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle.h +++ /dev/null @@ -1,629 +0,0 @@ -/* Public API of the libtextstyle library. - Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2006, 2019. */ - -#ifndef _TEXTSTYLE_H -#define _TEXTSTYLE_H - -#include -#include -#include -#include -#include - -/* Meta information. */ -#include - -/* ----------------------------- From ostream.h ----------------------------- */ - -/* Describes the scope of a flush operation. */ -typedef enum -{ - /* Flushes buffers in this ostream_t. - Use this value if you want to write to the underlying ostream_t. */ - FLUSH_THIS_STREAM = 0, - /* Flushes all buffers in the current process. - Use this value if you want to write to the same target through a - different file descriptor or a FILE stream. */ - FLUSH_THIS_PROCESS = 1, - /* Flushes buffers in the current process and attempts to flush the buffers - in the kernel. - Use this value so that some other process (or the kernel itself) - may write to the same target. */ - FLUSH_ALL = 2 -} ostream_flush_scope_t; - - -/* An output stream is an object to which one can feed a sequence of bytes. */ - -struct any_ostream_representation; -typedef struct any_ostream_representation * ostream_t; - -/* Functions that invoke the methods. */ -#ifdef __cplusplus -extern "C" { -#endif -extern void ostream_write_mem (ostream_t first_arg, const void *data, size_t len); -extern void ostream_flush (ostream_t first_arg, ostream_flush_scope_t scope); -extern void ostream_free (ostream_t first_arg); -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Write a string's contents to a stream. */ -extern void ostream_write_str (ostream_t stream, const char *string); - -/* Writes formatted output to a stream. - Returns the size of formatted output, or a negative value in case of an - error. */ -extern ptrdiff_t ostream_printf (ostream_t stream, const char *format, ...) -#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3 - __attribute__ ((__format__ (__printf__, 2, 3))) -#endif - ; -extern ptrdiff_t ostream_vprintf (ostream_t stream, - const char *format, va_list args) -#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3 - __attribute__ ((__format__ (__printf__, 2, 0))) -#endif - ; - -#ifdef __cplusplus -} -#endif - -/* ------------------------- From styled-ostream.h ------------------------- */ - -/* A styled output stream is an object to which one can feed a sequence of - bytes, marking some runs of text as belonging to specific CSS classes, - where the rendering of the CSS classes is defined through a CSS (cascading - style sheet). */ - -/* styled_ostream_t is a subtype of ostream_t. */ -typedef ostream_t styled_ostream_t; - -/* Functions that invoke the methods. */ -#ifdef __cplusplus -extern "C" { -#endif -extern void styled_ostream_write_mem (styled_ostream_t first_arg, const void *data, size_t len); -extern void styled_ostream_flush (styled_ostream_t first_arg, ostream_flush_scope_t scope); -extern void styled_ostream_free (styled_ostream_t first_arg); -extern void styled_ostream_begin_use_class (styled_ostream_t first_arg, const char *classname); -extern void styled_ostream_end_use_class (styled_ostream_t first_arg, const char *classname); -extern const char *styled_ostream_get_hyperlink_ref (styled_ostream_t first_arg); -extern const char *styled_ostream_get_hyperlink_id (styled_ostream_t first_arg); -extern void styled_ostream_set_hyperlink (styled_ostream_t first_arg, const char *ref, const char *id); -/* Like styled_ostream_flush (first_arg, FLUSH_THIS_STREAM), except that it - leaves the destination with the current text style enabled, instead - of with the default text style. - After calling this function, you can output strings without newlines(!) - to the underlying stream, and they will be rendered like strings passed - to 'ostream_write_mem', 'ostream_write_str', or 'ostream_write_printf'. */ -extern void styled_ostream_flush_to_current_style (styled_ostream_t stream); -#ifdef __cplusplus -} -#endif - -/* -------------------------- From file-ostream.h -------------------------- */ - -/* file_ostream_t is a subtype of ostream_t. */ -typedef ostream_t file_ostream_t; - -/* Functions that invoke the methods. */ -#ifdef __cplusplus -extern "C" { -#endif -extern void file_ostream_write_mem (file_ostream_t first_arg, const void *data, size_t len); -extern void file_ostream_flush (file_ostream_t first_arg, ostream_flush_scope_t scope); -extern void file_ostream_free (file_ostream_t first_arg); -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Create an output stream referring to FP. - Note that the resulting stream must be closed before FP can be closed. */ -extern file_ostream_t file_ostream_create (FILE *fp); - - -#ifdef __cplusplus -} -#endif - -/* --------------------------- From fd-ostream.h --------------------------- */ - -/* fd_ostream_t is a subtype of ostream_t. */ -typedef ostream_t fd_ostream_t; - -/* Functions that invoke the methods. */ -#ifdef __cplusplus -extern "C" { -#endif -extern void fd_ostream_write_mem (fd_ostream_t first_arg, const void *data, size_t len); -extern void fd_ostream_flush (fd_ostream_t first_arg, ostream_flush_scope_t scope); -extern void fd_ostream_free (fd_ostream_t first_arg); -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Create an output stream referring to the file descriptor FD. - FILENAME is used only for error messages. - Note that the resulting stream must be closed before FD can be closed. */ -extern fd_ostream_t fd_ostream_create (int fd, const char *filename, - bool buffered); - - -#ifdef __cplusplus -} -#endif - -/* -------------------------- From term-ostream.h -------------------------- */ - -/* Querying and setting of text attributes. - The stream has a notion of the current text attributes; they apply - implicitly to all following output. The attributes are automatically - reset when the stream is closed. - Note: Not all terminal types can actually render all attributes adequately. - For example, xterm cannot render POSTURE_ITALIC nor the combination of - WEIGHT_BOLD and UNDERLINE_ON. */ - -/* Colors are represented by indices >= 0 in a stream dependent format. */ -typedef int term_color_t; -/* The value -1 denotes the default (foreground or background) color. */ -enum -{ - COLOR_DEFAULT = -1 /* unknown */ -}; - -typedef enum -{ - WEIGHT_NORMAL = 0, - WEIGHT_BOLD, - WEIGHT_DEFAULT = WEIGHT_NORMAL -} term_weight_t; - -typedef enum -{ - POSTURE_NORMAL = 0, - POSTURE_ITALIC, /* same as oblique */ - POSTURE_DEFAULT = POSTURE_NORMAL -} term_posture_t; - -typedef enum -{ - UNDERLINE_OFF = 0, - UNDERLINE_ON, - UNDERLINE_DEFAULT = UNDERLINE_OFF -} term_underline_t; - -/* term_ostream_t is a subtype of ostream_t. */ -typedef ostream_t term_ostream_t; - -/* Functions that invoke the methods. */ -#ifdef __cplusplus -extern "C" { -#endif -extern void term_ostream_write_mem (term_ostream_t first_arg, const void *data, size_t len); -extern void term_ostream_flush (term_ostream_t first_arg, ostream_flush_scope_t scope); -extern void term_ostream_free (term_ostream_t first_arg); -extern term_color_t term_ostream_rgb_to_color (term_ostream_t first_arg, int red, int green, int blue); -extern term_color_t term_ostream_get_color (term_ostream_t first_arg); -extern void term_ostream_set_color (term_ostream_t first_arg, term_color_t color); -extern term_color_t term_ostream_get_bgcolor (term_ostream_t first_arg); -extern void term_ostream_set_bgcolor (term_ostream_t first_arg, term_color_t color); -extern term_weight_t term_ostream_get_weight (term_ostream_t first_arg); -extern void term_ostream_set_weight (term_ostream_t first_arg, term_weight_t weight); -extern term_posture_t term_ostream_get_posture (term_ostream_t first_arg); -extern void term_ostream_set_posture (term_ostream_t first_arg, term_posture_t posture); -extern term_underline_t term_ostream_get_underline (term_ostream_t first_arg); -extern void term_ostream_set_underline (term_ostream_t first_arg, term_underline_t underline); -extern const char *term_ostream_get_hyperlink_ref (term_ostream_t first_arg); -extern const char *term_ostream_get_hyperlink_id (term_ostream_t first_arg); -extern void term_ostream_set_hyperlink (term_ostream_t first_arg, const char *ref, const char *id); -/* Like term_ostream_flush (first_arg, FLUSH_THIS_STREAM), except that it - leaves the terminal with the current text attributes enabled, instead of - with the default text attributes. - After calling this function, you can output strings without newlines(!) - to the underlying file descriptor, and they will be rendered like strings - passed to 'ostream_write_mem', 'ostream_write_str', or - 'ostream_write_printf'. */ -extern void term_ostream_flush_to_current_style (term_ostream_t first_arg); -#ifdef __cplusplus -} -#endif - -/* The amount of control to take over the underlying tty in order to avoid - garbled output on the screen, due to interleaved output of escape sequences - and output from the kernel (such as when the kernel echoes user's input - or when the kernel prints '^C' after the user pressed Ctrl-C). */ -typedef enum -{ - TTYCTL_AUTO = 0, /* Automatic best-possible choice. */ - TTYCTL_NONE, /* No control. - Result: Garbled output can occur, and the terminal can - be left in any state when the program is interrupted. */ - TTYCTL_PARTIAL, /* Signal handling. - Result: Garbled output can occur, but the terminal will - be left in the default state when the program is - interrupted. */ - TTYCTL_FULL /* Signal handling and disabling echo and flush-upon-signal. - Result: No garbled output, and the the terminal will - be left in the default state when the program is - interrupted. */ -} ttyctl_t; - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Create an output stream referring to the file descriptor FD. - FILENAME is used only for error messages. - TTY_CONTROL specifies the amount of control to take over the underlying tty. - The resulting stream will be line-buffered. - Note that the resulting stream must be closed before FD can be closed. */ -extern term_ostream_t - term_ostream_create (int fd, const char *filename, ttyctl_t tty_control); - - -#ifdef __cplusplus -} -#endif - -/* ------------------------- From memory-ostream.h ------------------------- */ - -/* memory_ostream_t is a subtype of ostream_t. */ -typedef ostream_t memory_ostream_t; - -/* Functions that invoke the methods. */ -#ifdef __cplusplus -extern "C" { -#endif -extern void memory_ostream_write_mem (memory_ostream_t first_arg, const void *data, size_t len); -extern void memory_ostream_flush (memory_ostream_t first_arg, ostream_flush_scope_t scope); -extern void memory_ostream_free (memory_ostream_t first_arg); -extern void memory_ostream_contents (memory_ostream_t first_arg, const void **bufp, size_t *buflenp); -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Create an output stream that accumulates the output in a memory buffer. */ -extern memory_ostream_t memory_ostream_create (void); - - -#ifdef __cplusplus -} -#endif - -/* -------------------------- From iconv-ostream.h -------------------------- */ - -#if LIBTEXTSTYLE_USES_ICONV - -/* iconv_ostream_t is a subtype of ostream_t. */ -typedef ostream_t iconv_ostream_t; - -/* Functions that invoke the methods. */ -#ifdef __cplusplus -extern "C" { -#endif -extern void iconv_ostream_write_mem (iconv_ostream_t first_arg, const void *data, size_t len); -extern void iconv_ostream_flush (iconv_ostream_t first_arg, ostream_flush_scope_t scope); -extern void iconv_ostream_free (iconv_ostream_t first_arg); -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Create an output stream that converts from FROM_ENCODING to TO_ENCODING, - writing the result to DESTINATION. */ -extern iconv_ostream_t iconv_ostream_create (const char *from_encoding, - const char *to_encoding, - ostream_t destination); - - -#ifdef __cplusplus -} -#endif - -#endif /* LIBTEXTSTYLE_USES_ICONV */ - -/* -------------------------- From html-ostream.h -------------------------- */ - -/* html_ostream_t is a subtype of ostream_t. */ -typedef ostream_t html_ostream_t; - -/* Functions that invoke the methods. */ -#ifdef __cplusplus -extern "C" { -#endif -extern void html_ostream_write_mem (html_ostream_t first_arg, const void *data, size_t len); -extern void html_ostream_flush (html_ostream_t first_arg, ostream_flush_scope_t scope); -extern void html_ostream_free (html_ostream_t first_arg); -extern void html_ostream_begin_span (html_ostream_t first_arg, const char *classname); -extern void html_ostream_end_span (html_ostream_t first_arg, const char *classname); -extern const char *html_ostream_get_hyperlink_ref (html_ostream_t first_arg); -extern void html_ostream_set_hyperlink_ref (html_ostream_t first_arg, const char *ref); -/* Like html_ostream_flush (first_arg, FLUSH_THIS_STREAM), except that it - leaves the destination with the current text style enabled, instead - of with the default text style. - After calling this function, you can output strings without newlines(!) - to the underlying stream, and they will be rendered like strings passed - to 'ostream_write_mem', 'ostream_write_str', or 'ostream_write_printf'. */ -extern void html_ostream_flush_to_current_style (html_ostream_t stream); -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Create an output stream that takes input in the UTF-8 encoding and - writes it in HTML form on DESTINATION. - This stream produces a sequence of lines. The caller is responsible - for opening the elements before and for closing them after - the use of this stream. - Note that the resulting stream must be closed before DESTINATION can be - closed. */ -extern html_ostream_t html_ostream_create (ostream_t destination); - - -#ifdef __cplusplus -} -#endif - -/* ----------------------- From term-styled-ostream.h ----------------------- */ - -/* term_styled_ostream_t is a subtype of styled_ostream_t. */ -typedef styled_ostream_t term_styled_ostream_t; - -/* Functions that invoke the methods. */ -#ifdef __cplusplus -extern "C" { -#endif -extern void term_styled_ostream_write_mem (term_styled_ostream_t first_arg, const void *data, size_t len); -extern void term_styled_ostream_flush (term_styled_ostream_t first_arg, ostream_flush_scope_t scope); -extern void term_styled_ostream_free (term_styled_ostream_t first_arg); -extern void term_styled_ostream_begin_use_class (term_styled_ostream_t first_arg, const char *classname); -extern void term_styled_ostream_end_use_class (term_styled_ostream_t first_arg, const char *classname); -extern const char *term_styled_ostream_get_hyperlink_ref (term_styled_ostream_t first_arg); -extern const char *term_styled_ostream_get_hyperlink_id (term_styled_ostream_t first_arg); -extern void term_styled_ostream_set_hyperlink (term_styled_ostream_t first_arg, const char *ref, const char *id); -extern void term_styled_ostream_flush_to_current_style (term_styled_ostream_t first_arg); -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Create an output stream referring to the file descriptor FD, styled with - the file CSS_FILENAME. - FILENAME is used only for error messages. - TTY_CONTROL specifies the amount of control to take over the underlying tty. - Note that the resulting stream must be closed before FD can be closed. - Return NULL upon failure. */ -extern term_styled_ostream_t - term_styled_ostream_create (int fd, const char *filename, - ttyctl_t tty_control, - const char *css_filename); - - -#ifdef __cplusplus -} -#endif - -/* ----------------------- From html-styled-ostream.h ----------------------- */ - -/* html_styled_ostream_t is a subtype of styled_ostream_t. */ -typedef styled_ostream_t html_styled_ostream_t; - -/* Functions that invoke the methods. */ -#ifdef __cplusplus -extern "C" { -#endif -extern void html_styled_ostream_write_mem (html_styled_ostream_t first_arg, const void *data, size_t len); -extern void html_styled_ostream_flush (html_styled_ostream_t first_arg, ostream_flush_scope_t scope); -extern void html_styled_ostream_free (html_styled_ostream_t first_arg); -extern void html_styled_ostream_begin_use_class (html_styled_ostream_t first_arg, const char *classname); -extern void html_styled_ostream_end_use_class (html_styled_ostream_t first_arg, const char *classname); -extern const char *html_styled_ostream_get_hyperlink_ref (html_styled_ostream_t first_arg); -extern const char *html_styled_ostream_get_hyperlink_id (html_styled_ostream_t first_arg); -extern void html_styled_ostream_set_hyperlink (html_styled_ostream_t first_arg, const char *ref, const char *id); -extern void html_styled_ostream_flush_to_current_style (html_styled_ostream_t first_arg); -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Create an output stream that takes input in the UTF-8 encoding and - writes it in HTML form on DESTINATION, styled with the file CSS_FILENAME. - Note that the resulting stream must be closed before DESTINATION can be - closed. */ -extern html_styled_ostream_t - html_styled_ostream_create (ostream_t destination, - const char *css_filename); - - -#ifdef __cplusplus -} -#endif - -/* ----------------------- From noop-styled-ostream.h ----------------------- */ - -/* noop_styled_ostream_t is a subtype of styled_ostream_t. */ -typedef styled_ostream_t noop_styled_ostream_t; - -/* Functions that invoke the methods. */ -#ifdef __cplusplus -extern "C" { -#endif -extern void noop_styled_ostream_write_mem (noop_styled_ostream_t first_arg, const void *data, size_t len); -extern void noop_styled_ostream_flush (noop_styled_ostream_t first_arg, ostream_flush_scope_t scope); -extern void noop_styled_ostream_free (noop_styled_ostream_t first_arg); -extern void noop_styled_ostream_begin_use_class (noop_styled_ostream_t first_arg, const char *classname); -extern void noop_styled_ostream_end_use_class (noop_styled_ostream_t first_arg, const char *classname); -extern const char *noop_styled_ostream_get_hyperlink_ref (noop_styled_ostream_t first_arg); -extern const char *noop_styled_ostream_get_hyperlink_id (noop_styled_ostream_t first_arg); -extern void noop_styled_ostream_set_hyperlink (noop_styled_ostream_t first_arg, const char *ref, const char *id); -extern void noop_styled_ostream_flush_to_current_style (noop_styled_ostream_t first_arg); -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Create an output stream that delegates to DESTINATION and that supports - the styling operations as no-ops. - If PASS_OWNERSHIP is true, closing the resulting stream will automatically - close the DESTINATION. - Note that if PASS_OWNERSHIP is false, the resulting stream must be closed - before DESTINATION can be closed. */ -extern noop_styled_ostream_t - noop_styled_ostream_create (ostream_t destination, bool pass_ownership); - - -#ifdef __cplusplus -} -#endif - -/* ------------------------------ From color.h ------------------------------ */ - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Whether to output a test page. */ -extern LIBTEXTSTYLE_DLL_VARIABLE bool color_test_mode; - -/* Color option. */ -enum color_option { color_no, color_tty, color_yes, color_html }; -extern LIBTEXTSTYLE_DLL_VARIABLE enum color_option color_mode; - -/* Style to use when coloring. */ -extern LIBTEXTSTYLE_DLL_VARIABLE const char *style_file_name; - -/* --color argument handling. Return an error indicator. */ -extern bool handle_color_option (const char *option); - -/* --style argument handling. */ -extern void handle_style_option (const char *option); - -/* Print a color test page. */ -extern void print_color_test (void); - -/* Assign a default value to style_file_name if necessary. - STYLE_FILE_ENVVAR is an environment variable that, when set to a non-empty - value, specifies the style file to use. This environment variable is meant - to be set by the user. - STYLESDIR_ENVVAR is an environment variable that, when set to a non-empty - value, specifies the directory with the style files, or NULL. This is - necessary for running the testsuite before "make install". - STYLESDIR_AFTER_INSTALL is the directory with the style files after - "make install". - DEFAULT_STYLE_FILE is the file name of the default style file, relative to - STYLESDIR. */ -extern void style_file_prepare (const char *style_file_envvar, - const char *stylesdir_envvar, - const char *stylesdir_after_install, - const char *default_style_file); - - -#ifdef __cplusplus -} -#endif - -/* ------------------------------ From misc.h ------------------------------ */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Create an output stream referring to the file descriptor FD, styled with - the file CSS_FILENAME if possible. - FILENAME is used only for error messages. - TTY_CONTROL specifies the amount of control to take over the underlying tty. - Note that the resulting stream must be closed before FD can be closed. */ -extern styled_ostream_t - styled_ostream_create (int fd, const char *filename, - ttyctl_t tty_control, - const char *css_filename); - -/* Set the exit value upon failure within libtextstyle. */ -extern void libtextstyle_set_failure_exit_code (int exit_code); - -#ifdef __cplusplus -} -#endif - -/* ----------------------- Exported gnulib overrides ----------------------- */ - -#if defined _WIN32 && ! defined __CYGWIN__ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -extern int libtextstyle_isatty (int fd); -# undef isatty -# define isatty libtextstyle_isatty - -# ifdef __cplusplus -} -# endif - -#endif - -/* ------------------------------------------------------------------------- */ - -#endif /* _TEXTSTYLE_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/stdbool.h b/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/stdbool.h deleted file mode 100644 index 20347b94b..000000000 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/stdbool.h +++ /dev/null @@ -1,117 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#if !defined _GL_STDBOOL_H -#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) -#include -#else -/* Copyright (C) 2001-2003, 2006-2017, 2019 Free Software Foundation, Inc. - Written by Bruno Haible , 2001. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, see . */ - -#ifndef _TEXTSTYLE_STDBOOL_H -#define _TEXTSTYLE_STDBOOL_H - -/* ISO C 99 for platforms that lack it. */ - -/* Usage suggestions: - - Programs that use should be aware of some limitations - and standards compliance issues. - - Standards compliance: - - - must be #included before 'bool', 'false', 'true' - can be used. - - - You cannot assume that sizeof (bool) == 1. - - - Programs should not undefine the macros bool, true, and false, - as C99 lists that as an "obsolescent feature". - - Limitations of this substitute, when used in a C89 environment: - - - must be #included before the '_Bool' type can be used. - - - You cannot assume that _Bool is a typedef; it might be a macro. - - - Bit-fields of type 'bool' are not supported. Portable code - should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - - - In C99, casts and automatic conversions to '_Bool' or 'bool' are - performed in such a way that every nonzero value gets converted - to 'true', and zero gets converted to 'false'. This doesn't work - with this substitute. With this substitute, only the values 0 and 1 - give the expected result when converted to _Bool' or 'bool'. - - - C99 allows the use of (_Bool)0.0 in constant expressions, but - this substitute cannot always provide this property. - - Also, it is suggested that programs use 'bool' rather than '_Bool'; - this isn't required, but 'bool' is more common. */ - - -/* 7.16. Boolean type and values */ - -#ifdef __cplusplus - /* Assume the compiler has 'bool' and '_Bool'. */ -#else - /* is known to exist and work with the following compilers: - - GNU C 3.0 or newer, on any platform, - - Intel C, - - MSVC 12 (Visual Studio 2013) or newer, - - Sun C, on Solaris, if _STDC_C99 is defined, - - AIX xlc, if _ANSI_C_SOURCE is defined, - - HP C, on HP-UX 11.31 or newer. - It is know not to work with: - - Sun C, on Solaris, if __C99FEATURES__ is defined but _STDC_C99 is not, - - MIPSpro C 7.30, on IRIX. */ -# if (__GNUC__ >= 3) \ - || defined __INTEL_COMPILER \ - || (_MSC_VER >= 1800) \ - || (defined __SUNPRO_C && defined _STDC_C99) \ - || (defined _AIX && !defined __GNUC__ && defined _ANSI_C_SOURCE) \ - || defined __HP_cc - /* Assume the compiler has . */ -# include -# else - /* Need to define _Bool ourselves. As 'signed char' or as an enum type? - Use of a typedef, with SunPRO C, leads to a stupid - "warning: _Bool is a keyword in ISO C99". - Use of an enum type, with IRIX cc, leads to a stupid - "warning(1185): enumerated type mixed with another type". - Even the existence of an enum type, without a typedef, - "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. - The only benefit of the enum, debuggability, is not important - with these compilers. So use 'signed char' and no enum. */ -# define _Bool signed char -# define bool _Bool -# endif -#endif - -/* The other macros must be usable in preprocessor directives. */ -#ifdef __cplusplus -# define false false -# define true true -#else -# undef false -# define false 0 -# undef true -# define true 1 -#endif - -#define __bool_true_false_are_defined 1 - -#endif /* _TEXTSTYLE_STDBOOL_H */ -#endif -#endif diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/version.h b/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/version.h deleted file mode 100644 index 2303f789f..000000000 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/version.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Meta information about GNU libtextstyle. - Copyright (C) 2009-2010, 2019 Free Software Foundation, Inc. - Written by Bruno Haible , 2009. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . */ - -#ifndef _TEXTSTYLE_VERSION_H -#define _TEXTSTYLE_VERSION_H - -/* Get LIBTEXTSTYLE_DLL_VARIABLE. */ -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Version number: (major<<16) + (minor<<8) + subminor. */ -#define _LIBTEXTSTYLE_VERSION 0x001500 -extern LIBTEXTSTYLE_DLL_VARIABLE const int _libtextstyle_version; /* Likewise */ - - -/* 1 if libtextstyle was built with iconv support, 0 if not. */ -#define LIBTEXTSTYLE_USES_ICONV 1 - - -#ifdef __cplusplus -} -#endif - - -#endif /* _TEXTSTYLE_VERSION_H */ diff --git a/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/woe32dll.h b/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/woe32dll.h deleted file mode 100644 index 9511e4fcf..000000000 --- a/gvsbuild/patches/gettext/msvc/gettext-tools/src/textstyle/woe32dll.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Support for variables in shared libraries on Windows platforms. - Copyright (C) 2009, 2019 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2009. */ - -#ifndef _TEXTSTYLE_WOE32DLL_H -#define _TEXTSTYLE_WOE32DLL_H - -#ifdef IN_LIBTEXTSTYLE -/* All code is collected in a single library, */ -# define LIBTEXTSTYLE_DLL_VARIABLE __declspec (dllexport) -#else -/* References from outside of libtextstyle. */ -# define LIBTEXTSTYLE_DLL_VARIABLE __declspec (dllimport) -#endif - -#endif /* _TEXTSTYLE_WOE32DLL_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/config.h b/gvsbuild/patches/gettext/msvc/libtextstyle/config.h similarity index 56% rename from gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/config.h rename to gvsbuild/patches/gettext/msvc/libtextstyle/config.h index 3d67e667b..f4dca5139 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/config.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/config.h @@ -1,6 +1,10 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Witness that has been included. */ +#define _GL_CONFIG_H_INCLUDED 1 + + /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ @@ -78,6 +82,10 @@ "__gnu_printf__" instead of "__printf__" */ /* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module reallocarray shall be considered present. */ +#define GNULIB_REALLOCARRAY 1 + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module scanf shall be considered present. */ #define GNULIB_SCANF 1 @@ -90,6 +98,12 @@ whether the gnulib module strerror shall be considered present. */ #define GNULIB_STRERROR 1 +/* Define to 1 when the gnulib module calloc-gnu should be tested. */ +#define GNULIB_TEST_CALLOC_GNU 1 + +/* Define to 1 when the gnulib module calloc-posix should be tested. */ +#define GNULIB_TEST_CALLOC_POSIX 1 + /* Define to 1 when the gnulib module cloexec should be tested. */ #define GNULIB_TEST_CLOEXEC 1 @@ -102,24 +116,60 @@ /* Define to 1 when the gnulib module fcntl should be tested. */ #define GNULIB_TEST_FCNTL 1 +/* Define to 1 when the gnulib module fgetc should be tested. */ +#define GNULIB_TEST_FGETC 1 + +/* Define to 1 when the gnulib module fgets should be tested. */ +#define GNULIB_TEST_FGETS 1 + +/* Define to 1 when the gnulib module fprintf should be tested. */ +#define GNULIB_TEST_FPRINTF 1 + +/* Define to 1 when the gnulib module fputc should be tested. */ +#define GNULIB_TEST_FPUTC 1 + +/* Define to 1 when the gnulib module fputs should be tested. */ +#define GNULIB_TEST_FPUTS 1 + +/* Define to 1 when the gnulib module fread should be tested. */ +#define GNULIB_TEST_FREAD 1 + +/* Define to 1 when the gnulib module free-posix should be tested. */ +#define GNULIB_TEST_FREE_POSIX 1 + /* Define to 1 when the gnulib module frexp should be tested. */ #define GNULIB_TEST_FREXP 1 /* Define to 1 when the gnulib module frexpl should be tested. */ #define GNULIB_TEST_FREXPL 1 +/* Define to 1 when the gnulib module fscanf should be tested. */ +#define GNULIB_TEST_FSCANF 1 + /* Define to 1 when the gnulib module fstat should be tested. */ #define GNULIB_TEST_FSTAT 1 /* Define to 1 when the gnulib module fsync should be tested. */ #define GNULIB_TEST_FSYNC 1 +/* Define to 1 when the gnulib module fwrite should be tested. */ +#define GNULIB_TEST_FWRITE 1 + +/* Define to 1 when the gnulib module getc should be tested. */ +#define GNULIB_TEST_GETC 1 + +/* Define to 1 when the gnulib module getchar should be tested. */ +#define GNULIB_TEST_GETCHAR 1 + /* Define to 1 when the gnulib module getdtablesize should be tested. */ #define GNULIB_TEST_GETDTABLESIZE 1 /* Define to 1 when the gnulib module gethostname should be tested. */ #define GNULIB_TEST_GETHOSTNAME 1 +/* Define to 1 when the gnulib module getprogname should be tested. */ +#define GNULIB_TEST_GETPROGNAME 1 + /* Define to 1 when the gnulib module gettimeofday should be tested. */ #define GNULIB_TEST_GETTIMEOFDAY 1 @@ -144,21 +194,51 @@ /* Define to 1 when the gnulib module log10 should be tested. */ #define GNULIB_TEST_LOG10 1 +/* Define to 1 when the gnulib module malloc-gnu should be tested. */ +#define GNULIB_TEST_MALLOC_GNU 1 + /* Define to 1 when the gnulib module malloc-posix should be tested. */ #define GNULIB_TEST_MALLOC_POSIX 1 +/* Define to 1 when the gnulib module mbszero should be tested. */ +#define GNULIB_TEST_MBSZERO 1 + /* Define to 1 when the gnulib module memchr should be tested. */ #define GNULIB_TEST_MEMCHR 1 /* Define to 1 when the gnulib module open should be tested. */ #define GNULIB_TEST_OPEN 1 +/* Define to 1 when the gnulib module printf should be tested. */ +#define GNULIB_TEST_PRINTF 1 + +/* Define to 1 when the gnulib module putc should be tested. */ +#define GNULIB_TEST_PUTC 1 + +/* Define to 1 when the gnulib module putchar should be tested. */ +#define GNULIB_TEST_PUTCHAR 1 + +/* Define to 1 when the gnulib module puts should be tested. */ +#define GNULIB_TEST_PUTS 1 + /* Define to 1 when the gnulib module raise should be tested. */ #define GNULIB_TEST_RAISE 1 /* Define to 1 when the gnulib module read should be tested. */ #define GNULIB_TEST_READ 1 +/* Define to 1 when the gnulib module reallocarray should be tested. */ +#define GNULIB_TEST_REALLOCARRAY 1 + +/* Define to 1 when the gnulib module realloc-gnu should be tested. */ +#define GNULIB_TEST_REALLOC_GNU 1 + +/* Define to 1 when the gnulib module realloc-posix should be tested. */ +#define GNULIB_TEST_REALLOC_POSIX 1 + +/* Define to 1 when the gnulib module scanf should be tested. */ +#define GNULIB_TEST_SCANF 1 + /* Define to 1 when the gnulib module sigaction should be tested. */ #define GNULIB_TEST_SIGACTION 1 @@ -183,6 +263,12 @@ /* Define to 1 when the gnulib module vasprintf should be tested. */ #define GNULIB_TEST_VASPRINTF 1 +/* Define to 1 when the gnulib module vfprintf should be tested. */ +#define GNULIB_TEST_VFPRINTF 1 + +/* Define to 1 when the gnulib module vprintf should be tested. */ +#define GNULIB_TEST_VPRINTF 1 + /* Define to 1 when the gnulib module vsnprintf should be tested. */ #define GNULIB_TEST_VSNPRINTF 1 @@ -193,12 +279,19 @@ whether the gnulib module unistr/u8-mbtouc shall be considered present. */ #define GNULIB_UNISTR_U8_MBTOUC 1 +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module xalloc shall be considered present. */ +#define GNULIB_XALLOC 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module xalloc-die shall be considered present. */ +#define GNULIB_XALLOC_DIE 1 + /* Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution. */ #define HAVE_ALLOCA 1 -/* Define to 1 if you have and it should be used (not on Ultrix). - */ +/* Define to 1 if works. */ /* #undef HAVE_ALLOCA_H */ /* Define to 1 if you have the header file. */ @@ -228,6 +321,20 @@ /* Define to 1 if you have the header file. */ #define HAVE_CTYPE_H 1 +/* Define to 1 if the alignas and alignof keywords work. */ +/* #undef HAVE_C_ALIGNASOF */ + +/* Define to 1 if bool, true and false work as per C2023. */ +/* #undef HAVE_C_BOOL */ + +/* Define to 1 if the static_assert keyword works. */ +#if (_MSC_VER >= 1931) +# define HAVE_C_STATIC_ASSERT 1 +#endif + +/* Define to 1 if C supports variable-length arrays. */ +/* #undef HAVE_C_VARARRAYS */ + /* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. */ #define HAVE_DECL_ALARM 0 @@ -244,10 +351,34 @@ don't. */ /* #undef HAVE_DECL_COPYSIGNL */ +/* Define to 1 if you have the declaration of `ecvt', and to 0 if you don't. + */ +#define HAVE_DECL_ECVT 1 + +/* Define to 1 if you have the declaration of `execvpe', and to 0 if you + don't. */ +#define HAVE_DECL_EXECVPE 0 + +/* Define to 1 if you have the declaration of `fcloseall', and to 0 if you + don't. */ +#define HAVE_DECL_FCLOSEALL 1 + +/* Define to 1 if you have the declaration of `fcvt', and to 0 if you don't. + */ +#define HAVE_DECL_FCVT 1 + +/* Define to 1 if you have the declaration of `gcvt', and to 0 if you don't. + */ +#define HAVE_DECL_GCVT 1 + /* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you don't. */ #define HAVE_DECL_GETDTABLESIZE 0 +/* Define to 1 if you have the declaration of `getw', and to 0 if you don't. + */ +#define HAVE_DECL_GETW 1 + /* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. */ #define HAVE_DECL_ISINF 1 @@ -260,6 +391,10 @@ and to 0 if you don't. */ #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 +/* Define to 1 if you have the declaration of `putw', and to 0 if you don't. + */ +#define HAVE_DECL_PUTW 1 + /* Define to 1 if you have the declaration of `snprintf', and to 0 if you don't. */ #define HAVE_DECL_SNPRINTF 1 @@ -272,6 +407,10 @@ don't. */ #define HAVE_DECL_VSNPRINTF 1 +/* Define to 1 if you have the declaration of `wcsdup', and to 0 if you don't. + */ +#define HAVE_DECL_WCSDUP 1 + /* Define to 1 if you have the declaration of `_snprintf', and to 0 if you don't. */ #define HAVE_DECL__SNPRINTF 1 @@ -289,6 +428,12 @@ /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 +/* Define to 1 if you have the `error' function. */ +/* #undef HAVE_ERROR */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ERROR_H */ + /* Define to 1 if you have the `fcntl' function. */ /* #undef HAVE_FCNTL */ @@ -301,8 +446,11 @@ /* Define to 1 if you have the header file. */ #define HAVE_FLOAT_H 1 +/* Define if the 'free' function is guaranteed to preserve errno. */ +/* #undef HAVE_FREE_POSIX */ + /* Define if the frexpl function is available in libc. */ -/* #undef HAVE_FREXPL_IN_LIBC */ +#define HAVE_FREXPL_IN_LIBC 1 /* Define if the frexp function is available in libc. */ #define HAVE_FREXP_IN_LIBC 1 @@ -358,6 +506,9 @@ /* Define if the isnan(long double) function is available in libc. */ /* #undef HAVE_ISNANL_IN_LIBC */ +/* Define if you have and nl_langinfo(CODESET). */ +/* #undef HAVE_LANGINFO_CODESET */ + /* Define if the ldexpl function is available in libc. */ #define HAVE_LDEXPL_IN_LIBC 1 @@ -379,7 +530,7 @@ /* Define to 1 if you have the header file. */ #define HAVE_MALLOC_H 1 -/* Define if the 'malloc' function is POSIX compliant. */ +/* Define if malloc, realloc, and calloc set errno on allocation failure. */ /* #undef HAVE_MALLOC_POSIX */ /* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including @@ -392,8 +543,14 @@ /* Define to 1 if you have the `mbrtowc' function. */ #define HAVE_MBRTOWC 1 -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 +/* Define to 1 if you have the `mbsinit' function. */ +/* #undef HAVE_MBSINIT */ + +/* Define to 1 if declares mbstate_t. */ +#define HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ /* Define to 1 if defines the MIN and MAX macros. */ /* #undef HAVE_MINMAX_IN_LIMITS_H */ @@ -436,6 +593,9 @@ /* Define to 1 if you have the `raise' function. */ #define HAVE_RAISE 1 +/* Define to 1 if you have the `reallocarray' function. */ +/* #undef HAVE_REALLOCARRAY */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_RESOLV_H */ @@ -445,6 +605,9 @@ /* Define to 1 if the system has the type `sa_family_t'. */ /* #undef HAVE_SA_FAMILY_T */ +/* Define to 1 if you have the header file. */ +#define HAVE_SDKDDKVER_H 1 + /* Define to 1 if you have the `setdtablesize' function. */ /* #undef HAVE_SETDTABLESIZE */ @@ -489,9 +652,19 @@ buffer had been large enough. */ #define HAVE_SNPRINTF_RETVAL_C99 1 +/* Define if the string produced by the snprintf function is always NUL + terminated. */ +#define HAVE_SNPRINTF_TRUNCATION_C99 1 + /* Define to 1 if you have the `stat' function. */ #define HAVE_STAT 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDCKDINT_H */ + /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -499,13 +672,16 @@ uintmax_t. */ #define HAVE_STDINT_H_WITH_UINTMAX 1 +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `stpcpy' function. */ /* #undef HAVE_STPCPY */ -/* Define to 1 if you have the `strerror_r' function. */ +/* Define if you have `strerror_r'. */ /* #undef HAVE_STRERROR_R */ /* Define to 1 if you have the `strftime' function. */ @@ -520,6 +696,9 @@ /* Define to 1 if you have the `strnlen' function. */ #define HAVE_STRNLEN 1 +/* Define to 1 if `decimal_point' is a member of `struct lconv'. */ +#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1 + /* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ /* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ @@ -568,6 +747,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SELECT_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SINGLE_THREADED_H */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SOCKET_H */ @@ -586,8 +768,8 @@ /* Define to 1 if you have the `tcdrain' function. */ /* #undef HAVE_TCDRAIN */ -/* Define to 1 if you have the `tcgetattr' function. */ -/* #undef HAVE_TCGETATTR */ +/* Define to 1 if the system has the 'tcgetattr' function. */ +#define HAVE_TCGETATTR 0 /* Define if tgetent(), tgetnum(), tgetstr(), tgetflag() are among the termcap library functions. */ @@ -615,6 +797,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_UNISTD_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTRING_WOE32DLL_H */ + /* Define to 1 if the system has the type 'unsigned long long int'. */ #define HAVE_UNSIGNED_LONG_LONG_INT 1 @@ -642,9 +827,6 @@ /* Define to 1 if you have the `wcslen' function. */ #define HAVE_WCSLEN 1 -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - /* Define to 1 if the compiler and linker support weak declarations of symbols. */ /* #undef HAVE_WEAK_SYMBOLS */ @@ -664,12 +846,119 @@ /* Define to 1 if you have the header file. */ #define HAVE_WS2TCPIP_H 1 -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - /* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ #define HAVE__SET_INVALID_PARAMETER_HANDLER 1 +/* Define to 1 if ctype.h defines __header_inline. */ +/* #undef HAVE___HEADER_INLINE */ + +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Oracle Developer Studio 12.6 + (Sun C 5.15 SunOS_sparc 2017/05/30). + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions (ISO C 99 section 6.7.4.(3). + This bug is known to occur on: + + OS X 10.8 and earlier; see: + https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log + + FreeBSD; see: + https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. + + GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. It defines a macro + __GNUC_STDC_INLINE__ to indicate this situation or a macro + __GNUC_GNU_INLINE__ to indicate the opposite situation. + GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline + semantics but warns, unless -fgnu89-inline is used: + warning: C99 inline functions are not supported; using GNU89 + warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute + It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. + */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined HAVE___HEADER_INLINE \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? (defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + && !defined __PCC__) \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined __PCC__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE _GL_UNUSED static +# define _GL_EXTERN_INLINE _GL_UNUSED static +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + /* Define HOST_NAME_MAX when does not define it. */ #define HOST_NAME_MAX 256 @@ -708,14 +997,25 @@ #endif +/* Define to 1 on musl libc. */ +/* #undef MUSL_LIBC */ + /* Define if the vasnprintf implementation needs special code for the 'a' and 'A' directives. */ #define NEED_PRINTF_DIRECTIVE_A 1 +/* Define if the vasnprintf implementation needs special code for the 'b' + directive. */ +#define NEED_PRINTF_DIRECTIVE_B 1 + /* Define if the vasnprintf implementation needs special code for the 'F' directive. */ /* #undef NEED_PRINTF_DIRECTIVE_F */ +/* Define if the vasnprintf implementation needs special code for the 'lc' + directive. */ +#define NEED_PRINTF_DIRECTIVE_LC 1 + /* Define if the vasnprintf implementation needs special code for the 'ls' directive. */ /* #undef NEED_PRINTF_DIRECTIVE_LS */ @@ -728,6 +1028,10 @@ out-of-memory conditions. */ #define NEED_PRINTF_ENOMEM 1 +/* Define if the vasnprintf implementation needs special code for the # flag + with a zero precision and a zero value in the 'x' and 'X' directives. */ +/* #undef NEED_PRINTF_FLAG_ALT_PRECISION_ZERO */ + /* Define if the vasnprintf implementation needs special code for the ' flag. */ #define NEED_PRINTF_FLAG_GROUPING 1 @@ -818,15 +1122,17 @@ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define to 1 if the `S_IS*' macros in do not work properly. */ /* #undef STAT_MACROS_BROKEN */ -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #define STDC_HEADERS 1 /* Define to 1 if strerror_r returns char *. */ @@ -846,6 +1152,10 @@ /* Define if the POSIX multithreading library can be used. */ /* #undef USE_POSIX_THREADS */ +/* Define if references to the POSIX multithreading library are satisfied by + libc. */ +/* #undef USE_POSIX_THREADS_FROM_LIBC */ + /* Define if references to the POSIX multithreading library should be made weak. */ /* #undef USE_POSIX_THREADS_WEAK */ @@ -858,19 +1168,44 @@ #ifndef _DARWIN_C_SOURCE # define _DARWIN_C_SOURCE 1 #endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif -/* Enable NetBSD extensions on NetBSD. */ +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ #ifndef _NETBSD_SOURCE # define _NETBSD_SOURCE 1 #endif -/* Enable OpenBSD extensions on NetBSD. */ +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ #ifndef _OPENBSD_SOURCE # define _OPENBSD_SOURCE 1 #endif -/* Enable threading extensions on Solaris. */ +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif @@ -886,11 +1221,15 @@ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # define __STDC_WANT_IEC_60559_DFP_EXT__ 1 #endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# define __STDC_WANT_IEC_60559_EXT__ 1 +#endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 #endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 #endif @@ -906,21 +1245,11 @@ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ #ifndef _XOPEN_SOURCE /* # undef _XOPEN_SOURCE */ #endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif /* Define if the native Windows multithreading API can be used. */ @@ -930,7 +1259,7 @@ #define VA_COPY va_copy /* Version number of package */ -#define VERSION "0.21" +#define VERSION "0.22.3" /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wchar_t'. */ @@ -967,14 +1296,11 @@ #endif -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ +/* Define to enable the declarations of ISO C 11 types and functions. */ +/* #undef _ISOC11_SOURCE */ -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 +/* Define to 1 on platforms where this makes off_t a 64-bit type. */ +/* #undef _LARGE_FILES */ /* The _Noreturn keyword of C11. */ #ifndef _Noreturn @@ -989,14 +1315,20 @@ AIX system header files and several gnulib header files use precisely this syntax with 'extern'. */ # define _Noreturn [[noreturn]] +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn # elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (_GL_GNUC_PREREQ (4, 7) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C +# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) @@ -1006,26 +1338,29 @@ #endif -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - /* Define to 1 in order to get the POSIX compatible declarations of socket functions. */ /* #undef _POSIX_PII_SOCKET */ -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ +/* Number of bits in time_t, on hosts where this is settable. */ +/* #undef _TIME_BITS */ /* For standard stat data types on VMS. */ #define _USE_STD_STAT 1 +/* Define to 1 on platforms where this makes time_t a 64-bit type. */ +/* #undef __MINGW_USE_VC2005_COMPAT */ + /* Define to 1 if the system predates C++11. */ /* #undef __STDC_CONSTANT_MACROS */ /* Define to 1 if the system predates C++11. */ /* #undef __STDC_LIMIT_MACROS */ +/* Define to 1 if C does not support variable-length arrays, and if the + compiler does not already define this. */ +#define __STDC_NO_VLA__ 1 + /* The _GL_ASYNC_SAFE marker should be attached to functions that are signal handlers (for signals other than SIGABRT, SIGPIPE) or can be invoked from such signal handlers. Such functions have some restrictions: @@ -1054,7 +1389,11 @@ /* Attributes. */ -#ifdef __has_attribute +#if (defined __has_attribute \ + && (!defined __clang_minor__ \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 5 <= __clang_major__))) # define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) #else # define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr @@ -1064,17 +1403,18 @@ # define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) # define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) # define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) +# define _GL_ATTR_diagnose_if 0 # define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) # define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) # define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) # define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) # define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) +# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) # ifdef _ICC # define _GL_ATTR_may_alias 0 # else # define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) # endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) # define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) # define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) # define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) @@ -1087,276 +1427,473 @@ # define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) #endif - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) +/* Use __has_c_attribute if available. However, do not use with + pre-C23 GCC, which can issue false positives if -Wpedantic. */ +#if (defined __has_c_attribute \ + && ! (_GL_GNUC_PREREQ (4, 6) \ + && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710)) +# define _GL_HAVE___HAS_C_ATTRIBUTE 1 #else -# define _GL_ATTRIBUTE_ALWAYS_INLINE +# define _GL_HAVE___HAS_C_ATTRIBUTE 0 #endif -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) +/* Define if, in a function declaration, the attributes in bracket syntax + [[...]] must come before the attributes in __attribute__((...)) syntax. + If this is defined, it is best to avoid the bracket syntax, so that the + various _GL_ATTRIBUTE_* can be cumulated on the same declaration in any + order. */ +#ifdef __cplusplus +# if defined __clang__ +# define _GL_BRACKET_BEFORE_ATTRIBUTE 1 +# endif #else -# define _GL_ATTRIBUTE_ARTIFICIAL +# if defined __GNUC__ && !defined __clang__ +# define _GL_BRACKET_BEFORE_ATTRIBUTE 1 +# endif #endif -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD +/* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function + is the size of the returned memory block. + _GL_ATTRIBUTE_ALLOC_SIZE ((M, N)) declares that the Mth argument multiplied + by the Nth argument of the function is the size of the returned memory block. + */ +/* Applies to: function, pointer to function, function types. */ +#ifndef _GL_ATTRIBUTE_ALLOC_SIZE +# if _GL_HAS_ATTRIBUTE (alloc_size) +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) +# else +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) +# endif #endif -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST +/* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the + function and report an error if it cannot do so. */ +/* Applies to: function. */ +#ifndef _GL_ATTRIBUTE_ALWAYS_INLINE +# if _GL_HAS_ATTRIBUTE (always_inline) +# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) +# else +# define _GL_ATTRIBUTE_ALWAYS_INLINE +# endif #endif -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED +/* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show + in stack traces when debugging. The compiler should omit the function from + stack traces. */ +/* Applies to: function. */ +#ifndef _GL_ATTRIBUTE_ARTIFICIAL +# if _GL_HAS_ATTRIBUTE (artificial) +# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) +# else +# define _GL_ATTRIBUTE_ARTIFICIAL +# endif #endif -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) +/* _GL_ATTRIBUTE_COLD declares that the function is rarely executed. */ +/* Applies to: functions. */ +/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at + . + Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */ +#ifndef _GL_ATTRIBUTE_COLD +# if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ +# ifndef __SUNPRO_C +# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) +# else +# define _GL_ATTRIBUTE_COLD __attribute__ ((cold)) +# endif +# else +# define _GL_ATTRIBUTE_COLD +# endif #endif -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +/* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate + calls to the function with the same arguments. + This attribute is safe for a function that neither depends on nor affects + observable state, and always returns exactly once - e.g., does not loop + forever, and does not call longjmp. + (This attribute is stricter than _GL_ATTRIBUTE_PURE.) */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_CONST +# if _GL_HAS_ATTRIBUTE (const) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _GL_ATTRIBUTE_CONST +# endif #endif -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. + _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if _GL_GNUC_PREREQ (11, 0) +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif #endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) +/* If gnulib's or has already defined this macro, continue + to use this earlier definition, since may not have been included + yet. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif #endif -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF +/* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated. + The compiler may warn if the entity is used. */ +/* Applies to: + - function, variable, + - struct, union, struct/union member, + - enumeration, enumeration item, + - typedef, + in C++ also: namespace, class, template specialization. */ +#ifndef _GL_ATTRIBUTE_DEPRECATED +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__deprecated__) +# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] +# endif +# endif +# endif +# if !defined _GL_ATTRIBUTE_DEPRECATED && _GL_HAS_ATTRIBUTE (deprecated) +# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) +# endif +# ifndef _GL_ATTRIBUTE_DEPRECATED +# define _GL_ATTRIBUTE_DEPRECATED +# endif #endif -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS +/* _GL_ATTRIBUTE_ERROR(msg) requests an error if a function is called and + the function call is not optimized away. + _GL_ATTRIBUTE_WARNING(msg) requests a warning if a function is called and + the function call is not optimized away. */ +/* Applies to: functions. */ +#if !(defined _GL_ATTRIBUTE_ERROR && defined _GL_ATTRIBUTE_WARNING) +# if _GL_HAS_ATTRIBUTE (error) +# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) +# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) +# elif _GL_HAS_ATTRIBUTE (diagnose_if) +# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error"))) +# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning"))) +# else +# define _GL_ATTRIBUTE_ERROR(msg) +# define _GL_ATTRIBUTE_WARNING(msg) +# endif #endif -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED +/* _GL_ATTRIBUTE_EXTERNALLY_VISIBLE declares that the entity should remain + visible to debuggers etc., even with '-fwhole-program'. */ +/* Applies to: functions, variables. */ +#ifndef _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +# if _GL_HAS_ATTRIBUTE (externally_visible) +# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) +# else +# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE +# endif #endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC +/* _GL_ATTRIBUTE_FALLTHROUGH declares that it is not a programming mistake if + the control flow falls through to the immediately following 'case' or + 'default' label. The compiler should not warn in this case. */ +/* Applies to: Empty statement (;), inside a 'switch' statement. */ +/* Always expands to something. */ +#ifndef _GL_ATTRIBUTE_FALLTHROUGH +# if _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__fallthrough__) +# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] +# endif +# endif +# if !defined _GL_ATTRIBUTE_FALLTHROUGH && _GL_HAS_ATTRIBUTE (fallthrough) +# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) +# endif +# ifndef _GL_ATTRIBUTE_FALLTHROUGH +# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) +# endif #endif -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD +/* _GL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK)) + declares that the STRING-INDEXth function argument is a format string of + style ARCHETYPE, which is one of: + printf, gnu_printf + scanf, gnu_scanf, + strftime, gnu_strftime, + strfmon, + or the same thing prefixed and suffixed with '__'. + If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK + are suitable for the format string. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_FORMAT +# if _GL_HAS_ATTRIBUTE (format) +# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +# else +# define _GL_ATTRIBUTE_FORMAT(spec) +# endif #endif -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE +/* _GL_ATTRIBUTE_LEAF declares that if the function is called from some other + compilation unit, it executes code from that unit only by return or by + exception handling. This declaration lets the compiler optimize that unit + more aggressively. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_LEAF +# if _GL_HAS_ATTRIBUTE (leaf) +# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) +# else +# define _GL_ATTRIBUTE_LEAF +# endif #endif -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if _GL_HAS_ATTRIBUTE (malloc) +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif #endif -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING +/* _GL_ATTRIBUTE_MAY_ALIAS declares that pointers to the type may point to the + same storage as pointers to other types. Thus this declaration disables + strict aliasing optimization. */ +/* Applies to: types. */ +/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */ +#ifndef _GL_ATTRIBUTE_MAY_ALIAS +# if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C +# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) +# else +# define _GL_ATTRIBUTE_MAY_ALIAS +# endif #endif -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW +/* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if + the entity is not used. The compiler should not warn if the entity is not + used. */ +/* Applies to: + - function, variable, + - struct, union, struct/union member, + - enumeration, enumeration item, + - typedef, + in C++ also: class. */ +/* In C++ and C23, this is spelled [[__maybe_unused__]]. + GCC's syntax is __attribute__ ((__unused__)). + clang supports both syntaxes. Except that with clang ≥ 6, < 10, in C++ mode, + __has_c_attribute (__maybe_unused__) yields true but the use of + [[__maybe_unused__]] nevertheless produces a warning. */ +#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if defined __clang__ && defined __cplusplus +# if !defined __apple_build_version__ && __clang_major__ >= 10 +# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# elif _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__maybe_unused__) +# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] +# endif +# endif +# endif +# ifndef _GL_ATTRIBUTE_MAYBE_UNUSED +# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED +# endif #endif +/* Alternative spelling of this macro, for convenience and for + compatibility with glibc/include/libc-symbols.h. */ +#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED +/* Earlier spellings of this macro. */ +#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED +/* _GL_ATTRIBUTE_NODISCARD declares that the caller of the function should not + discard the return value. The compiler may warn if the caller does not use + the return value, unless the caller uses something like ignore_value. */ +/* Applies to: function, enumeration, class. */ +#ifndef _GL_ATTRIBUTE_NODISCARD +# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE +# if defined __clang__ && defined __cplusplus + /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] produces + a warning. + The 1000 below means a yet unknown threshold. When clang++ version X + starts supporting [[__nodiscard__]] without warning about it, you can + replace the 1000 with X. */ +# if __clang_major__ >= 1000 +# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] +# endif +# elif _GL_HAVE___HAS_C_ATTRIBUTE +# if __has_c_attribute (__nodiscard__) +# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] +# endif +# endif +# endif +# if !defined _GL_ATTRIBUTE_NODISCARD && _GL_HAS_ATTRIBUTE (warn_unused_result) +# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) +# endif +# ifndef _GL_ATTRIBUTE_NODISCARD +# define _GL_ATTRIBUTE_NODISCARD +# endif #endif -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE +/* _GL_ATTRIBUTE_NOINLINE tells that the compiler should not inline the + function. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_NOINLINE +# if _GL_HAS_ATTRIBUTE (noinline) +# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) +# else +# define _GL_ATTRIBUTE_NOINLINE +# endif #endif -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL +/* _GL_ATTRIBUTE_NONNULL ((N1, N2,...)) declares that the arguments N1, N2,... + must not be NULL. + _GL_ATTRIBUTE_NONNULL () declares that all pointer arguments must not be + null. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_NONNULL +# if _GL_HAS_ATTRIBUTE (nonnull) +# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) +# else +# define _GL_ATTRIBUTE_NONNULL(args) +# endif #endif -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) +/* _GL_ATTRIBUTE_NONSTRING declares that the contents of a character array is + not meant to be NUL-terminated. */ +/* Applies to: struct/union members and variables that are arrays of element + type '[[un]signed] char'. */ +#ifndef _GL_ATTRIBUTE_NONSTRING +# if _GL_HAS_ATTRIBUTE (nonstring) +# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) +# else +# define _GL_ATTRIBUTE_NONSTRING +# endif #endif +/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +/* Applies to: functions. */ +/* After a function's parameter list, this attribute must come first, before + other attributes. */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if _GL_GNUC_PREREQ (2, 8) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if _GL_HAS_ATTRIBUTE (nothrow) +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif #endif +/* _GL_ATTRIBUTE_PACKED declares: + For struct members: The member has the smallest possible alignment. + For struct, union, class: All members have the smallest possible alignment, + minimizing the memory required. */ +/* Applies to: struct members, struct, union, + in C++ also: class. */ +#ifndef _GL_ATTRIBUTE_PACKED +# if _GL_HAS_ATTRIBUTE (packed) +# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) +# else +# define _GL_ATTRIBUTE_PACKED +# endif +#endif -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html +/* _GL_ATTRIBUTE_PURE declares that It is OK for a compiler to omit duplicate + calls to the function with the same arguments if observable state is not + changed between calls. + This attribute is safe for a function that does not affect + observable state, and always returns exactly once. + (This attribute is looser than _GL_ATTRIBUTE_CONST.) */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_PURE +# if _GL_HAS_ATTRIBUTE (pure) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _GL_ATTRIBUTE_PURE +# endif +#endif - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. +/* _GL_ATTRIBUTE_RETURNS_NONNULL declares that the function's return value is + a non-NULL pointer. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_RETURNS_NONNULL +# if _GL_HAS_ATTRIBUTE (returns_nonnull) +# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) +# else +# define _GL_ATTRIBUTE_RETURNS_NONNULL +# endif +#endif - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG +/* _GL_ATTRIBUTE_SENTINEL(pos) declares that the variadic function expects a + trailing NULL argument. + _GL_ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99). + _GL_ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_SENTINEL +# if _GL_HAS_ATTRIBUTE (sentinel) +# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) +# else +# define _GL_ATTRIBUTE_SENTINEL(pos) +# endif #endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) + +/* A helper macro. Don't use it directly. */ +#ifndef _GL_ATTRIBUTE_UNUSED +# if _GL_HAS_ATTRIBUTE (unused) +# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else -# define _GL_INLINE extern inline +# define _GL_ATTRIBUTE_UNUSED # endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED #endif -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA + +/* _GL_UNUSED_LABEL; declares that it is not a programming mistake if the + immediately preceding label is not used. The compiler should not warn + if the label is not used. */ +/* Applies to: label (both in C and C++). */ +/* Note that g++ < 4.5 does not support the '__attribute__ ((__unused__)) ;' + syntax. But clang does. */ +#ifndef _GL_UNUSED_LABEL +# if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__ +# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED # else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# define _GL_UNUSED_LABEL # endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") +#endif + + +/* In C++, there is the concept of "language linkage", that encompasses + name mangling and function calling conventions. + The following macros start and end a block of "C" linkage. */ +#ifdef __cplusplus +# define _GL_BEGIN_C_LINKAGE extern "C" { +# define _GL_END_C_LINKAGE } #else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END +# define _GL_BEGIN_C_LINKAGE +# define _GL_END_C_LINKAGE #endif + /* Define to `int' if doesn't define. */ #define gid_t int @@ -1382,7 +1919,12 @@ # define __GNUC_STDC_INLINE__ 1 #endif -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. +/* Define to a type if does not define. */ +/* #undef mbstate_t */ + +/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where + n1 and n2 are expressions without side effects, that evaluate to real + numbers (excluding NaN). It returns 1 if n1 > n2 0 if n1 == n2 @@ -1402,8 +1944,12 @@ /* Define to the type of st_nlink in struct stat, or a supertype. */ #define nlink_t int -/* Define to `int' if does not define. */ -#define pid_t int +/* Define as a signed integer type capable of holding a process identifier. */ +#ifdef _WIN64 +# define pid_t __int64 +#else +# define pid_t int +#endif /* Define as the type of the result of subtracting two pointers, if the system doesn't define it. */ @@ -1411,7 +1957,7 @@ /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is - supported directly. */ + supported only directly. */ #define restrict /**/ /* Work around a bug in older versions of Sun C++, which did not #define __restrict__ or support _Restrict or __restrict__ @@ -1435,14 +1981,186 @@ /* #undef socklen_t */ /* Define as a signed type of the same size as size_t. */ -#define ssize_t int +#ifdef _WIN64 +# define ssize_t long long +#else +# define ssize_t long +#endif /* Define to `int' if doesn't define. */ #define uid_t int + + /* This definition is a duplicate of the one in unitypes.h. + It is here so that we can cope with an older version of unitypes.h + that does not contain this definition and that is pre-installed among + the public header files. */ + # if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 + # define _UC_RESTRICT __restrict + # elif 199901L <= __STDC_VERSION__ || defined restrict + # define _UC_RESTRICT restrict + # else + # define _UC_RESTRICT + # endif + + /* Define as a macro for copying va_list variables. */ /* #undef va_copy */ +#if !defined HAVE_C_ALIGNASOF \ + && !(defined __cplusplus && 201103 <= __cplusplus) \ + && !defined alignof +# if defined HAVE_STDALIGN_H +# include +# endif + +/* ISO C23 alignas and alignof for platforms that lack it. + + References: + ISO C23 (latest free draft + ) + sections 6.5.3.4, 6.7.5, 7.15. + C++11 (latest free draft + ) + section 18.10. */ + +/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment + requirement of a structure member (i.e., slot or field) that is of + type TYPE, as an integer constant expression. + + This differs from GCC's and clang's __alignof__ operator, which can + yield a better-performing alignment for an object of that type. For + example, on x86 with GCC and on Linux/x86 with clang, + __alignof__ (double) and __alignof__ (long long) are 8, whereas + alignof (double) and alignof (long long) are 4 unless the option + '-malign-double' is used. + + The result cannot be used as a value for an 'enum' constant, if you + want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ + +/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 + . + clang versions < 8.0.0 have the same bug. */ +# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ + || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ + && !defined __clang__) \ + || (defined __clang__ && __clang_major__ < 8)) +# undef/**/_Alignof +# ifdef __cplusplus +# if (201103 <= __cplusplus || defined _MSC_VER) +# define _Alignof(type) alignof (type) +# else + template struct __alignof_helper { char __a; __t __b; }; +# if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__ +# define _Alignof(type) __builtin_offsetof (__alignof_helper, __b) +# else +# define _Alignof(type) offsetof (__alignof_helper, __b) +# endif +# define _GL_STDALIGN_NEEDS_STDDEF 1 +# endif +# else +# if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__ +# define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b) +# else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +# define _GL_STDALIGN_NEEDS_STDDEF 1 +# endif +# endif +# endif +# if ! (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)) +# undef/**/alignof +# define alignof _Alignof +# endif + +/* alignas (A), also known as _Alignas (A), aligns a variable or type + to the alignment A, where A is an integer constant expression. For + example: + + int alignas (8) foo; + struct s { int a; int alignas (8) bar; }; + + aligns the address of FOO and the offset of BAR to be multiples of 8. + + A should be a power of two that is at least the type's alignment + and at most the implementation's alignment limit. This limit is + 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable + to MSVC through at least version 10.0, A should be an integer + constant, as MSVC does not support expressions such as 1 << 3. + To be portable to Sun C 5.11, do not align auto variables to + anything stricter than their default alignment. + + The following C23 requirements are not supported here: + + - If A is zero, alignas has no effect. + - alignas can be used multiple times; the strictest one wins. + - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). + + */ +# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +# if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER) +# define _Alignas(a) alignas (a) +# elif (!defined __attribute__ \ + && ((defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + : __GNUC__ && !defined __ibmxl__) \ + || (4 <= __clang_major__) \ + || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ + || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)) +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +# elif 1300 <= _MSC_VER +# define _Alignas(a) __declspec (align (a)) +# endif +# endif +# if !defined HAVE_STDALIGN_H +# if ((defined _Alignas \ + && !(defined __cplusplus \ + && (201103 <= __cplusplus || defined _MSC_VER))) \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# define alignas _Alignas +# endif +# endif + +# if defined _GL_STDALIGN_NEEDS_STDDEF +# include +# endif +#endif + +#ifndef HAVE_C_BOOL +# if !defined __cplusplus && !defined __bool_true_false_are_defined +# if HAVE_STDBOOL_H +# include +# else +# if defined __SUNPRO_C +# error " is not usable with this configuration. To make it usable, add -D_STDC_C99= to $CC." +# else +# error " does not exist on this platform. Use gnulib module 'stdbool-c99' instead of gnulib module 'stdbool'." +# endif +# endif +# endif +# if !true +# define true (!false) +# endif +#endif + +#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6))) + #include + #undef/**/assert + #ifdef __sgi + #undef/**/__ASSERT_H__ + #endif + /* Solaris 11.4 defines static_assert as a macro with 2 arguments. + We need it also to be invocable with a single argument. */ + #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus + #undef/**/static_assert + #define static_assert _Static_assert + #endif +#endif + /* In order to define all the symbols declared by textstyle.h, do not use 'inline' functions, even when the compiler would support them. */ diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/assert.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/assert.h new file mode 100644 index 000000000..2f250811c --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/assert.h @@ -0,0 +1,313 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Substitute for and wrapper around + Copyright (C) 2011-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Do not guard the include, since is supposed to define + the assert macro each time it is included. */ + +#if __GNUC__ >= 3 + +#endif + + +#include "../ucrt/assert.h" + +#if (_MSC_VER < 1931) +/* The definition of static_assert is copied here. */ +/* Compile-time assert-like macros. + + Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ + +#ifndef _GL_LTS_STATIC_ASSERT_H +#define _GL_LTS_STATIC_ASSERT_H + + +/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC) + works as per C11. This is supported by GCC 4.6.0+ and by clang 4+. + + Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as + per C23. This is supported by GCC 9.1+. + + Support compilers claiming conformance to the relevant standard, + and also support GCC when not pedantic. If we were willing to slow + 'configure' down we could also use it with other compilers, but + since this affects only the quality of diagnostics, why bother? */ +#ifndef __cplusplus +# if (201112 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__))) +# define _GL_HAVE__STATIC_ASSERT 1 +# endif +# if (202311 <= __STDC_VERSION__ \ + || (!defined __STRICT_ANSI__ && 9 <= __GNUC__)) +# define _GL_HAVE__STATIC_ASSERT1 1 +# endif +#endif + +/* FreeBSD 9.1 , included by and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE__STATIC_ASSERT +# include +# undef _Static_assert +#endif + +/* Each of these macros verifies that its argument R is nonzero. To + be portable, R should be an integer constant expression. Unlike + assert (R), there is no run-time overhead. + + If _Static_assert works, verify (R) uses it directly. Similarly, + _GL_STATIC_ASSERT_TRUE works by packaging a _Static_assert inside a struct + that is an operand of sizeof. + + The code below uses several ideas for C++ compilers, and for C + compilers that do not support _Static_assert: + + * The first step is ((R) ? 1 : -1). Given an expression R, of + integral or boolean or floating-point type, this yields an + expression of integral type, whose value is later verified to be + constant and nonnegative. + + * Next this expression W is wrapped in a type + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: W; + }. + If W is negative, this yields a compile-time error. No compiler can + deal with a bit-field of negative size. + + One might think that an array size check would have the same + effect, that is, that the type struct { unsigned int dummy[W]; } + would work as well. However, inside a function, some compilers + (such as C++ compilers and GNU C) allow local parameters and + variables inside array size expressions. With these compilers, + an array size check would not properly diagnose this misuse of + the verify macro: + + void function (int n) { verify (n < 0); } + + * For the verify macro, the struct _gl_static_assert_type will need to + somehow be embedded into a declaration. To be portable, this + declaration must declare an object, a constant, a function, or a + typedef name. If the declared entity uses the type directly, + such as in + + struct dummy {...}; + typedef struct {...} dummy; + extern struct {...} *dummy; + extern void dummy (struct {...} *); + extern struct {...} *dummy (void); + + two uses of the verify macro would yield colliding declarations + if the entity names are not disambiguated. A workaround is to + attach the current line number to the entity name: + + #define _GL_CONCAT0(x, y) x##y + #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) + extern struct {...} * _GL_CONCAT (dummy, __LINE__); + + But this has the problem that two invocations of verify from + within the same macro would collide, since the __LINE__ value + would be the same for both invocations. (The GCC __COUNTER__ + macro solves this problem, but is not portable.) + + A solution is to use the sizeof operator. It yields a number, + getting rid of the identity of the type. Declarations like + + extern int dummy [sizeof (struct {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + + can be repeated. + + * Should the implementation use a named struct or an unnamed struct? + Which of the following alternatives can be used? + + extern int dummy [sizeof (struct {...})]; + extern int dummy [sizeof (struct _gl_static_assert_type {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern void dummy (int [sizeof (struct _gl_static_assert_type {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + extern int (*dummy (void)) [sizeof (struct _gl_static_assert_type {...})]; + + In the second and sixth case, the struct type is exported to the + outer scope; two such declarations therefore collide. GCC warns + about the first, third, and fourth cases. So the only remaining + possibility is the fifth case: + + extern int (*dummy (void)) [sizeof (struct {...})]; + + * GCC warns about duplicate declarations of the dummy function if + -Wredundant-decls is used. GCC 4.3 and later have a builtin + __COUNTER__ macro that can let us generate unique identifiers for + each dummy function, to suppress this warning. + + * This implementation exploits the fact that older versions of GCC, + which do not support _Static_assert, also do not warn about the + last declaration mentioned above. + + * GCC warns if -Wnested-externs is enabled and 'verify' is used + within a function body; but inside a function, you can always + arrange to use verify_expr instead. + + * In C++, any struct definition inside sizeof is invalid. + Use a template type to work around the problem. */ + +/* Concatenate two preprocessor tokens. */ +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y + +/* _GL_COUNTER is an integer, preferably one that changes each time we + use it. Use __COUNTER__ if it works, falling back on __LINE__ + otherwise. __LINE__ isn't perfect, but it's better than a + constant. */ +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif + +/* Generate a symbol with the given prefix, making it unique if + possible. */ +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) + +/* Verify requirement R at compile-time, as an integer constant expression + that returns 1. If R is false, fail at compile-time, preferably + with a diagnostic that includes the string-literal DIAGNOSTIC. */ + +#define _GL_STATIC_ASSERT_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_STATIC_ASSERT_TYPE (R, DIAGNOSTIC))) + +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_static_assert_type +template + struct _gl_static_assert_type { + unsigned int _gl_static_assert_error_if_negative: w; + }; +# define GNULIB_defined_struct__gl_static_assert_type 1 +# endif +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + _gl_static_assert_type<(R) ? 1 : -1> +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_STATIC_ASSERT_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_static_assert_error_if_negative: (R) ? 1 : -1; } +#endif + +/* Verify requirement R at compile-time, as a declaration without a + trailing ';'. If R is false, fail at compile-time. + + This macro requires three or more arguments but uses at most the first + two, so that the _Static_assert macro optionally defined below supports + both the C11 two-argument syntax and the C23 one-argument syntax. + + Unfortunately, unlike C11, this implementation must appear as an + ordinary declaration, and cannot appear inside struct { ... }. */ + +#if 202311 <= __STDC_VERSION__ || 200410 <= __cpp_static_assert +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) static_assert (R, DIAGNOSTIC) +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC) +#else +# define _GL_STATIC_ASSERT(R, DIAGNOSTIC, ...) \ + extern int (*_GL_GENSYM (_gl_static_assert_function) (void)) \ + [_GL_STATIC_ASSERT_TRUE (R, DIAGNOSTIC)] +# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Wnested-externs" +# endif +#endif + +/* _GL_LTS_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ +#ifdef _GL_LTS_STATIC_ASSERT_H +/* Define _Static_assert if needed. */ +/* With clang ≥ 3.8.0 in C++ mode, _Static_assert already works and accepts + 1 or 2 arguments. We better don't override it, because clang's standard + C++ library uses static_assert inside classes in several places, and our + replacement via _GL_STATIC_ASSERT does not work in these contexts. */ +# if (defined __cplusplus && defined __clang__ \ + && (4 <= __clang_major__ + (8 <= __clang_minor__))) +# if 5 <= __clang_major__ +/* Avoid "warning: 'static_assert' with no message is a C++17 extension". */ +# pragma clang diagnostic ignored "-Wc++17-extensions" +# else +/* Avoid "warning: static_assert with no message is a C++1z extension". */ +# pragma clang diagnostic ignored "-Wc++1z-extensions" +# endif +# elif !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert +# if !defined _MSC_VER || defined __clang__ +# define _Static_assert(...) \ + _GL_STATIC_ASSERT (__VA_ARGS__, "static assertion failed", -) +# else +# if defined __cplusplus && _MSC_VER >= 1910 + /* In MSVC 14.1 or newer, static_assert accepts one or two arguments, + but _Static_assert is not defined. */ +# define _Static_assert static_assert +# else + /* Work around MSVC preprocessor incompatibility with ISO C; see + . */ +# define _Static_assert(R, ...) \ + _GL_STATIC_ASSERT ((R), "static assertion failed", -) +# endif +# endif +# endif +/* Define static_assert if needed. */ +# if (!defined static_assert \ + && __STDC_VERSION__ < 202311 \ + && (!defined __cplusplus \ + || (__cpp_static_assert < 201411 \ + && __GNUG__ < 6 && __clang_major__ < 6 && _MSC_VER < 1910))) +# if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__ +/* MSVC 14 in C++ mode supports the two-arguments static_assert but not + the one-argument static_assert, and it does not support _Static_assert. + We have to play preprocessor tricks to distinguish the two cases. + Since the MSVC preprocessor is not ISO C compliant (see above),. + the solution is specific to MSVC. */ +# define _GL_EXPAND(x) x +# define _GL_SA1(a1) static_assert ((a1), "static assertion failed") +# define _GL_SA2 static_assert +# define _GL_SA3 static_assert +# define _GL_SA_PICK(x1,x2,x3,x4,...) x4 +# define static_assert(...) _GL_EXPAND(_GL_SA_PICK(__VA_ARGS__,_GL_SA3,_GL_SA2,_GL_SA1)) (__VA_ARGS__) +/* Avoid "fatal error C1189: #error: The C++ Standard Library forbids macroizing keywords." */ +# define _ALLOW_KEYWORD_MACROS 1 +# else +# define static_assert _Static_assert /* C11 requires this #define. */ +# endif +# endif +#endif + + +#endif +#endif \ No newline at end of file diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/lib/config.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/config.h similarity index 95% rename from gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/lib/config.h rename to gvsbuild/patches/gettext/msvc/libtextstyle/lib/config.h index bd5668611..c1421f525 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/lib/config.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/config.h @@ -42,6 +42,13 @@ #define __xmlStructuredErrorContext libtextstyle___xmlStructuredErrorContext #define __xmlSubstituteEntitiesDefaultValue libtextstyle___xmlSubstituteEntitiesDefaultValue #define __xmlTreeIndentString libtextstyle___xmlTreeIndentString +#define _gl_nothrow_get_osfhandle libtextstyle__gl_nothrow_get_osfhandle +#define _obstack_allocated_p libtextstyle__obstack_allocated_p +#define _obstack_begin libtextstyle__obstack_begin +#define _obstack_begin_1 libtextstyle__obstack_begin_1 +#define _obstack_free libtextstyle__obstack_free +#define _obstack_memory_used libtextstyle__obstack_memory_used +#define _obstack_newchunk libtextstyle__obstack_newchunk #define activate_term_non_default_mode libtextstyle_activate_term_non_default_mode #define activate_term_style_controller libtextstyle_activate_term_style_controller #define at_fatal_signal libtextstyle_at_fatal_signal @@ -465,16 +472,23 @@ #define deactivate_term_non_default_mode libtextstyle_deactivate_term_non_default_mode #define deactivate_term_style_controller libtextstyle_deactivate_term_style_controller #define dup_cloexec libtextstyle_dup_cloexec +#define error libtextstyle_error +#define error_at_line libtextstyle_error_at_line +#define error_message_count libtextstyle_error_message_count +#define error_one_per_line libtextstyle_error_one_per_line +#define error_print_progname libtextstyle_error_print_progname #define execute_all_close_hooks libtextstyle_execute_all_close_hooks #define execute_all_ioctl_hooks libtextstyle_execute_all_ioctl_hooks #define execute_close_hooks libtextstyle_execute_close_hooks #define execute_ioctl_hooks libtextstyle_execute_ioctl_hooks #define exit_failure libtextstyle_exit_failure +#define fcntl libtextstyle_fcntl #define fd_ostream_typeinfo libtextstyle_fd_ostream_typeinfo #define fd_ostream_vtable libtextstyle_fd_ostream_vtable #define file_ostream_typeinfo libtextstyle_file_ostream_typeinfo #define file_ostream_vtable libtextstyle_file_ostream_vtable #define freea libtextstyle_freea +#define fsync libtextstyle_fsync #define full_write libtextstyle_full_write #define g_ascii_dtostr libtextstyle_g_ascii_dtostr #define g_ascii_formatd libtextstyle_g_ascii_formatd @@ -520,10 +534,34 @@ #define get_fatal_signals libtextstyle_get_fatal_signals #define get_ppid_of libtextstyle_get_ppid_of #define get_progname_of libtextstyle_get_progname_of +#define getdtablesize libtextstyle_getdtablesize #define getprogname libtextstyle_getprogname +#define gettimeofday libtextstyle_gettimeofday #define gl_array_list_implementation libtextstyle_gl_array_list_implementation +#define gl_isinfd libtextstyle_gl_isinfd +#define gl_isinff libtextstyle_gl_isinff +#define gl_isinfl libtextstyle_gl_isinfl +#define gl_msvc_inval_ensure_handler libtextstyle_gl_msvc_inval_ensure_handler #define gl_sockets_cleanup libtextstyle_gl_sockets_cleanup #define gl_sockets_startup libtextstyle_gl_sockets_startup +#define glwthread_mutex_destroy libtextstyle_glwthread_mutex_destroy +#define glwthread_mutex_init libtextstyle_glwthread_mutex_init +#define glwthread_mutex_lock libtextstyle_glwthread_mutex_lock +#define glwthread_mutex_trylock libtextstyle_glwthread_mutex_trylock +#define glwthread_mutex_unlock libtextstyle_glwthread_mutex_unlock +#define glwthread_once libtextstyle_glwthread_once +#define glwthread_recmutex_destroy libtextstyle_glwthread_recmutex_destroy +#define glwthread_recmutex_init libtextstyle_glwthread_recmutex_init +#define glwthread_recmutex_lock libtextstyle_glwthread_recmutex_lock +#define glwthread_recmutex_trylock libtextstyle_glwthread_recmutex_trylock +#define glwthread_recmutex_unlock libtextstyle_glwthread_recmutex_unlock +#define glwthread_rwlock_destroy libtextstyle_glwthread_rwlock_destroy +#define glwthread_rwlock_init libtextstyle_glwthread_rwlock_init +#define glwthread_rwlock_rdlock libtextstyle_glwthread_rwlock_rdlock +#define glwthread_rwlock_tryrdlock libtextstyle_glwthread_rwlock_tryrdlock +#define glwthread_rwlock_trywrlock libtextstyle_glwthread_rwlock_trywrlock +#define glwthread_rwlock_unlock libtextstyle_glwthread_rwlock_unlock +#define glwthread_rwlock_wrlock libtextstyle_glwthread_rwlock_wrlock #define hash_destroy libtextstyle_hash_destroy #define hash_find_entry libtextstyle_hash_find_entry #define hash_init libtextstyle_hash_init @@ -544,7 +582,6 @@ #define last_component libtextstyle_last_component #define libxml_domnode_binary_insertion_sort libtextstyle_libxml_domnode_binary_insertion_sort #define libxml_domnode_tim_sort libtextstyle_libxml_domnode_tim_sort -#define memory_ostream__contents libtextstyle_memory_ostream__contents #define memory_ostream_typeinfo libtextstyle_memory_ostream_typeinfo #define memory_ostream_vtable libtextstyle_memory_ostream_vtable #define mmalloca libtextstyle_mmalloca @@ -555,6 +592,7 @@ #define nodePush libtextstyle_nodePush #define noop_styled_ostream_typeinfo libtextstyle_noop_styled_ostream_typeinfo #define noop_styled_ostream_vtable libtextstyle_noop_styled_ostream_vtable +#define obstack_alloc_failed_handler libtextstyle_obstack_alloc_failed_handler #define oldXMLWDcompatibility libtextstyle_oldXMLWDcompatibility #define ostream__flush libtextstyle_ostream__flush #define ostream__free libtextstyle_ostream__free @@ -563,10 +601,33 @@ #define ostream_vtable libtextstyle_ostream_vtable #define printf_frexp libtextstyle_printf_frexp #define printf_frexpl libtextstyle_printf_frexpl +#define reallocarray libtextstyle_reallocarray #define register_fd_hook libtextstyle_register_fd_hook +#define rpl_close libtextstyle_rpl_close +#define rpl_dup2 libtextstyle_rpl_dup2 +#define rpl_free libtextstyle_rpl_free +#define rpl_fstat libtextstyle_rpl_fstat +#define rpl_gethostname libtextstyle_rpl_gethostname +#define rpl_open libtextstyle_rpl_open +#define rpl_raise libtextstyle_rpl_raise +#define rpl_read libtextstyle_rpl_read +#define rpl_signal libtextstyle_rpl_signal +#define rpl_stat libtextstyle_rpl_stat +#define rpl_strerror libtextstyle_rpl_strerror +#define rpl_write libtextstyle_rpl_write #define safe_read libtextstyle_safe_read #define safe_write libtextstyle_safe_write #define set_cloexec_flag libtextstyle_set_cloexec_flag +#define sigaction libtextstyle_sigaction +#define sigaddset libtextstyle_sigaddset +#define sigdelset libtextstyle_sigdelset +#define sigemptyset libtextstyle_sigemptyset +#define sigfillset libtextstyle_sigfillset +#define sigismember libtextstyle_sigismember +#define sigpending libtextstyle_sigpending +#define sigprocmask libtextstyle_sigprocmask +#define stpcpy libtextstyle_stpcpy +#define strerror_override libtextstyle_strerror_override #define styled_ostream__begin_use_class libtextstyle_styled_ostream__begin_use_class #define styled_ostream__end_use_class libtextstyle_styled_ostream__end_use_class #define styled_ostream__flush libtextstyle_styled_ostream__flush @@ -585,14 +646,23 @@ #define u8_mbtouc libtextstyle_u8_mbtouc #define unblock_fatal_signals libtextstyle_unblock_fatal_signals #define unregister_fd_hook libtextstyle_unregister_fd_hook +#define x2nrealloc libtextstyle_x2nrealloc #define x2realloc libtextstyle_x2realloc #define xalloc_die libtextstyle_xalloc_die #define xasprintf libtextstyle_xasprintf #define xcalloc libtextstyle_xcalloc +#define xcharalloc libtextstyle_xcharalloc #define xconcatenated_filename libtextstyle_xconcatenated_filename #define xgethostname libtextstyle_xgethostname +#define xicalloc libtextstyle_xicalloc +#define ximalloc libtextstyle_ximalloc +#define ximemdup libtextstyle_ximemdup +#define ximemdup0 libtextstyle_ximemdup0 +#define xinmalloc libtextstyle_xinmalloc +#define xirealloc libtextstyle_xirealloc +#define xireallocarray libtextstyle_xireallocarray +#define xizalloc libtextstyle_xizalloc #define xmalloc libtextstyle_xmalloc -#define xmalloc_exit_failure libtextstyle_xmalloc_exit_failure #define xmemdup libtextstyle_xmemdup #define xmlAddAttributeDecl libtextstyle_xmlAddAttributeDecl #define xmlAddChild libtextstyle_xmlAddChild @@ -1244,7 +1314,9 @@ #define xmlValidateName libtextstyle_xmlValidateName #define xmlValidateQName libtextstyle_xmlValidateQName #define xnmalloc libtextstyle_xnmalloc +#define xpalloc libtextstyle_xpalloc #define xrealloc libtextstyle_xrealloc +#define xreallocarray libtextstyle_xreallocarray #define xstrdup libtextstyle_xstrdup #define xvasprintf libtextstyle_xvasprintf #define xzalloc libtextstyle_xzalloc diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/errno.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/errno.h index dd2612b80..1fd2130b1 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/errno.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/errno.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A POSIX-like . - Copyright (C) 2008-2020 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_LTS_ERRNO_H @@ -24,11 +24,7 @@ /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/errno.h" -#else #include "../ucrt/errno.h" -#endif #ifndef _GL_LTS_ERRNO_H #define _GL_LTS_ERRNO_H diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/error.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/error.h new file mode 100644 index 000000000..54012185e --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/error.h @@ -0,0 +1,563 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Declarations for error-reporting functions. + Copyright (C) 1995-1997, 2003, 2006, 2008-2023 Free Software Foundation, + Inc. + This file is part of the GNU C Library. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_LTS_ERROR_H + +/* No @PRAGMA_SYSTEM_HEADER@ here, because it would prevent + -Wimplicit-fallthrough warnings for missing FALLTHROUGH after error(...) + or error_at_line(...) invocations. */ + +/* The include_next requires a split double-inclusion guard. */ +#if 0 +# include +#endif + +#ifndef _GL_LTS_ERROR_H +#define _GL_LTS_ERROR_H + +/* This file uses _GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_FORMAT, + _GL_ATTRIBUTE_MAYBE_UNUSED. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* Get 'unreachable'. */ +#include + +/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM. */ +#include + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* Begin/end the GNULIB_NAMESPACE namespace. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { +# define _GL_END_NAMESPACE } +#else +# define _GL_BEGIN_NAMESPACE +# define _GL_END_NAMESPACE +#endif + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + + Wrapping rpl_func in an object with an inline conversion operator + avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::rpl_func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::rpl_func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + + Wrapping func in an object with an inline conversion operator + avoids a reference to func unless GNULIB_NAMESPACE::func is + actually used in the program. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return ::func; \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast(::func); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static const struct _gl_ ## func ## _wrapper \ + { \ + typedef rettype (*type) parameters; \ + \ + inline operator type () const \ + { \ + return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ + } \ + } func = {}; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +#if GNULIB_VFPRINTF_POSIX +# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD +#else +# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM +#endif + +/* Helper macro for supporting the compiler's control flow analysis better. + It evaluates its arguments only once. + Test case: Compile copy-file.c with "gcc -Wimplicit-fallthrough". */ +#if defined __GNUC__ || defined __clang__ +/* Use 'unreachable' to tell the compiler when the function call does not + return. */ +# define __gl_error_call1(function, status, ...) \ + ((function) (status, __VA_ARGS__), \ + (status) != 0 ? unreachable () : (void) 0) +/* If STATUS is a not a constant, the function call may or may not return; + therefore -Wimplicit-fallthrough will produce a warning. Use a compound + statement in order to evaluate STATUS only once. + If STATUS is a constant, we don't use a compound statement, because that + would trigger a -Wimplicit-fallthrough warning even when STATUS is != 0, + when not optimizing. This causes STATUS to be evaluated twice, but + that's OK since it does not have side effects. */ +# define __gl_error_call(function, status, ...) \ + (__builtin_constant_p (status) \ + ? __gl_error_call1 (function, status, __VA_ARGS__) \ + : __extension__ \ + ({ \ + int const __errstatus = status; \ + __gl_error_call1 (function, __errstatus, __VA_ARGS__); \ + })) +#else +# define __gl_error_call(function, status, ...) \ + (function) (status, __VA_ARGS__) +#endif + +#if GNULIB_REPLACE_ERROR +# undef error_print_progname +# undef error_message_count +# undef error_one_per_line +# define error_print_progname rpl_error_print_progname +# define error_message_count rpl_error_message_count +# define error_one_per_line rpl_error_one_per_line +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Print a message with 'fprintf (stderr, FORMAT, ...)'; + if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). + If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */ +#if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef error +# define error rpl_error +# endif +_GL_FUNCDECL_RPL (error, void, + (int __status, int __errnum, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4))); +_GL_CXXALIAS_RPL (error, void, + (int __status, int __errnum, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# undef error +# define error(status, ...) \ + __gl_error_call (rpl_error, status, __VA_ARGS__) +# endif +#else +# if ! 0 +_GL_FUNCDECL_SYS (error, void, + (int __status, int __errnum, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4))); +# endif +_GL_CXXALIAS_SYS (error, void, + (int __status, int __errnum, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# ifdef error +/* Only gcc ≥ 4.7 has __builtin_va_arg_pack. */ +# if _GL_GNUC_PREREQ (4, 7) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wattributes" +_GL_ATTRIBUTE_MAYBE_UNUSED +static void +_GL_ATTRIBUTE_ALWAYS_INLINE +_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4)) +_gl_inline_error (int __status, int __errnum, const char *__format, ...) +{ + return error (__status, __errnum, __format, __builtin_va_arg_pack ()); +} +# pragma GCC diagnostic pop +# undef error +# define error(status, ...) \ + __gl_error_call (_gl_inline_error, status, __VA_ARGS__) +# endif +# else +# define error(status, ...) \ + __gl_error_call (error, status, __VA_ARGS__) +# endif +# endif +#endif +#if __GLIBC__ >= 2 +_GL_CXXALIASWARN (error); +#endif + +/* Likewise. If FILENAME is non-NULL, include FILENAME:LINENO: in the + message. */ +#if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef error_at_line +# define error_at_line rpl_error_at_line +# endif +_GL_FUNCDECL_RPL (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6))); +_GL_CXXALIAS_RPL (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# undef error_at_line +# define error_at_line(status, ...) \ + __gl_error_call (rpl_error_at_line, status, __VA_ARGS__) +# endif +#else +# if ! 0 +_GL_FUNCDECL_SYS (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6))); +# endif +_GL_CXXALIAS_SYS (error_at_line, void, + (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...)); +# ifndef _GL_NO_INLINE_ERROR +# ifdef error_at_line +/* Only gcc ≥ 4.7 has __builtin_va_arg_pack. */ +# if _GL_GNUC_PREREQ (4, 7) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wattributes" +_GL_ATTRIBUTE_MAYBE_UNUSED +static void +_GL_ATTRIBUTE_ALWAYS_INLINE +_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6)) +_gl_inline_error_at_line (int __status, int __errnum, const char *__filename, + unsigned int __lineno, const char *__format, ...) +{ + return error_at_line (__status, __errnum, __filename, __lineno, __format, + __builtin_va_arg_pack ()); +} +# pragma GCC diagnostic pop +# undef error_at_line +# define error_at_line(status, ...) \ + __gl_error_call (_gl_inline_error_at_line, status, __VA_ARGS__) +# endif +# else +# define error_at_line(status, ...) \ + __gl_error_call (error_at_line, status, __VA_ARGS__) +# endif +# endif +#endif +_GL_CXXALIASWARN (error_at_line); + +/* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +extern DLL_VARIABLE void (*error_print_progname) (void); + +/* This variable is incremented each time 'error' is called. */ +extern DLL_VARIABLE unsigned int error_message_count; + +/* Sometimes we want to have at most one error per line. This + variable controls whether this mode is selected or not. */ +extern DLL_VARIABLE int error_one_per_line; + +#ifdef __cplusplus +} +#endif + +#endif /* _GL_LTS_ERROR_H */ +#endif /* _GL_LTS_ERROR_H */ diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/fcntl.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/fcntl.h index 22b28a993..b2a8b51be 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/fcntl.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/fcntl.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Like , but with non-working flags defined to 0. - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* written by Paul Eggert */ @@ -38,11 +38,7 @@ #if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))) # include #endif -#if (_MSC_VER < 1900) -#include "../include/fcntl.h" -#else #include "../ucrt/fcntl.h" -#endif /* Native Windows platforms declare open(), creat() in . */ #if (0 || 1 || defined GNULIB_POSIXCHECK) \ @@ -68,11 +64,7 @@ # include #endif /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/fcntl.h" -#else #include "../ucrt/fcntl.h" -#endif /* Native Windows platforms declare open(), creat() in . */ #if (0 || 1 || defined GNULIB_POSIXCHECK) \ @@ -83,6 +75,11 @@ #ifndef _GL_LTS_FCNTL_H #define _GL_LTS_FCNTL_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ # include #endif @@ -90,19 +87,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -190,6 +187,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -237,6 +240,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -262,6 +275,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -359,7 +380,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -387,9 +408,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -405,26 +426,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -433,19 +454,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -518,13 +539,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -533,27 +561,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -581,6 +615,12 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use _GL_FUNCDECL_RPL (creat, int, (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (creat, int, (const char *filename, mode_t mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef creat +# define creat _creat +# endif +_GL_CXXALIAS_MDA (creat, int, (const char *filename, mode_t mode)); # else _GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); # endif @@ -590,6 +630,21 @@ _GL_CXXALIASWARN (creat); /* Assume creat is always declared. */ _GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - " "use gnulib module creat for portability"); +#elif 1 +/* On native Windows, map 'creat' to '_creat', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::creat always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef creat +# define creat _creat +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (creat, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (creat); #endif #if 1 @@ -630,6 +685,12 @@ _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef open +# define open _open +# endif +_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); # else _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); # endif @@ -643,6 +704,22 @@ _GL_CXXALIASWARN (open); /* Assume open is always declared. */ _GL_WARN_ON_USE (open, "open is not always POSIX compliant - " "use gnulib module open for portability"); +#elif 1 +/* On native Windows, map 'open' to '_open', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::open always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef open +# define open _open +# endif +_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); +# else +_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); +# endif +# if !defined __hpux +_GL_CXXALIASWARN (open); +# endif #endif #if 0 @@ -876,6 +953,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " # define AT_EACCESS 4 #endif +/* Ignore this flag if not supported. */ +#ifndef AT_NO_AUTOMOUNT +# define AT_NO_AUTOMOUNT 0 +#endif #endif /* _GL_LTS_FCNTL_H */ #endif /* _GL_LTS_FCNTL_H */ diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib.h index c5e85894f..4ba20738b 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib.h @@ -3,16 +3,16 @@ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/ghash.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/ghash.h index d5c705964..366217e68 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/ghash.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/ghash.h @@ -12,16 +12,16 @@ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/glist.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/glist.h index c5d64c428..e7df74b08 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/glist.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/glist.h @@ -12,16 +12,16 @@ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gmacros.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gmacros.h index af5bf388e..a9cec729b 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gmacros.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gmacros.h @@ -12,16 +12,16 @@ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gprimes.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gprimes.h index 240db6cbb..028ca2e72 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gprimes.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gprimes.h @@ -12,16 +12,16 @@ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gprintfint.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gprintfint.h index f41265926..48029b006 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gprintfint.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gprintfint.h @@ -12,16 +12,16 @@ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gstrfuncs.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gstrfuncs.h index 5f0a8ec25..5d8b3254f 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gstrfuncs.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gstrfuncs.h @@ -12,16 +12,16 @@ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gstring.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gstring.h index de566d581..ddceb5a8c 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gstring.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gstring.h @@ -12,16 +12,16 @@ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gtypes.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gtypes.h index ba7a9a99f..a8864342d 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gtypes.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glib/gtypes.h @@ -12,16 +12,16 @@ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glibconfig.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glibconfig.h index 0fb1a0049..8dfaa88c4 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glibconfig.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/glibconfig.h @@ -12,16 +12,16 @@ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/inttypes.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/inttypes.h index cc44a96fa..00153bfed 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/inttypes.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/inttypes.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2006-2020 Free Software Foundation, Inc. +/* Copyright (C) 2006-2023 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* @@ -38,11 +38,7 @@ # define __STDC_FORMAT_MACROS 1 # endif -#if (_MSC_VER < 1900) -#include "../include/inttypes.h" -#else -#include "../ucrt/inttypes.h" -#endif +# include "../ucrt/inttypes.h" # define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H # endif @@ -51,6 +47,11 @@ #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H #define INTTYPES_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Include or the gnulib replacement. But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ @@ -69,19 +70,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -169,6 +170,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -216,6 +223,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -241,6 +258,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -338,7 +363,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -366,9 +391,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -384,26 +409,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -412,19 +437,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -497,13 +522,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -512,27 +544,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -1383,8 +1421,21 @@ extern "C" { #endif #if 0 -# if !1 -extern intmax_t imaxabs (intmax_t); +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxabs +# define imaxabs rpl_imaxabs +# endif +_GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x)); +_GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +_GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxabs); # endif #elif defined GNULIB_POSIXCHECK # undef imaxabs @@ -1401,8 +1452,21 @@ typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; # define GNULIB_defined_imaxdiv_t 1 # endif # endif -# if !1 -extern imaxdiv_t imaxdiv (intmax_t, intmax_t); +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef imaxdiv +# define imaxdiv rpl_imaxdiv +# endif +_GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +_GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# else +# if !1 +_GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +_GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (imaxdiv); # endif #elif defined GNULIB_POSIXCHECK # undef imaxdiv diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/libxml/parser.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/libxml/parser.h index 8ac8b752c..995ba828f 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/libxml/parser.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/libxml/parser.h @@ -1,6 +1,6 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* libxml2 - Library for parsing XML documents - * Copyright (C) 2006-2019 Free Software Foundation, Inc. + * Copyright (C) 2006-2020 Free Software Foundation, Inc. * * This file is not part of the GNU gettext program, but is used with * GNU gettext. @@ -41,6 +41,7 @@ #define __XML_PARSER_H__ #include +#include /* because Gnulib's may '#define free ...' */ #include #include @@ -690,7 +691,7 @@ typedef int (*hasExternalSubsetSAXFunc) (void *ctx); /************************************************************************ * * - * The SAX version 3 API extensions * + * The SAX version 2 API extensions * * * ************************************************************************/ /** @@ -775,7 +776,7 @@ struct _xmlSAXHandler { cdataBlockSAXFunc cdataBlock; externalSubsetSAXFunc externalSubset; unsigned int initialized; - /* The following fields are extensions available only on version 3 */ + /* The following fields are extensions available only on version 2 */ void *_private; startElementNsSAX2Func startElementNs; endElementNsSAX2Func endElementNs; diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/limits.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/limits.h index e43b7c456..ed831eb21 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/limits.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/limits.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright 2016-2020 Free Software Foundation, Inc. + Copyright 2016-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 3, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -38,7 +38,7 @@ # define _GL_ALREADY_INCLUDING_LIMITS_H /* The include_next requires a split double-inclusion guard. */ -#include "../include/limits.h" +# include "../include/limits.h" # undef _GL_ALREADY_INCLUDING_LIMITS_H @@ -100,10 +100,16 @@ # endif #endif -/* Macros specified by ISO/IEC TS 18661-1:2014. */ +/* Assume no multibyte character is longer than 16 bytes. */ +#ifndef MB_LEN_MAX +# define MB_LEN_MAX 16 +#endif + +/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */ #if (! defined ULLONG_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) + && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))) # define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) # define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) # define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) @@ -115,7 +121,31 @@ # define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) # define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) # define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) -#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ +#endif + +/* Macros specified by C23. */ + +#if (defined _GNU_SOURCE \ + || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)) +# if ! defined BOOL_WIDTH +# define BOOL_WIDTH 1 +# define BOOL_MAX 1 +# elif ! defined BOOL_MAX +# define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1) +# endif +#endif + +/* Macro specified by POSIX. */ + +/* The maximum ssize_t value. Although it might not be of ssize_t type + as it should be, it's too much trouble to fix this minor detail. */ +#ifndef SSIZE_MAX +# ifdef _WIN64 +# define SSIZE_MAX LLONG_MAX +# else +# define SSIZE_MAX LONG_MAX +# endif +#endif #endif /* _GL_LTS_LIMITS_H */ #endif /* _GL_LTS_LIMITS_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/lib/math.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/math.h similarity index 84% rename from gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/lib/math.h rename to gvsbuild/patches/gettext/msvc/libtextstyle/lib/math.h index caaa8f6ff..58b18418b 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/lib/math.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/math.h @@ -1,21 +1,26 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2007-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ +/* On Android, in C++ mode, when /usr/include/c++/v1/math.h is being included + and /usr/include/math.h has not yet been included, skip this file, since it + would lead to many syntax errors. */ +#if !(defined __ANDROID__ && defined _LIBCPP_MATH_H && !defined INFINITY) + #ifndef _GL_LTS_MATH_H #if __GNUC__ >= 3 @@ -23,40 +28,68 @@ #endif +#if defined _GL_INCLUDING_MATH_H +/* Special invocation convention: + - On FreeBSD 12.2 we have a sequence of nested includes + -> -> -> -> + -> -> -> -> + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. */ + +#include "../ucrt/math.h" + +#else +/* Normal invocation convention. */ + /* The include_next requires a split double-inclusion guard. */ +#define _GL_INCLUDING_MATH_H #include "../ucrt/math.h" +#undef _GL_INCLUDING_MATH_H #ifndef _GL_LTS_MATH_H #define _GL_LTS_MATH_H +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_CONST, + GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ #if defined __VMS && ! defined NAN # include #endif -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_MATH_INLINE # define _GL_MATH_INLINE _GL_INLINE #endif +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __const__ was added in gcc 2.95. */ +#ifndef _GL_ATTRIBUTE_CONST +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__ +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _GL_ATTRIBUTE_CONST /* empty */ +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -144,6 +177,12 @@ _GL_INLINE_HEADER_BEGIN Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -191,6 +230,16 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -216,6 +265,14 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -313,7 +370,7 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -341,9 +398,9 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -359,26 +416,26 @@ _GL_INLINE_HEADER_BEGIN /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -387,19 +444,19 @@ _GL_INLINE_HEADER_BEGIN /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -472,13 +529,20 @@ _GL_INLINE_HEADER_BEGIN # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -487,27 +551,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -603,12 +673,6 @@ static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; #endif -/* For clang: Use __has_builtin to determine whether a builtin is available. */ -#ifndef __has_builtin -# define __has_builtin(name) 0 -#endif - - /* POSIX allows platforms that don't support NAN. But all major machines in the past 15 years have supported something close to IEEE NaN, so we define this unconditionally. We also must define @@ -737,7 +801,9 @@ _GL_WARN_ON_USE (acosf, "acosf is unportable - " _GL_FUNCDECL_SYS (acosl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (acosl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (acosl); +# endif #elif defined GNULIB_POSIXCHECK # undef acosl # if HAVE_RAW_DECL_ACOSL @@ -777,7 +843,9 @@ _GL_WARN_ON_USE (asinf, "asinf is unportable - " _GL_FUNCDECL_SYS (asinl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (asinl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (asinl); +# endif #elif defined GNULIB_POSIXCHECK # undef asinl # if HAVE_RAW_DECL_ASINL @@ -817,7 +885,9 @@ _GL_WARN_ON_USE (atanf, "atanf is unportable - " _GL_FUNCDECL_SYS (atanl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (atanl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (atanl); +# endif #elif defined GNULIB_POSIXCHECK # undef atanl # if HAVE_RAW_DECL_ATANL @@ -881,7 +951,7 @@ _GL_FUNCDECL_SYS (cbrt, double, (double x)); # endif _GL_CXXALIAS_SYS (cbrt, double, (double x)); # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (cbrt); +_GL_CXXALIASWARN1 (cbrt, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef cbrt @@ -905,7 +975,9 @@ _GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (cbrtl); +# endif #elif defined GNULIB_POSIXCHECK # undef cbrtl # if HAVE_RAW_DECL_CBRTL @@ -951,7 +1023,7 @@ _GL_CXXALIAS_RPL (ceil, double, (double x)); _GL_CXXALIAS_SYS (ceil, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ceil); +_GL_CXXALIASWARN1 (ceil, double, (double x)); # endif #endif @@ -970,7 +1042,9 @@ _GL_FUNCDECL_SYS (ceill, long double, (long double x)); # endif _GL_CXXALIAS_SYS (ceill, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ceill); +# endif #elif defined GNULIB_POSIXCHECK # undef ceill # if HAVE_RAW_DECL_CEILL @@ -1001,7 +1075,7 @@ _GL_FUNCDECL_SYS (copysign, double, (double x, double y)); # endif _GL_CXXALIAS_SYS (copysign, double, (double x, double y)); # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (copysign); +_GL_CXXALIASWARN1 (copysign, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef copysign @@ -1016,7 +1090,9 @@ _GL_WARN_ON_USE (copysign, "copysign is unportable - " _GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (copysignl); +# endif #elif defined GNULIB_POSIXCHECK # undef copysignl # if HAVE_RAW_DECL_COPYSIGNL @@ -1056,7 +1132,9 @@ _GL_WARN_ON_USE (cosf, "cosf is unportable - " _GL_FUNCDECL_SYS (cosl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (cosl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (cosl); +# endif #elif defined GNULIB_POSIXCHECK # undef cosl # if HAVE_RAW_DECL_COSL @@ -1130,7 +1208,9 @@ _GL_FUNCDECL_SYS (expl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (expl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (expl); +# endif #elif defined GNULIB_POSIXCHECK # undef expl # if HAVE_RAW_DECL_EXPL @@ -1169,7 +1249,7 @@ _GL_FUNCDECL_SYS (exp2, double, (double x)); _GL_CXXALIAS_SYS (exp2, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (exp2); +_GL_CXXALIASWARN1 (exp2, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef exp2 @@ -1194,7 +1274,9 @@ _GL_FUNCDECL_SYS (exp2l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (exp2l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (exp2l); +# endif #elif defined GNULIB_POSIXCHECK # undef exp2l # if HAVE_RAW_DECL_EXP2L @@ -1242,7 +1324,7 @@ _GL_FUNCDECL_SYS (expm1, double, (double x)); _GL_CXXALIAS_SYS (expm1, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (expm1); +_GL_CXXALIASWARN1 (expm1, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef expm1 @@ -1269,7 +1351,9 @@ _GL_FUNCDECL_SYS (expm1l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (expm1l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (expm1l); +# endif #elif defined GNULIB_POSIXCHECK # undef expm1l # if HAVE_RAW_DECL_EXPM1L @@ -1285,7 +1369,9 @@ _GL_WARN_ON_USE (expm1l, "expm1l is unportable - " _GL_FUNCDECL_SYS (fabsf, float, (float x)); # endif _GL_CXXALIAS_SYS (fabsf, float, (float x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fabsf); +# endif #elif defined GNULIB_POSIXCHECK # undef fabsf # if HAVE_RAW_DECL_FABSF @@ -1309,7 +1395,9 @@ _GL_FUNCDECL_SYS (fabsl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (fabsl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fabsl); +# endif #elif defined GNULIB_POSIXCHECK # undef fabsl # if HAVE_RAW_DECL_FABSL @@ -1355,7 +1443,7 @@ _GL_CXXALIAS_RPL (floor, double, (double x)); _GL_CXXALIAS_SYS (floor, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (floor); +_GL_CXXALIASWARN1 (floor, double, (double x)); # endif #endif @@ -1374,7 +1462,9 @@ _GL_FUNCDECL_SYS (floorl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (floorl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (floorl); +# endif #elif defined GNULIB_POSIXCHECK # undef floorl # if HAVE_RAW_DECL_FLOORL @@ -1424,7 +1514,7 @@ _GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fma); +_GL_CXXALIASWARN1 (fma, double, (double x, double y, double z)); # endif #elif defined GNULIB_POSIXCHECK # undef fma @@ -1455,7 +1545,9 @@ _GL_FUNCDECL_SYS (fmal, long double, _GL_CXXALIAS_SYS (fmal, long double, (long double x, long double y, long double z)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fmal); +# endif #elif defined GNULIB_POSIXCHECK # undef fmal # if HAVE_RAW_DECL_FMAL @@ -1501,7 +1593,7 @@ _GL_CXXALIAS_RPL (fmod, double, (double x, double y)); _GL_CXXALIAS_SYS (fmod, double, (double x, double y)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fmod); +_GL_CXXALIASWARN1 (fmod, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef fmod @@ -1526,7 +1618,9 @@ _GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fmodl); +# endif #elif defined GNULIB_POSIXCHECK # undef fmodl # if HAVE_RAW_DECL_FMODL @@ -1558,7 +1652,9 @@ _GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (frexpf); +# endif #elif defined GNULIB_POSIXCHECK # undef frexpf # if HAVE_RAW_DECL_FREXPF @@ -1602,7 +1698,7 @@ _GL_WARN_ON_USE (frexp, "frexp is unportable - " If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ -#if 1 && 1 +#if 1 && 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef frexpl # define frexpl rpl_frexpl @@ -1619,8 +1715,10 @@ _GL_FUNCDECL_SYS (frexpl, long double, _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); # endif #endif -#if 1 && !(1 && !1) +#if 1 && !(0 && !1) +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (frexpl); +# endif #endif #if !1 && defined GNULIB_POSIXCHECK # undef frexpl @@ -1646,7 +1744,9 @@ _GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); # endif _GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (hypotf); +# endif #elif defined GNULIB_POSIXCHECK # undef hypotf # if HAVE_RAW_DECL_HYPOTF @@ -1668,7 +1768,7 @@ _GL_CXXALIAS_RPL (hypot, double, (double x, double y)); _GL_CXXALIAS_SYS (hypot, double, (double x, double y)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (hypot); +_GL_CXXALIASWARN1 (hypot, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef hypot @@ -1693,7 +1793,9 @@ _GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (hypotl); +# endif #elif defined GNULIB_POSIXCHECK # undef hypotl # if HAVE_RAW_DECL_HYPOTL @@ -1741,7 +1843,7 @@ _GL_FUNCDECL_SYS (ilogb, int, (double x)); _GL_CXXALIAS_SYS (ilogb, int, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ilogb); +_GL_CXXALIASWARN1 (ilogb, int, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef ilogb @@ -1761,11 +1863,14 @@ _GL_FUNCDECL_RPL (ilogbl, int, (long double x)); _GL_CXXALIAS_RPL (ilogbl, int, (long double x)); # else # if !1 +# undef ilogbl _GL_FUNCDECL_SYS (ilogbl, int, (long double x)); # endif _GL_CXXALIAS_SYS (ilogbl, int, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ilogbl); +# endif #elif defined GNULIB_POSIXCHECK # undef ilogbl # if HAVE_RAW_DECL_ILOGBL @@ -1775,6 +1880,55 @@ _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " #endif +#if 1 +/* On native Windows, map 'j0' to '_j0', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::j0 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef j0 +# define j0 _j0 +# endif +_GL_CXXALIAS_MDA (j0, double, (double x)); +# else +_GL_CXXALIAS_SYS (j0, double, (double x)); +# endif +_GL_CXXALIASWARN (j0); +#endif + +#if 1 +/* On native Windows, map 'j1' to '_j1', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::j1 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef j1 +# define j1 _j1 +# endif +_GL_CXXALIAS_MDA (j1, double, (double x)); +# else +_GL_CXXALIAS_SYS (j1, double, (double x)); +# endif +_GL_CXXALIASWARN (j1); +#endif + +#if 1 +/* On native Windows, map 'jn' to '_jn', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::jn always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef jn +# define jn _jn +# endif +_GL_CXXALIAS_MDA (jn, double, (int n, double x)); +# else +_GL_CXXALIAS_SYS (jn, double, (int n, double x)); +# endif +_GL_CXXALIASWARN (jn); +#endif + + /* Return x * 2^exp. */ #if 0 # if !1 @@ -1782,7 +1936,9 @@ _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " _GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); # endif _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ldexpf); +# endif #elif defined GNULIB_POSIXCHECK # undef ldexpf # if HAVE_RAW_DECL_LDEXPF @@ -1791,6 +1947,29 @@ _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " # endif #endif +/* Return x * 2^exp. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ldexp +# define ldexp rpl_ldexp +# endif +_GL_FUNCDECL_RPL (ldexp, double, (double x, int exp)); +_GL_CXXALIAS_RPL (ldexp, double, (double x, int exp)); +# else +/* Assume ldexp is always declared. */ +_GL_CXXALIAS_SYS (ldexp, double, (double x, int exp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN1 (ldexp, double, (double x, int exp)); +# endif +#elif defined GNULIB_POSIXCHECK +# undef ldexp +/* Assume ldexp is always declared. */ +_GL_WARN_ON_USE (ldexp, "ldexp is unportable - " + "use gnulib module ldexp for portability"); +#endif + /* Return x * 2^exp. */ #if 0 && 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1808,7 +1987,9 @@ _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); # endif #endif #if 0 +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ldexpl); +# endif #endif #if !0 && defined GNULIB_POSIXCHECK # undef ldexpl @@ -1855,7 +2036,7 @@ _GL_CXXALIAS_RPL (log, double, (double x)); _GL_CXXALIAS_SYS (log, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log); +_GL_CXXALIASWARN1 (log, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log @@ -1880,7 +2061,9 @@ _GL_FUNCDECL_SYS (logl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (logl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (logl); +# endif #elif defined GNULIB_POSIXCHECK # undef logl # if HAVE_RAW_DECL_LOGL @@ -1926,7 +2109,7 @@ _GL_CXXALIAS_RPL (log10, double, (double x)); _GL_CXXALIAS_SYS (log10, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log10); +_GL_CXXALIASWARN1 (log10, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log10 @@ -1951,7 +2134,9 @@ _GL_FUNCDECL_SYS (log10l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log10l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log10l); +# endif #elif defined GNULIB_POSIXCHECK # undef log10l # if HAVE_RAW_DECL_LOG10L @@ -1999,7 +2184,7 @@ _GL_FUNCDECL_SYS (log1p, double, (double x)); _GL_CXXALIAS_SYS (log1p, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log1p); +_GL_CXXALIASWARN1 (log1p, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log1p @@ -2023,7 +2208,9 @@ _GL_FUNCDECL_SYS (log1pl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log1pl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log1pl); +# endif #elif defined GNULIB_POSIXCHECK # undef log1pl # if HAVE_RAW_DECL_LOG1PL @@ -2048,7 +2235,9 @@ _GL_FUNCDECL_SYS (log2f, float, (float x)); # endif _GL_CXXALIAS_SYS (log2f, float, (float x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log2f); +# endif #elif defined GNULIB_POSIXCHECK # undef log2f # if HAVE_RAW_DECL_LOG2F @@ -2073,7 +2262,7 @@ _GL_FUNCDECL_SYS (log2, double, (double x)); _GL_CXXALIAS_SYS (log2, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log2); +_GL_CXXALIASWARN1 (log2, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef log2 @@ -2097,7 +2286,9 @@ _GL_FUNCDECL_SYS (log2l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log2l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log2l); +# endif #elif defined GNULIB_POSIXCHECK # undef log2l # if HAVE_RAW_DECL_LOG2L @@ -2145,7 +2336,7 @@ _GL_FUNCDECL_SYS (logb, double, (double x)); _GL_CXXALIAS_SYS (logb, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (logb); +_GL_CXXALIASWARN1 (logb, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef logb @@ -2169,7 +2360,9 @@ _GL_FUNCDECL_SYS (logbl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (logbl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (logbl); +# endif #elif defined GNULIB_POSIXCHECK # undef logbl # if HAVE_RAW_DECL_LOGBL @@ -2215,7 +2408,7 @@ _GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); _GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (modf); +_GL_CXXALIASWARN1 (modf, double, (double x, double *iptr)); # endif #elif defined GNULIB_POSIXCHECK # undef modf @@ -2242,7 +2435,9 @@ _GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) # endif _GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (modfl); +# endif #elif defined GNULIB_POSIXCHECK # undef modfl # if HAVE_RAW_DECL_MODFL @@ -2306,7 +2501,7 @@ _GL_FUNCDECL_SYS (remainder, double, (double x, double y)); _GL_CXXALIAS_SYS (remainder, double, (double x, double y)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remainder); +_GL_CXXALIASWARN1 (remainder, double, (double x, double y)); # endif #elif defined GNULIB_POSIXCHECK # undef remainder @@ -2333,7 +2528,9 @@ _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (remainderl); +# endif #elif defined GNULIB_POSIXCHECK # undef remainderl # if HAVE_RAW_DECL_REMAINDERL @@ -2363,7 +2560,7 @@ _GL_FUNCDECL_SYS (rint, double, (double x)); # endif _GL_CXXALIAS_SYS (rint, double, (double x)); # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rint); +_GL_CXXALIASWARN1 (rint, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef rint @@ -2387,7 +2584,9 @@ _GL_FUNCDECL_SYS (rintl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (rintl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (rintl); +# endif #elif defined GNULIB_POSIXCHECK # undef rintl # if HAVE_RAW_DECL_RINTL @@ -2435,7 +2634,7 @@ _GL_FUNCDECL_SYS (round, double, (double x)); _GL_CXXALIAS_SYS (round, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (round); +_GL_CXXALIASWARN1 (round, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef round @@ -2462,7 +2661,9 @@ _GL_FUNCDECL_SYS (roundl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (roundl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (roundl); +# endif #elif defined GNULIB_POSIXCHECK # undef roundl # if HAVE_RAW_DECL_ROUNDL @@ -2482,7 +2683,7 @@ _GL_FUNCDECL_RPL (sinf, float, (float x)); _GL_CXXALIAS_RPL (sinf, float, (float x)); # else # if !1 - # undef sinf +# undef sinf _GL_FUNCDECL_SYS (sinf, float, (float x)); # endif _GL_CXXALIAS_SYS (sinf, float, (float x)); @@ -2502,7 +2703,9 @@ _GL_WARN_ON_USE (sinf, "sinf is unportable - " _GL_FUNCDECL_SYS (sinl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (sinl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sinl); +# endif #elif defined GNULIB_POSIXCHECK # undef sinl # if HAVE_RAW_DECL_SINL @@ -2576,7 +2779,9 @@ _GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sqrtl); +# endif #elif defined GNULIB_POSIXCHECK # undef sqrtl # if HAVE_RAW_DECL_SQRTL @@ -2616,7 +2821,9 @@ _GL_WARN_ON_USE (tanf, "tanf is unportable - " _GL_FUNCDECL_SYS (tanl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (tanl, long double, (long double x)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (tanl); +# endif #elif defined GNULIB_POSIXCHECK # undef tanl # if HAVE_RAW_DECL_TANL @@ -2689,7 +2896,7 @@ _GL_FUNCDECL_SYS (trunc, double, (double x)); _GL_CXXALIAS_SYS (trunc, double, (double x)); # endif # if __GLIBC__ >= 2 -_GL_CXXALIASWARN (trunc); +_GL_CXXALIASWARN1 (trunc, double, (double x)); # endif #elif defined GNULIB_POSIXCHECK # undef trunc @@ -2713,7 +2920,9 @@ _GL_FUNCDECL_SYS (truncl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (truncl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (truncl); +# endif #elif defined GNULIB_POSIXCHECK # undef truncl # if HAVE_RAW_DECL_TRUNCL @@ -2723,6 +2932,55 @@ _GL_WARN_ON_USE (truncl, "truncl is unportable - " #endif +#if 1 +/* On native Windows, map 'y0' to '_y0', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::y0 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef y0 +# define y0 _y0 +# endif +_GL_CXXALIAS_MDA (y0, double, (double x)); +# else +_GL_CXXALIAS_SYS (y0, double, (double x)); +# endif +_GL_CXXALIASWARN (y0); +#endif + +#if 1 +/* On native Windows, map 'y1' to '_y1', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::y1 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef y1 +# define y1 _y1 +# endif +_GL_CXXALIAS_MDA (y1, double, (double x)); +# else +_GL_CXXALIAS_SYS (y1, double, (double x)); +# endif +_GL_CXXALIASWARN (y1); +#endif + +#if 1 +/* On native Windows, map 'yn' to '_yn', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::yn always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef yn +# define yn _yn +# endif +_GL_CXXALIAS_MDA (yn, double, (int n, double x)); +# else +_GL_CXXALIAS_SYS (yn, double, (int n, double x)); +# endif +_GL_CXXALIASWARN (yn); +#endif + + /* Definitions of function-like macros come here, after the function declarations. */ @@ -2742,11 +3000,12 @@ _GL_EXTERN_C int gl_isfinitel (long double x); # if defined isfinite || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) # undef isfinite -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isfinite through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) # define isfinite rpl_isfinite +# define GNULIB_NAMESPACE_LACKS_ISFINITE 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) # endif @@ -2776,11 +3035,12 @@ _GL_EXTERN_C int gl_isinfl (long double x); # if defined isinf || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) # undef isinf -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isinf through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) # define isinf rpl_isinf +# define GNULIB_NAMESPACE_LACKS_ISINF 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) # endif @@ -2800,10 +3060,11 @@ _GL_WARN_REAL_FLOATING_DECL (isinf); # if 0 /* The original included above provides a declaration of isnan macro or (older) isnanf function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ +# if (__GNUC__ >= 4) || (__clang_major__ >= 4) + /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. + GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't. */ # undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) +# define isnanf(x) __builtin_isnan ((float)(x)) # elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) @@ -2823,8 +3084,8 @@ _GL_EXTERN_C int isnanf (float x); # if 1 /* The original included above provides a declaration of isnan macro. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ +# if (__GNUC__ >= 4) || (__clang_major__ >= 4) + /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. */ # undef isnand # define isnand(x) __builtin_isnan ((double)(x)) # else @@ -2844,10 +3105,11 @@ _GL_EXTERN_C int isnand (double x); # if 0 /* The original included above provides a declaration of isnan macro or (older) isnanl function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ +# if (__GNUC__ >= 4) || (__clang_major__ >= 4) + /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. + GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't. */ # undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) +# define isnanl(x) __builtin_isnan ((long double)(x)) # elif defined isnan # undef isnanl # define isnanl(x) isnan ((long double)(x)) @@ -2867,20 +3129,20 @@ _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; isnanf.h (e.g.) here, because those may end up being macros that recursively expand back to isnan. So use the gnulib replacements for them directly. */ -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) -# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) +# if 0 && (__GNUC__ >= 4) || (__clang_major__ >= 4) +# define gl_isnan_f(x) __builtin_isnan ((float)(x)) # else _GL_EXTERN_C int rpl_isnanf (float x); # define gl_isnan_f(x) rpl_isnanf (x) # endif -# if 1 && __GNUC__ >= 4 +# if 1 && (__GNUC__ >= 4) || (__clang_major__ >= 4) # define gl_isnan_d(x) __builtin_isnan ((double)(x)) # else _GL_EXTERN_C int rpl_isnand (double x); # define gl_isnan_d(x) rpl_isnand (x) # endif -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) -# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) +# if 0 && (__GNUC__ >= 4) || (__clang_major__ >= 4) +# define gl_isnan_l(x) __builtin_isnan ((long double)(x)) # else _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; # define gl_isnan_l(x) rpl_isnanl (x) @@ -2890,22 +3152,28 @@ _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ gl_isnan_f (x)) -# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl))) +# elif (__GNUC__ >= 4) || (__clang_major__ >= 4) # undef isnan # define isnan(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ + (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \ sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ - __builtin_isnanf ((float)(x))) + __builtin_isnan ((float)(x))) # endif # ifdef __cplusplus # if defined isnan || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) # undef isnan -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ != 12) || (defined __FreeBSD__ && (__clang_major__ < 7 || __clang_major__ >= 11)) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isnan through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) # define isnan rpl_isnan +# define GNULIB_NAMESPACE_LACKS_ISNAN 1 +# elif (defined __FreeBSD__ && __clang_major__ >= 14) + /* Neither of the two possible _GL_MATH_CXX_REAL_FLOATING_DECL_2 invocations + works. Inline functions are already present in /usr/include/c++/v1/math.h, + which comes from LLVM. */ +# define GNULIB_NAMESPACE_LACKS_ISNAN 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) # endif @@ -2929,7 +3197,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); # if (0 \ && (!defined __cplusplus || __cplusplus < 201103)) # undef signbit - /* GCC 4.0 and newer provides three built-ins for signbit. */ + /* GCC >= 4.0 and clang provide three built-ins for signbit. */ # define signbit(x) \ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ @@ -2940,12 +3208,13 @@ _GL_WARN_REAL_FLOATING_DECL (isnan); _GL_EXTERN_C int gl_signbitf (float arg); _GL_EXTERN_C int gl_signbitd (double arg); _GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ +# if __GNUC__ >= 2 || defined __clang__ # define _GL_NUM_UINT_WORDS(type) \ ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf # define gl_signbitf_OPTIMIZED_MACRO # define gl_signbitf(arg) \ + __extension__ \ ({ union { float _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ } _m; \ @@ -2956,6 +3225,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd # define gl_signbitd_OPTIMIZED_MACRO # define gl_signbitd(arg) \ + __extension__ \ ({ union { double _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ } _m; \ @@ -2966,6 +3236,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl # define gl_signbitl_OPTIMIZED_MACRO # define gl_signbitl(arg) \ + __extension__ \ ({ union { long double _value; \ unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ } _m; \ @@ -2984,11 +3255,12 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined signbit || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) # undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines signbit through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) # define signbit rpl_signbit +# define GNULIB_NAMESPACE_LACKS_SIGNBIT 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) # endif @@ -3002,7 +3274,85 @@ _GL_WARN_REAL_FLOATING_DECL (signbit); # endif #endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef totalorderf +# define totalorderf rpl_totalorderf +# endif +_GL_FUNCDECL_RPL (totalorderf, int, (float const *, float const *)); +_GL_CXXALIAS_RPL (totalorderf, int, (float const *, float const *)); +# else +# if !1 +_GL_FUNCDECL_SYS (totalorderf, int, (float const *, float const *)); +# endif +_GL_CXXALIAS_SYS (totalorderf, int, (float const *, float const *)); +# endif +_GL_CXXALIASWARN (totalorderf); +#elif defined GNULIB_POSIXCHECK +# undef totalorderf +# if HAVE_RAW_DECL_TOTALORDERF +_GL_WARN_ON_USE (totalorderf, "totalorderf is unportable - " + "use gnulib module totalorderf for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef totalorder +# define totalorder rpl_totalorder +# endif +_GL_FUNCDECL_RPL (totalorder, int, (double const *, double const *)); +_GL_CXXALIAS_RPL (totalorder, int, (double const *, double const *)); +# else +# if !1 +_GL_FUNCDECL_SYS (totalorder, int, (double const *, double const *)); +# endif +_GL_CXXALIAS_SYS (totalorder, int, (double const *, double const *)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN1 (totalorder, int, (double const *, double const *)); +# endif +#elif defined GNULIB_POSIXCHECK +# undef totalorder +# if HAVE_RAW_DECL_TOTALORDER +_GL_WARN_ON_USE (totalorder, "totalorder is unportable - " + "use gnulib module totalorder for portability"); +# endif +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef totalorderl +# define totalorderl rpl_totalorderl +# endif +_GL_FUNCDECL_RPL (totalorderl, int, + (long double const *, long double const *)); +_GL_CXXALIAS_RPL (totalorderl, int, + (long double const *, long double const *)); +# else +# if !1 +_GL_FUNCDECL_SYS (totalorderl, int, + (long double const *, long double const *)); +# endif +_GL_CXXALIAS_SYS (totalorderl, int, + (long double const *, long double const *)); +# endif +_GL_CXXALIASWARN (totalorderl); +#elif defined GNULIB_POSIXCHECK +# undef totalorderl +# if HAVE_RAW_DECL_TOTALORDERL +_GL_WARN_ON_USE (totalorderl, "totalorderl is unportable - " + "use gnulib module totalorderl for portability"); +# endif +#endif + _GL_INLINE_HEADER_END #endif /* _GL_LTS_MATH_H */ +#endif /* _GL_INCLUDING_MATH_H */ #endif /* _GL_LTS_MATH_H */ +#endif diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/signal.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/signal.h index 59190eb8a..79271a604 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/signal.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/signal.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2006-2020 Free Software Foundation, Inc. + Copyright (C) 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -33,11 +33,7 @@ In this situation, some of the functions are not yet declared, therefore we cannot provide the C++ aliases. */ -#if (_MSC_VER < 1900) -#include "../include/signal.h" -#else -#include "../ucrt/signal.h" -#endif +# include "../ucrt/signal.h" #else /* Normal invocation convention. */ @@ -53,43 +49,52 @@ #include /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/signal.h" -#else #include "../ucrt/signal.h" -#endif #undef _GL_ALREADY_INCLUDING_SIGNAL_H #ifndef _GL_LTS_SIGNAL_H #define _GL_LTS_SIGNAL_H -/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android - declare pthread_sigmask in , not in . +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* For testing the OpenBSD version. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && defined __OpenBSD__ +# include +#endif + +/* Mac OS X 10.3, FreeBSD < 8.0, OpenBSD < 5.1, OSF/1 4.0, Solaris 2.6, Android, + OS/2 kLIBC declare pthread_sigmask in , not in . But avoid namespace pollution on glibc systems.*/ #if (0 || defined GNULIB_POSIXCHECK) \ && ((defined __APPLE__ && defined __MACH__) \ - || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \ - || defined __sun || defined __ANDROID__) \ + || (defined __FreeBSD__ && __FreeBSD__ < 8) \ + || (defined __OpenBSD__ && OpenBSD < 201205) \ + || defined __osf__ || defined __sun || defined __ANDROID__ \ + || defined __KLIBC__) \ && ! defined __GLIBC__ # include #endif /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -177,6 +182,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -224,6 +235,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -249,6 +270,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -346,7 +375,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -374,9 +403,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -392,26 +421,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -420,19 +449,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -505,13 +534,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -520,27 +556,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdalign.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdalign.h deleted file mode 100644 index 9bcf6ed58..000000000 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdalign.h +++ /dev/null @@ -1,122 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A substitute for ISO C11 . - - Copyright 2011-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Paul Eggert and Bruno Haible. */ - -#ifndef _GL_STDALIGN_H -#define _GL_STDALIGN_H - -/* ISO C11 for platforms that lack it. - - References: - ISO C11 (latest free draft - ) - sections 6.5.3.4, 6.7.5, 7.15. - C++11 (latest free draft - ) - section 18.10. */ - -/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment - requirement of a structure member (i.e., slot or field) that is of - type TYPE, as an integer constant expression. - - This differs from GCC's __alignof__ operator, which can yield a - better-performing alignment for an object of that type. For - example, on x86 with GCC, __alignof__ (double) and __alignof__ - (long long) are 8, whereas alignof (double) and alignof (long long) - are 4 unless the option '-malign-double' is used. - - The result cannot be used as a value for an 'enum' constant, if you - want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. - - Include for offsetof. */ -#include - -/* FreeBSD 9.1 , included by and lots of other - standard headers, defines conflicting implementations of _Alignas - and _Alignof that are no better than ours; override them. */ -#undef _Alignas -#undef _Alignof - -/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 - . */ -#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ - || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9))) -# ifdef __cplusplus -# if 201103 <= __cplusplus -# define _Alignof(type) alignof (type) -# else - template struct __alignof_helper { char __a; __t __b; }; -# define _Alignof(type) offsetof (__alignof_helper, __b) -# endif -# else -# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) -# endif -#endif -#if ! (defined __cplusplus && 201103 <= __cplusplus) -# define alignof _Alignof -#endif -#define __alignof_is_defined 1 - -/* alignas (A), also known as _Alignas (A), aligns a variable or type - to the alignment A, where A is an integer constant expression. For - example: - - int alignas (8) foo; - struct s { int a; int alignas (8) bar; }; - - aligns the address of FOO and the offset of BAR to be multiples of 8. - - A should be a power of two that is at least the type's alignment - and at most the implementation's alignment limit. This limit is - 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable - to MSVC through at least version 10.0, A should be an integer - constant, as MSVC does not support expressions such as 1 << 3. - To be portable to Sun C 5.11, do not align auto variables to - anything stricter than their default alignment. - - The following C11 requirements are not supported here: - - - If A is zero, alignas has no effect. - - alignas can be used multiple times; the strictest one wins. - - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). - - */ - -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 -# if defined __cplusplus && 201103 <= __cplusplus -# define _Alignas(a) alignas (a) -# elif ((defined __APPLE__ && defined __MACH__ \ - ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ - : __GNUC__ && !defined __ibmxl__) \ - || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ - || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__) -# define _Alignas(a) __attribute__ ((__aligned__ (a))) -# elif 1300 <= _MSC_VER -# define _Alignas(a) __declspec (align (a)) -# endif -#endif -#if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \ - || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) -# define alignas _Alignas -#endif -#if defined alignas || (defined __cplusplus && 201103 <= __cplusplus) -# define __alignas_is_defined 1 -#endif - -#endif /* _GL_STDALIGN_H */ diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdckdint.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdckdint.h new file mode 100644 index 000000000..edcda2982 --- /dev/null +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdckdint.h @@ -0,0 +1,36 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* stdckdint.h -- checked integer arithmetic + + Copyright 2022-2023 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _GL_STDCKDINT_H +#define _GL_STDCKDINT_H + +#include "intprops-internal.h" + +/* Store into *R the low-order bits of A + B, A - B, A * B, respectively. + Return 1 if the result overflows, 0 otherwise. + A, B, and *R can have any integer type other than char, bool, a + bit-precise integer type, or an enumeration type. + + These are like the standard macros introduced in C23, except that + arguments should not have side effects. */ + +#define ckd_add(r, a, b) ((bool) _GL_INT_ADD_WRAPV (a, b, r)) +#define ckd_sub(r, a, b) ((bool) _GL_INT_SUBTRACT_WRAPV (a, b, r)) +#define ckd_mul(r, a, b) ((bool) _GL_INT_MULTIPLY_WRAPV (a, b, r)) + +#endif /* _GL_STDCKDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stddef.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stddef.h index d5c2de51f..868f26c6f 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stddef.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stddef.h @@ -1,25 +1,25 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for POSIX 2008 , for platforms that have issues. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake. */ /* - * POSIX 2008 for platforms that have issues. + * POSIX 2008 and ISO C 23 for platforms that have issues. * */ @@ -38,15 +38,18 @@ remember if special invocation has ever been used to obtain wint_t, in which case we need to clean up NULL yet again. */ -# if !(defined _GL_LTS_STDDEF_H && defined _GL_STDDEF_WINT_T) +# if !(defined _GL_LTS_STDDEF_H && defined _GL_LTS_STDDEF_WINT_T) # ifdef __need_wint_t -# define _GL_STDDEF_WINT_T +# define _GL_LTS_STDDEF_WINT_T # endif -#if (_MSC_VER < 1900) -#include "../include/stddef.h" -#else -#include "../ucrt/stddef.h" -#endif +# include "../ucrt/stddef.h" + /* On TinyCC, make sure that the macros that indicate the special invocation + convention get undefined. */ +# undef __need_wchar_t +# undef __need_size_t +# undef __need_ptrdiff_t +# undef __need_NULL +# undef __need_wint_t # endif #else @@ -54,17 +57,31 @@ # ifndef _GL_LTS_STDDEF_H +/* On AIX 7.2, with xlc in 64-bit mode, defines max_align_t to a + type with alignment 4, but 'long' has alignment 8. */ +# if defined _AIX && defined __LP64__ && !0 +# if !GNULIB_defined_max_align_t +# ifdef _MAX_ALIGN_T +/* /usr/include/stddef.h has already defined max_align_t. Override it. */ +typedef long rpl_max_align_t; +# define max_align_t rpl_max_align_t +# else +/* Prevent /usr/include/stddef.h from defining max_align_t. */ +typedef long max_align_t; +# define _MAX_ALIGN_T +# endif +# define __CLANG_MAX_ALIGN_T_DEFINED +# define GNULIB_defined_max_align_t 1 +# endif +# endif + /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/stddef.h" -#else -#include "../ucrt/stddef.h" -#endif +# include "../ucrt/stddef.h" /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ # if (0 \ - && (!defined _GL_LTS_STDDEF_H || defined _GL_STDDEF_WINT_T)) + && (!defined _GL_LTS_STDDEF_H || defined _GL_LTS_STDDEF_WINT_T)) # undef NULL # ifdef __cplusplus /* ISO C++ says that the macro NULL must expand to an integer constant @@ -85,6 +102,33 @@ # ifndef _GL_LTS_STDDEF_H # define _GL_LTS_STDDEF_H +/* This file uses _Noreturn, _GL_ATTRIBUTE_NOTHROW. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* Some platforms lack wchar_t. */ #if !1 # define wchar_t int @@ -95,18 +139,20 @@ we are currently compiling with gcc. On MSVC, max_align_t is defined only in C++ mode, after was included. Its definition is good since it has an alignment of 8 (on x86 - and x86_64). */ -#if defined _MSC_VER && defined __cplusplus + and x86_64). + Similarly on OS/2 kLIBC. */ +#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \ + && defined __cplusplus # include #else -# if ! (0 || defined _GCC_MAX_ALIGN_T) +# if ! (0 || (defined _GCC_MAX_ALIGN_T && !defined __clang__)) # if !GNULIB_defined_max_align_t /* On the x86, the maximum storage alignment of double, long, etc. is 4, but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, and the C11 standard allows this. Work around this problem by using __alignof__ (which returns 8 for double) rather than _Alignof (which returns 4), and align each union member accordingly. */ -# ifdef __GNUC__ +# if defined __GNUC__ || (__clang_major__ >= 4) # define _GL_STDDEF_ALIGNAS(type) \ __attribute__ ((__aligned__ (__alignof__ (type)))) # else @@ -120,11 +166,49 @@ typedef union long int __i _GL_STDDEF_ALIGNAS (long int); } rpl_max_align_t; # define max_align_t rpl_max_align_t +# define __CLANG_MAX_ALIGN_T_DEFINED # define GNULIB_defined_max_align_t 1 # endif # endif #endif +/* ISO C 23 § 7.21.1 The unreachable macro */ +#ifndef unreachable + +/* Code borrowed from verify.h. */ +# ifndef _GL_HAS_BUILTIN_UNREACHABLE +# if defined __clang_major__ && __clang_major__ < 5 +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__) +# define _GL_HAS_BUILTIN_UNREACHABLE 1 +# elif defined __has_builtin +# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable) +# else +# define _GL_HAS_BUILTIN_UNREACHABLE 0 +# endif +# endif + +# if _GL_HAS_BUILTIN_UNREACHABLE +# define unreachable() __builtin_unreachable () +# elif 1200 <= _MSC_VER +# define unreachable() __assume (0) +# else +/* Declare abort(), without including . */ +extern +# if defined __cplusplus +"C" +# endif +_Noreturn +void abort (void) +# if defined __cplusplus && (__GLIBC__ >= 2) +_GL_ATTRIBUTE_NOTHROW +# endif +; +# define unreachable() abort () +# endif + +#endif + # endif /* _GL_LTS_STDDEF_H */ # endif /* _GL_LTS_STDDEF_H */ #endif /* __need_XXX */ diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdint.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdint.h index b657769a6..e05607fd1 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdint.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdint.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2023 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* * ISO C 99 for platforms that lack it. @@ -303,12 +303,11 @@ typedef gl_uint_fast32_t gl_uint_fast16_t; /* kLIBC's defines _INTPTR_T_DECLARED and needs its own definitions of intptr_t and uintptr_t (which use int and unsigned) to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and + Similarly, MinGW WSL-5.4.1 needs its own intptr_t and uintptr_t to avoid conflicting declarations of system functions like _findclose in . */ # if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) + || defined __MINGW32__) # undef intptr_t # undef uintptr_t # ifdef _WIN64 @@ -581,11 +580,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) -> -> -> , and the latter includes and assumes its types are already defined. */ # if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include # undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/lib/stdio.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdio.h similarity index 78% rename from gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/lib/stdio.h rename to gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdio.h index ae58831aa..325eb74d1 100644 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/lib/stdio.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdio.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -37,6 +37,12 @@ #ifndef _GL_LTS_STDIO_H +/* Suppress macOS deprecation warnings for sprintf and vsprintf. */ +#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE +# define _POSIX_C_SOURCE 200809L +# define _GL_DEFINED__POSIX_C_SOURCE +#endif + #define _GL_ALREADY_INCLUDING_STDIO_H /* The include_next requires a split double-inclusion guard. */ @@ -44,9 +50,21 @@ #undef _GL_ALREADY_INCLUDING_STDIO_H +#ifdef _GL_DEFINED__POSIX_C_SOURCE +# undef _GL_DEFINED__POSIX_C_SOURCE +# undef _POSIX_C_SOURCE +#endif + #ifndef _GL_LTS_STDIO_H #define _GL_LTS_STDIO_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_FORMAT, + _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Get va_list. Needed on many systems, including glibc 2.8. */ #include @@ -57,6 +75,52 @@ May also define off_t to a 64-bit type on native Windows. */ #include +/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ + && ! defined __GLIBC__ +# include +#endif + +/* Android 4.3 declares renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'perror' in , not in . We must include + it before we #define perror rpl_perror. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + +/* MSVC declares 'remove' in , not in . We must include + it before we #define remove rpl_remove. */ +/* MSVC declares 'rename' in , not in . We must include + it before we #define rename rpl_rename. */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _WIN32 && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The __-protected variants of the attributes 'format' and 'printf' are accepted by gcc versions 2.6.4 (effectively 2.7) and later. @@ -64,37 +128,83 @@ gnulib and libintl do '#define printf __printf__' when they override the 'printf' function. */ #ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__ # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) # else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ # endif #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones + standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD */ +/* __gnu_printf__ is supported in GCC >= 4.4. */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__ #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__ #endif -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ +/* An __attribute__ __format__ specifier for a function that takes a format + string and arguments, where the format string directives are the ones of the + system printf(), rather than the ones standardized by ISO C99 and POSIX. + _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM */ +/* On mingw, Gnulib sets __USE_MINGW_ANSI_STDIO in order to get closer to + the standards. The macro GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU indicates + whether this change is effective. On older mingw, it is not. */ #if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD #else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM __printf__ #endif +/* _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD + indicates to GCC that the function takes a format string and arguments, + where the format string directives are the ones standardized by ISO C99 + and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument)) + +/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD, + except that it indicates to GCC that the supported format string directives + are the ones of the system printf(), rather than the ones standardized by + ISO C99 and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, formatstring_parameter, first_argument)) + /* _GL_ATTRIBUTE_FORMAT_SCANF indicates to GCC that the function takes a format string and arguments, where the format string directives are the ones standardized by ISO C99 @@ -114,56 +224,21 @@ #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -251,6 +326,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -298,6 +379,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -323,6 +414,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -420,7 +519,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -448,9 +547,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -466,26 +565,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -494,19 +593,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -579,13 +678,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -594,27 +700,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -644,24 +756,56 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # undef putc_unlocked #endif + +/* Maximum number of characters produced by printing a NaN value. */ +#ifndef _PRINTF_NAN_LEN_MAX +# if defined __FreeBSD__ || defined __DragonFly__ \ + || defined __NetBSD__ \ + || (defined __APPLE__ && defined __MACH__) +/* On BSD systems, a NaN value prints as just "nan", without a sign. */ +# define _PRINTF_NAN_LEN_MAX 3 +# elif (__GLIBC__ >= 2) || MUSL_LIBC || defined __OpenBSD__ || defined __sun || defined __CYGWIN__ +/* glibc, musl libc, OpenBSD, Solaris libc, and Cygwin produce "[-]nan". */ +# define _PRINTF_NAN_LEN_MAX 4 +# elif defined _AIX +/* AIX produces "[-]NaNQ". */ +# define _PRINTF_NAN_LEN_MAX 5 +# elif defined _WIN32 && !defined __CYGWIN__ +/* On native Windows, the output can be: + - with MSVC ucrt: "[-]nan" or "[-]nan(ind)" or "[-]nan(snan)", + - with mingw: "[-]1.#IND" or "[-]1.#QNAN". */ +# define _PRINTF_NAN_LEN_MAX 10 +# elif defined __sgi +/* On IRIX, the output typically is "[-]nan0xNNNNNNNN" with 8 hexadecimal + digits. */ +# define _PRINTF_NAN_LEN_MAX 14 +# else +/* We don't know, but 32 should be a safe maximum. */ +# define _PRINTF_NAN_LEN_MAX 32 +# endif +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dprintf rpl_dprintf # endif _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); # else # if !1 _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((2))); # endif _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (dprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef dprintf # if HAVE_RAW_DECL_DPRINTF @@ -691,24 +835,103 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " "use gnulib module fclose for portable POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'fcloseall' to '_fcloseall', so that -loldnames is + not required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcloseall on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcloseall +# define fcloseall _fcloseall +# endif +_GL_CXXALIAS_MDA (fcloseall, int, (void)); +# else +# if 1 +# if defined __FreeBSD__ || defined __DragonFly__ +_GL_CXXALIAS_SYS (fcloseall, void, (void)); +# else +_GL_CXXALIAS_SYS (fcloseall, int, (void)); +# endif +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcloseall); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fdopen # define fdopen rpl_fdopen # endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); +_GL_FUNCDECL_RPL (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); # endif _GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen +#else +# if 0 && __GNUC__ >= 11 && !defined fdopen +/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# else +_GL_FUNCDECL_SYS (fdopen, FILE *, + (int fd, const char *mode) + _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef fdopen /* Assume fdopen is always declared. */ _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " "use gnulib module fdopen for portability"); +# elif 1 +/* On native Windows, map 'fdopen' to '_fdopen', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fdopen always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen _fdopen +# endif +_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode)); +# else +_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); +# endif +_GL_CXXALIASWARN (fdopen); +# endif #endif #if 0 @@ -773,29 +996,61 @@ _GL_CXXALIASWARN (fgets); # endif #endif +#if 1 +/* On native Windows, map 'fileno' to '_fileno', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fileno always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fileno +# define fileno _fileno +# endif +_GL_CXXALIAS_MDA (fileno, int, (FILE *restrict stream)); +# else +_GL_CXXALIAS_SYS (fileno, int, (FILE *restrict stream)); +# endif +_GL_CXXALIASWARN (fileno); +#endif + #if 0 -# if 0 +# if (0 && 0) \ + || (0 && 0) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef fopen # define fopen rpl_fopen # endif _GL_FUNCDECL_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif _GL_CXXALIAS_SYS (fopen, FILE *, (const char *restrict filename, const char *restrict mode)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (fopen); # endif -#elif defined GNULIB_POSIXCHECK -# undef fopen +#else +# if 0 && __GNUC__ >= 11 && !defined fopen +/* For -Wmismatched-dealloc: Associate fopen with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (fopen, FILE *, + (const char *restrict filename, const char *restrict mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)); +# endif +# if defined GNULIB_POSIXCHECK +# undef fopen /* Assume fopen is always declared. */ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " "use gnulib module fopen for portability"); +# endif #endif #if 0 || 1 @@ -808,7 +1063,7 @@ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX complian # if 0 || 0 _GL_FUNCDECL_RPL (fprintf, int, (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (fprintf, int, @@ -1242,7 +1497,9 @@ _GL_CXXALIAS_SYS (getdelim, ssize_t, int delimiter, FILE *restrict stream)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getdelim); +# endif #elif defined GNULIB_POSIXCHECK # undef getdelim # if HAVE_RAW_DECL_GETDELIM @@ -1281,7 +1538,7 @@ _GL_CXXALIAS_SYS (getline, ssize_t, (char **restrict lineptr, size_t *restrict linesize, FILE *restrict stream)); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (getline); # endif #elif defined GNULIB_POSIXCHECK @@ -1300,6 +1557,30 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif +#if 1 +/* On native Windows, map 'getw' to '_getw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getw +# define getw _getw +# endif +_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getw); +# endif +#endif + #if 0 || 0 struct obstack; /* Grow an obstack with formatted output. Return the number of @@ -1313,7 +1594,7 @@ struct obstack; # endif _GL_FUNCDECL_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_printf, int, (struct obstack *obs, const char *format, ...)); @@ -1321,7 +1602,7 @@ _GL_CXXALIAS_RPL (obstack_printf, int, # if !1 _GL_FUNCDECL_SYS (obstack_printf, int, (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_printf, int, @@ -1334,7 +1615,7 @@ _GL_CXXALIASWARN (obstack_printf); # endif _GL_FUNCDECL_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args)); @@ -1342,7 +1623,7 @@ _GL_CXXALIAS_RPL (obstack_vprintf, int, # if !1 _GL_FUNCDECL_SYS (obstack_vprintf, int, (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (obstack_vprintf, int, @@ -1394,29 +1675,42 @@ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " # undef popen # define popen rpl_popen # endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +_GL_FUNCDECL_RPL (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); # else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); +# if !1 || __GNUC__ >= 11 +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); # endif _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); # endif _GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN +#else +# if 0 && __GNUC__ >= 11 && !defined popen +/* For -Wmismatched-dealloc: Associate popen with pclose or rpl_pclose. */ +_GL_FUNCDECL_SYS (popen, FILE *, + (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef popen +# if HAVE_RAW_DECL_POPEN _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " "use gnulib module popen or pipe for more portability"); +# endif # endif #endif #if 0 || 1 # if (0 && 0) \ || (1 && 0 && (0 || 0)) -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ @@ -1426,7 +1720,7 @@ _GL_FUNCDECL_RPL_1 (__printf__, int, (const char *restrict format, ...) __asm__ ( _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL_1 (__printf__, int, @@ -1443,7 +1737,7 @@ _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); # endif _GL_FUNCDECL_RPL (printf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); # endif @@ -1513,6 +1807,30 @@ _GL_CXXALIASWARN (puts); # endif #endif +#if 1 +/* On native Windows, map 'putw' to '_putw', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putw always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putw +# define putw _putw +# endif +_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream)); +# else +# if 1 +# if defined __APPLE__ && defined __MACH__ +/* The presence of the declaration depends on _POSIX_C_SOURCE. */ +_GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream)); +# endif +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (putw); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1590,7 +1908,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - " #if 1 # if 0 && 0 -# if defined __GNUC__ +# if defined __GNUC__ || defined __clang__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef scanf /* Don't break __attribute__((format(scanf,M,N))). */ @@ -1626,10 +1944,11 @@ _GL_CXXALIASWARN (scanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif +# define GNULIB_overrides_snprintf 1 _GL_FUNCDECL_RPL (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (snprintf, int, (char *restrict str, size_t size, @@ -1639,14 +1958,16 @@ _GL_CXXALIAS_RPL (snprintf, int, _GL_FUNCDECL_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (snprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef snprintf # if HAVE_RAW_DECL_SNPRINTF @@ -1669,9 +1990,10 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif +# define GNULIB_overrides_sprintf 1 _GL_FUNCDECL_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...)); @@ -1690,24 +2012,56 @@ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " "POSIX compliance"); #endif +#if 1 +/* On native Windows, map 'tempnam' to '_tempnam', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::tempnam always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tempnam +# define tempnam _tempnam +# endif +_GL_CXXALIAS_MDA (tempnam, char *, (const char *dir, const char *prefix)); +# else +_GL_CXXALIAS_SYS (tempnam, char *, (const char *dir, const char *prefix)); +# endif +_GL_CXXALIASWARN (tempnam); +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define tmpfile rpl_tmpfile # endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); +_GL_FUNCDECL_RPL (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (tmpfile); # endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE +#else +# if 0 && __GNUC__ >= 11 && !defined tmpfile +/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */ +_GL_FUNCDECL_SYS (tmpfile, FILE *, (void) + _GL_ATTRIBUTE_DEALLOC (fclose, 1) + _GL_ATTRIBUTE_MALLOC); +# endif +# if defined GNULIB_POSIXCHECK +# undef tmpfile +# if HAVE_RAW_DECL_TMPFILE _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " "use gnulib module tmpfile for portability"); +# endif # endif #endif @@ -1720,9 +2074,10 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif +# define GNULIB_overrides_asprintf _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (asprintf, int, (char **result, const char *format, ...)); @@ -1730,7 +2085,7 @@ _GL_CXXALIAS_RPL (asprintf, int, # if !0 _GL_FUNCDECL_SYS (asprintf, int, (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (asprintf, int, @@ -1741,9 +2096,10 @@ _GL_CXXALIASWARN (asprintf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif +# define GNULIB_overrides_vasprintf 1 _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vasprintf, int, (char **result, const char *format, va_list args)); @@ -1751,7 +2107,7 @@ _GL_CXXALIAS_RPL (vasprintf, int, # if !0 _GL_FUNCDECL_SYS (vasprintf, int, (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # endif _GL_CXXALIAS_SYS (vasprintf, int, @@ -1767,7 +2123,7 @@ _GL_CXXALIASWARN (vasprintf); # endif _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *restrict format, va_list args)); @@ -1775,7 +2131,7 @@ _GL_CXXALIAS_RPL (vdprintf, int, # if !1 _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((2))); # endif /* Need to cast, because on Solaris, the third parameter will likely be @@ -1805,7 +2161,7 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " _GL_FUNCDECL_RPL (vfprintf, int, (FILE *restrict fp, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); # else _GL_FUNCDECL_RPL (vfprintf, int, @@ -1858,7 +2214,9 @@ _GL_CXXALIAS_SYS (vfscanf, int, (FILE *restrict stream, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vfscanf); +# endif #endif #if 0 || 1 @@ -1870,7 +2228,7 @@ _GL_CXXALIASWARN (vfscanf); # define GNULIB_overrides_vprintf 1 # if 0 || 0 _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0) _GL_ARG_NONNULL ((1))); # else _GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) @@ -1912,7 +2270,9 @@ _GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); # else _GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vscanf); +# endif #endif #if 1 @@ -1920,10 +2280,11 @@ _GL_CXXALIASWARN (vscanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif +# define GNULIB_overrides_vsnprintf 1 _GL_FUNCDECL_RPL (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); _GL_CXXALIAS_RPL (vsnprintf, int, (char *restrict str, size_t size, @@ -1933,14 +2294,16 @@ _GL_CXXALIAS_RPL (vsnprintf, int, _GL_FUNCDECL_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))); # endif _GL_CXXALIAS_SYS (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (vsnprintf); +# endif #elif defined GNULIB_POSIXCHECK # undef vsnprintf # if HAVE_RAW_DECL_VSNPRINTF @@ -1954,10 +2317,11 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif +# define GNULIB_overrides_vsprintf 1 _GL_FUNCDECL_RPL (vsprintf, int, (char *restrict str, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) _GL_ARG_NONNULL ((1, 2))); _GL_CXXALIAS_RPL (vsprintf, int, (char *restrict str, diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdlib.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdlib.h index 8b68528f5..719589d63 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdlib.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/stdlib.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2020 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -25,11 +25,7 @@ /* Special invocation conventions inside some gnulib header files, and inside some glibc header files, respectively. */ -#if (_MSC_VER < 1900) -#include "../include/stdlib.h" -#else #include "../ucrt/stdlib.h" -#endif #else /* Normal invocation convention. */ @@ -37,15 +33,18 @@ #ifndef _GL_LTS_STDLIB_H /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/stdlib.h" -#else #include "../ucrt/stdlib.h" -#endif #ifndef _GL_LTS_STDLIB_H #define _GL_LTS_STDLIB_H +/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include @@ -62,8 +61,8 @@ # include #endif -/* Native Windows platforms declare mktemp() in . */ -#if 0 && (defined _WIN32 && ! defined __CYGWIN__) +/* Native Windows platforms declare _mktemp() in . */ +#if defined _WIN32 && !defined __CYGWIN__ # include #endif @@ -76,9 +75,7 @@ # include # endif -# if !1 || 0 || !1 -# include -# endif +# include # if !1 /* Define 'struct random_data'. @@ -108,10 +105,61 @@ struct random_data # include #endif +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ @@ -120,19 +168,19 @@ struct random_data /* The definition of _Noreturn is copied here. */ /* A C macro for declaring that a function does not return. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _Noreturn @@ -147,14 +195,21 @@ struct random_data AIX system header files and several gnulib header files use precisely this syntax with 'extern'. */ # define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) +# elif (defined __clang__ && __clang_major__ < 16 \ + && defined _GL_WORK_AROUND_LLVM_BUG_59792) + /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around + that rare LLVM bug, though you may get many false-alarm warnings. */ +# define _Noreturn +# elif ((!defined __cplusplus || defined __clang__) \ + && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ + || (!defined __STRICT_ANSI__ \ + && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \ + || (defined __apple_build_version__ \ + ? 6000000 <= __apple_build_version__ \ + : 3 < __clang_major__ + (5 <= __clang_minor__)))))) /* _Noreturn works as-is. */ -# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C +# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \ + || 0x5110 <= __SUNPRO_C) # define _Noreturn __attribute__ ((__noreturn__)) # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) # define _Noreturn __declspec (noreturn) @@ -165,19 +220,19 @@ struct random_data /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -265,6 +320,12 @@ struct random_data Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -312,6 +373,16 @@ struct random_data _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -337,6 +408,14 @@ struct random_data _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -434,7 +513,7 @@ struct random_data _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -462,9 +541,9 @@ struct random_data _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -480,26 +559,26 @@ struct random_data /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -508,19 +587,19 @@ struct random_data /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -593,13 +672,20 @@ struct random_data # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -608,27 +694,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -662,11 +754,22 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use #if 0 /* Terminate the current process with the given return code, without running the 'atexit' handlers. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef _Exit +# define _Exit rpl__Exit +# endif +_GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status)); +_GL_CXXALIAS_RPL (_Exit, void, (int status)); +# else +# if !1 _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); -# endif +# endif _GL_CXXALIAS_SYS (_Exit, void, (int status)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (_Exit); +# endif #elif defined GNULIB_POSIXCHECK # undef _Exit # if HAVE_RAW_DECL__EXIT @@ -676,6 +779,87 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " #endif +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef free +# define free rpl_free +# endif +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_FUNCDECL_RPL (free, void, (void *ptr) _GL_ATTRIBUTE_NOTHROW); +# else +_GL_FUNCDECL_RPL (free, void, (void *ptr)); +# endif +_GL_CXXALIAS_RPL (free, void, (void *ptr)); +# else +_GL_CXXALIAS_SYS (free, void, (void *ptr)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (free); +# endif +#elif defined GNULIB_POSIXCHECK +# undef free +/* Assume free is always declared. */ +_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - " + "use gnulib module free for portability"); +#endif + + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef aligned_alloc +# define aligned_alloc rpl_aligned_alloc +# endif +_GL_FUNCDECL_RPL (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size)); +# else +# if 1 +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size)); +# endif +# endif +# if (__GLIBC__ >= 2) && 1 +_GL_CXXALIASWARN (aligned_alloc); +# endif +#else +# if 1 && __GNUC__ >= 11 && !defined aligned_alloc +/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 16) > 2 +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (aligned_alloc, void *, + (size_t alignment, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef aligned_alloc +# if HAVE_RAW_DECL_ALIGNED_ALLOC +_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - " + "use gnulib module aligned_alloc for portability"); +# endif +# endif +#endif + #if 0 /* Parse a signed decimal integer. Returns the value of the integer. Errors are not detected. */ @@ -694,25 +878,56 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - " # endif #endif -#if 0 -# if 0 +#if 1 +# if (1 && 1) \ + || (1 && 1) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc # endif -_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); +_GL_FUNCDECL_RPL (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (calloc); # endif -#elif defined GNULIB_POSIXCHECK -# undef calloc +#else +# if 1 && __GNUC__ >= 11 && !defined calloc +/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (calloc, void *, + (size_t nmemb, size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef calloc /* Assume calloc is always declared. */ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " "use gnulib module calloc-posix for portability"); +# endif #endif #if 0 @@ -720,13 +935,25 @@ _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define canonicalize_file_name rpl_canonicalize_file_name # endif -_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); # else -# if !1 -_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); +# if !1 || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); # endif @@ -735,12 +962,97 @@ _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); (!1 || 0) # endif _GL_CXXALIASWARN (canonicalize_file_name); -#elif defined GNULIB_POSIXCHECK -# undef canonicalize_file_name -# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME +#else +# if 1 && __GNUC__ >= 11 && !defined canonicalize_file_name +/* For -Wmismatched-dealloc: Associate canonicalize_file_name with free or + rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, + (const char *name) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef canonicalize_file_name +# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME _GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - " "use gnulib module canonicalize-lgpl for portability"); +# endif +# endif +#endif + +#if 1 +/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ecvt +# define ecvt _ecvt +# endif +_GL_CXXALIAS_MDA (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (ecvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (ecvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcvt +# define fcvt _fcvt +# endif +_GL_CXXALIAS_MDA (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# else +# if 1 +_GL_CXXALIAS_SYS (fcvt, char *, + (double number, int ndigits, int *decptp, int *signp)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (fcvt); +# endif +#endif + +#if 1 +/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gcvt +# define gcvt _gcvt +# endif +_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf)); +# else +# if 1 +_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (gcvt); # endif #endif @@ -749,12 +1061,24 @@ _GL_WARN_ON_USE (canonicalize_file_name, The three numbers are the load average of the last 1 minute, the last 5 minutes, and the last 15 minutes, respectively. LOADAVG is an array of NELEM numbers. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getloadavg +# define getloadavg rpl_getloadavg +# endif +_GL_FUNCDECL_RPL (getloadavg, int, (double loadavg[], int nelem) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getloadavg, int, (double loadavg[], int nelem)); +# else +# if !1 _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getloadavg); +# endif #elif defined GNULIB_POSIXCHECK # undef getloadavg # if HAVE_RAW_DECL_GETLOADAVG @@ -763,6 +1087,41 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " # endif #endif +#if 1 +/* Return the base name of the executing program. + On native Windows this will usually end in ".exe" or ".EXE". */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getprogname +# define getprogname rpl_getprogname +# endif +# if 0 +_GL_FUNCDECL_RPL (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_RPL (getprogname, const char *, (void)); +# endif +_GL_CXXALIAS_RPL (getprogname, const char *, (void)); +# else +# if !0 +# if 0 +_GL_FUNCDECL_SYS (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE); +# else +_GL_FUNCDECL_SYS (getprogname, const char *, (void)); +# endif +# endif +_GL_CXXALIAS_SYS (getprogname, const char *, (void)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (getprogname); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getprogname +# if HAVE_RAW_DECL_GETPROGNAME +_GL_WARN_ON_USE (getprogname, "getprogname is unportable - " + "use gnulib module getprogname for portability"); +# endif +#endif + #if 0 /* Assuming *OPTIONP is a comma separated list of elements of the form "token" or "token=value", getsubopt parses the first of these elements. @@ -775,14 +1134,28 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. For more details see the POSIX specification. https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getsubopt +# define getsubopt rpl_getsubopt +# endif +_GL_FUNCDECL_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep)); +# else +# if !1 _GL_FUNCDECL_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep) _GL_ARG_NONNULL ((1, 2, 3))); -# endif +# endif _GL_CXXALIAS_SYS (getsubopt, int, (char **optionp, char *const *tokens, char **valuep)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getsubopt); +# endif #elif defined GNULIB_POSIXCHECK # undef getsubopt # if HAVE_RAW_DECL_GETSUBOPT @@ -812,25 +1185,101 @@ _GL_WARN_ON_USE (grantpt, "grantpt is not portable - " by never specifying a zero size), so it does not need malloc or realloc to be redefined. */ #if 1 -# if 1 +# if (1 && 1) \ + || (1 && 1) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef malloc # define malloc rpl_malloc # endif -_GL_FUNCDECL_RPL (malloc, void *, (size_t size)); +_GL_FUNCDECL_RPL (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (malloc); # endif -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef malloc +#else +# if 1 && __GNUC__ >= 11 && !defined malloc +/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (malloc, void *, + (size_t size) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef malloc /* Assume malloc is always declared. */ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " "use gnulib module malloc-posix for portability"); +# endif +#endif + +/* Return maximum number of bytes of a multibyte character. */ +#if 0 +# if !GNULIB_defined_MB_CUR_MAX +static inline +int gl_MB_CUR_MAX (void) +{ + /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ + return MB_CUR_MAX + (MB_CUR_MAX == 3); +} +# undef MB_CUR_MAX +# define MB_CUR_MAX gl_MB_CUR_MAX () +# define GNULIB_defined_MB_CUR_MAX 1 +# endif +#endif + +/* Convert a string to a wide string. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbstowcs +# define mbstowcs rpl_mbstowcs +# endif +_GL_FUNCDECL_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# else +_GL_CXXALIAS_SYS (mbstowcs, size_t, + (wchar_t *restrict dest, const char *restrict src, + size_t len)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (mbstowcs); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mbstowcs +# if HAVE_RAW_DECL_MBSTOWCS +_GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - " + "use gnulib module mbstowcs for portability"); +# endif #endif /* Convert a multibyte character to a wide character. */ @@ -895,12 +1344,24 @@ _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemp +# define mkostemp rpl_mkostemp +# endif +_GL_FUNCDECL_RPL (mkostemp, int, (char * /*template*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemp, int, (char * /*template*/, int /*flags*/)); +# else +# if !1 _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkostemp); +# endif #elif defined GNULIB_POSIXCHECK # undef mkostemp # if HAVE_RAW_DECL_MKOSTEMP @@ -923,14 +1384,28 @@ _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " implementation. Returns the open file descriptor if successful, otherwise -1 and errno set. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkostemps +# define mkostemps rpl_mkostemps +# endif +_GL_FUNCDECL_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# else +# if !1 _GL_FUNCDECL_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (mkostemps, int, (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkostemps); +# endif #elif defined GNULIB_POSIXCHECK # undef mkostemps # if HAVE_RAW_DECL_MKOSTEMPS @@ -995,14 +1470,70 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " # endif #endif +#if 1 +/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::mktemp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mktemp +# define mktemp _mktemp +# endif +_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/)); +# else +_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/)); +# endif +_GL_CXXALIASWARN (mktemp); +#endif + +/* Allocate memory with indefinite extent and specified alignment. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_memalign +# define posix_memalign rpl_posix_memalign +# endif +_GL_FUNCDECL_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# else +# if 1 +_GL_CXXALIAS_SYS (posix_memalign, int, + (void **memptr, size_t alignment, size_t size)); +# endif +# endif +# if __GLIBC__ >= 2 && 1 +_GL_CXXALIASWARN (posix_memalign); +# endif +#elif defined GNULIB_POSIXCHECK +# undef posix_memalign +# if HAVE_RAW_DECL_POSIX_MEMALIGN +_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - " + "use gnulib module posix_memalign for portability"); +# endif +#endif + #if 0 /* Return an FD open to the master side of a pseudo-terminal. Flags should include O_RDWR, and may also include O_NOCTTY. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef posix_openpt +# define posix_openpt rpl_posix_openpt +# endif +_GL_FUNCDECL_RPL (posix_openpt, int, (int flags)); +_GL_CXXALIAS_RPL (posix_openpt, int, (int flags)); +# else +# if !1 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); -# endif +# endif _GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (posix_openpt); +# endif #elif defined GNULIB_POSIXCHECK # undef posix_openpt # if HAVE_RAW_DECL_POSIX_OPENPT @@ -1073,6 +1604,36 @@ _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " # endif _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (putenv, int, (char *string)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +_GL_CXXALIAS_MDA (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); +# else +_GL_CXXALIAS_SYS (putenv, int, (char *string)); +# endif +_GL_CXXALIASWARN (putenv); +#elif 1 +/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::putenv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv _putenv +# endif +/* Need to cast, because on mingw, the parameter is either + 'const char *string' or 'char *string'. */ +_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string)); +# elif defined __KLIBC__ +/* Need to cast, because on OS/2 kLIBC, the first parameter is + const char *string. */ +_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string)); # else _GL_CXXALIAS_SYS (putenv, int, (char *string)); # endif @@ -1083,29 +1644,35 @@ _GL_CXXALIASWARN (putenv); /* Sort an array of NMEMB elements, starting at address BASE, each element occupying SIZE bytes, in ascending order according to the comparison function COMPARE. */ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_qsort_r_fn_types +typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *); +# define GNULIB_defined_qsort_r_fn_types 1 +# endif +# ifdef __cplusplus +} +# endif # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef qsort_r # define qsort_r rpl_qsort_r # endif _GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # else # if !1 _GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg) _GL_ARG_NONNULL ((1, 4))); # endif _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), + _gl_qsort_r_compar_fn compare, void *arg)); # endif _GL_CXXALIASWARN (qsort_r); @@ -1143,7 +1710,9 @@ _GL_FUNCDECL_SYS (random, long, (void)); int. */ _GL_CXXALIAS_SYS_CAST (random, long, (void)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (random); +# endif #elif defined GNULIB_POSIXCHECK # undef random # if HAVE_RAW_DECL_RANDOM @@ -1168,7 +1737,9 @@ _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); unsigned long seed. */ _GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (srandom); +# endif #elif defined GNULIB_POSIXCHECK # undef srandom # if HAVE_RAW_DECL_SRANDOM @@ -1199,7 +1770,9 @@ _GL_FUNCDECL_SYS (initstate, char *, _GL_CXXALIAS_SYS_CAST (initstate, char *, (unsigned int seed, char *buf, size_t buf_size)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (initstate); +# endif #elif defined GNULIB_POSIXCHECK # undef initstate # if HAVE_RAW_DECL_INITSTATE @@ -1224,7 +1797,9 @@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); is const char *arg_state. */ _GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (setstate); +# endif #elif defined GNULIB_POSIXCHECK # undef setstate # if HAVE_RAW_DECL_SETSTATE @@ -1355,37 +1930,80 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " #endif -#if 0 -# if 0 +#if 1 +# if (1 && 1) \ + || (1 && 0) # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ || _GL_USE_STDLIB_ALLOC) # undef realloc # define realloc rpl_realloc # endif -_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); +_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); # else +# if __GNUC__ >= 11 +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); # endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (realloc); # endif -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef realloc +#else +# if 1 && __GNUC__ >= 11 && !defined realloc +/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2 +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (realloc, void *, + (void *ptr, size_t size) + _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef realloc /* Assume realloc is always declared. */ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " "use gnulib module realloc-posix for portability"); +# endif #endif -#if 0 -# if ! 1 +#if 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef reallocarray +# define reallocarray rpl_reallocarray +# endif +_GL_FUNCDECL_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +_GL_CXXALIAS_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# else +# if ! 0 _GL_FUNCDECL_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); -# endif +# endif _GL_CXXALIAS_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (reallocarray); +# endif #elif defined GNULIB_POSIXCHECK # undef reallocarray # if HAVE_RAW_DECL_REALLOCARRAY @@ -1549,6 +2167,49 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable - " # endif #endif +#if 0 +/* Parse a signed integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is set + to ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtol rpl_strtol +# endif +# define GNULIB_defined_strtol_function 1 +_GL_FUNCDECL_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtol); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtol +# if HAVE_RAW_DECL_STRTOL +_GL_WARN_ON_USE (strtol, "strtol is unportable - " + "use gnulib module strtol for portability"); +# endif +#endif + #if 0 /* Parse a signed integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, @@ -1558,15 +2219,29 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable - " stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set to ERANGE. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoll rpl_strtoll +# endif +# define GNULIB_defined_strtoll_function 1 +_GL_FUNCDECL_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 _GL_FUNCDECL_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoll); #elif defined GNULIB_POSIXCHECK # undef strtoll @@ -1576,6 +2251,48 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " # endif #endif +#if 0 +/* Parse an unsigned integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is ULONG_MAX, and errno is set to ERANGE. */ +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoul rpl_strtoul +# endif +# define GNULIB_defined_strtoul_function 1 +_GL_FUNCDECL_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (strtoul); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtoul +# if HAVE_RAW_DECL_STRTOUL +_GL_WARN_ON_USE (strtoul, "strtoul is unportable - " + "use gnulib module strtoul for portability"); +# endif +#endif + #if 0 /* Parse an unsigned integer whose textual representation starts at STRING. The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, @@ -1585,15 +2302,29 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - " stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoull rpl_strtoull +# endif +# define GNULIB_defined_strtoull_function 1 +_GL_FUNCDECL_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !1 _GL_FUNCDECL_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoull); #elif defined GNULIB_POSIXCHECK # undef strtoull diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/string.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/string.h index b2fd6d438..13962511b 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/string.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/string.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2020 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 @@ -28,11 +28,7 @@ In this situation system _chk variants due to -D_FORTIFY_SOURCE might be used after any replacements defined here. */ -#if (_MSC_VER < 1900) -#include "../include/string.h" -#else #include "../ucrt/string.h" -#endif #else /* Normal invocation convention. */ @@ -42,17 +38,20 @@ #define _GL_ALREADY_INCLUDING_STRING_H /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/string.h" -#else #include "../ucrt/string.h" -#endif #undef _GL_ALREADY_INCLUDING_STRING_H #ifndef _GL_LTS_STRING_H #define _GL_LTS_STRING_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. */ #include @@ -61,38 +60,105 @@ # include #endif +/* NetBSD 5.0 declares strsignal in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (0 || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ + && ! defined __GLIBC__ +# include +#endif + +/* AIX 7.2 and Android 13 declare ffsl and ffsll in , not in + . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if ((0 || 0 || defined GNULIB_POSIXCHECK) \ + && (defined _AIX || defined __ANDROID__)) \ + && ! defined __GLIBC__ +# include +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ # endif #endif -/* NetBSD 5.0 declares strsignal in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ - && ! defined __GLIBC__ -# include -#endif - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -180,6 +246,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -227,6 +299,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -252,6 +334,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -349,7 +439,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -377,9 +467,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -395,26 +485,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -423,19 +513,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -508,13 +598,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -523,27 +620,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -559,6 +662,49 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif /* Clear a block of memory. The compiler will not delete a call to this function, even if the block is dead after the call. */ @@ -594,10 +740,18 @@ _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); /* Find the index of the least-significant set bit. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define ffsll rpl_ffsll +# endif +_GL_FUNCDECL_RPL (ffsll, int, (long long int i)); +_GL_CXXALIAS_RPL (ffsll, int, (long long int i)); +# else +# if !1 _GL_FUNCDECL_SYS (ffsll, int, (long long int i)); -# endif +# endif _GL_CXXALIAS_SYS (ffsll, int, (long long int i)); +# endif _GL_CXXALIASWARN (ffsll); #elif defined GNULIB_POSIXCHECK # undef ffsll @@ -607,10 +761,30 @@ _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); #endif +#if 1 +/* On native Windows, map 'memccpy' to '_memccpy', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::memccpy always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memccpy +# define memccpy _memccpy +# endif +_GL_CXXALIAS_MDA (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# else +_GL_CXXALIAS_SYS (memccpy, void *, + (void *dest, const void *src, int c, size_t n)); +# endif +_GL_CXXALIASWARN (memccpy); +#endif + + /* Return the first instance of C within N bytes of S, or NULL. */ #if 1 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef memchr # define memchr rpl_memchr # endif _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) @@ -626,10 +800,14 @@ _GL_CXXALIAS_SYS_CAST2 (memchr, void const *, (void const *__s, int __c, size_t __n)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memchr, void *, + (void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (memchr, void const *, - (void const *__s, int __c, size_t __n)); + (void const *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (memchr); # endif @@ -679,16 +857,32 @@ _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ #if 0 -# if ! 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mempcpy +# define mempcpy rpl_mempcpy +# endif +_GL_FUNCDECL_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n)); +# else +# if !1 _GL_FUNCDECL_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n) _GL_ARG_NONNULL ((1, 2))); -# endif +# endif _GL_CXXALIAS_SYS (mempcpy, void *, (void *restrict __dest, void const *restrict __src, size_t __n)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mempcpy); +# endif #elif defined GNULIB_POSIXCHECK # undef mempcpy # if HAVE_RAW_DECL_MEMPCPY @@ -711,10 +905,15 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr, void *, (void const *, int, size_t), void const *, (void const *, int, size_t)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); -_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); -# else + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (memrchr, void *, + (void *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (memrchr, void const *, + (void const *, int, size_t) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (memrchr); # endif #elif defined GNULIB_POSIXCHECK @@ -725,6 +924,23 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - " # endif #endif +/* Overwrite a block of memory. The compiler will not optimize + effects away, even if the block is dead after the call. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (memset_explicit, void *, + (void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n)); +_GL_CXXALIASWARN (memset_explicit); +#elif defined GNULIB_POSIXCHECK +# undef memset_explicit +# if HAVE_RAW_DECL_MEMSET_EXPLICIT +_GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - " + "use gnulib module memset_explicit for portability"); +# endif +#endif + /* Find the first occurrence of C in S. More efficient than memchr(S,C,N), at the expense of undefined behavior if C does not occur within N bytes. */ @@ -741,9 +957,14 @@ _GL_CXXALIAS_SYS_CAST2 (rawmemchr, void *, (void const *__s, int __c_in), void const *, (void const *__s, int __c_in)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); -_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (rawmemchr, void *, + (void *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (rawmemchr, void const *, + (void const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); # else _GL_CXXALIASWARN (rawmemchr); # endif @@ -757,14 +978,28 @@ _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ #if 1 -# if ! 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef stpcpy +# define stpcpy rpl_stpcpy +# endif +_GL_FUNCDECL_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (stpcpy, char *, + (char *restrict __dst, char const *restrict __src)); +# else +# if !0 _GL_FUNCDECL_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src) _GL_ARG_NONNULL ((1, 2))); -# endif +# endif _GL_CXXALIAS_SYS (stpcpy, char *, (char *restrict __dst, char const *restrict __src)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (stpcpy); +# endif #elif defined GNULIB_POSIXCHECK # undef stpcpy # if HAVE_RAW_DECL_STPCPY @@ -799,7 +1034,9 @@ _GL_CXXALIAS_SYS (stpncpy, char *, (char *restrict __dst, char const *restrict __src, size_t __n)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (stpncpy); +# endif #elif defined GNULIB_POSIXCHECK # undef stpncpy # if HAVE_RAW_DECL_STPNCPY @@ -813,7 +1050,8 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " GB18030 and the character to be searched is a digit. */ # undef strchr /* Assume strchr is always declared. */ -_GL_WARN_ON_USE_CXX (strchr, const char *, (const char *, int), +_GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), "strchr cannot work correctly on character strings " "in some multibyte locales - " "use mbschr if you care about internationalization"); @@ -844,10 +1082,15 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul, char const *, (char const *__s, int __c_in)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); -_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); -# else + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strchrnul, char *, + (char *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +_GL_CXXALIASWARN1 (strchrnul, char const *, + (char const *__s, int __c_in) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strchrnul); # endif #elif defined GNULIB_POSIXCHECK @@ -865,24 +1108,78 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " # undef strdup # define strdup rpl_strdup # endif -_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); # else # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup /* strdup exists as a function and as a macro. Get rid of the macro. */ # undef strdup # endif -# if !(1 || defined strdup) -_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); +# if (!1 || __GNUC__ >= 11) && !defined strdup +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); # endif _GL_CXXALIASWARN (strdup); -#elif defined GNULIB_POSIXCHECK -# undef strdup -# if HAVE_RAW_DECL_STRDUP +#else +# if __GNUC__ >= 11 && !defined strdup +/* For -Wmismatched-dealloc: Associate strdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strdup, char *, + (char const *__s) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strdup +# if HAVE_RAW_DECL_STRDUP _GL_WARN_ON_USE (strdup, "strdup is unportable - " "use gnulib module strdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'creat' to '_creat', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::strdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup _strdup +# endif +_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); +# else +# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup +# undef strdup +# endif +_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); +# endif +_GL_CXXALIASWARN (strdup); # endif #endif @@ -920,22 +1217,51 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - " # undef strndup # define strndup rpl_strndup # endif -_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_RPL (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); # else -# if ! 1 -_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); +# if !1 || (__GNUC__ >= 11 && !defined strndup) +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif # endif _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); # endif _GL_CXXALIASWARN (strndup); -#elif defined GNULIB_POSIXCHECK -# undef strndup -# if HAVE_RAW_DECL_STRNDUP +#else +# if __GNUC__ >= 11 && !defined strndup +/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ATTRIBUTE_NOTHROW + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (strndup, char *, + (char const *__s, size_t __n) + _GL_ARG_NONNULL ((1)) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef strndup +# if HAVE_RAW_DECL_STRNDUP _GL_WARN_ON_USE (strndup, "strndup is unportable - " "use gnulib module strndup for portability"); +# endif # endif #endif @@ -995,10 +1321,14 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk, char *, (char const *__s, char const *__accept), const char *, (char const *__s, char const *__accept)); # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strpbrk, char *, + (char *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strpbrk, char const *, - (char const *__s, char const *__accept)); + (char const *__s, char const *__accept) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strpbrk); # endif @@ -1008,7 +1338,8 @@ _GL_CXXALIASWARN (strpbrk); locale encoding is GB18030 and one of the characters to be searched is a digit. */ # undef strpbrk -_GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), "strpbrk cannot work correctly on character strings " "in multibyte locales - " "use mbspbrk if you care about internationalization"); @@ -1016,7 +1347,8 @@ _GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), #elif defined GNULIB_POSIXCHECK # undef strpbrk # if HAVE_RAW_DECL_STRPBRK -_GL_WARN_ON_USE_CXX (strpbrk, const char *, (const char *, const char *), +_GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), "strpbrk is unportable - " "use gnulib module strpbrk for portability"); # endif @@ -1037,7 +1369,8 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " GB18030 and the character to be searched is a digit. */ # undef strrchr /* Assume strrchr is always declared. */ -_GL_WARN_ON_USE_CXX (strrchr, const char *, (const char *, int), +_GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), "strrchr cannot work correctly on character strings " "in some multibyte locales - " "use mbsrchr if you care about internationalization"); @@ -1100,10 +1433,14 @@ _GL_CXXALIAS_SYS_CAST2 (strstr, const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strstr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strstr, const char *, - (const char *haystack, const char *needle)); + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); # elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strstr); # endif @@ -1149,11 +1486,15 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr, const char *, (const char *haystack, const char *needle)); # endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ + || defined __clang__) +_GL_CXXALIASWARN1 (strcasestr, char *, + (char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); _GL_CXXALIASWARN1 (strcasestr, const char *, - (const char *haystack, const char *needle)); -# else + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_NOTHROW); +# elif __GLIBC__ >= 2 _GL_CXXALIASWARN (strcasestr); # endif #elif defined GNULIB_POSIXCHECK @@ -1257,7 +1598,9 @@ _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbslen); +# endif #endif #if 0 @@ -1499,7 +1842,7 @@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) # endif _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (strerror_r); # endif #elif defined GNULIB_POSIXCHECK @@ -1510,6 +1853,60 @@ _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " # endif #endif +/* Return the name of the system error code ERRNUM. */ +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerrorname_np +# define strerrorname_np rpl_strerrorname_np +# endif +_GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum)); +_GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum)); +# else +# if !1 +_GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum)); +# endif +_GL_CXXALIASWARN (strerrorname_np); +#elif defined GNULIB_POSIXCHECK +# undef strerrorname_np +# if HAVE_RAW_DECL_STRERRORNAME_NP +_GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - " + "use gnulib module strerrorname_np for portability"); +# endif +#endif + +/* Return an abbreviation string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigabbrev_np); +#elif defined GNULIB_POSIXCHECK +# undef sigabbrev_np +# if HAVE_RAW_DECL_SIGABBREV_NP +_GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - " + "use gnulib module sigabbrev_np for portability"); +# endif +#endif + +/* Return an English description string for the signal number SIG. */ +#if 0 +# if ! 1 +_GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig)); +# endif +_GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); +_GL_CXXALIASWARN (sigdescr_np); +#elif defined GNULIB_POSIXCHECK +# undef sigdescr_np +# if HAVE_RAW_DECL_SIGDESCR_NP +_GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - " + "use gnulib module sigdescr_np for portability"); +# endif +#endif + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/socket.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/socket.h index 539b7400e..b46131e54 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/socket.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/socket.h @@ -1,21 +1,21 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a sys/socket header file for systems lacking it (read: MinGW) and for systems where it is incomplete. - Copyright (C) 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. Written by Simon Josefsson. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* This file is supposed to be used on platforms that lack , on platforms where cannot be included standalone, and on @@ -64,9 +64,12 @@ #ifndef _GL_LTS_SYS_SOCKET_H #define _GL_LTS_SYS_SOCKET_H -#ifndef _GL_INLINE_HEADER_BEGIN +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*, alignof. */ +#if !_GL_CONFIG_H_INCLUDED #error "Please include config.h first." #endif + _GL_INLINE_HEADER_BEGIN #ifndef _GL_SYS_SOCKET_INLINE # define _GL_SYS_SOCKET_INLINE _GL_INLINE @@ -74,19 +77,19 @@ _GL_INLINE_HEADER_BEGIN /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -174,6 +177,12 @@ _GL_INLINE_HEADER_BEGIN Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -221,6 +230,16 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -246,6 +265,14 @@ _GL_INLINE_HEADER_BEGIN _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -343,7 +370,7 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -371,9 +398,9 @@ _GL_INLINE_HEADER_BEGIN _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -389,26 +416,26 @@ _GL_INLINE_HEADER_BEGIN /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -417,19 +444,19 @@ _GL_INLINE_HEADER_BEGIN /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -502,13 +529,20 @@ _GL_INLINE_HEADER_BEGIN # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -517,27 +551,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -573,7 +613,6 @@ typedef unsigned char sa_family_t; # endif # endif #else -# include /* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */ # define __ss_aligntype unsigned long int @@ -732,7 +771,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close close_used_without_including_unistd_h -# else +# elif !defined __clang__ _GL_WARN_ON_USE (close, "close() used without including "); # endif @@ -832,7 +871,9 @@ _GL_CXXALIAS_SYS_CAST (accept, int, struct sockaddr *restrict addr, socklen_t *restrict addrlen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (accept); +# endif #elif 1 # undef accept # define accept accept_used_without_requesting_gnulib_module_accept @@ -894,7 +935,9 @@ _GL_CXXALIAS_SYS_CAST (getpeername, int, (int fd, struct sockaddr *restrict addr, socklen_t *restrict addrlen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getpeername); +# endif #elif 1 # undef getpeername # define getpeername getpeername_used_without_requesting_gnulib_module_getpeername @@ -926,7 +969,9 @@ _GL_CXXALIAS_SYS_CAST (getsockname, int, (int fd, struct sockaddr *restrict addr, socklen_t *restrict addrlen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getsockname); +# endif #elif 1 # undef getsockname # define getsockname getsockname_used_without_requesting_gnulib_module_getsockname @@ -1073,7 +1118,9 @@ _GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t, struct sockaddr *restrict from, socklen_t *restrict fromlen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (recvfrom); +# endif #elif 1 # undef recvfrom # define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/stat.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/stat.h index 716f569c0..c85699067 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/stat.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/stat.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a more complete sys/stat.h header file. - Copyright (C) 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2005-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ @@ -26,14 +26,17 @@ #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if defined __need_system_sys_stat_h /* Special invocation convention. */ -#if (_MSC_VER < 1900) -#include "../include/sys/stat.h" -#else #include "../ucrt/sys/stat.h" -#endif #else /* Normal invocation convention. */ @@ -48,30 +51,54 @@ #include /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/sys/stat.h" -#else #include "../ucrt/sys/stat.h" -#endif #ifndef _GL_LTS_SYS_STAT_H #define _GL_LTS_SYS_STAT_H +/* This file uses _GL_ATTRIBUTE_NOTHROW, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + + +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -159,6 +186,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -206,6 +239,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -231,6 +274,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -328,7 +379,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -356,9 +407,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -374,26 +425,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -402,19 +453,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -487,13 +538,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -502,27 +560,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -538,6 +602,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif + /* Before doing "#define mknod rpl_mknod" below, we need to include all headers that may declare mknod(). OS/2 kLIBC declares mknod() in , not in . */ @@ -859,11 +924,11 @@ struct stat # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif -/* S_IXUGO is a common extension to POSIX. */ +/* Although S_IXUGO and S_IRWXUGO are not specified by POSIX and are + not implemented in GNU/Linux, some Gnulib-using apps use the macros. */ #if !S_IXUGO # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif - #ifndef S_IRWXUGO # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) #endif @@ -875,6 +940,50 @@ struct stat #endif +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod rpl_chmod +# endif +_GL_FUNCDECL_RPL (chmod, int, (const char *filename, mode_t mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (chmod, int, (const char *filename, mode_t mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod _chmod +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (chmod); +#elif defined GNULIB_POSIXCHECK +# undef chmod +# if HAVE_RAW_DECL_CHMOD +_GL_WARN_ON_USE (chmod, "chmod has portability problems - " + "use gnulib module chmod for portability"); +# endif +#elif 1 +/* On native Windows, map 'chmod' to '_chmod', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chmod always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chmod +# define chmod _chmod +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode)); +# else +_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode)); +# endif +_GL_CXXALIASWARN (chmod); +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -916,7 +1025,9 @@ _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); # else _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fstat); +# endif #elif 0 # undef fstat # define fstat fstat_used_without_requesting_gnulib_module_fstat @@ -987,7 +1098,7 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (futimens); # endif #elif defined GNULIB_POSIXCHECK @@ -1001,7 +1112,11 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " #if 0 # if !1 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (getumask, mode_t, (void) _GL_ATTRIBUTE_NOTHROW); +# else _GL_FUNCDECL_SYS (getumask, mode_t, (void)); +# endif # endif _GL_CXXALIAS_SYS (getumask, mode_t, (void)); # if 1 @@ -1035,58 +1150,19 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " #if 0 -# if ! 1 -/* mingw does not support symlinks, therefore it does not have lstat. But - without links, stat does just fine. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lstat stat -# endif -_GL_CXXALIAS_RPL_1 (lstat, stat, int, - (const char *restrict name, struct stat *restrict buf)); -# elif 0 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lstat -# define lstat rpl_lstat +# undef mkdir +# define mkdir rpl_mkdir # endif -_GL_FUNCDECL_RPL (lstat, int, - (const char *restrict name, struct stat *restrict buf) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (lstat, int, - (const char *restrict name, struct stat *restrict buf)); -# else -_GL_CXXALIAS_SYS (lstat, int, - (const char *restrict name, struct stat *restrict buf)); -# endif -# if 1 -_GL_CXXALIASWARN (lstat); -# endif -#elif 0 -# undef lstat -# define lstat lstat_used_without_requesting_gnulib_module_lstat -#elif defined GNULIB_POSIXCHECK -# undef lstat -# if HAVE_RAW_DECL_LSTAT -_GL_WARN_ON_USE (lstat, "lstat is unportable - " - "use gnulib module lstat for portability"); -# endif -#endif - - -#if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkdir -# define mkdir rpl_mkdir -# endif _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) - _GL_ARG_NONNULL ((1))); + _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -#else +# elif defined _WIN32 && !defined __CYGWIN__ /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes and , which are included above. */ -# if defined _WIN32 && ! defined __CYGWIN__ - # if !GNULIB_defined_rpl_mkdir static int rpl_mkdir (char const *name, mode_t mode) @@ -1095,16 +1171,44 @@ rpl_mkdir (char const *name, mode_t mode) } # define GNULIB_defined_rpl_mkdir 1 # endif - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkdir +# define mkdir rpl_mkdir +# endif +_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); +# else +_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); +# endif +_GL_CXXALIASWARN (mkdir); +#elif defined GNULIB_POSIXCHECK +# undef mkdir +# if HAVE_RAW_DECL_MKDIR +_GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - " + "use gnulib module mkdir for portability"); +# endif +#elif 1 +/* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::mkdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !GNULIB_defined_rpl_mkdir +static int +rpl_mkdir (char const *name, mode_t mode) +{ + return _mkdir (name); +} +# define GNULIB_defined_rpl_mkdir 1 +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkdir # define mkdir rpl_mkdir # endif _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); # else _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); # endif -#endif _GL_CXXALIASWARN (mkdir); +#endif #if 0 @@ -1150,12 +1254,24 @@ _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkfifoat +# define mkfifoat rpl_mkfifoat +# endif +_GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)); +# else +# if !1 _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) _GL_ARG_NONNULL ((2))); -# endif +# endif _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mkfifoat); +# endif #elif defined GNULIB_POSIXCHECK # undef mkfifoat # if HAVE_RAW_DECL_MKFIFOAT @@ -1193,14 +1309,28 @@ _GL_WARN_ON_USE (mknod, "mknod is not portable - " #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mknodat +# define mknodat rpl_mknodat +# endif +_GL_FUNCDECL_RPL (mknodat, int, + (int fd, char const *file, mode_t mode, dev_t dev) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mknodat, int, + (int fd, char const *file, mode_t mode, dev_t dev)); +# else +# if !1 _GL_FUNCDECL_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev) _GL_ARG_NONNULL ((2))); -# endif +# endif _GL_CXXALIAS_SYS (mknodat, int, (int fd, char const *file, mode_t mode, dev_t dev)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mknodat); +# endif #elif defined GNULIB_POSIXCHECK # undef mknodat # if HAVE_RAW_DECL_MKNODAT @@ -1284,6 +1414,62 @@ _GL_WARN_ON_USE (stat, "stat is unportable - " #endif +#if 0 +# if ! 1 +/* mingw does not support symlinks, therefore it does not have lstat. But + without links, stat does just fine. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define lstat stat +# endif +_GL_CXXALIAS_RPL_1 (lstat, stat, int, + (const char *restrict name, struct stat *restrict buf)); +# elif 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lstat +# define lstat rpl_lstat +# endif +_GL_FUNCDECL_RPL (lstat, int, + (const char *restrict name, struct stat *restrict buf) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (lstat, int, + (const char *restrict name, struct stat *restrict buf)); +# else +_GL_CXXALIAS_SYS (lstat, int, + (const char *restrict name, struct stat *restrict buf)); +# endif +# if 1 +_GL_CXXALIASWARN (lstat); +# endif +#elif 0 +# undef lstat +# define lstat lstat_used_without_requesting_gnulib_module_lstat +#elif defined GNULIB_POSIXCHECK +# undef lstat +# if HAVE_RAW_DECL_LSTAT +_GL_WARN_ON_USE (lstat, "lstat is unportable - " + "use gnulib module lstat for portability"); +# endif +#endif + + +#if 1 +/* On native Windows, map 'umask' to '_umask', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::umask always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef umask +# define umask _umask +# endif +/* Need to cast, because in mingw the last argument is 'int mode'. */ +_GL_CXXALIAS_MDA_CAST (umask, mode_t, (mode_t mask)); +# else +_GL_CXXALIAS_SYS (umask, mode_t, (mode_t mask)); +# endif +_GL_CXXALIASWARN (umask); +#endif + + #if 0 /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat implementation relies on futimesat, which on Solaris 10 makes an invocation @@ -1308,7 +1494,7 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # endif -# if 1 +# if __GLIBC__ >= 2 && 1 _GL_CXXALIASWARN (utimensat); # endif #elif defined GNULIB_POSIXCHECK diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/time.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/time.h index 50eb0f5bf..528cdd6ad 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/time.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/time.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a more complete sys/time.h. - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Paul Eggert. */ @@ -25,6 +25,13 @@ #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* On Cygwin and on many BSDish systems, includes itself recursively via . Simply delegate to the system's header in this case; it is a no-op. @@ -42,6 +49,11 @@ #ifndef _GL_LTS_SYS_TIME_H #define _GL_LTS_SYS_TIME_H +/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if ! 0 # include #endif @@ -58,19 +70,19 @@ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -158,6 +170,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -205,6 +223,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -230,6 +258,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -327,7 +363,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -355,9 +391,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -373,26 +409,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -401,19 +437,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -486,13 +522,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -501,27 +544,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -611,7 +660,7 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef close # define close close_used_without_including_unistd_h -# else +# elif !defined __clang__ _GL_WARN_ON_USE (close, "close() used without including "); # endif diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/types.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/types.h index f02e75dc6..4f351f35d 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/types.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/types.h @@ -1,37 +1,40 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Provide a more complete sys/types.h. - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + #if defined _WIN32 && !defined __CYGWIN__ \ && (defined __need_off_t || defined __need___off64_t \ || defined __need_ssize_t || defined __need_time_t) /* Special invocation convention inside mingw header files. */ -#if (_MSC_VER < 1900) -#include "../include/sys/types.h" -#else #include "../ucrt/sys/types.h" -#endif #else /* Normal invocation convention. */ @@ -40,12 +43,7 @@ /* The include_next requires a split double-inclusion guard. */ # define _GL_INCLUDING_SYS_TYPES_H -#if (_MSC_VER < 1900) -#include "../include/sys/types.h" -#else #include "../ucrt/sys/types.h" -#endif - # undef _GL_INCLUDING_SYS_TYPES_H #ifndef _GL_LTS_SYS_TYPES_H diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/uio.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/uio.h index d9fea4d13..0a2bdc4db 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/uio.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/sys/uio.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for . - Copyright (C) 2011-2020 Free Software Foundation, Inc. + Copyright (C) 2011-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ # if __GNUC__ >= 3 diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/textstyle/version.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/textstyle/version.h index 2303f789f..ad2ac7c1f 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/textstyle/version.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/textstyle/version.h @@ -28,7 +28,7 @@ extern "C" { /* Version number: (major<<16) + (minor<<8) + subminor. */ -#define _LIBTEXTSTYLE_VERSION 0x001500 +#define _LIBTEXTSTYLE_VERSION 0x001603 extern LIBTEXTSTYLE_DLL_VARIABLE const int _libtextstyle_version; /* Likewise */ diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/time.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/time.h index 8be3753fb..cf3ad73a2 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/time.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/time.h @@ -1,26 +1,33 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A more-standard . - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #if __GNUC__ >= 3 #endif +/* This file uses #include_next of a system file that defines time_t. + For the 'year2038' module to work right, needs to have been + included before. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* Don't get in the way of glibc when it includes time.h merely to declare a few standard symbols, rather than to declare all the symbols. (However, skip this for MinGW as it treats __need_time_t @@ -32,11 +39,7 @@ && !defined __MINGW32__) \ || defined _GL_LTS_TIME_H) -#if (_MSC_VER < 1900) -#include "../include/time.h" -#else -#include "../ucrt/time.h" -#endif +# include "../ucrt/time.h" #else @@ -48,30 +51,32 @@ # include # endif -#if (_MSC_VER < 1900) -#include "../include/time.h" -#else -#include "../ucrt/time.h" -#endif +# include "../ucrt/time.h" + +/* This file uses _GL_ATTRIBUTE_DEPRECATED, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +# if !_GL_CONFIG_H_INCLUDED +# error "Please include config.h first." +# endif /* NetBSD 5.0 mis-defines NULL. */ # include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -159,6 +164,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -206,6 +217,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -231,6 +252,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -328,7 +357,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -356,9 +385,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -374,26 +403,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -402,19 +431,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -487,13 +516,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -502,27 +538,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -542,7 +584,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use Or they define it with the wrong member names or define it in (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, but the pthreads-win32 library defines it in . */ -# if (_MSC_VER < 1900) +# if ! 1 # if 0 # include # elif 0 @@ -585,11 +627,87 @@ struct __time_t_must_be_integral { # define GNULIB_defined_struct_time_t_must_be_integral 1 # endif +/* Define TIME_UTC, a positive integer constant used for timespec_get(). */ +# if ! 1 +# if !GNULIB_defined_TIME_UTC +# define TIME_UTC 1 +# define GNULIB_defined_TIME_UTC 1 +# endif +# endif + +/* Set *TS to the current time, and return BASE. + Upon failure, return 0. */ +# if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef timespec_get +# define timespec_get rpl_timespec_get +# endif +_GL_FUNCDECL_RPL (timespec_get, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (timespec_get, int, (struct timespec *ts, int base)); +# else +# if !1 +_GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (timespec_get); +# endif +# elif defined GNULIB_POSIXCHECK +# undef timespec_get +# if HAVE_RAW_DECL_TIMESPEC_GET +_GL_WARN_ON_USE (timespec_get, "timespec_get is unportable - " + "use gnulib module timespec_get for portability"); +# endif +# endif + +/* Set *TS to the current time resolution, and return BASE. + Upon failure, return 0. */ +# if 0 +# if ! 1 +_GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base)); +_GL_CXXALIASWARN (timespec_getres); +# elif defined GNULIB_POSIXCHECK +# undef timespec_getres +# if HAVE_RAW_DECL_TIMESPEC_GETRES +_GL_WARN_ON_USE (timespec_getres, "timespec_getres is unportable - " + "use gnulib module timespec_getres for portability"); +# endif +# endif + +/* Return the number of seconds that have elapsed since the Epoch. */ +# if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define time rpl_time +# endif +_GL_FUNCDECL_RPL (time, time_t, (time_t *__tp)); +_GL_CXXALIAS_RPL (time, time_t, (time_t *__tp)); +# else +_GL_CXXALIAS_SYS (time, time_t, (time_t *__tp)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (time); +# endif +# elif defined GNULIB_POSIXCHECK +# undef time +# if HAVE_RAW_DECL_TIME +_GL_WARN_ON_USE (time, "time has consistency problems - " + "use gnulib module time for portability"); +# endif +# endif + /* Sleep for at least RQTP seconds unless interrupted, If interrupted, return -1 and store the remaining time into RMTP. See . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define nanosleep rpl_nanosleep # endif @@ -608,29 +726,58 @@ _GL_CXXALIAS_SYS (nanosleep, int, (struct timespec const *__rqtp, struct timespec *__rmtp)); # endif _GL_CXXALIASWARN (nanosleep); +# elif defined GNULIB_POSIXCHECK +# undef nanosleep +# if HAVE_RAW_DECL_NANOSLEEP +_GL_WARN_ON_USE (nanosleep, "nanosleep is unportable - " + "use gnulib module nanosleep for portability"); +# endif # endif /* Initialize time conversion information. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef tzset # define tzset rpl_tzset # endif _GL_FUNCDECL_RPL (tzset, void, (void)); _GL_CXXALIAS_RPL (tzset, void, (void)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tzset +# define tzset _tzset +# endif +_GL_CXXALIAS_MDA (tzset, void, (void)); # else -# if ! 1 -_GL_FUNCDECL_SYS (tzset, void, (void)); +_GL_CXXALIAS_SYS (tzset, void, (void)); +# endif +_GL_CXXALIASWARN (tzset); +# elif 1 +/* On native Windows, map 'tzset' to '_tzset', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::tzset always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef tzset +# define tzset _tzset # endif +_GL_CXXALIAS_MDA (tzset, void, (void)); +# else _GL_CXXALIAS_SYS (tzset, void, (void)); # endif _GL_CXXALIASWARN (tzset); +# elif defined GNULIB_POSIXCHECK +# undef tzset +# if HAVE_RAW_DECL_TZSET +_GL_WARN_ON_USE (tzset, "tzset has portability problems - " + "use gnulib module tzset for portability"); +# endif # endif /* Return the 'time_t' representation of TP and normalize TP. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define mktime rpl_mktime # endif @@ -642,13 +789,19 @@ _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (mktime); # endif +# elif defined GNULIB_POSIXCHECK +# undef mktime +# if HAVE_RAW_DECL_MKTIME +_GL_WARN_ON_USE (mktime, "mktime has portability problems - " + "use gnulib module mktime for portability"); +# endif # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef localtime_r # define localtime_r rpl_localtime_r @@ -670,7 +823,7 @@ _GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, # if 1 _GL_CXXALIASWARN (localtime_r); # endif -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime_r # define gmtime_r rpl_gmtime_r @@ -692,6 +845,17 @@ _GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, # if 1 _GL_CXXALIASWARN (gmtime_r); # endif +# elif defined GNULIB_POSIXCHECK +# undef localtime_r +# if HAVE_RAW_DECL_LOCALTIME_R +_GL_WARN_ON_USE (localtime_r, "localtime_r is unportable - " + "use gnulib module time_r for portability"); +# endif +# undef gmtime_r +# if HAVE_RAW_DECL_GMTIME_R +_GL_WARN_ON_USE (gmtime_r, "gmtime_r is unportable - " + "use gnulib module time_r for portability"); +# endif # endif /* Convert TIMER to RESULT, assuming local time and UTC respectively. See @@ -712,6 +876,12 @@ _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (localtime); # endif +# elif defined GNULIB_POSIXCHECK +# undef localtime +# if HAVE_RAW_DECL_LOCALTIME +_GL_WARN_ON_USE (localtime, "localtime has portability problems - " + "use gnulib module localtime for portability"); +# endif # endif # if 0 || 0 @@ -743,15 +913,24 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, char const *restrict __format, struct tm *restrict __tm)); _GL_CXXALIASWARN (strptime); +# elif defined GNULIB_POSIXCHECK +# undef strptime +# if HAVE_RAW_DECL_STRPTIME +_GL_WARN_ON_USE (strptime, "strptime is unportable - " + "use gnulib module strptime for portability"); +# endif # endif /* Convert *TP to a date and time string. See . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define ctime rpl_ctime # endif +# ifndef __cplusplus +_GL_ATTRIBUTE_DEPRECATED +# endif _GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp)); @@ -761,12 +940,18 @@ _GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp)); # if __GLIBC__ >= 2 _GL_CXXALIASWARN (ctime); # endif +# elif defined GNULIB_POSIXCHECK +# undef ctime +# if HAVE_RAW_DECL_CTIME +_GL_WARN_ON_USE (ctime, "ctime has portability problems - " + "use gnulib module ctime for portability"); +# endif # endif /* Convert *TP to a date and time string. See . */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define strftime rpl_strftime # endif @@ -785,30 +970,74 @@ _GL_CXXALIAS_SYS (strftime, size_t, # if __GLIBC__ >= 2 _GL_CXXALIASWARN (strftime); # endif +# elif defined GNULIB_POSIXCHECK +# undef strftime +# if HAVE_RAW_DECL_STRFTIME +_GL_WARN_ON_USE (strftime, "strftime has portability problems - " + "use gnulib module strftime-fixes for portability"); +# endif # endif # if defined _GNU_SOURCE && 0 && ! 0 +/* Functions that use a first-class time zone data type, instead of + relying on an implicit global time zone. + Inspired by NetBSD. */ + +/* Represents a time zone. + (timezone_t) NULL stands for UTC. */ typedef struct tm_zone *timezone_t; + +/* tzalloc (name) + Returns a time zone object for the given time zone NAME. This object + represents the time zone that other functions would use it the TZ + environment variable was set to NAME. + If NAME is NULL, the result represents the time zone that other functions + would use it the TZ environment variable was unset. + May return NULL if NAME is invalid (this is platform dependent) or + upon memory allocation failure. */ _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); + +/* tzfree (tz) + Frees a time zone object. + The argument must have been returned by tzalloc(). */ _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); + +/* localtime_rz (tz, &t, &result) + Converts an absolute time T to a broken-down time RESULT, assuming the + time zone TZ. + This function is like 'localtime_r', but relies on the argument TZ instead + of an implicit global time zone. */ _GL_FUNCDECL_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3))); _GL_CXXALIAS_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result)); + +/* mktime_z (tz, &tm) + Normalizes the broken-down time TM and converts it to an absolute time, + assuming the time zone TZ. Returns the absolute time. + This function is like 'mktime', but relies on the argument TZ instead + of an implicit global time zone. */ _GL_FUNCDECL_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result) + (timezone_t __tz, struct tm *restrict __tm) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result)); + (timezone_t __tz, struct tm *restrict __tm)); + +/* Time zone abbreviation strings (returned by 'localtime_rz' or 'mktime_z' + in the 'tm_zone' member of 'struct tm') are valid as long as + - the 'struct tm' argument is not destroyed or overwritten, + and + - the 'timezone_t' argument is not freed through tzfree(). */ + # endif /* Convert TM to a time_t value, assuming UTC. */ # if 0 -# if GNULIB_PORTCHECK +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef timegm # define timegm rpl_timegm @@ -821,7 +1050,15 @@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (timegm); +# endif +# elif defined GNULIB_POSIXCHECK +# undef timegm +# if HAVE_RAW_DECL_TIMEGM +_GL_WARN_ON_USE (timegm, "timegm is unportable - " + "use gnulib module timegm for portability"); +# endif # endif /* Encourage applications to avoid unsafe functions that can overrun @@ -829,23 +1066,31 @@ _GL_CXXALIASWARN (timegm); applications should use strftime (or even sprintf) instead. */ # if defined GNULIB_POSIXCHECK # undef asctime +# if HAVE_RAW_DECL_ASCTIME _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef asctime_r -_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " +# if HAVE_RAW_DECL_ASCTIME_R +_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef ctime -_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " +# if HAVE_RAW_DECL_CTIME +_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif # if defined GNULIB_POSIXCHECK # undef ctime_r -_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " +# if HAVE_RAW_DECL_CTIME_R +_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - " "better use strftime (or even sprintf) instead"); +# endif # endif #endif diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unistd.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unistd.h index 9c1545806..e297e0064 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unistd.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unistd.h @@ -1,19 +1,19 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Substitute for and wrapper around . - Copyright (C) 2003-2020 Free Software Foundation, Inc. + Copyright (C) 2003-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ #ifndef _GL_LTS_UNISTD_H @@ -41,6 +41,24 @@ # undef _GL_INCLUDING_UNISTD_H #endif +/* Avoid lseek bugs in FreeBSD, macOS . + This bug is fixed after FreeBSD 13; see . + Use macOS "9999" to stand for a future fixed macOS version. */ +#if defined __FreeBSD__ && __FreeBSD__ < 14 +# undef SEEK_DATA +# undef SEEK_HOLE +#elif defined __APPLE__ && defined __MACH__ && defined SEEK_DATA +# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ +# include +# endif +# if (!defined MAC_OS_X_VERSION_MIN_REQUIRED \ + || MAC_OS_X_VERSION_MIN_REQUIRED < 99990000) +# include /* It also defines the two macros. */ +# undef SEEK_DATA +# undef SEEK_HOLE +# endif +#endif + /* Get all possible declarations of gethostname(). */ #if 1 && 1 \ && !defined _GL_INCLUDING_WINSOCK2_H @@ -52,6 +70,12 @@ #if !defined _GL_LTS_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H #define _GL_LTS_UNISTD_H +/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + /* NetBSD 5.0 mis-defines NULL. Also get size_t. */ /* But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ @@ -94,20 +118,18 @@ # undef __need_system_stdlib_h #endif -/* Native Windows platforms declare chdir, getcwd, rmdir in +/* Native Windows platforms declare _chdir, _getcwd, _rmdir in and/or , not in . - They also declare access(), chmod(), close(), dup(), dup2(), isatty(), - lseek(), read(), unlink(), write() in . */ -#if ((0 || 0 || 0 \ - || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__)) -# include /* mingw32, mingw64 */ -# include /* mingw64, MSVC 9 */ -#elif (1 || 0 || 1 || 0 \ - || 0 || 1 || 0 || 1 \ - || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) + They also declare _access(), _chmod(), _close(), _dup(), _dup2(), _isatty(), + _lseek(), _read(), _unlink(), _write() in . */ +#if defined _WIN32 && !defined __CYGWIN__ # include +# include +#endif + +/* Native Windows platforms declare _execl*, _execv* in . */ +#if defined _WIN32 && !defined __CYGWIN__ +# include #endif /* AIX and OSF/1 5.1 declare getdomainname in , not in . @@ -139,27 +161,24 @@ /* MSVC defines off_t in . May also define off_t to a 64-bit type on native Windows. */ -/* But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -/* Get off_t, ssize_t. */ -# include -#endif +/* Get off_t, ssize_t, mode_t. */ +#include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -247,6 +266,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -294,6 +319,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -319,6 +354,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -416,7 +459,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -444,9 +487,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -462,26 +505,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -490,19 +533,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -575,13 +618,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -590,27 +640,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -632,14 +688,11 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use the getopt module only in gettext-tools/gnulib-lib/, not in gettext-tools/libgettextpo/, but there is only a single GNULIB_UNISTD_H_GETOPT variable for both. */ -#if 0 && 0 && !defined GTPO_CONFIG_H && !defined _GL_SYSTEM_GETOPT +#if 0 && 00 && !defined GTPO_CONFIG_H && !defined _GL_SYSTEM_GETOPT # include # include #endif -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_UNISTD_INLINE # define _GL_UNISTD_INLINE _GL_INLINE @@ -753,6 +806,12 @@ _GL_INLINE_HEADER_BEGIN _GL_FUNCDECL_RPL (access, int, (const char *file, int mode) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); # else _GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); # endif @@ -766,11 +825,33 @@ _GL_WARN_ON_USE (access, "access does not always support X_OK - " "also, this function is a security risk - " "use the gnulib module faccessat instead"); # endif +#elif 1 +/* On native Windows, map 'access' to '_access', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::access always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef access +# define access _access +# endif +_GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); +# else +_GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); +# endif +_GL_CXXALIASWARN (access); #endif #if 0 +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIASWARN (chdir); #elif defined GNULIB_POSIXCHECK # undef chdir @@ -778,6 +859,20 @@ _GL_CXXALIASWARN (chdir); _GL_WARN_ON_USE (chown, "chdir is not always in - " "use gnulib module chdir for portability"); # endif +#elif 1 +/* On native Windows, map 'chdir' to '_chdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::chdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef chdir +# define chdir _chdir +# endif +_GL_CXXALIAS_MDA (chdir, int, (const char *file)); +# else +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIASWARN (chdir); #endif @@ -822,6 +917,12 @@ _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " # endif _GL_FUNCDECL_RPL (close, int, (int fd)); _GL_CXXALIAS_RPL (close, int, (int fd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close _close +# endif +_GL_CXXALIAS_MDA (close, int, (int fd)); # else _GL_CXXALIAS_SYS (close, int, (int fd)); # endif @@ -834,24 +935,53 @@ _GL_CXXALIASWARN (close); /* Assume close is always declared. */ _GL_WARN_ON_USE (close, "close does not portably work on sockets - " "use gnulib module close for portability"); +#elif 1 +/* On native Windows, map 'close' to '_close', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::close always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close _close +# endif +_GL_CXXALIAS_MDA (close, int, (int fd)); +# else +_GL_CXXALIAS_SYS (close, int, (int fd)); +# endif +_GL_CXXALIASWARN (close); #endif #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef copy_file_range +# define copy_file_range rpl_copy_file_range +# endif +_GL_FUNCDECL_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +_GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, + int ofd, off_t *opos, + size_t len, unsigned flags)); +# else +# if !1 _GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); +# endif _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, int ofd, off_t *opos, size_t len, unsigned flags)); # endif _GL_CXXALIASWARN (copy_file_range); #elif defined GNULIB_POSIXCHECK -/* Assume copy_file_range is always declared. */ +# undef copy_file_range +# if HAVE_RAW_DECL_COPY_FILE_RANGE _GL_WARN_ON_USE (copy_file_range, "copy_file_range is unportable - " "use gnulib module copy_file_range for portability"); +# endif #endif @@ -862,6 +992,12 @@ _GL_WARN_ON_USE (copy_file_range, # endif _GL_FUNCDECL_RPL (dup, int, (int oldfd)); _GL_CXXALIAS_RPL (dup, int, (int oldfd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup +# define dup _dup +# endif +_GL_CXXALIAS_MDA (dup, int, (int oldfd)); # else _GL_CXXALIAS_SYS (dup, int, (int oldfd)); # endif @@ -872,6 +1008,20 @@ _GL_CXXALIASWARN (dup); _GL_WARN_ON_USE (dup, "dup is unportable - " "use gnulib module dup for portability"); # endif +#elif 1 +/* On native Windows, map 'dup' to '_dup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup +# define dup _dup +# endif +_GL_CXXALIAS_MDA (dup, int, (int oldfd)); +# else +_GL_CXXALIAS_SYS (dup, int, (int oldfd)); +# endif +_GL_CXXALIASWARN (dup); #endif @@ -887,6 +1037,12 @@ _GL_WARN_ON_USE (dup, "dup is unportable - " # endif _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); # else _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); # endif @@ -897,6 +1053,20 @@ _GL_CXXALIASWARN (dup2); _GL_WARN_ON_USE (dup2, "dup2 is unportable - " "use gnulib module dup2 for portability"); # endif +#elif 1 +/* On native Windows, map 'dup2' to '_dup2', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::dup2 always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup2 +# define dup2 _dup2 +# endif +_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd)); +# else +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); #endif @@ -909,17 +1079,22 @@ _GL_WARN_ON_USE (dup2, "dup2 is unportable - " Return newfd if successful, otherwise -1 and errno set. See the Linux man page at . */ -# if 1 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dup3 # define dup3 rpl_dup3 # endif _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); # else +# if !1 _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (dup3); +# endif #elif defined GNULIB_POSIXCHECK # undef dup3 # if HAVE_RAW_DECL_DUP3 @@ -997,6 +1172,284 @@ _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " #endif +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl rpl_execl +# endif +_GL_FUNCDECL_RPL (execl, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execl, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#elif defined GNULIB_POSIXCHECK +# undef execl +# if HAVE_RAW_DECL_EXECL +_GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - " + "use gnulib module execl for portability"); +# endif +#elif 1 +/* On native Windows, map 'execl' to '_execl', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execl always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execl +# define execl _execl +# endif +_GL_CXXALIAS_MDA (execl, intptr_t, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execl); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle rpl_execle +# endif +_GL_FUNCDECL_RPL (execle, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execle, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#elif defined GNULIB_POSIXCHECK +# undef execle +# if HAVE_RAW_DECL_EXECLE +_GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - " + "use gnulib module execle for portability"); +# endif +#elif 1 +/* On native Windows, map 'execle' to '_execle', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execle always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execle +# define execle _execle +# endif +_GL_CXXALIAS_MDA (execle, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execle); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp rpl_execlp +# endif +_GL_FUNCDECL_RPL (execlp, int, (const char *program, const char *arg, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (execlp, int, (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#elif defined GNULIB_POSIXCHECK +# undef execlp +# if HAVE_RAW_DECL_EXECLP +_GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - " + "use gnulib module execlp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execlp' to '_execlp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execlp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execlp +# define execlp _execlp +# endif +_GL_CXXALIAS_MDA (execlp, intptr_t, + (const char *program, const char *arg, ...)); +# else +_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...)); +# endif +_GL_CXXALIASWARN (execlp); +#endif + + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv rpl_execv +# endif +_GL_FUNCDECL_RPL (execv, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execv, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#elif defined GNULIB_POSIXCHECK +# undef execv +# if HAVE_RAW_DECL_EXECV +_GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - " + "use gnulib module execv for portability"); +# endif +#elif 1 +/* On native Windows, map 'execv' to '_execv', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execv always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execv +# define execv _execv +# endif +_GL_CXXALIAS_MDA_CAST (execv, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execv); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve rpl_execve +# endif +_GL_FUNCDECL_RPL (execve, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execve, int, + (const char *program, char * const *argv, char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#elif defined GNULIB_POSIXCHECK +# undef execve +# if HAVE_RAW_DECL_EXECVE +_GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - " + "use gnulib module execve for portability"); +# endif +#elif 1 +/* On native Windows, map 'execve' to '_execve', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execve always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execve +# define execve _execve +# endif +_GL_CXXALIAS_MDA_CAST (execve, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# else +_GL_CXXALIAS_SYS (execve, int, + (const char *program, char * const *argv, char * const *env)); +# endif +_GL_CXXALIASWARN (execve); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp rpl_execvp +# endif +_GL_FUNCDECL_RPL (execvp, int, (const char *program, char * const *argv) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvp, int, (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#elif defined GNULIB_POSIXCHECK +# undef execvp +# if HAVE_RAW_DECL_EXECVP +_GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - " + "use gnulib module execvp for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvp' to '_execvp', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvp always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvp +# define execvp _execvp +# endif +_GL_CXXALIAS_MDA_CAST (execvp, intptr_t, + (const char *program, char * const *argv)); +# else +_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv)); +# endif +_GL_CXXALIASWARN (execvp); +#endif + +#if 0 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe rpl_execvpe +# endif +_GL_FUNCDECL_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# else +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (execvpe); +# endif +#elif defined GNULIB_POSIXCHECK +# undef execvpe +# if HAVE_RAW_DECL_EXECVPE +_GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - " + "use gnulib module execvpe for portability"); +# endif +#elif 1 +/* On native Windows, map 'execvpe' to '_execvpe', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::execvpe on all platforms that have + it. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef execvpe +# define execvpe _execvpe +# endif +_GL_CXXALIAS_MDA_CAST (execvpe, intptr_t, + (const char *program, char * const *argv, + char * const *env)); +# elif 1 +# if !0 +_GL_FUNCDECL_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (execvpe, int, + (const char *program, char * const *argv, char * const *env)); +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (execvpe); +# endif +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -1017,7 +1470,9 @@ _GL_FUNCDECL_SYS (faccessat, int, _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (faccessat); +# endif #elif defined GNULIB_POSIXCHECK # undef faccessat # if HAVE_RAW_DECL_FACCESSAT @@ -1033,23 +1488,28 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " Return 0 if successful, otherwise -1 and errno set. See the POSIX:2008 specification . */ -# if ! 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchdir +# define fchdir rpl_fchdir +# endif +_GL_FUNCDECL_RPL (fchdir, int, (int /*fd*/)); +_GL_CXXALIAS_RPL (fchdir, int, (int /*fd*/)); +# else +# if !1 || !1 _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); - +# endif +_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); +# endif +_GL_CXXALIASWARN (fchdir); +# if 0 || !1 /* Gnulib internal hooks needed to maintain the fchdir metadata. */ _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) _GL_ARG_NONNULL ((2)); _GL_EXTERN_C void _gl_unregister_fd (int fd); _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); _GL_EXTERN_C const char *_gl_directory_name (int fd); - -# else -# if !1 -_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); -# endif # endif -_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); -_GL_CXXALIASWARN (fchdir); #elif defined GNULIB_POSIXCHECK # undef fchdir # if HAVE_RAW_DECL_FCHDIR @@ -1084,7 +1544,7 @@ _GL_CXXALIASWARN (fchownat); # undef fchownat # if HAVE_RAW_DECL_FCHOWNAT _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " - "use gnulib module openat for portability"); + "use gnulib module fchownat for portability"); # endif #endif @@ -1094,11 +1554,22 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " Return 0 if successful, otherwise -1 and errno set. See POSIX:2008 specification . */ -# if !1 || !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdatasync +# define fdatasync rpl_fdatasync +# endif +_GL_FUNCDECL_RPL (fdatasync, int, (int fd)); +_GL_CXXALIAS_RPL (fdatasync, int, (int fd)); +# else +# if !1|| !1 _GL_FUNCDECL_SYS (fdatasync, int, (int fd)); -# endif +# endif _GL_CXXALIAS_SYS (fdatasync, int, (int fd)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fdatasync); +# endif #elif defined GNULIB_POSIXCHECK # undef fdatasync # if HAVE_RAW_DECL_FDATASYNC @@ -1145,7 +1616,9 @@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); # endif _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ftruncate); +# endif #elif defined GNULIB_POSIXCHECK # undef ftruncate # if HAVE_RAW_DECL_FTRUNCATE @@ -1162,16 +1635,22 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " or SIZE was too small. See the POSIX:2008 specification . - Additionally, the gnulib module 'getcwd' guarantees the following GNU - extension: If BUF is NULL, an array is allocated with 'malloc'; the array - is SIZE bytes long, unless SIZE == 0, in which case it is as big as - necessary. */ + Additionally, the gnulib module 'getcwd' or 'getcwd-lgpl' guarantees the + following GNU extension: If BUF is NULL, an array is allocated with + 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case + it is as big as necessary. */ # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define getcwd rpl_getcwd # endif _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +_GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size)); # else /* Need to cast, because on mingw, the second parameter is int size. */ @@ -1184,6 +1663,22 @@ _GL_CXXALIASWARN (getcwd); _GL_WARN_ON_USE (getcwd, "getcwd is unportable - " "use gnulib module getcwd for portability"); # endif +#elif 1 +/* On native Windows, map 'getcwd' to '_getcwd', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getcwd always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getcwd +# define getcwd _getcwd +# endif +/* Need to cast, because on mingw, the second parameter is either + 'int size' or 'size_t size'. */ +_GL_CXXALIAS_MDA_CAST (getcwd, char *, (char *buf, size_t size)); +# else +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); #endif @@ -1213,7 +1708,9 @@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) # endif _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getdomainname); +# endif #elif defined GNULIB_POSIXCHECK # undef getdomainname # if HAVE_RAW_DECL_GETDOMAINNAME @@ -1253,11 +1750,22 @@ _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " #if 0 /* Fill a buffer with random bytes. */ -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getentropy +# define getentropy rpl_getentropy +# endif +_GL_FUNCDECL_RPL (getentropy, int, (void *buffer, size_t length)); +_GL_CXXALIAS_RPL (getentropy, int, (void *buffer, size_t length)); +# else +# if !1 _GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length)); -# endif +# endif _GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getentropy); +# endif #elif defined GNULIB_POSIXCHECK # undef getentropy # if HAVE_RAW_DECL_GETENTROPY @@ -1391,7 +1899,9 @@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) int size. */ _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (getlogin_r); +# endif #elif defined GNULIB_POSIXCHECK # undef getlogin_r # if HAVE_RAW_DECL_GETLOGIN_R @@ -1493,7 +2003,8 @@ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " Read a password from /dev/tty or stdin. Function getpass() from module 'getpass-gnu': Read a password of arbitrary length from /dev/tty or stdin. */ -# if 0 +# if (0 && 0) \ + || (0 && 0) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef getpass # define getpass rpl_getpass @@ -1518,6 +2029,23 @@ _GL_WARN_ON_USE (getpass, "getpass is unportable - " #endif +#if 1 +/* On native Windows, map 'getpid' to '_getpid', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::getpid always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpid +# define getpid _getpid +# endif +_GL_CXXALIAS_MDA (getpid, int, (void)); +# else +_GL_CXXALIAS_SYS (getpid, pid_t, (void)); +# endif +_GL_CXXALIASWARN (getpid); +#endif + + #if 0 /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ @@ -1588,8 +2116,15 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - " # undef isatty # define isatty rpl_isatty # endif +# define GNULIB_defined_isatty 1 _GL_FUNCDECL_RPL (isatty, int, (int fd)); _GL_CXXALIAS_RPL (isatty, int, (int fd)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); # else _GL_CXXALIAS_SYS (isatty, int, (int fd)); # endif @@ -1600,6 +2135,20 @@ _GL_CXXALIASWARN (isatty); _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " "use gnulib module isatty for portability"); # endif +#elif 0 +/* On native Windows, map 'isatty' to '_isatty', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::isatty always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty _isatty +# endif +_GL_CXXALIAS_MDA (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); #endif @@ -1690,7 +2239,9 @@ _GL_CXXALIAS_SYS (linkat, int, (int fd1, const char *path1, int fd2, const char *path2, int flag)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (linkat); +# endif #elif defined GNULIB_POSIXCHECK # undef linkat # if HAVE_RAW_DECL_LINKAT @@ -1711,6 +2262,12 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - " # endif _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence)); # else _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); # endif @@ -1721,6 +2278,20 @@ _GL_CXXALIASWARN (lseek); _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " "systems - use gnulib module lseek for portability"); # endif +#elif 1 +/* On native Windows, map 'lseek' to '_lseek', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::lseek always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lseek +# define lseek _lseek +# endif +_GL_CXXALIAS_MDA (lseek, long, (int fd, long offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); #endif @@ -1751,8 +2322,9 @@ _GL_WARN_ON_USE (pipe, "pipe is unportable - " Return 0 upon success, or -1 with errno set upon failure. See also the Linux man page at . */ -# if 1 +# if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pipe2 # define pipe2 rpl_pipe2 # endif _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); @@ -1761,7 +2333,9 @@ _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pipe2); +# endif #elif defined GNULIB_POSIXCHECK # undef pipe2 # if HAVE_RAW_DECL_PIPE2 @@ -1796,7 +2370,9 @@ _GL_FUNCDECL_SYS (pread, ssize_t, _GL_CXXALIAS_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pread); +# endif #elif defined GNULIB_POSIXCHECK # undef pread # if HAVE_RAW_DECL_PREAD @@ -1831,7 +2407,9 @@ _GL_FUNCDECL_SYS (pwrite, ssize_t, _GL_CXXALIAS_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pwrite); +# endif #elif defined GNULIB_POSIXCHECK # undef pwrite # if HAVE_RAW_DECL_PWRITE @@ -1853,11 +2431,32 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (read); +#elif 1 +/* On native Windows, map 'read' to '_read', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::read always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read _read +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count)); +# endif # else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); +_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count)); # endif _GL_CXXALIASWARN (read); #endif @@ -1924,7 +2523,9 @@ _GL_CXXALIAS_SYS (readlinkat, ssize_t, (int fd, char const *restrict file, char *restrict buf, size_t len)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (readlinkat); +# endif #elif defined GNULIB_POSIXCHECK # undef readlinkat # if HAVE_RAW_DECL_READLINKAT @@ -1942,6 +2543,12 @@ _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " # endif _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (rmdir, int, (char const *name)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); # else _GL_CXXALIAS_SYS (rmdir, int, (char const *name)); # endif @@ -1952,6 +2559,20 @@ _GL_CXXALIASWARN (rmdir); _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " "use gnulib module rmdir for portability"); # endif +#elif 1 +/* On native Windows, map 'rmdir' to '_rmdir', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::rmdir always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rmdir +# define rmdir _rmdir +# endif +_GL_CXXALIAS_MDA (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); #endif @@ -1964,15 +2585,27 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " Platforms with no ability to set the hostname return -1 and set errno = ENOSYS. */ -# if !1 || !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sethostname +# define sethostname rpl_sethostname +# endif +_GL_FUNCDECL_RPL (sethostname, int, (const char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (sethostname, int, (const char *name, size_t len)); +# else +# if !1 || !1 _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) _GL_ARG_NONNULL ((1))); -# endif +# endif /* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 and FreeBSD 6.4 the second parameter is int. On Solaris 11 2011-10, the first parameter is not const. */ _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); +# endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (sethostname); +# endif #elif defined GNULIB_POSIXCHECK # undef sethostname # if HAVE_RAW_DECL_SETHOSTNAME @@ -2010,6 +2643,31 @@ _GL_WARN_ON_USE (sleep, "sleep is unportable - " #endif +#if 1 +/* On native Windows, map 'swab' to '_swab', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::swab always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef swab +# define swab _swab +# endif +/* Need to cast, because in old mingw the arguments are + (const char *from, char *to, size_t n). */ +_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n)); +# else +# if defined __hpux /* HP-UX */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n)); +# elif defined __sun && (defined __SunOS_5_10 || defined __XOPEN_OR_POSIX) && !defined _XPG4 /* Solaris */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n)); +# else +_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n)); +# endif +# endif +_GL_CXXALIASWARN (swab); +#endif + + #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -2056,7 +2714,9 @@ _GL_FUNCDECL_SYS (symlinkat, int, _GL_CXXALIAS_SYS (symlinkat, int, (char const *contents, int fd, char const *file)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (symlinkat); +# endif #elif defined GNULIB_POSIXCHECK # undef symlinkat # if HAVE_RAW_DECL_SYMLINKAT @@ -2086,7 +2746,9 @@ _GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) # endif _GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (truncate); +# endif #elif defined GNULIB_POSIXCHECK # undef truncate # if HAVE_RAW_DECL_TRUNCATE @@ -2116,7 +2778,9 @@ _GL_FUNCDECL_SYS (ttyname_r, int, _GL_CXXALIAS_SYS (ttyname_r, int, (int fd, char *buf, size_t buflen)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ttyname_r); +# endif #elif defined GNULIB_POSIXCHECK # undef ttyname_r # if HAVE_RAW_DECL_TTYNAME_R @@ -2134,6 +2798,12 @@ _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " # endif _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (unlink, int, (char const *file)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); # else _GL_CXXALIAS_SYS (unlink, int, (char const *file)); # endif @@ -2144,6 +2814,20 @@ _GL_CXXALIASWARN (unlink); _GL_WARN_ON_USE (unlink, "unlink is not portable - " "use gnulib module unlink for portability"); # endif +#elif 1 +/* On native Windows, map 'unlink' to '_unlink', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::unlink always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink _unlink +# endif +_GL_CXXALIAS_MDA (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); #endif @@ -2168,7 +2852,7 @@ _GL_CXXALIASWARN (unlinkat); # undef unlinkat # if HAVE_RAW_DECL_UNLINKAT _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " - "use gnulib module openat for portability"); + "use gnulib module unlinkat for portability"); # endif #endif @@ -2215,11 +2899,32 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - " _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); +# elif defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count)); +# else +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#elif 1 +/* On native Windows, map 'write' to '_write', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::write always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write _write +# endif +# ifdef __MINGW32__ +_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count)); +# else +_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count)); +# endif # else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); +_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count)); # endif _GL_CXXALIASWARN (write); #endif diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unistr.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unistr.h index 7b4d3f108..1ca6c20d5 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unistr.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unistr.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Elementary Unicode string functions. - Copyright (C) 2001-2002, 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2005-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNISTR_H @@ -20,15 +20,15 @@ #include "unitypes.h" -/* Get common macros for C. */ -#include "unused-parameter.h" - /* Get bool. */ #include -/* Get size_t. */ +/* Get size_t, ptrdiff_t. */ #include +/* Get free(). */ +#include + #ifdef __cplusplus extern "C" { #endif @@ -194,7 +194,7 @@ extern int # else static inline int u32_mbtouc_unsafe (ucs4_t *puc, - const uint32_t *s, size_t n _GL_UNUSED_PARAMETER) + const uint32_t *s, _GL_ATTRIBUTE_MAYBE_UNUSED size_t n) { uint32_t c = *s; @@ -260,7 +260,8 @@ extern int u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n); # else static inline int -u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER) +u32_mbtouc (ucs4_t *puc, const uint32_t *s, + _GL_ATTRIBUTE_MAYBE_UNUSED size_t n) { uint32_t c = *s; @@ -306,13 +307,13 @@ extern int #if GNULIB_UNISTR_U8_UCTOMB || HAVE_LIBUNISTRING /* Auxiliary function, also used by u8_chr, u8_strchr, u8_strrchr. */ extern int - u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n); + u8_uctomb_aux (uint8_t *s, ucs4_t uc, ptrdiff_t n); # if !HAVE_INLINE extern int - u8_uctomb (uint8_t *s, ucs4_t uc, int n); + u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u8_uctomb (uint8_t *s, ucs4_t uc, int n) +u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0x80 && n > 0) { @@ -328,13 +329,13 @@ u8_uctomb (uint8_t *s, ucs4_t uc, int n) #if GNULIB_UNISTR_U16_UCTOMB || HAVE_LIBUNISTRING /* Auxiliary function, also used by u16_chr, u16_strchr, u16_strrchr. */ extern int - u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n); + u16_uctomb_aux (uint16_t *s, ucs4_t uc, ptrdiff_t n); # if !HAVE_INLINE extern int - u16_uctomb (uint16_t *s, ucs4_t uc, int n); + u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u16_uctomb (uint16_t *s, ucs4_t uc, int n) +u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0xd800 && n > 0) { @@ -350,10 +351,10 @@ u16_uctomb (uint16_t *s, ucs4_t uc, int n) #if GNULIB_UNISTR_U32_UCTOMB || HAVE_LIBUNISTRING # if !HAVE_INLINE extern int - u32_uctomb (uint32_t *s, ucs4_t uc, int n); + u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n); # else static inline int -u32_uctomb (uint32_t *s, ucs4_t uc, int n) +u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n) { if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000)) { @@ -380,6 +381,15 @@ extern uint16_t * extern uint32_t * u32_cpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); +/* Copy N units from SRC to DEST, returning pointer after last written unit. */ +/* Similar to mempcpy(). */ +extern uint8_t * + u8_pcpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n); +extern uint16_t * + u16_pcpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n); +extern uint32_t * + u32_pcpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n); + /* Copy N units from SRC to DEST, guaranteeing correct behavior for overlapping memory areas. */ /* Similar to memmove(). */ @@ -627,11 +637,14 @@ extern int /* Duplicate S, returning an identical malloc'd string. */ /* Similar to strdup(), wcsdup(). */ extern uint8_t * - u8_strdup (const uint8_t *s); + u8_strdup (const uint8_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; extern uint16_t * - u16_strdup (const uint16_t *s); + u16_strdup (const uint16_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; extern uint32_t * - u32_strdup (const uint32_t *s); + u32_strdup (const uint32_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; /* Find the first occurrence of UC in STR. */ /* Similar to strchr(), wcschr(). */ diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unitypes.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unitypes.h index b277a0858..cd57d2721 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unitypes.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/unitypes.h @@ -1,18 +1,18 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Elementary types and macros for the GNU UniString library. - Copyright (C) 2002, 2005-2006, 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _UNITYPES_H @@ -27,7 +27,7 @@ typedef uint32_t ucs4_t; /* Attribute of a function whose result depends only on the arguments (not pointers!) and which has no side effects. */ #ifndef _UC_ATTRIBUTE_CONST -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__ # define _UC_ATTRIBUTE_CONST __attribute__ ((__const__)) # else # define _UC_ATTRIBUTE_CONST @@ -37,7 +37,7 @@ typedef uint32_t ucs4_t; /* Attribute of a function whose result depends only on the arguments (possibly pointers) and global memory, and which has no side effects. */ #ifndef _UC_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _UC_ATTRIBUTE_PURE @@ -48,7 +48,9 @@ typedef uint32_t ucs4_t; pass a pointer to a different object in the specified pointer argument than in the other pointer arguments. */ #ifndef _UC_RESTRICT -# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) +# if defined __restrict \ + || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \ + || __clang_major__ >= 3 # define _UC_RESTRICT __restrict # elif 199901L <= __STDC_VERSION__ || defined restrict # define _UC_RESTRICT restrict diff --git a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/wchar.h b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/wchar.h index b63692420..ce061d5d7 100644 --- a/gvsbuild/patches/gettext/msvc/libtextstyle/lib/wchar.h +++ b/gvsbuild/patches/gettext/msvc/libtextstyle/lib/wchar.h @@ -1,20 +1,20 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2020 Free Software Foundation, Inc. + Copyright (C) 2007-2023 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ /* Written by Eric Blake. */ @@ -53,11 +53,7 @@ the latter includes . But here, we have no way to detect whether is completely included or is still being included. */ -#if (_MSC_VER < 1900) -#include "../include/wchar.h" -#else #include "../ucrt/wchar.h" -#endif #else /* Normal invocation convention. */ @@ -70,30 +66,18 @@ # include /* for __GLIBC__ */ #endif -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . - In some builds of uClibc, is nonexistent and wchar_t is defined +/* In some builds of uClibc, is nonexistent and wchar_t is defined by . But avoid namespace pollution on glibc systems. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include #endif -#ifndef __GLIBC__ -# include -# include -#endif /* Include the original if it exists. Some builds of uClibc lack it. */ /* The include_next requires a split double-inclusion guard. */ -#if (_MSC_VER < 1900) -#include "../include/wchar.h" -#else -#include "../ucrt/wchar.h" -#endif #if 1 +# include "../ucrt/wchar.h" #endif #undef _GL_ALREADY_INCLUDING_WCHAR_H @@ -101,31 +85,96 @@ #ifndef _GL_LTS_WCHAR_H #define _GL_LTS_WCHAR_H +/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC, + _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, + HAVE_RAW_DECL_*. */ +#if !_GL_CONFIG_H_INCLUDED + #error "Please include config.h first." +#endif + +/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers + that can be freed by passing them as the Ith argument to the + function F. */ +#ifndef _GL_ATTRIBUTE_DEALLOC +# if __GNUC__ >= 11 +# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) +# else +# define _GL_ATTRIBUTE_DEALLOC(f, i) +# endif +#endif + +/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that + can be freed via 'free'; it can be used only after declaring 'free'. */ +/* Applies to: functions. Cannot be used on inline functions. */ +#ifndef _GL_ATTRIBUTE_DEALLOC_FREE +# if defined __cplusplus && defined __GNUC__ && !defined __clang__ +/* Work around GCC bug */ +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) +# else +# define _GL_ATTRIBUTE_DEALLOC_FREE \ + _GL_ATTRIBUTE_DEALLOC (free, 1) +# endif +#endif + +/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly + allocated memory. */ +/* Applies to: functions. */ +#ifndef _GL_ATTRIBUTE_MALLOC +# if __GNUC__ >= 3 || defined __clang__ +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +# else +# define _GL_ATTRIBUTE_MALLOC +# endif +#endif + /* The __attribute__ feature is available in gcc versions 2.5 and later. The attribute __pure__ was added in gcc 2.96. */ #ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define _GL_ATTRIBUTE_PURE /* empty */ # endif #endif +/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions. + */ +#ifndef _GL_ATTRIBUTE_NOTHROW +# if defined __cplusplus +# if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 2) || __clang_major >= 4 +# if __cplusplus >= 201103L +# define _GL_ATTRIBUTE_NOTHROW noexcept (true) +# else +# define _GL_ATTRIBUTE_NOTHROW throw () +# endif +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# else +# if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__ +# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) +# else +# define _GL_ATTRIBUTE_NOTHROW +# endif +# endif +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H @@ -213,6 +262,12 @@ Example: _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1))); + + Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front + of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's + because + [[...]] extern "C" ; + is invalid syntax in C++.) */ #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) @@ -260,6 +315,16 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA (func, rettype, parameters); + is to be used when func is a Microsoft deprecated alias, on native Windows. + It declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to _func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_MDA(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); except that the C function rpl_func may have a slightly different @@ -285,6 +350,14 @@ _GL_EXTERN_C int _gl_cxxalias_dummy #endif +/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_MDA (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters) + /* _GL_CXXALIAS_SYS (func, rettype, parameters); declares a C++ alias called GNULIB_NAMESPACE::func that redirects to the system provided function func, if GNULIB_NAMESPACE @@ -382,7 +455,7 @@ _GL_CXXALIASWARN_2 (func, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN_2(func,namespace) \ _GL_WARN_ON_USE (func, \ "The symbol ::" #func " refers to the system function. " \ @@ -410,9 +483,9 @@ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) /* To work around GCC bug , we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ +# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") # else @@ -428,26 +501,26 @@ /* The definition of _GL_ARG_NONNULL is copied here. */ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. n = 1 stands for the first argument, n = 2 for the second argument etc. */ #ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__ # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) # else # define _GL_ARG_NONNULL(params) @@ -456,19 +529,19 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. + Copyright (C) 2010-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration @@ -541,13 +614,20 @@ # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message))) # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ __attribute__ ((__warning__ (message))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C __typeof__ (function) function \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) +# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ + __attribute__ ((__diagnose_if__ (1, message, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function +_GL_WARN_EXTERN_C __typeof__ (function) function # define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ @@ -556,27 +636,33 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif #endif -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the +/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message") + is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the function is declared with the given prototype, consisting of return type, parameters, and attributes. This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does not work in this case. */ #ifndef _GL_WARN_ON_USE_CXX # if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_ON_USE (function, msg) # else # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __clang_major__ >= 4 +/* Another compiler attribute is available in clang. */ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_clang function parameters_and_attributes \ + __attribute__ ((__diagnose_if__ (1, msg, "warning"))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ +extern rettype_gcc function parameters_and_attributes # else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \ _GL_WARN_EXTERN_C int _gl_warn_on_use # endif # endif @@ -638,6 +724,56 @@ typedef int rpl_mbstate_t; # endif #endif +/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though may not have + been included yet. */ +#if 1 +# if (1 && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +/* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void rpl_free (void *); +# endif +# undef _GL_ATTRIBUTE_DEALLOC_FREE +# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) +# else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +# endif +#else +# if defined _MSC_VER && !defined free +_GL_EXTERN_C +# if defined _DLL + __declspec (dllimport) +# endif + void __cdecl free (void *); +# else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) _GL_ATTRIBUTE_NOTHROW; +# else +_GL_EXTERN_C void free (void *); +# endif +# endif +#endif + + +#if 1 +/* Get memset(). */ +# include +#endif + /* Convert a single-byte character to a wide character. */ #if 0 @@ -695,7 +831,7 @@ _GL_WARN_ON_USE (wctob, "wctob is unportable - " #endif -/* Test whether *PS is in the initial state. */ +/* Test whether *PS is in an initial state. */ #if 0 # if 0 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -722,6 +858,208 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " #endif +/* Put *PS into an initial state. */ +#if 1 +/* ISO C 23 § 7.31.6.(3) says that zeroing an mbstate_t is a way to put the + mbstate_t into an initial state. However, on many platforms an mbstate_t + is large, and it is possible - as an optimization - to get away with zeroing + only part of it. So, instead of + + mbstate_t state = { 0 }; + + or + + mbstate_t state; + memset (&state, 0, sizeof (mbstate_t)); + + we can write this faster code: + + mbstate_t state; + mbszero (&state); + */ +/* _GL_MBSTATE_INIT_SIZE describes how mbsinit() behaves: It is the number of + bytes at the beginning of an mbstate_t that need to be zero, for mbsinit() + to return true. + _GL_MBSTATE_ZERO_SIZE is the number of bytes at the beginning of an mbstate_t + that need to be zero, + - for mbsinit() to return true, and + - for all other multibyte-aware functions to operate properly. + 0 < _GL_MBSTATE_INIT_SIZE <= _GL_MBSTATE_ZERO_SIZE <= sizeof (mbstate_t). + These values are determined by source code inspection, where possible, and + by running the gnulib unit tests. + We need _GL_MBSTATE_INIT_SIZE because if we define _GL_MBSTATE_ZERO_SIZE + without considering what mbsinit() does, we get test failures such as + assertion "mbsinit (&iter->state)" failed + */ +# if GNULIB_defined_mbstate_t /* AIX, IRIX */ +/* mbstate_t has at least 4 bytes. They are used as coded in + gnulib/lib/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 1 +/* define _GL_MBSTATE_ZERO_SIZE 4 + does not work: it causes test failures. + So, use the safe fallback value, below. */ +# elif __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 /* glibc */ +/* mbstate_t is defined in . + For more details, see glibc/iconv/skeleton.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (((mbstate_t) {0}).__count) */ +# define _GL_MBSTATE_ZERO_SIZE /* 8 */ sizeof (mbstate_t) +# elif defined MUSL_LIBC /* musl libc */ +/* mbstate_t is defined in . + It is an opaque aligned 8-byte struct, of which at most the first + 4 bytes are used. + For more details, see src/multibyte/mbrtowc.c. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (unsigned) */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __APPLE__ && defined __MACH__ /* macOS */ +/* On macOS, mbstate_t is defined in . + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + Libc-/locale/FreeBSD/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8,utf2}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 10 + utf2.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __FreeBSD__ /* FreeBSD */ +/* On FreeBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see the __mbsinit implementations in + src/lib/libc/locale/ + {ascii,none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + ascii.c 0 0 + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 8 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __NetBSD__ /* NetBSD */ +/* On NetBSD, mbstate_t is defined in src/sys/sys/ansi.h. + It is an opaque aligned 128-byte struct, of which at most the first + 28 bytes are used. + For more details, see the *State types in + src/lib/libc/citrus/modules/citrus_*.c + (ignoring citrus_{hz,iso2022,utf7,viqr,zw}.c, since these implement + stateful encodings, not usable as locale encodings). */ +/* File ZERO_SIZE + citrus/citrus_none.c 0 + citrus/modules/citrus_euc.c 8 + citrus/modules/citrus_euctw.c 8 + citrus/modules/citrus_mskanji.c 8 + citrus/modules/citrus_big5.c 8 + citrus/modules/citrus_gbk2k.c 8 + citrus/modules/citrus_dechanyu.c 8 + citrus/modules/citrus_johab.c 6 + citrus/modules/citrus_utf8.c 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 28. */ +# define _GL_MBSTATE_ZERO_SIZE 28 +# elif defined __OpenBSD__ /* OpenBSD */ +/* On OpenBSD, mbstate_t is defined in src/sys/sys/_types.h. + It is an opaque aligned 128-byte struct, of which at most the first + 12 bytes are used. + For more details, see src/lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 + citrus_utf8.c 12 12 */ +# define _GL_MBSTATE_INIT_SIZE 12 +# define _GL_MBSTATE_ZERO_SIZE 12 +# elif defined __minix /* Minix */ +/* On Minix, mbstate_t is defined in sys/sys/ansi.h. + It is an opaque aligned 128-byte struct. + For more details, see the *State types in + lib/libc/citrus/citrus_*.c. */ +/* File INIT_SIZE ZERO_SIZE + citrus_none.c 0 0 */ +/* But 1 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures for values < 4. */ +# define _GL_MBSTATE_ZERO_SIZE 4 +# elif defined __sun /* Solaris */ +/* On Solaris, mbstate_t is defined in . + It is an opaque aligned 24-byte or 32-byte struct, of which at most the first + 20 or 28 bytes are used. + For more details on OpenSolaris derivatives, see the *State types in + illumos-gate/usr/src/lib/libc/port/locale/ + {none,euc,mskanji,big5,gb2312,gbk,gb18030,utf8}.c. */ +/* File INIT_SIZE ZERO_SIZE + none.c 0 0 + euc.c 12 12 + mskanji.c 4 4 + big5.c 4 4 + gb2312.c 4 6 + gbk.c 4 4 + gb18030.c 4 8 + utf8.c 12 12 */ +/* But 12 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test + failures + - in OpenIndiana and OmniOS: for values < 16, + - in Solaris 10 and 11: for values < 20 (in 32-bit mode) + or < 28 (in 64-bit mode). + Since we don't have a good way to distinguish the OpenSolaris derivatives + from the proprietary Solaris versions, and can't inspect the Solaris source + code, use the safe fallback values, below. */ +# elif defined __CYGWIN__ /* Cygwin */ +/* On Cygwin, mbstate_t is defined in . + For more details, see newlib/libc/stdlib/mbtowc_r.c and + winsup/cygwin/strfuncs.cc. */ +# define _GL_MBSTATE_INIT_SIZE 4 /* sizeof (int) */ +# define _GL_MBSTATE_ZERO_SIZE 8 +# elif defined _WIN32 && !defined __CYGWIN__ /* Native Windows. */ +/* MSVC defines 'mbstate_t' as an aligned 8-byte struct. + On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined + as an aligned 8-byte struct, of which the first 4 bytes matter. + Use the safe values, below. */ +# elif defined __ANDROID__ /* Android */ +/* Android defines 'mbstate_t' in . + It is an opaque 4-byte or 8-byte struct. + For more details, see + bionic/libc/private/bionic_mbstate.h + bionic/libc/bionic/mbrtoc32.cpp + bionic/libc/bionic/mbrtoc16.cpp + */ +# define _GL_MBSTATE_INIT_SIZE 4 +# define _GL_MBSTATE_ZERO_SIZE 4 +# endif +/* Use safe values as defaults. */ +# ifndef _GL_MBSTATE_INIT_SIZE +# define _GL_MBSTATE_INIT_SIZE sizeof (mbstate_t) +# endif +# ifndef _GL_MBSTATE_ZERO_SIZE +# define _GL_MBSTATE_ZERO_SIZE sizeof (mbstate_t) +# endif +_GL_BEGIN_C_LINKAGE +# if defined IN_MBSZERO +_GL_EXTERN_INLINE +# else +_GL_INLINE +# endif +_GL_ARG_NONNULL ((1)) void +mbszero (mbstate_t *ps) +{ + memset (ps, 0, _GL_MBSTATE_ZERO_SIZE); +} +_GL_END_C_LINKAGE +_GL_CXXALIAS_SYS (mbszero, void, (mbstate_t *ps)); +_GL_CXXALIASWARN (mbszero); +#endif + + /* Convert a multibyte character to a wide character. */ #if 0 # if 0 @@ -858,7 +1196,9 @@ _GL_CXXALIAS_SYS (mbsnrtowcs, size_t, const char **restrict srcp, size_t srclen, size_t len, mbstate_t *restrict ps)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbsnrtowcs); +# endif #elif defined GNULIB_POSIXCHECK # undef mbsnrtowcs # if HAVE_RAW_DECL_MBSNRTOWCS @@ -1046,13 +1386,25 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " /* Compare N wide characters of S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmemcmp +# define wmemcmp rpl_wmemcmp +# endif +_GL_FUNCDECL_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 _GL_FUNCDECL_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wmemcmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmemcmp); # endif @@ -1111,14 +1463,27 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " /* Copy N wide characters of SRC to DEST. Return pointer to wide characters after the last written wide character. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wmempcpy +# define wmempcpy rpl_wmempcpy +# endif +_GL_FUNCDECL_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +_GL_CXXALIAS_RPL (wmempcpy, wchar_t *, + (wchar_t *restrict dest, + const wchar_t *restrict src, size_t n)); +# else +# if !1 _GL_FUNCDECL_SYS (wmempcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); -# endif +# endif _GL_CXXALIAS_SYS (wmempcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wmempcpy); # endif @@ -1169,7 +1534,10 @@ _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " /* Return the number of wide characters in S, but at most MAXLEN. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) _GL_ATTRIBUTE_PURE); # endif @@ -1206,7 +1574,10 @@ _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src)); # endif @@ -1247,7 +1618,10 @@ _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcpncpy, wchar_t *, (wchar_t *restrict dest, const wchar_t *restrict src, size_t n)); @@ -1309,11 +1683,21 @@ _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " /* Compare S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcscmp +# define wcscmp rpl_wcscmp +# endif +_GL_FUNCDECL_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# else +# if !1 _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcscmp); # endif @@ -1328,13 +1712,25 @@ _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " /* Compare no more than N wide characters of S1 and S2. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsncmp +# define wcsncmp rpl_wcsncmp +# endif +_GL_FUNCDECL_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +# else +# if !1 _GL_FUNCDECL_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); -# endif +# endif _GL_CXXALIAS_SYS (wcsncmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n)); +# endif # if __GLIBC__ >= 2 _GL_CXXALIASWARN (wcsncmp); # endif @@ -1349,7 +1745,10 @@ _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " /* Compare S1 and S2, ignoring case. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) _GL_ATTRIBUTE_PURE); # endif @@ -1366,7 +1765,10 @@ _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " /* Compare no more than N chars of S1 and S2, ignoring case. */ #if 0 -# if !1 +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) _GL_FUNCDECL_SYS (wcsncasecmp, int, (const wchar_t *s1, const wchar_t *s2, size_t n) _GL_ATTRIBUTE_PURE); @@ -1426,16 +1828,79 @@ _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " /* Duplicate S, returning an identical malloc'd string. */ #if 0 -# if !1 -_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s)); -# endif +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +/* On Solaris 11.3, the header files declare the function in the std:: + namespace, not in the global namespace. So, force a declaration in + the global namespace. */ +# if !1 || (defined __sun && defined __cplusplus) || __GNUC__ >= 11 +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif _GL_CXXALIASWARN (wcsdup); -#elif defined GNULIB_POSIXCHECK -# undef wcsdup -# if HAVE_RAW_DECL_WCSDUP +#else +# if __GNUC__ >= 11 && !defined wcsdup +/* For -Wmismatched-dealloc: Associate wcsdup with free or rpl_free. */ +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# endif +# if defined GNULIB_POSIXCHECK +# undef wcsdup +# if HAVE_RAW_DECL_WCSDUP _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " "use gnulib module wcsdup for portability"); +# endif +# elif 1 +/* On native Windows, map 'wcsdup' to '_wcsdup', so that -loldnames is not + required. In C++ with GNULIB_NAMESPACE, avoid differences between + platforms by defining GNULIB_NAMESPACE::wcsdup always. */ +# if defined _WIN32 && !defined __CYGWIN__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsdup +# define wcsdup _wcsdup +# endif +_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s)); +# else +# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_NOTHROW + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# else +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, + (const wchar_t *s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); +# endif +# if 1 +_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif +# endif +# if (defined _WIN32 && !defined __CYGWIN__) || 1 +_GL_CXXALIASWARN (wcsdup); +# endif # endif #endif @@ -1500,7 +1965,7 @@ _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " #endif -/* Return the length of the initial segmet of WCS which consists entirely +/* Return the length of the initial segment of WCS which consists entirely of wide characters not in REJECT. */ #if 0 # if !1 @@ -1520,7 +1985,7 @@ _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " #endif -/* Return the length of the initial segmet of WCS which consists entirely +/* Return the length of the initial segment of WCS which consists entirely of wide characters in ACCEPT. */ #if 0 # if !1 @@ -1575,12 +2040,25 @@ _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " /* Find the first occurrence of NEEDLE in HAYSTACK. */ #if 0 -# if !1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsstr +# define wcsstr rpl_wcsstr +# endif +_GL_FUNCDECL_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcsstr, wchar_t *, + (const wchar_t *restrict haystack, + const wchar_t *restrict needle)); +# else +# if !1 _GL_FUNCDECL_SYS (wcsstr, wchar_t *, (const wchar_t *restrict haystack, const wchar_t *restrict needle) _GL_ATTRIBUTE_PURE); -# endif +# endif /* On some systems, this function is defined as an overloaded function: extern "C++" { const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); @@ -1591,6 +2069,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcsstr, (const wchar_t *restrict, const wchar_t *restrict), const wchar_t *, (const wchar_t *restrict, const wchar_t *restrict)); +# endif # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) _GL_CXXALIASWARN1 (wcsstr, wchar_t *, @@ -1718,6 +2197,24 @@ _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " #endif +#if 0 && (defined _WIN32 && !defined __CYGWIN__) +/* Gets the name of the current working directory. + (a) If BUF is non-NULL, it is assumed to have room for SIZE wide characters. + This function stores the working directory (NUL-terminated) in BUF and + returns BUF. + (b) If BUF is NULL, an array is allocated with 'malloc'. The array is SIZE + wide characters long, unless SIZE == 0, in which case it is as big as + necessary. + If the directory couldn't be determined or SIZE was too small, this function + returns NULL and sets errno. For a directory of length LEN, SIZE should be + >= LEN + 3 in case (a) or >= LEN + 1 in case (b). + Possible errno values include: + - ERANGE if SIZE is too small. + - ENOMEM if the memory could no be allocated. */ +_GL_FUNCDECL_SYS (wgetcwd, wchar_t *, (wchar_t *buf, size_t size)); +#endif + + #endif /* _GL_LTS_WCHAR_H */ #endif /* _GL_LTS_WCHAR_H */ #endif diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/config.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/config.h deleted file mode 100644 index fffda9d10..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/config.h +++ /dev/null @@ -1,1542 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if // is a file system root distinct from /. */ -#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the file system. */ -#define ENABLE_RELOCATABLE 1 - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like 'struct s { int n; short - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate - the size in bytes of such a struct containing an N-element array. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ -/* #undef FUNC_REALPATH_WORKS */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize-lgpl shall be considered present. */ -#define GNULIB_CANONICALIZE_LGPL 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fwriteerror shall be considered present. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module sigpipe shall be considered present. */ -#define GNULIB_SIGPIPE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to 1 when the gnulib module canonicalize_file_name should be tested. - */ -#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module environ should be tested. */ -#define GNULIB_TEST_ENVIRON 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module getopt-posix should be tested. */ -#define GNULIB_TEST_GETOPT_POSIX 1 - -/* Define to 1 when the gnulib module iswblank should be tested. */ -#define GNULIB_TEST_ISWBLANK 1 - -/* Define to 1 when the gnulib module iswdigit should be tested. */ -#define GNULIB_TEST_ISWDIGIT 1 - -/* Define to 1 when the gnulib module iswxdigit should be tested. */ -#define GNULIB_TEST_ISWXDIGIT 1 - -/* Define to 1 when the gnulib module localename should be tested. */ -#define GNULIB_TEST_LOCALENAME 1 - -/* Define to 1 when the gnulib module lstat should be tested. */ -#define GNULIB_TEST_LSTAT 1 - -/* Define to 1 when the gnulib module mbrtowc should be tested. */ -#define GNULIB_TEST_MBRTOWC 1 - -/* Define to 1 when the gnulib module mbsinit should be tested. */ -#define GNULIB_TEST_MBSINIT 1 - -/* Define to 1 when the gnulib module mbslen should be tested. */ -#define GNULIB_TEST_MBSLEN 1 - -/* Define to 1 when the gnulib module mbsstr should be tested. */ -#define GNULIB_TEST_MBSSTR 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module readlink should be tested. */ -#define GNULIB_TEST_READLINK 1 - -/* Define to 1 when the gnulib module realpath should be tested. */ -#define GNULIB_TEST_REALPATH 1 - -/* Define to 1 when the gnulib module setlocale should be tested. */ -#define GNULIB_TEST_SETLOCALE 1 - -/* Define to 1 when the gnulib module setlocale_null should be tested. */ -#define GNULIB_TEST_SETLOCALE_NULL 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module strnlen should be tested. */ -#define GNULIB_TEST_STRNLEN 1 - -/* Define to 1 when the gnulib module wcwidth should be tested. */ -#define GNULIB_TEST_WCWIDTH 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUCR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-uctomb shall be considered present. */ -#define GNULIB_UNISTR_U8_UCTOMB 1 - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the Mac OS X function - CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define to 1 if you have the `copy_file_range' function. */ -/* #undef HAVE_COPY_FILE_RANGE */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `iswblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISWBLANK 1 - -/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBRTOWC */ - -/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you - don't. */ -#define HAVE_DECL_MBSINIT 1 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. - */ -#define HAVE_DECL_SETENV 0 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 1 - -/* Define to 1 if you have the declaration of `towlower', and to 0 if you - don't. */ -/* #undef HAVE_DECL_TOWLOWER */ - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 0 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the `duplocale' function. */ -/* #undef HAVE_DUPLOCALE */ - -/* Define if you have the declaration of environ. */ -#define HAVE_ENVIRON_DECL 1 - -/* Define if the locale_t type contains insufficient information, as on - OpenBSD. */ -/* #undef HAVE_FAKE_LOCALES */ - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the `freelocale' function. */ -/* #undef HAVE_FREELOCALE */ - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the `getlocalename_l' function. */ -/* #undef HAVE_GETLOCALENAME_L */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getopt_long_only' function. */ -/* #undef HAVE_GETOPT_LONG_ONLY */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ICONV_H 1 - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the `iswblank' function. */ -#define HAVE_ISWBLANK 1 - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define if you have and nl_langinfo(CODESET). */ -/* #undef HAVE_LANGINFO_CODESET */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LANGINFO_H */ - -/* Define if your file defines LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACH_O_DYLD_H */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the `mbsinit' function. */ -/* #undef HAVE_MBSINIT */ - -/* Define to 1 if you have the `mbslen' function. */ -/* #undef HAVE_MBSLEN */ - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define if the locale_t type does not contain the name of each locale - category. */ -/* #undef HAVE_NAMELESS_LOCALES */ - -/* Define to 1 if you have the `newlocale' function. */ -/* #undef HAVE_NEWLOCALE */ - -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the `readlinkat' function. */ -/* #undef HAVE_READLINKAT */ - -/* Define to 1 if you have the `realpath' function. */ -/* #undef HAVE_REALPATH */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the locale_t type is as on Solaris 11.4. */ -/* #undef HAVE_SOLARIS114_LOCALES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CDEFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the `towlower' function. */ -/* #undef HAVE_TOWLOWER */ - -/* Define to 1 if you have the `tsearch' function. */ -/* #undef HAVE_TSEARCH */ - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if the system has the type 'unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define to 1 if you have the `uselocale' function. */ -/* #undef HAVE_USELOCALE */ - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -/* #undef HAVE_WCSLEN */ - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -/* #undef HAVE_WCWIDTH */ - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define if the uselocale function exists any may safely be called. */ -/* #undef HAVE_WORKING_USELOCALE */ - -/* Define to 1 if you have the `wprintf' function. */ -#define HAVE_WPRINTF 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_XLOCALE_H */ - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -#define INSTALLPREFIX "/cygdrive/c/software.b/gettext-0.21" - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing - slash. */ -/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Define if the mbrtowc function does not return (size_t) -2 for empty input. - */ -#define MBRTOWC_EMPTY_INPUT_BUG 1 - -/* Define if the mbrtowc function may signal encoding errors in the C locale. - */ -/* #undef MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ */ - -/* Define if the mbrtowc function has the NULL pwc argument bug. */ -/* #undef MBRTOWC_NULL_ARG1_BUG */ - -/* Define if the mbrtowc function has the NULL string argument bug. */ -/* #undef MBRTOWC_NULL_ARG2_BUG */ - -/* Define if the mbrtowc function does not return 0 for a NUL character. */ -/* #undef MBRTOWC_NUL_RETVAL_BUG */ - -/* Define if the mbrtowc function returns a wrong return value. */ -#define MBRTOWC_RETVAL_BUG 1 - -/* Define if the mbrtowc function stores a wide character when reporting - incomplete input. */ -#define MBRTOWC_STORES_INCOMPLETE_BUG 1 - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define to 1 to enable general improvements of setlocale. */ -#define NEED_SETLOCALE_IMPROVED 1 - -/* Define to 1 to enable a multithread-safety fix of setlocale. */ -#define NEED_SETLOCALE_MTSAFE 0 - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "gettext-runtime" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "bug-gettext@gnu.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gettext-runtime" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-runtime 0.21" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gettext-runtime" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.21" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -/* #undef READLINK_TRAILING_SLASH_BUG */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ALL_MTSAFE 1 - -/* Define to 1 if setlocale (category, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ONE_MTSAFE 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define to the prefix of C symbols at the assembler and linker level, either - an underscore or empty. */ -#define USER_LABEL_PREFIX _ - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define when --enable-shared is used on mingw or Cygwin. */ -#define WOE32DLL 1 - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 on Solaris. */ -/* #undef _LCONV_C99 */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#ifndef _GL_UNUSED -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -# else -# define _GL_UNUSED -# endif -#endif - -/* The __pure__ attribute was added in gcc 2.96. */ -#ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define _GL_ATTRIBUTE_PURE /* empty */ -# endif -#endif - - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded - - - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#if defined __EMX__ && !defined __KLIBC__ -# include "intl/os2compat.h" -#endif - diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/gnulib-lib/stdint.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/gnulib-lib/stdint.h deleted file mode 100644 index d941efd4d..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/gnulib-lib/stdint.h +++ /dev/null @@ -1,747 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _GL_STDINT_H - -#if __GNUC__ >= 3 - -#endif - - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#else - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if 1 -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _GL_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#endif - -#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_STDINT_H - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -#include - -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if 1 -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - -#if ! 1 - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h". */ -# if 1 && ! defined _AIX -# include -# endif - -# if 1 - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -# elif 0 - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -# endif - -# if 0 && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -# endif - -# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -/* These are separate macros, because if you try to merge these macros into - a single one, HP-UX cc rejects the resulting expression in constant - expressions. */ -# define _STDINT_UNSIGNED_MIN(bits, zero) \ - (zero) -# define _STDINT_SIGNED_MIN(bits, zero) \ - (~ _STDINT_MAX (1, bits, zero)) - -# define _STDINT_MAX(signed, bits, zero) \ - (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef int8_t -# undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -# define int8_t gl_int8_t -# define uint8_t gl_uint8_t - -# undef int16_t -# undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -# define int16_t gl_int16_t -# define uint16_t gl_uint16_t - -# undef int32_t -# undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -# define int32_t gl_int32_t -# define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -# ifdef INT64_MAX -# define GL_INT64_T -# else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# else -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -# endif - -# ifdef UINT64_MAX -# define GL_UINT64_T -# else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# else -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -# endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -# define _UINT8_T -# define _UINT32_T -# define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef int_least8_t -# undef uint_least8_t -# undef int_least16_t -# undef uint_least16_t -# undef int_least32_t -# undef uint_least32_t -# undef int_least64_t -# undef uint_least64_t -# define int_least8_t int8_t -# define uint_least8_t uint8_t -# define int_least16_t int16_t -# define uint_least16_t uint16_t -# define int_least32_t int32_t -# define uint_least32_t uint32_t -# ifdef GL_INT64_T -# define int_least64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_least64_t uint64_t -# endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -# undef int_fast8_t -# undef uint_fast8_t -# undef int_fast16_t -# undef uint_fast16_t -# undef int_fast32_t -# undef uint_fast32_t -# undef int_fast64_t -# undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -# ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -# else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -# endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -# define int_fast8_t gl_int_fast8_t -# define uint_fast8_t gl_uint_fast8_t -# define int_fast16_t gl_int_fast16_t -# define uint_fast16_t gl_uint_fast16_t -# define int_fast32_t gl_int_fast32_t -# define uint_fast32_t gl_uint_fast32_t -# ifdef GL_INT64_T -# define int_fast64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -# endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -/* kLIBC's defines _INTPTR_T_DECLARED and needs its own - definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and - uintptr_t to avoid conflicting declarations of system functions like - _findclose in . */ -# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) -# undef intptr_t -# undef uintptr_t -# ifdef _WIN64 -typedef long long int gl_intptr_t; -typedef unsigned long long int gl_uintptr_t; -# else -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -# endif -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t -# endif - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -# ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -# endif - -# ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -# endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -# define GNULIB_defined_stdint_types 1 -# endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef INT8_MIN -# undef INT8_MAX -# undef UINT8_MAX -# define INT8_MIN (~ INT8_MAX) -# define INT8_MAX 127 -# define UINT8_MAX 255 - -# undef INT16_MIN -# undef INT16_MAX -# undef UINT16_MAX -# define INT16_MIN (~ INT16_MAX) -# define INT16_MAX 32767 -# define UINT16_MAX 65535 - -# undef INT32_MIN -# undef INT32_MAX -# undef UINT32_MAX -# define INT32_MIN (~ INT32_MAX) -# define INT32_MAX 2147483647 -# define UINT32_MAX 4294967295U - -# if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -# endif - -# if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -# endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef INT_LEAST8_MIN -# undef INT_LEAST8_MAX -# undef UINT_LEAST8_MAX -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST8_MAX INT8_MAX -# define UINT_LEAST8_MAX UINT8_MAX - -# undef INT_LEAST16_MIN -# undef INT_LEAST16_MAX -# undef UINT_LEAST16_MAX -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST16_MAX INT16_MAX -# define UINT_LEAST16_MAX UINT16_MAX - -# undef INT_LEAST32_MIN -# undef INT_LEAST32_MAX -# undef UINT_LEAST32_MAX -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST32_MAX INT32_MAX -# define UINT_LEAST32_MAX UINT32_MAX - -# undef INT_LEAST64_MIN -# undef INT_LEAST64_MAX -# ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -# endif - -# undef UINT_LEAST64_MAX -# ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -# undef INT_FAST8_MIN -# undef INT_FAST8_MAX -# undef UINT_FAST8_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define UINT_FAST8_MAX UCHAR_MAX - -# undef INT_FAST16_MIN -# undef INT_FAST16_MAX -# undef UINT_FAST16_MAX -# define INT_FAST16_MIN INT_FAST32_MIN -# define INT_FAST16_MAX INT_FAST32_MAX -# define UINT_FAST16_MAX UINT_FAST32_MAX - -# undef INT_FAST32_MIN -# undef INT_FAST32_MAX -# undef UINT_FAST32_MAX -# ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -# else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -# endif - -# undef INT_FAST64_MIN -# undef INT_FAST64_MAX -# ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -# endif - -# undef UINT_FAST64_MAX -# ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -# undef INTPTR_MIN -# undef INTPTR_MAX -# undef UINTPTR_MAX -# ifdef _WIN64 -# define INTPTR_MIN LLONG_MIN -# define INTPTR_MAX LLONG_MAX -# define UINTPTR_MAX ULLONG_MAX -# else -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX -# endif - -/* 7.18.2.5. Limits of greatest-width integer types */ - -# ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -# endif - -# ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -# endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -# undef PTRDIFF_MIN -# undef PTRDIFF_MAX -# if 0 -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -# else -# define PTRDIFF_MIN \ - _STDINT_SIGNED_MIN (, 0) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, , 0) -# endif - -/* sig_atomic_t limits */ -# undef SIG_ATOMIC_MIN -# undef SIG_ATOMIC_MAX -# if -# define SIG_ATOMIC_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define SIG_ATOMIC_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define SIG_ATOMIC_MAX \ - _STDINT_MAX (, , \ - 0) - - -/* size_t limit */ -# undef SIZE_MAX -# if 0 -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -# else -# define SIZE_MAX _STDINT_MAX (0, , 0) -# endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -# if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# endif -# undef WCHAR_MIN -# undef WCHAR_MAX -# if -# define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WCHAR_MAX \ - _STDINT_MAX (, , 0) - -/* wint_t limits */ -/* If gnulib's or overrides wint_t, is not - accurate, therefore use the definitions from above. */ -# if !1 -# undef WINT_MIN -# undef WINT_MAX -# if -# define WINT_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WINT_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WINT_MAX \ - _STDINT_MAX (, , 0) -# endif - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -# undef INT8_C -# undef UINT8_C -# define INT8_C(x) x -# define UINT8_C(x) x - -# undef INT16_C -# undef UINT16_C -# define INT16_C(x) x -# define UINT16_C(x) x - -# undef INT32_C -# undef UINT32_C -# define INT32_C(x) x -# define UINT32_C(x) x ## U - -# undef INT64_C -# undef UINT64_C -# if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -# elif defined _MSC_VER -# define INT64_C(x) x##i64 -# else -# define INT64_C(x) x##LL -# endif -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -# elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -# else -# define UINT64_C(x) x##ULL -# endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -# ifndef INTMAX_C -# if LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -# endif - -# ifndef UINTMAX_C -# if ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -# endif - -#endif /* !1 */ - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (!defined UINTMAX_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# ifdef INT8_MAX -# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -# endif -# ifdef UINT8_MAX -# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -# endif -# ifdef INT16_MAX -# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -# endif -# ifdef UINT16_MAX -# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -# endif -# ifdef INT32_MAX -# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -# endif -# ifdef UINT32_MAX -# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -# endif -# ifdef INT64_MAX -# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -# endif -# ifdef UINT64_MAX -# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -# endif -# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -# ifdef WINT_MAX -# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -# endif -# ifdef SIG_ATOMIC_MAX -# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -# endif -#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _GL_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/gnulib-lib/stdio.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/gnulib-lib/stdio.h deleted file mode 100644 index 9da08528d..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-runtime/gnulib-lib/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_STDIO_H -#define _GL_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 0 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 0 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 1 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if 0 -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 0 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_STDIO_H */ -#endif /* _GL_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/config.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/config.h deleted file mode 100644 index 2815c6a88..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/config.h +++ /dev/null @@ -1,2872 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - - -/* Default value for alignment of strings in .mo file. */ -#define DEFAULT_OUTPUT_ALIGNMENT 1 - - -/* Define this to an absolute name of . */ -/* #undef ABSOLUTE_LIBXML2_LIBXML_XMLEXPORTS_H */ - -/* Define this to an absolute name of . */ -/* #undef ABSOLUTE_LIBXML2_LIBXML_XMLVERSION_H */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'double'. */ -#define DBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'double'. */ -#define DBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_WORD */ - -/* the name of the file descriptor member of DIR */ -/* #undef DIR_FD_MEMBER_NAME */ - -#ifdef DIR_FD_MEMBER_NAME -# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME) -#else -# define DIR_TO_FD(Dir_p) -1 -#endif - - -/* Define to 1 if // is a file system root distinct from /. */ -#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the file system. */ -#define ENABLE_RELOCATABLE 1 - -/* Define according to the byte order of the target machine: 1 for big endian, - 0 for little endian. */ -#define ENDIANNESS 0 - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like 'struct s { int n; short - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate - the size in bytes of such a struct containing an N-element array. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'float'. */ -#define FLT_EXPBIT0_BIT 23 - -/* Define as the word index where to find the exponent of 'float'. */ -#define FLT_EXPBIT0_WORD 0 - -/* Define as the bit index in the word where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_WORD */ - -/* Define to 1 if fopen() fails to recognize a trailing slash. */ -#define FOPEN_TRAILING_SLASH_BUG 1 - -/* Define to 1 if the system's ftello function has the Solaris bug. */ -/* #undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE */ - -/* Define to 1 if mkdir mistakenly creates a directory given with a trailing - dot component. */ -#define FUNC_MKDIR_DOT_BUG 1 - -/* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */ -/* #undef FUNC_NL_LANGINFO_YESEXPR_WORKS */ - -/* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ -/* #undef FUNC_REALPATH_WORKS */ - -/* Define to 1 if ungetc is broken when used on arbitrary bytes. */ -/* #undef FUNC_UNGETC_BROKEN */ - -/* Define to 1 if futimesat mishandles a NULL file name. */ -/* #undef FUTIMESAT_NULL_BUG */ - -/* Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday. */ -#define GETTIMEOFDAY_TIMEZONE void - -/* Define to 1 if getxattr works with XATTR_NAME_POSIX_ACL_ACCESS and - XATTR_NAME_POSIX_ACL_DEFAULT. */ -/* #undef GETXATTR_WITH_POSIX_ACLS */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize shall be considered present. */ -#define GNULIB_CANONICALIZE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize-lgpl shall be considered present. */ -#define GNULIB_CANONICALIZE_LGPL 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fd-safer-flag shall be considered present. */ -#define GNULIB_FD_SAFER_FLAG 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module filenamecat shall be considered present. */ -#define GNULIB_FILENAMECAT IN_GETTEXT_TOOLS_GNULIB_TESTS - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fopen-gnu shall be considered present. */ -#define GNULIB_FOPEN_GNU 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fwriteerror shall be considered present. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module isblank shall be considered present. */ -#define GNULIB_ISBLANK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module pipe2-safer shall be considered present. */ -#define GNULIB_PIPE2_SAFER 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define when the error facility is replaced by gnulib. */ -#define GNULIB_REPLACE_ERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module sigpipe shall be considered present. */ -#define GNULIB_SIGPIPE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module snprintf shall be considered present. */ -#define GNULIB_SNPRINTF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror_r-posix shall be considered present. */ -#define GNULIB_STRERROR_R_POSIX IN_GETTEXT_TOOLS_GNULIB_TESTS - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module tempname shall be considered present. */ -#define GNULIB_TEMPNAME 1 - -/* Define to 1 when the gnulib module accept should be tested. */ -#define GNULIB_TEST_ACCEPT 1 - -/* Define to 1 when the gnulib module access should be tested. */ -#define GNULIB_TEST_ACCESS 1 - -/* Define to 1 when the gnulib module bind should be tested. */ -#define GNULIB_TEST_BIND 1 - -/* Define to 1 when the gnulib module btowc should be tested. */ -#define GNULIB_TEST_BTOWC 1 - -/* Define to 1 when the gnulib module canonicalize should be tested. */ -#define GNULIB_TEST_CANONICALIZE 1 - -/* Define to 1 when the gnulib module canonicalize_file_name should be tested. - */ -#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module closedir should be tested. */ -#define GNULIB_TEST_CLOSEDIR 1 - -/* Define to 1 when the gnulib module connect should be tested. */ -#define GNULIB_TEST_CONNECT 1 - -/* Define to 1 when the gnulib module copy-file-range should be tested. */ -#define GNULIB_TEST_COPY_FILE_RANGE 1 - -/* Define to 1 when the gnulib module creat should be tested. */ -#define GNULIB_TEST_CREAT 1 - -/* Define to 1 when the gnulib module dirfd should be tested. */ -#define GNULIB_TEST_DIRFD 1 - -/* Define to 1 when the gnulib module dup should be tested. */ -#define GNULIB_TEST_DUP 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module environ should be tested. */ -#define GNULIB_TEST_ENVIRON 1 - -/* Define to 1 when the gnulib module explicit_bzero should be tested. */ -#define GNULIB_TEST_EXPLICIT_BZERO 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module fdopen should be tested. */ -#define GNULIB_TEST_FDOPEN 1 - -/* Define to 1 when the gnulib module fnmatch should be tested. */ -#define GNULIB_TEST_FNMATCH 1 - -/* Define to 1 when the gnulib module fopen should be tested. */ -#define GNULIB_TEST_FOPEN 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module fsync should be tested. */ -#define GNULIB_TEST_FSYNC 1 - -/* Define to 1 when the gnulib module ftell should be tested. */ -#define GNULIB_TEST_FTELL 1 - -/* Define to 1 when the gnulib module ftello should be tested. */ -#define GNULIB_TEST_FTELLO 1 - -/* Define to 1 when the gnulib module ftruncate should be tested. */ -#define GNULIB_TEST_FTRUNCATE 1 - -/* Define to 1 when the gnulib module getcwd should be tested. */ -#define GNULIB_TEST_GETCWD 1 - -/* Define to 1 when the gnulib module getdelim should be tested. */ -#define GNULIB_TEST_GETDELIM 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module getline should be tested. */ -#define GNULIB_TEST_GETLINE 1 - -/* Define to 1 when the gnulib module getopt-posix should be tested. */ -#define GNULIB_TEST_GETOPT_POSIX 1 - -/* Define to 1 when the gnulib module getpagesize should be tested. */ -#define GNULIB_TEST_GETPAGESIZE 1 - -/* Define to 1 when the gnulib module getrandom should be tested. */ -#define GNULIB_TEST_GETRANDOM 1 - -/* Define to 1 when the gnulib module gettimeofday should be tested. */ -#define GNULIB_TEST_GETTIMEOFDAY 1 - -/* Define to 1 when the gnulib module ioctl should be tested. */ -#define GNULIB_TEST_IOCTL 1 - -/* Define to 1 when the gnulib module isinf should be tested. */ -#define GNULIB_TEST_ISINF 1 - -/* Define to 1 when the gnulib module isnan should be tested. */ -#define GNULIB_TEST_ISNAN 1 - -/* Define to 1 when the gnulib module isnand should be tested. */ -#define GNULIB_TEST_ISNAND 1 - -/* Define to 1 when the gnulib module isnanf should be tested. */ -#define GNULIB_TEST_ISNANF 1 - -/* Define to 1 when the gnulib module isnanl should be tested. */ -#define GNULIB_TEST_ISNANL 1 - -/* Define to 1 when the gnulib module iswblank should be tested. */ -#define GNULIB_TEST_ISWBLANK 1 - -/* Define to 1 when the gnulib module iswdigit should be tested. */ -#define GNULIB_TEST_ISWDIGIT 1 - -/* Define to 1 when the gnulib module iswxdigit should be tested. */ -#define GNULIB_TEST_ISWXDIGIT 1 - -/* Define to 1 when the gnulib module listen should be tested. */ -#define GNULIB_TEST_LISTEN 1 - -/* Define to 1 when the gnulib module localeconv should be tested. */ -#define GNULIB_TEST_LOCALECONV 1 - -/* Define to 1 when the gnulib module localename should be tested. */ -#define GNULIB_TEST_LOCALENAME 1 - -/* Define to 1 when the gnulib module localtime should be tested. */ -#define GNULIB_TEST_LOCALTIME 1 - -/* Define to 1 when the gnulib module log10 should be tested. */ -#define GNULIB_TEST_LOG10 1 - -/* Define to 1 when the gnulib module lseek should be tested. */ -#define GNULIB_TEST_LSEEK 1 - -/* Define to 1 when the gnulib module lstat should be tested. */ -#define GNULIB_TEST_LSTAT 1 - -/* Define to 1 when the gnulib module malloc-posix should be tested. */ -#define GNULIB_TEST_MALLOC_POSIX 1 - -/* Define to 1 when the gnulib module mbrlen should be tested. */ -#define GNULIB_TEST_MBRLEN 1 - -/* Define to 1 when the gnulib module mbrtowc should be tested. */ -#define GNULIB_TEST_MBRTOWC 1 - -/* Define to 1 when the gnulib module mbsinit should be tested. */ -#define GNULIB_TEST_MBSINIT 1 - -/* Define to 1 when the gnulib module mbslen should be tested. */ -#define GNULIB_TEST_MBSLEN 1 - -/* Define to 1 when the gnulib module mbsrtowcs should be tested. */ -#define GNULIB_TEST_MBSRTOWCS 1 - -/* Define to 1 when the gnulib module mbsstr should be tested. */ -#define GNULIB_TEST_MBSSTR 1 - -/* Define to 1 when the gnulib module mbtowc should be tested. */ -#define GNULIB_TEST_MBTOWC 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module mempcpy should be tested. */ -#define GNULIB_TEST_MEMPCPY 1 - -/* Define to 1 when the gnulib module mkdtemp should be tested. */ -#define GNULIB_TEST_MKDTEMP 1 - -/* Define to 1 when the gnulib module nanosleep should be tested. */ -#define GNULIB_TEST_NANOSLEEP 1 - -/* Define to 1 when the gnulib module nl_langinfo should be tested. */ -#define GNULIB_TEST_NL_LANGINFO 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module opendir should be tested. */ -#define GNULIB_TEST_OPENDIR 1 - -/* Define to 1 when the gnulib module perror should be tested. */ -#define GNULIB_TEST_PERROR 1 - -/* Define to 1 when the gnulib module pipe should be tested. */ -#define GNULIB_TEST_PIPE 1 - -/* Define to 1 when the gnulib module pipe2 should be tested. */ -#define GNULIB_TEST_PIPE2 1 - -/* Define to 1 when the gnulib module posix_spawnattr_destroy should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1 - -/* Define to 1 when the gnulib module posix_spawnattr_init should be tested. - */ -#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1 - -/* Define to 1 when the gnulib module posix_spawnattr_setflags should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1 - -/* Define to 1 when the gnulib module posix_spawnattr_setsigmask should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1 - -/* Define to 1 when the gnulib module posix_spawnp should be tested. */ -#define GNULIB_TEST_POSIX_SPAWNP 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_addclose should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_adddup2 should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_addopen should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_destroy should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_init should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1 - -/* Define to 1 when the gnulib module pthread_sigmask should be tested. */ -#define GNULIB_TEST_PTHREAD_SIGMASK 1 - -/* Define to 1 when the gnulib module pthread-thread should be tested. */ -#define GNULIB_TEST_PTHREAD_THREAD 1 - -/* Define to 1 when the gnulib module putenv should be tested. */ -#define GNULIB_TEST_PUTENV 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module rawmemchr should be tested. */ -#define GNULIB_TEST_RAWMEMCHR 1 - -/* Define to 1 when the gnulib module read should be tested. */ -#define GNULIB_TEST_READ 1 - -/* Define to 1 when the gnulib module readdir should be tested. */ -#define GNULIB_TEST_READDIR 1 - -/* Define to 1 when the gnulib module readlink should be tested. */ -#define GNULIB_TEST_READLINK 1 - -/* Define to 1 when the gnulib module realloc-posix should be tested. */ -#define GNULIB_TEST_REALLOC_POSIX 1 - -/* Define to 1 when the gnulib module realpath should be tested. */ -#define GNULIB_TEST_REALPATH 1 - -/* Define to 1 when the gnulib module rmdir should be tested. */ -#define GNULIB_TEST_RMDIR 1 - -/* Define to 1 when the gnulib module secure_getenv should be tested. */ -#define GNULIB_TEST_SECURE_GETENV 1 - -/* Define to 1 when the gnulib module select should be tested. */ -#define GNULIB_TEST_SELECT 1 - -/* Define to 1 when the gnulib module setenv should be tested. */ -#define GNULIB_TEST_SETENV 1 - -/* Define to 1 when the gnulib module setlocale should be tested. */ -#define GNULIB_TEST_SETLOCALE 1 - -/* Define to 1 when the gnulib module setlocale_null should be tested. */ -#define GNULIB_TEST_SETLOCALE_NULL 1 - -/* Define to 1 when the gnulib module setsockopt should be tested. */ -#define GNULIB_TEST_SETSOCKOPT 1 - -/* Define to 1 when the gnulib module sigaction should be tested. */ -#define GNULIB_TEST_SIGACTION 1 - -/* Define to 1 when the gnulib module signbit should be tested. */ -#define GNULIB_TEST_SIGNBIT 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module sleep should be tested. */ -#define GNULIB_TEST_SLEEP 1 - -/* Define to 1 when the gnulib module snprintf should be tested. */ -#define GNULIB_TEST_SNPRINTF 1 - -/* Define to 1 when the gnulib module socket should be tested. */ -#define GNULIB_TEST_SOCKET 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module stpcpy should be tested. */ -#define GNULIB_TEST_STPCPY 1 - -/* Define to 1 when the gnulib module stpncpy should be tested. */ -#define GNULIB_TEST_STPNCPY 1 - -/* Define to 1 when the gnulib module strchrnul should be tested. */ -#define GNULIB_TEST_STRCHRNUL 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module strerror_r should be tested. */ -#define GNULIB_TEST_STRERROR_R 1 - -/* Define to 1 when the gnulib module strnlen should be tested. */ -#define GNULIB_TEST_STRNLEN 1 - -/* Define to 1 when the gnulib module strpbrk should be tested. */ -#define GNULIB_TEST_STRPBRK 1 - -/* Define to 1 when the gnulib module strstr should be tested. */ -#define GNULIB_TEST_STRSTR 1 - -/* Define to 1 when the gnulib module symlink should be tested. */ -#define GNULIB_TEST_SYMLINK 1 - -/* Define to 1 when the gnulib module unlink should be tested. */ -#define GNULIB_TEST_UNLINK 1 - -/* Define to 1 when the gnulib module unsetenv should be tested. */ -#define GNULIB_TEST_UNSETENV 1 - -/* Define to 1 when the gnulib module usleep should be tested. */ -#define GNULIB_TEST_USLEEP 1 - -/* Define to 1 when the gnulib module utime should be tested. */ -#define GNULIB_TEST_UTIME 1 - -/* Define to 1 when the gnulib module vasprintf should be tested. */ -#define GNULIB_TEST_VASPRINTF 1 - -/* Define to 1 when the gnulib module vsnprintf should be tested. */ -#define GNULIB_TEST_VSNPRINTF 1 - -/* Define to 1 when the gnulib module waitpid should be tested. */ -#define GNULIB_TEST_WAITPID 1 - -/* Define to 1 when the gnulib module wcrtomb should be tested. */ -#define GNULIB_TEST_WCRTOMB 1 - -/* Define to 1 when the gnulib module wctob should be tested. */ -#define GNULIB_TEST_WCTOB 1 - -/* Define to 1 when the gnulib module wctomb should be tested. */ -#define GNULIB_TEST_WCTOMB 1 - -/* Define to 1 when the gnulib module wcwidth should be tested. */ -#define GNULIB_TEST_WCWIDTH 1 - -/* Define to 1 when the gnulib module wmemchr should be tested. */ -#define GNULIB_TEST_WMEMCHR 1 - -/* Define to 1 when the gnulib module wmempcpy should be tested. */ -#define GNULIB_TEST_WMEMPCPY 1 - -/* Define to 1 when the gnulib module write should be tested. */ -#define GNULIB_TEST_WRITE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u16-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U16_MBTOUC 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUC 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUCR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc-unsafe shall be considered - present. */ -#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-uctomb shall be considered present. */ -#define GNULIB_UNISTR_U8_UCTOMB 1 - -/* Define to 1 if you have the `aclsort' function. */ -/* #undef HAVE_ACLSORT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ACLV_H */ - -/* Define to 1 if you have the `aclx_get' function. */ -/* #undef HAVE_ACLX_GET */ - -/* Define to 1 if you have the `acl_copy_ext_native' function. */ -/* #undef HAVE_ACL_COPY_EXT_NATIVE */ - -/* Define to 1 if you have the `acl_create_entry_np' function. */ -/* #undef HAVE_ACL_CREATE_ENTRY_NP */ - -/* Define to 1 if you have the `acl_delete_def_file' function. */ -/* #undef HAVE_ACL_DELETE_DEF_FILE */ - -/* Define to 1 if you have the `acl_delete_fd_np' function. */ -/* #undef HAVE_ACL_DELETE_FD_NP */ - -/* Define to 1 if you have the `acl_delete_file_np' function. */ -/* #undef HAVE_ACL_DELETE_FILE_NP */ - -/* Define to 1 if you have the `acl_entries' function. */ -/* #undef HAVE_ACL_ENTRIES */ - -/* Define to 1 if you have the `acl_extended_file' function. */ -/* #undef HAVE_ACL_EXTENDED_FILE */ - -/* Define to 1 if the constant ACL_FIRST_ENTRY exists. */ -/* #undef HAVE_ACL_FIRST_ENTRY */ - -/* Define to 1 if you have the `acl_free' function. */ -/* #undef HAVE_ACL_FREE */ - -/* Define to 1 if you have the `acl_free_text' function. */ -/* #undef HAVE_ACL_FREE_TEXT */ - -/* Define to 1 if you have the `acl_from_mode' function. */ -/* #undef HAVE_ACL_FROM_MODE */ - -/* Define to 1 if you have the `acl_from_text' function. */ -/* #undef HAVE_ACL_FROM_TEXT */ - -/* Define to 1 if you have the `acl_get_fd' function. */ -/* #undef HAVE_ACL_GET_FD */ - -/* Define to 1 if you have the `acl_get_file' function. */ -/* #undef HAVE_ACL_GET_FILE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ACL_LIBACL_H */ - -/* Define to 1 if you have the `acl_set_fd' function. */ -/* #undef HAVE_ACL_SET_FD */ - -/* Define to 1 if you have the `acl_set_file' function. */ -/* #undef HAVE_ACL_SET_FILE */ - -/* Define to 1 if you have the `acl_to_short_text' function. */ -/* #undef HAVE_ACL_TO_SHORT_TEXT */ - -/* Define to 1 if you have the `acl_trivial' function. */ -/* #undef HAVE_ACL_TRIVIAL */ - -/* Define to 1 if the ACL type ACL_TYPE_EXTENDED exists. */ -/* #undef HAVE_ACL_TYPE_EXTENDED */ - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_NAMESER_H */ - -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_BCRYPT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if you have the `btowc' function. */ -#define HAVE_BTOWC 1 - -/* Define to 1 if nanosleep mishandles large arguments. */ -/* #undef HAVE_BUG_BIG_NANOSLEEP */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BYTESWAP_H */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the `catgets' function. */ -/* #undef HAVE_CATGETS */ - -/* Define to 1 if you have the Mac OS X function - CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define to 1 if you have the `chown' function. */ -/* #undef HAVE_CHOWN */ - -/* Define to 1 if you have the `chsize' function. */ -#define HAVE_CHSIZE 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -/* #undef HAVE_CLOCK_GETTIME */ - -/* Define to 1 if you have the `clock_settime' function. */ -/* #undef HAVE_CLOCK_SETTIME */ - -/* Define to 1 if you have the `closedir' function. */ -/* #undef HAVE_CLOSEDIR */ - -/* Define to 1 if you have the `confstr' function. */ -/* #undef HAVE_CONFSTR */ - -/* Define if the copysignf function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNF_IN_LIBC */ - -/* Define if the copysignl function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNL_IN_LIBC */ - -/* Define if the copysign function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGN_IN_LIBC */ - -/* Define to 1 if you have the `copy_file_range' function. */ -/* #undef HAVE_COPY_FILE_RANGE */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. - */ -#define HAVE_DECL_ALARM 0 - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `copysign', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGN */ - -/* Define to 1 if you have the declaration of `copysignf', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNF */ - -/* Define to 1 if you have the declaration of `copysignl', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNL */ - -/* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't. - */ -#define HAVE_DECL_DIRFD 0 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't. - */ -#define HAVE_DECL_FTELLO 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getdelim', and to 0 if you - don't. */ -#define HAVE_DECL_GETDELIM 0 - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `getline', and to 0 if you - don't. */ -#define HAVE_DECL_GETLINE 0 - -/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you - don't. */ -#define HAVE_DECL_INET_PTON 1 - -/* Define to 1 if you have the declaration of `isblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISBLANK 1 - -/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. - */ -#define HAVE_DECL_ISINF 1 - -/* Define to 1 if you have the declaration of `iswblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISWBLANK 1 - -/* Define to 1 if you have the declaration of `mbrlen', and to 0 if you don't. - */ -/* #undef HAVE_DECL_MBRLEN */ - -/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBRTOWC */ - -/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you - don't. */ -#define HAVE_DECL_MBSINIT 1 - -/* Define to 1 if you have the declaration of `mbsrtowcs', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBSRTOWCS */ - -/* Define to 1 if you have a declaration of mbswidth() in , and to 0 - otherwise. */ -#define HAVE_DECL_MBSWIDTH_IN_WCHAR_H 0 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. - */ -#define HAVE_DECL_SETENV 0 - -/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't. - */ -#define HAVE_DECL_SLEEP 0 - -/* Define to 1 if you have the declaration of `snprintf', and to 0 if you - don't. */ -#define HAVE_DECL_SNPRINTF 0 - -/* Define to 1 if you have the declaration of `stpncpy', and to 0 if you - don't. */ -#define HAVE_DECL_STPNCPY 0 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 1 - -/* Define to 1 if you have the declaration of `towlower', and to 0 if you - don't. */ -/* #undef HAVE_DECL_TOWLOWER */ - -/* Define to 1 if you have the declaration of `unsetenv', and to 0 if you - don't. */ -#define HAVE_DECL_UNSETENV 0 - -/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VSNPRINTF 1 - -/* Define to 1 if you have the declaration of `wcrtomb', and to 0 if you - don't. */ -/* #undef HAVE_DECL_WCRTOMB */ - -/* Define to 1 if you have the declaration of `wctob', and to 0 if you don't. - */ -/* #undef HAVE_DECL_WCTOB */ - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 0 - -/* Define to 1 if you have the declaration of `_putenv', and to 0 if you - don't. */ -#define HAVE_DECL__PUTENV 1 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DIRENT_H */ - -/* Define to 1 if you have the `dirfd' function. */ -/* #undef HAVE_DIRFD */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DL_H */ - -/* Define to 1 if you have the `duplocale' function. */ -/* #undef HAVE_DUPLOCALE */ - -/* Define if you have the declaration of environ. */ -#define HAVE_ENVIRON_DECL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the `explicit_bzero' function. */ -/* #undef HAVE_EXPLICIT_BZERO */ - -/* Define to 1 if you have the `explicit_memset' function. */ -/* #undef HAVE_EXPLICIT_MEMSET */ - -/* Define to 1 if you have the `facl' function. */ -/* #undef HAVE_FACL */ - -/* Define if the locale_t type contains insufficient information, as on - OpenBSD. */ -/* #undef HAVE_FAKE_LOCALES */ - -/* Define to 1 if you have the `fchmod' function. */ -/* #undef HAVE_FCHMOD */ - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `flockfile' function. */ -/* #undef HAVE_FLOCKFILE */ - -/* Define to 1 if you have the `fnmatch' function. */ -/* #undef HAVE_FNMATCH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FNMATCH_H */ - -/* Define to 1 if you have the `fork' function. */ -/* #undef HAVE_FORK */ - -/* Define to 1 if you have the `freelocale' function. */ -/* #undef HAVE_FREELOCALE */ - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -/* #undef HAVE_FSEEKO */ - -/* Define to 1 if you have the `fsync' function. */ -/* #undef HAVE_FSYNC */ - -/* Define to 1 if you have the `ftruncate' function. */ -/* #undef HAVE_FTRUNCATE */ - -/* Define to 1 if you have the `funlockfile' function. */ -/* #undef HAVE_FUNLOCKFILE */ - -/* Define to 1 if you have the `futimens' function. */ -/* #undef HAVE_FUTIMENS */ - -/* Define to 1 if you have the `futimes' function. */ -/* #undef HAVE_FUTIMES */ - -/* Define to 1 if you have the `futimesat' function. */ -/* #undef HAVE_FUTIMESAT */ - -/* Define to 1 if you have the `getacl' function. */ -/* #undef HAVE_GETACL */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getdelim' function. */ -/* #undef HAVE_GETDELIM */ - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the `gethostbyname' function. */ -/* #undef HAVE_GETHOSTBYNAME */ - -/* Define to 1 if you have the `gethostname' function. */ -/* #undef HAVE_GETHOSTNAME */ - -/* Define to 1 if you have the `getlocalename_l' function. */ -/* #undef HAVE_GETLOCALENAME_L */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getopt_long_only' function. */ -/* #undef HAVE_GETOPT_LONG_ONLY */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define to 1 if you have the `getppriv' function. */ -/* #undef HAVE_GETPPRIV */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define to 1 if you have the `getrandom' function. */ -/* #undef HAVE_GETRANDOM */ - -/* Define to 1 if you have the `getrlimit' function. */ -/* #undef HAVE_GETRLIMIT */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ICONV_H 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -/* #undef HAVE_INET_NTOP */ - -/* Define to 1 if you have the `inet_pton' function. */ -/* #undef HAVE_INET_PTON */ - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the `ioctl' function. */ -/* #undef HAVE_IOCTL */ - -/* Define to 1 if defines AF_INET. */ -#define HAVE_IPV4 1 - -/* Define if defines AF_INET6. */ -#define HAVE_IPV6 1 - -/* Define to 1 if you have the `isascii' function. */ -/* #undef HAVE_ISASCII */ - -/* Define to 1 if you have the `isblank' function. */ -#define HAVE_ISBLANK 1 - -/* Define if the isnan(double) function is available in libc. */ -#define HAVE_ISNAND_IN_LIBC 1 - -/* Define if the isnan(float) function is available in libc. */ -/* #undef HAVE_ISNANF_IN_LIBC */ - -/* Define if the isnan(long double) function is available in libc. */ -/* #undef HAVE_ISNANL_IN_LIBC */ - -/* Define to 1 if you have the `issetugid' function. */ -/* #undef HAVE_ISSETUGID */ - -/* Define to 1 if you have the `iswblank' function. */ -#define HAVE_ISWBLANK 1 - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define to 1 if you have the `iswctype' function. */ -#define HAVE_ISWCTYPE 1 - -/* Define if you have and nl_langinfo(CODESET). */ -/* #undef HAVE_LANGINFO_CODESET */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LANGINFO_H */ - -/* Define if your file defines LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBINTL_H 1 - -/* Define if you have the libtextstyle library. */ -/* #undef HAVE_LIBTEXTSTYLE */ - -/* Define if you have the libunistring library. */ -/* #undef HAVE_LIBUNISTRING */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBXML2_LIBXML_XMLEXPORTS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBXML2_LIBXML_XMLVERSION_H 1 - -/* Define to 1 if the bcrypt library is guaranteed to be present. */ -#define HAVE_LIB_BCRYPT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `localtime' function. */ -#define HAVE_LOCALTIME 1 - -/* Define to 1 if you support file names longer than 14 characters. */ -#define HAVE_LONG_FILE_NAMES 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the `lutimes' function. */ -/* #undef HAVE_LUTIMES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACH_O_DYLD_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define if the 'malloc' function is POSIX compliant. */ -/* #undef HAVE_MALLOC_POSIX */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the `mbrlen' function. */ -#define HAVE_MBRLEN 1 - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the `mbsinit' function. */ -/* #undef HAVE_MBSINIT */ - -/* Define to 1 if you have the `mbslen' function. */ -/* #undef HAVE_MBSLEN */ - -/* Define to 1 if you have the `mbsrtowcs' function. */ -#define HAVE_MBSRTOWCS 1 - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `mbtowc' function. */ -#define HAVE_MBTOWC 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ - -/* Define to 1 if you have the `memset' function. */ -/* #undef HAVE_MEMSET */ - -/* Define to 1 if you have the `memset_s' function. */ -/* #undef HAVE_MEMSET_S */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_LIMITS_H */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_SYS_PARAM_H */ - -/* Define to 1 if you have the `mkdtemp' function. */ -/* #undef HAVE_MKDTEMP */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 if you have the `mquery' function. */ -/* #undef HAVE_MQUERY */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define if the locale_t type does not contain the name of each locale - category. */ -/* #undef HAVE_NAMELESS_LOCALES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETDB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_H */ - -/* Define to 1 if you have the `newlocale' function. */ -/* #undef HAVE_NEWLOCALE */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -/* #undef HAVE_NL_LANGINFO */ - -/* Define to 1 if the system has obstacks that work with any size object. */ -/* #undef HAVE_OBSTACK */ - -/* Define to 1 if you have the `opendir' function. */ -/* #undef HAVE_OPENDIR */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OS_H */ - -/* Define to 1 if you have the `pathconf' function. */ -/* #undef HAVE_PATHCONF */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PATHS_H */ - -/* Define to 1 if you have the `pipe' function. */ -/* #undef HAVE_PIPE */ - -/* Define to 1 if you have the `pipe2' function. */ -/* #undef HAVE_PIPE2 */ - -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - -/* Define to 1 if you have the `posix_spawn' function. */ -/* #undef HAVE_POSIX_SPAWN */ - -/* Define to 1 if the system has the type `posix_spawnattr_t'. */ -/* #undef HAVE_POSIX_SPAWNATTR_T */ - -/* Define to 1 if the system has the type `posix_spawn_file_actions_t'. */ -/* #undef HAVE_POSIX_SPAWN_FILE_ACTIONS_T */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PRIV_H */ - -/* Define to 1 if you have the `pstat_getprocvm' function. */ -/* #undef HAVE_PSTAT_GETPROCVM */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define to 1 if you have the `pthread_atfork' function. */ -/* #undef HAVE_PTHREAD_ATFORK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PTHREAD_H */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if the pthread_sigmask function can be used (despite bugs). */ -/* #undef HAVE_PTHREAD_SIGMASK */ - -/* Define to 1 if the system has the type `pthread_spinlock_t'. */ -/* #undef HAVE_PTHREAD_SPINLOCK_T */ - -/* Define to 1 if the system has the type `pthread_t'. */ -/* #undef HAVE_PTHREAD_T */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PWD_H */ - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `rawmemchr' function. */ -/* #undef HAVE_RAWMEMCHR */ - -/* Define to 1 if you have the `readdir' function. */ -/* #undef HAVE_READDIR */ - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the `readlinkat' function. */ -/* #undef HAVE_READLINKAT */ - -/* Define if the 'realloc' function is POSIX compliant. */ -/* #undef HAVE_REALLOC_POSIX */ - -/* Define to 1 if you have the `realpath' function. */ -/* #undef HAVE_REALPATH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RESOLV_H */ - -/* Define to 1 if 'long double' and 'double' have the same representation. */ -#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1 - -/* Define to 1 if the system has the type `sa_family_t'. */ -/* #undef HAVE_SA_FAMILY_T */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SCHED_H */ - -/* Define to 1 if you have the `sched_setparam' function. */ -/* #undef HAVE_SCHED_SETPARAM */ - -/* Define to 1 if you have the `sched_setscheduler' function. */ -/* #undef HAVE_SCHED_SETSCHEDULER */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `secure_getenv' function. */ -/* #undef HAVE_SECURE_GETENV */ - -/* Define to 1 if you have the `select' function. */ -/* #undef HAVE_SELECT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SEMAPHORE_H */ - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `setegid' function. */ -/* #undef HAVE_SETEGID */ - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `seteuid' function. */ -/* #undef HAVE_SETEUID */ - -/* Define to 1 if you have the `setrlimit' function. */ -/* #undef HAVE_SETRLIMIT */ - -/* Define to 1 if you have the `shutdown' function. */ -/* #undef HAVE_SHUTDOWN */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if you have the `sigaltstack' function. */ -/* #undef HAVE_SIGALTSTACK */ - -/* Define to 1 if defines the siginfo_t type, and struct sigaction - has the sa_sigaction member and the SA_SIGINFO flag. */ -/* #undef HAVE_SIGINFO */ - -/* Define to 1 if the system has the type `siginfo_t'. */ -/* #undef HAVE_SIGINFO_T */ - -/* Define to 1 if you have the `siginterrupt' function. */ -/* #undef HAVE_SIGINTERRUPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if the system has the type `sig_atomic_t'. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if you have the `sleep' function. */ -/* #undef HAVE_SLEEP */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the return value of the snprintf function is the number of of - bytes (excluding the terminating NUL) that would have been produced if the - buffer had been large enough. */ -/* #undef HAVE_SNPRINTF_RETVAL_C99 */ - -/* Define if the locale_t type is as on Solaris 11.4. */ -/* #undef HAVE_SOLARIS114_LOCALES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SPAWN_H */ - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if you have the `statacl' function. */ -/* #undef HAVE_STATACL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define if you have the stpncpy() function and it works. */ -/* #undef HAVE_STPNCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strchrnul' function. */ -/* #undef HAVE_STRCHRNUL */ - -/* Define to 1 if you have the `strcspn' function. */ -#define HAVE_STRCSPN 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strpbrk' function. */ -#define HAVE_STRPBRK 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `decimal_point' is a member of `struct lconv'. */ -/* #undef HAVE_STRUCT_LCONV_DECIMAL_POINT */ - -/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ -/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ - -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ACL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CDEFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOCTL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_RANDOM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_WAIT_H */ - -/* Define to 1 if you have the `tcdrain' function. */ -/* #undef HAVE_TCDRAIN */ - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the `towlower' function. */ -/* #undef HAVE_TOWLOWER */ - -/* Define to 1 if you have the `tsearch' function. */ -/* #undef HAVE_TSEARCH */ - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if you have the `unsetenv' function. */ -/* #undef HAVE_UNSETENV */ - -/* Define to 1 if the system has the type `unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define to 1 if you have the `uselocale' function. */ -/* #undef HAVE_USELOCALE */ - -/* Define to 1 if you have the `usleep' function. */ -/* #undef HAVE_USLEEP */ - -/* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 - -/* Define to 1 if you have the `utimensat' function. */ -/* #undef HAVE_UTIMENSAT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UTIME_H */ - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 if you have the `vasnprintf' function. */ -/* #undef HAVE_VASNPRINTF */ - -/* Define to 1 if you have the `vasprintf' function. */ -/* #undef HAVE_VASPRINTF */ - -/* Define to 1 if you have the `vfork' function. */ -/* #undef HAVE_VFORK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VFORK_H */ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if you have the `waitid' function. */ -/* #undef HAVE_WAITID */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -/* #undef HAVE_WCSLEN */ - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if you have the `wctob' function. */ -#define HAVE_WCTOB 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -/* #undef HAVE_WCWIDTH */ - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if you have the `wmempcpy' function. */ -/* #undef HAVE_WMEMPCPY */ - -/* Define to 1 if `fork' works. */ -/* #undef HAVE_WORKING_FORK */ - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define if the uselocale function exists any may safely be called. */ -/* #undef HAVE_WORKING_USELOCALE */ - -/* Define if utimes works properly. */ -/* #undef HAVE_WORKING_UTIMES */ - -/* Define to 1 if `vfork' works. */ -/* #undef HAVE_WORKING_VFORK */ - -/* Define to 1 if you have the `wprintf' function. */ -#define HAVE_WPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WS2TCPIP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_XLOCALE_H */ - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_ftelli64' function. */ -#define HAVE__FTELLI64 1 - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if the compiler supports __builtin_expect, - and to 2 if does. */ -/* #undef HAVE___BUILTIN_EXPECT */ -#ifndef HAVE___BUILTIN_EXPECT -# define __builtin_expect(e, c) (e) -#elif HAVE___BUILTIN_EXPECT == 2 -# include -#endif - - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define to 1 if the compiler supports the keyword '__inline'. */ -#define HAVE___INLINE 1 - -/* Define to 1 if you have the `__secure_getenv' function. */ -/* #undef HAVE___SECURE_GETENV */ - -/* Define to 1 if you have the `__xpg_strerror_r' function. */ -/* #undef HAVE___XPG_STRERROR_R */ - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -#define INSTALLPREFIX "/cygdrive/c/software.b/gettext-0.21" - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'long double'. */ -#define LDBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'long double'. */ -#define LDBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'long - double'. */ -/* #undef LDBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'long double'. */ -/* #undef LDBL_SIGNBIT_WORD */ - -/* Define if libxml is being used as a static library. */ -/* #undef LIBXML_STATIC */ - -/* Define to 1 if lseek does not detect pipes. */ -#define LSEEK_PIPE_BROKEN 1 - -/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing - slash. */ -/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Define if the mbrtowc function does not return (size_t) -2 for empty input. - */ -#define MBRTOWC_EMPTY_INPUT_BUG 1 - -/* Define if the mbrtowc function may signal encoding errors in the C locale. - */ -/* #undef MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ */ - -/* Define if the mbrtowc function has the NULL pwc argument bug. */ -/* #undef MBRTOWC_NULL_ARG1_BUG */ - -/* Define if the mbrtowc function has the NULL string argument bug. */ -/* #undef MBRTOWC_NULL_ARG2_BUG */ - -/* Define if the mbrtowc function does not return 0 for a NUL character. */ -/* #undef MBRTOWC_NUL_RETVAL_BUG */ - -/* Define if the mbrtowc function returns a wrong return value. */ -#define MBRTOWC_RETVAL_BUG 1 - -/* Define if the mbrtowc function stores a wide character when reporting - incomplete input. */ -#define MBRTOWC_STORES_INCOMPLETE_BUG 1 - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define to 1 on musl libc. */ -/* #undef MUSL_LIBC */ - -/* Define to 1 to enable general improvements of setlocale. */ -#define NEED_SETLOCALE_IMPROVED 1 - -/* Define to 1 to enable a multithread-safety fix of setlocale. */ -#define NEED_SETLOCALE_MTSAFE 0 - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "gettext-tools" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "bug-gettext@gnu.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gettext-tools" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-tools 0.21" - -/* Define to the suffix of this package */ -#define PACKAGE_SUFFIX "-0.21" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gettext-tools" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.21" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if pthread_create is an inline function. */ -/* #undef PTHREAD_CREATE_IS_INLINE */ - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to 1 if pthread_sigmask(), when it fails, returns -1 and sets errno. - */ -/* #undef PTHREAD_SIGMASK_FAILS_WITH_ERRNO */ - -/* Define to 1 if pthread_sigmask may return 0 and have no effect. */ -/* #undef PTHREAD_SIGMASK_INEFFECTIVE */ - -/* Define to 1 if pthread_sigmask() unblocks signals incorrectly. */ -/* #undef PTHREAD_SIGMASK_UNBLOCK_BUG */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -/* #undef READLINK_TRAILING_SLASH_BUG */ - -/* Define to 1 if gnulib's dirfd() replacement is used. */ -/* #undef REPLACE_DIRFD */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define if nl_langinfo exists but is overridden by gnulib. */ -/* #undef REPLACE_NL_LANGINFO */ - -/* Define if gnulib uses its own posix_spawn and posix_spawnp functions. */ -#define REPLACE_POSIX_SPAWN 1 - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define if vasnprintf exists but is overridden by gnulib. */ -/* #undef REPLACE_VASNPRINTF */ - -/* Define as const if the declaration of setlocale() needs const. */ -#define SETLOCALE_CONST - -/* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ALL_MTSAFE 1 - -/* Define to 1 if setlocale (category, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ONE_MTSAFE 1 - -/* File name of the Bourne shell. */ -#if defined __CYGWIN__ || defined __ANDROID__ -/* Omit the directory part because - - For 32-bit Cygwin programs in a 64-bit Cygwin environment, the Cygwin - mounts are not visible. - - On Android, /bin/sh does not exist. It's /system/bin/sh instead. */ -# define BOURNE_SHELL "sh" -#else -# define BOURNE_SHELL "/bin/sh" -#endif - -/* Define if lists must be signal-safe. */ -#define SIGNAL_SAFE_LIST 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define to 1 if unlink (dir) cannot possibly succeed. */ -#define UNLINK_CANNOT_UNLINK_DIR 1 - -/* Define to 1 if unlink() on a parent directory may succeed */ -/* #undef UNLINK_PARENT_BUG */ - -/* Define to the prefix of C symbols at the assembler and linker level, either - an underscore or empty. */ -#define USER_LABEL_PREFIX _ - -/* Define to nonzero if you want access control list support. */ -#define USE_ACL 0 - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Define to a working va_copy macro or replacement. */ -#define VA_COPY va_copy - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to 1 if unsetenv returns void instead of int. */ -/* #undef VOID_UNSETENV */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define if the wcrtomb function does not work in the C locale. */ -/* #undef WCRTOMB_C_LOCALE_BUG */ - -/* Define if the wcrtomb function has an incorrect return value. */ -/* #undef WCRTOMB_RETVAL_BUG */ - -/* Define if WSAStartup is needed. */ -#define WINDOWS_SOCKETS 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define when --enable-shared is used on mingw or Cygwin. */ -#define WOE32DLL 1 - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 to internationalize bison runtime messages. */ -#define YYENABLE_NLS 1 - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -/* #undef _LARGEFILE_SOURCE */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 on Solaris. */ -/* #undef _LCONV_C99 */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 in order to get the POSIX compatible declarations of socket - functions. */ -/* #undef _POSIX_PII_SOCKET */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define if you want to include , so that it consistently - overrides 's RE_DUP_MAX. */ -#define _REGEX_INCLUDE_LIMITS_H 1 - -/* Define if you want regoff_t to be at least as wide POSIX requires. */ -#define _REGEX_LARGE_OFFSETS 1 - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Define as 'access' if you don't have the eaccess() function. */ -#define eaccess access - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b)) - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#ifndef _GL_UNUSED -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -# else -# define _GL_UNUSED -# endif -#endif - -/* The __pure__ attribute was added in gcc 2.96. */ -#ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define _GL_ATTRIBUTE_PURE /* empty */ -# endif -#endif - - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Define to long or long long if and don't define. */ -/* #undef intmax_t */ - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `long int' if does not define. */ -/* #undef off_t */ - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to rpl_re_comp if the replacement should be used. */ -#define re_comp rpl_re_comp - -/* Define to rpl_re_compile_fastmap if the replacement should be used. */ -#define re_compile_fastmap rpl_re_compile_fastmap - -/* Define to rpl_re_compile_pattern if the replacement should be used. */ -#define re_compile_pattern rpl_re_compile_pattern - -/* Define to rpl_re_exec if the replacement should be used. */ -#define re_exec rpl_re_exec - -/* Define to rpl_re_match if the replacement should be used. */ -#define re_match rpl_re_match - -/* Define to rpl_re_match_2 if the replacement should be used. */ -#define re_match_2 rpl_re_match_2 - -/* Define to rpl_re_search if the replacement should be used. */ -#define re_search rpl_re_search - -/* Define to rpl_re_search_2 if the replacement should be used. */ -#define re_search_2 rpl_re_search_2 - -/* Define to rpl_re_set_registers if the replacement should be used. */ -#define re_set_registers rpl_re_set_registers - -/* Define to rpl_re_set_syntax if the replacement should be used. */ -#define re_set_syntax rpl_re_set_syntax - -/* Define to rpl_re_syntax_options if the replacement should be used. */ -#define re_syntax_options rpl_re_syntax_options - -/* Define to rpl_regcomp if the replacement should be used. */ -#define regcomp rpl_regcomp - -/* Define to rpl_regerror if the replacement should be used. */ -#define regerror rpl_regerror - -/* Define to rpl_regexec if the replacement should be used. */ -#define regexec rpl_regexec - -/* Define to rpl_regfree if the replacement should be used. */ -#define regfree rpl_regfree - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define as an integer type suitable for memory locations that can be - accessed atomically even in the presence of asynchronous signals. */ -/* #undef sig_atomic_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* type to use in place of socklen_t if not defined */ -/* #undef socklen_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - -/* Define to an unsigned 32-bit type if lacks this type. */ -#define useconds_t unsigned int - -/* Define as a macro for copying va_list variables. */ -/* #undef va_copy */ - -/* Define as `fork' if `vfork' does not work. */ -#define vfork fork - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded - - - -#ifndef ENDIANNESS -# if defined __BIG_ENDIAN__ -# define ENDIANNESS 0 -# endif -# if defined __LITTLE_ENDIAN__ -# define ENDIANNESS 0 -# endif -#endif - - - -/* A file name cannot consist of any character possible. INVALID_PATH_CHAR - contains the characters not allowed. */ -#if defined _MSC_VER || defined __MINGW32__ -/* Woe32. This string is valid for Windows NT/2000. On Windows 95/98/ME some - few characters in the range 0x80..0xff are invalid as well, but this doesn't - matter much for our purposes. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\"*/:<>?\\|" -#elif defined MSDOS -/* Something like this for MSDOG. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 \177\\:." -#else -/* Unix. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 \177/" -#endif - -/* This is the page width for the message_print function. It should - not be set to more than 79 characters (Emacs users will appreciate - it). It is used to wrap the msgid and msgstr strings, and also to - wrap the file position (#:) comments. */ -#define PAGE_WIDTH 79 - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if defined WOE32DLL && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#if defined __EMX__ && !defined __KLIBC__ -# include "intl/os2compat.h" -#endif - diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/configmake.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/configmake.h deleted file mode 100644 index 3521af1a1..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/configmake.h +++ /dev/null @@ -1,31 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#if HAVE_WINSOCK2_H -# include /* avoid mingw pollution on DATADIR */ -#endif -#define PREFIX "/cygdrive/c/software.b/gettext-0.21" -#define EXEC_PREFIX "/cygdrive/c/software.b/gettext-0.21" -#define BINDIR "/cygdrive/c/software.b/gettext-0.21/bin" -#define SBINDIR "/cygdrive/c/software.b/gettext-0.21/sbin" -#define LIBEXECDIR "/cygdrive/c/software.b/gettext-0.21/libexec" -#define DATAROOTDIR "/cygdrive/c/software.b/gettext-0.21/share" -#define DATADIR "/cygdrive/c/software.b/gettext-0.21/share" -#define SYSCONFDIR "/cygdrive/c/software.b/gettext-0.21/etc" -#define SHAREDSTATEDIR "/cygdrive/c/software.b/gettext-0.21/com" -#define LOCALSTATEDIR "/cygdrive/c/software.b/gettext-0.21/var" -#define RUNSTATEDIR "/cygdrive/c/software.b/gettext-0.21/var/run" -#define INCLUDEDIR "/cygdrive/c/software.b/gettext-0.21/include" -#define OLDINCLUDEDIR "/usr/include" -#define DOCDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define INFODIR "/cygdrive/c/software.b/gettext-0.21/share/info" -#define HTMLDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define DVIDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define PDFDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define PSDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define LIBDIR "/cygdrive/c/software.b/gettext-0.21/lib" -#define LISPDIR "/cygdrive/c/software.b/gettext-0.21/share/emacs/site-lisp" -#define LOCALEDIR "/cygdrive/c/software.b/gettext-0.21/share/locale" -#define MANDIR "/cygdrive/c/software.b/gettext-0.21/share/man" -#define PKGDATADIR "/cygdrive/c/software.b/gettext-0.21/share/gettext" -#define PKGINCLUDEDIR "/cygdrive/c/software.b/gettext-0.21/include/gettext-tools" -#define PKGLIBDIR "/cygdrive/c/software.b/gettext-0.21/lib/gettext-tools" -#define PKGLIBEXECDIR "/cygdrive/c/software.b/gettext-0.21/libexec/gettext-tools" diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/math.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/math.h deleted file mode 100644 index fc00cbb1c..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/math.h +++ /dev/null @@ -1,3008 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_MATH_H - -#if __GNUC__ >= 3 - -#endif - - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h" - -#ifndef _GL_MATH_H -#define _GL_MATH_H - -/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ -#if defined __VMS && ! defined NAN -# include -#endif - -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif -_GL_INLINE_HEADER_BEGIN -#ifndef _GL_MATH_INLINE -# define _GL_MATH_INLINE _GL_INLINE -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -#ifdef __cplusplus -/* Helper macros to define type-generic function FUNC as overloaded functions, - rather than as macros like in C. POSIX declares these with an argument of - real-floating (that is, one of float, double, or long double). */ -# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ -static inline int \ -_gl_cxx_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -static inline int \ -_gl_cxx_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -static inline int \ -_gl_cxx_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \ -_GL_BEGIN_NAMESPACE \ -inline rettype \ -rpl_func (float f) \ -{ \ - return _gl_cxx_ ## func ## f (f); \ -} \ -inline rettype \ -rpl_func (double d) \ -{ \ - return _gl_cxx_ ## func ## d (d); \ -} \ -inline rettype \ -rpl_func (long double l) \ -{ \ - return _gl_cxx_ ## func ## l (l); \ -} \ -_GL_END_NAMESPACE -#endif - -/* Helper macros to define a portability warning for the - classification macro FUNC called with VALUE. POSIX declares the - classification macros with an argument of real-floating (that is, - one of float, double, or long double). */ -#define _GL_WARN_REAL_FLOATING_DECL(func) \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ - (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ - : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ - : rpl_ ## func ## l (value)) - - -#if 0 -/* Pull in a function that fixes the 'int' to 'long double' conversion - of glibc 2.7. */ -_GL_EXTERN_C void _Qp_itoq (long double *, int); -static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; -#endif - - -/* For clang: Use __has_builtin to determine whether a builtin is available. */ -#ifndef __has_builtin -# define __has_builtin(name) 0 -#endif - - -/* POSIX allows platforms that don't support NAN. But all major - machines in the past 15 years have supported something close to - IEEE NaN, so we define this unconditionally. We also must define - it on platforms like Solaris 10, where NAN is present but defined - as a function pointer rather than a floating point constant. */ -#if !defined NAN || 0 -# if !GNULIB_defined_NAN -# undef NAN - /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler - choke on the expression 0.0 / 0.0. */ -# if defined __DECC || defined _MSC_VER -_GL_MATH_INLINE float -_NaN () -{ - static float zero = 0.0f; - return zero / zero; -} -# define NAN (_NaN()) -# else -# define NAN (0.0f / 0.0f) -# endif -# define GNULIB_defined_NAN 1 -# endif -#endif - -/* Solaris 10 defines HUGE_VAL, but as a function pointer rather - than a floating point constant. */ -#if 0 -# undef HUGE_VALF -# define HUGE_VALF (1.0f / 0.0f) -# undef HUGE_VAL -# define HUGE_VAL (1.0 / 0.0) -# undef HUGE_VALL -# define HUGE_VALL (1.0L / 0.0L) -#endif - -/* HUGE_VALF is a 'float' Infinity. */ -#ifndef HUGE_VALF -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ -# define HUGE_VALF (1e25f * 1e25f) -# else -# define HUGE_VALF (1.0f / 0.0f) -# endif -#endif - -/* HUGE_VAL is a 'double' Infinity. */ -#ifndef HUGE_VAL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ -# define HUGE_VAL (1e250 * 1e250) -# else -# define HUGE_VAL (1.0 / 0.0) -# endif -#endif - -/* HUGE_VALL is a 'long double' Infinity. */ -#ifndef HUGE_VALL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ -# define HUGE_VALL (1e250L * 1e250L) -# else -# define HUGE_VALL (1.0L / 0.0L) -# endif -#endif - - -#if defined FP_ILOGB0 && defined FP_ILOGBNAN - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */ -# if defined __HAIKU__ - /* Haiku: match what ilogb() does */ -# undef FP_ILOGB0 -# undef FP_ILOGBNAN -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#else - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ -# if defined __NetBSD__ || defined __sgi - /* NetBSD, IRIX 6.5: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# elif defined _AIX - /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# elif defined __sun - /* Solaris 9: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# else - /* Gnulib defined values. */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef acosf -# define acosf rpl_acosf -# endif -_GL_FUNCDECL_RPL (acosf, float, (float x)); -_GL_CXXALIAS_RPL (acosf, float, (float x)); -# else -# if !1 -# undef acosf -_GL_FUNCDECL_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIASWARN (acosf); -#elif defined GNULIB_POSIXCHECK -# undef acosf -# if HAVE_RAW_DECL_ACOSF -_GL_WARN_ON_USE (acosf, "acosf is unportable - " - "use gnulib module acosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef acosl -_GL_FUNCDECL_SYS (acosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (acosl, long double, (long double x)); -_GL_CXXALIASWARN (acosl); -#elif defined GNULIB_POSIXCHECK -# undef acosl -# if HAVE_RAW_DECL_ACOSL -_GL_WARN_ON_USE (acosl, "acosl is unportable - " - "use gnulib module acosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef asinf -# define asinf rpl_asinf -# endif -_GL_FUNCDECL_RPL (asinf, float, (float x)); -_GL_CXXALIAS_RPL (asinf, float, (float x)); -# else -# if !1 -# undef asinf -_GL_FUNCDECL_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIASWARN (asinf); -#elif defined GNULIB_POSIXCHECK -# undef asinf -# if HAVE_RAW_DECL_ASINF -_GL_WARN_ON_USE (asinf, "asinf is unportable - " - "use gnulib module asinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef asinl -_GL_FUNCDECL_SYS (asinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (asinl, long double, (long double x)); -_GL_CXXALIASWARN (asinl); -#elif defined GNULIB_POSIXCHECK -# undef asinl -# if HAVE_RAW_DECL_ASINL -_GL_WARN_ON_USE (asinl, "asinl is unportable - " - "use gnulib module asinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atanf -# define atanf rpl_atanf -# endif -_GL_FUNCDECL_RPL (atanf, float, (float x)); -_GL_CXXALIAS_RPL (atanf, float, (float x)); -# else -# if !1 -# undef atanf -_GL_FUNCDECL_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIASWARN (atanf); -#elif defined GNULIB_POSIXCHECK -# undef atanf -# if HAVE_RAW_DECL_ATANF -_GL_WARN_ON_USE (atanf, "atanf is unportable - " - "use gnulib module atanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef atanl -_GL_FUNCDECL_SYS (atanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (atanl, long double, (long double x)); -_GL_CXXALIASWARN (atanl); -#elif defined GNULIB_POSIXCHECK -# undef atanl -# if HAVE_RAW_DECL_ATANL -_GL_WARN_ON_USE (atanl, "atanl is unportable - " - "use gnulib module atanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atan2f -# define atan2f rpl_atan2f -# endif -_GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); -_GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); -# else -# if !1 -# undef atan2f -_GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIASWARN (atan2f); -#elif defined GNULIB_POSIXCHECK -# undef atan2f -# if HAVE_RAW_DECL_ATAN2F -_GL_WARN_ON_USE (atan2f, "atan2f is unportable - " - "use gnulib module atan2f for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtf -# define cbrtf rpl_cbrtf -# endif -_GL_FUNCDECL_RPL (cbrtf, float, (float x)); -_GL_CXXALIAS_RPL (cbrtf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (cbrtf); -#elif defined GNULIB_POSIXCHECK -# undef cbrtf -# if HAVE_RAW_DECL_CBRTF -_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " - "use gnulib module cbrtf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (cbrt, double, (double x)); -# endif -_GL_CXXALIAS_SYS (cbrt, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (cbrt); -# endif -#elif defined GNULIB_POSIXCHECK -# undef cbrt -# if HAVE_RAW_DECL_CBRT -_GL_WARN_ON_USE (cbrt, "cbrt is unportable - " - "use gnulib module cbrt for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtl -# define cbrtl rpl_cbrtl -# endif -_GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (cbrtl); -#elif defined GNULIB_POSIXCHECK -# undef cbrtl -# if HAVE_RAW_DECL_CBRTL -_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " - "use gnulib module cbrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceilf -# define ceilf rpl_ceilf -# endif -_GL_FUNCDECL_RPL (ceilf, float, (float x)); -_GL_CXXALIAS_RPL (ceilf, float, (float x)); -# else -# if !1 -# undef ceilf -_GL_FUNCDECL_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIASWARN (ceilf); -#elif defined GNULIB_POSIXCHECK -# undef ceilf -# if HAVE_RAW_DECL_CEILF -_GL_WARN_ON_USE (ceilf, "ceilf is unportable - " - "use gnulib module ceilf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceil -# define ceil rpl_ceil -# endif -_GL_FUNCDECL_RPL (ceil, double, (double x)); -_GL_CXXALIAS_RPL (ceil, double, (double x)); -# else -_GL_CXXALIAS_SYS (ceil, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ceil); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceill -# define ceill rpl_ceill -# endif -_GL_FUNCDECL_RPL (ceill, long double, (long double x)); -_GL_CXXALIAS_RPL (ceill, long double, (long double x)); -# else -# if !1 -# undef ceill -_GL_FUNCDECL_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIASWARN (ceill); -#elif defined GNULIB_POSIXCHECK -# undef ceill -# if HAVE_RAW_DECL_CEILL -_GL_WARN_ON_USE (ceill, "ceill is unportable - " - "use gnulib module ceill for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef copysignf -_GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); -_GL_CXXALIASWARN (copysignf); -#elif defined GNULIB_POSIXCHECK -# undef copysignf -# if HAVE_RAW_DECL_COPYSIGNF -_GL_WARN_ON_USE (copysignf, "copysignf is unportable - " - "use gnulib module copysignf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysign, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (copysign, double, (double x, double y)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (copysign); -# endif -#elif defined GNULIB_POSIXCHECK -# undef copysign -# if HAVE_RAW_DECL_COPYSIGN -_GL_WARN_ON_USE (copysign, "copysign is unportable - " - "use gnulib module copysign for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); -_GL_CXXALIASWARN (copysignl); -#elif defined GNULIB_POSIXCHECK -# undef copysignl -# if HAVE_RAW_DECL_COPYSIGNL -_GL_WARN_ON_USE (copysign, "copysignl is unportable - " - "use gnulib module copysignl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cosf -# define cosf rpl_cosf -# endif -_GL_FUNCDECL_RPL (cosf, float, (float x)); -_GL_CXXALIAS_RPL (cosf, float, (float x)); -# else -# if !1 -# undef cosf -_GL_FUNCDECL_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIASWARN (cosf); -#elif defined GNULIB_POSIXCHECK -# undef cosf -# if HAVE_RAW_DECL_COSF -_GL_WARN_ON_USE (cosf, "cosf is unportable - " - "use gnulib module cosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef cosl -_GL_FUNCDECL_SYS (cosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cosl, long double, (long double x)); -_GL_CXXALIASWARN (cosl); -#elif defined GNULIB_POSIXCHECK -# undef cosl -# if HAVE_RAW_DECL_COSL -_GL_WARN_ON_USE (cosl, "cosl is unportable - " - "use gnulib module cosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef coshf -# define coshf rpl_coshf -# endif -_GL_FUNCDECL_RPL (coshf, float, (float x)); -_GL_CXXALIAS_RPL (coshf, float, (float x)); -# else -# if !1 -# undef coshf -_GL_FUNCDECL_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIASWARN (coshf); -#elif defined GNULIB_POSIXCHECK -# undef coshf -# if HAVE_RAW_DECL_COSHF -_GL_WARN_ON_USE (coshf, "coshf is unportable - " - "use gnulib module coshf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expf -# define expf rpl_expf -# endif -_GL_FUNCDECL_RPL (expf, float, (float x)); -_GL_CXXALIAS_RPL (expf, float, (float x)); -# else -# if !1 -# undef expf -_GL_FUNCDECL_SYS (expf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expf, float, (float x)); -# endif -_GL_CXXALIASWARN (expf); -#elif defined GNULIB_POSIXCHECK -# undef expf -# if HAVE_RAW_DECL_EXPF -_GL_WARN_ON_USE (expf, "expf is unportable - " - "use gnulib module expf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expl -# define expl rpl_expl -# endif -_GL_FUNCDECL_RPL (expl, long double, (long double x)); -_GL_CXXALIAS_RPL (expl, long double, (long double x)); -# else -# if !1 || !1 -# undef expl -_GL_FUNCDECL_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expl); -#elif defined GNULIB_POSIXCHECK -# undef expl -# if HAVE_RAW_DECL_EXPL -_GL_WARN_ON_USE (expl, "expl is unportable - " - "use gnulib module expl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (exp2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (exp2f, float, (float x)); -_GL_CXXALIASWARN (exp2f); -#elif defined GNULIB_POSIXCHECK -# undef exp2f -# if HAVE_RAW_DECL_EXP2F -_GL_WARN_ON_USE (exp2f, "exp2f is unportable - " - "use gnulib module exp2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2 -# define exp2 rpl_exp2 -# endif -_GL_FUNCDECL_RPL (exp2, double, (double x)); -_GL_CXXALIAS_RPL (exp2, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (exp2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (exp2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (exp2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef exp2 -# if HAVE_RAW_DECL_EXP2 -_GL_WARN_ON_USE (exp2, "exp2 is unportable - " - "use gnulib module exp2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2l -# define exp2l rpl_exp2l -# endif -_GL_FUNCDECL_RPL (exp2l, long double, (long double x)); -_GL_CXXALIAS_RPL (exp2l, long double, (long double x)); -# else -# if !1 -# undef exp2l -_GL_FUNCDECL_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (exp2l); -#elif defined GNULIB_POSIXCHECK -# undef exp2l -# if HAVE_RAW_DECL_EXP2L -_GL_WARN_ON_USE (exp2l, "exp2l is unportable - " - "use gnulib module exp2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1f -# define expm1f rpl_expm1f -# endif -_GL_FUNCDECL_RPL (expm1f, float, (float x)); -_GL_CXXALIAS_RPL (expm1f, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIASWARN (expm1f); -#elif defined GNULIB_POSIXCHECK -# undef expm1f -# if HAVE_RAW_DECL_EXPM1F -_GL_WARN_ON_USE (expm1f, "expm1f is unportable - " - "use gnulib module expm1f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1 -# define expm1 rpl_expm1 -# endif -_GL_FUNCDECL_RPL (expm1, double, (double x)); -_GL_CXXALIAS_RPL (expm1, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1, double, (double x)); -# endif -_GL_CXXALIAS_SYS (expm1, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (expm1); -# endif -#elif defined GNULIB_POSIXCHECK -# undef expm1 -# if HAVE_RAW_DECL_EXPM1 -_GL_WARN_ON_USE (expm1, "expm1 is unportable - " - "use gnulib module expm1 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1l -# define expm1l rpl_expm1l -# endif -_GL_FUNCDECL_RPL (expm1l, long double, (long double x)); -_GL_CXXALIAS_RPL (expm1l, long double, (long double x)); -# else -# if !1 -# undef expm1l -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (expm1l, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (expm1l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expm1l); -#elif defined GNULIB_POSIXCHECK -# undef expm1l -# if HAVE_RAW_DECL_EXPM1L -_GL_WARN_ON_USE (expm1l, "expm1l is unportable - " - "use gnulib module expm1l for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef fabsf -_GL_FUNCDECL_SYS (fabsf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (fabsf, float, (float x)); -_GL_CXXALIASWARN (fabsf); -#elif defined GNULIB_POSIXCHECK -# undef fabsf -# if HAVE_RAW_DECL_FABSF -_GL_WARN_ON_USE (fabsf, "fabsf is unportable - " - "use gnulib module fabsf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fabsl -# define fabsl rpl_fabsl -# endif -_GL_FUNCDECL_RPL (fabsl, long double, (long double x)); -_GL_CXXALIAS_RPL (fabsl, long double, (long double x)); -# else -# if !1 -# undef fabsl -_GL_FUNCDECL_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (fabsl); -#elif defined GNULIB_POSIXCHECK -# undef fabsl -# if HAVE_RAW_DECL_FABSL -_GL_WARN_ON_USE (fabsl, "fabsl is unportable - " - "use gnulib module fabsl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorf -# define floorf rpl_floorf -# endif -_GL_FUNCDECL_RPL (floorf, float, (float x)); -_GL_CXXALIAS_RPL (floorf, float, (float x)); -# else -# if !1 -# undef floorf -_GL_FUNCDECL_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIASWARN (floorf); -#elif defined GNULIB_POSIXCHECK -# undef floorf -# if HAVE_RAW_DECL_FLOORF -_GL_WARN_ON_USE (floorf, "floorf is unportable - " - "use gnulib module floorf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floor -# define floor rpl_floor -# endif -_GL_FUNCDECL_RPL (floor, double, (double x)); -_GL_CXXALIAS_RPL (floor, double, (double x)); -# else -_GL_CXXALIAS_SYS (floor, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (floor); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorl -# define floorl rpl_floorl -# endif -_GL_FUNCDECL_RPL (floorl, long double, (long double x)); -_GL_CXXALIAS_RPL (floorl, long double, (long double x)); -# else -# if !1 -# undef floorl -_GL_FUNCDECL_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (floorl); -#elif defined GNULIB_POSIXCHECK -# undef floorl -# if HAVE_RAW_DECL_FLOORL -_GL_WARN_ON_USE (floorl, "floorl is unportable - " - "use gnulib module floorl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmaf -# define fmaf rpl_fmaf -# endif -_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); -_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); -# else -# if !1 -# undef fmaf -_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIASWARN (fmaf); -#elif defined GNULIB_POSIXCHECK -# undef fmaf -# if HAVE_RAW_DECL_FMAF -_GL_WARN_ON_USE (fmaf, "fmaf is unportable - " - "use gnulib module fmaf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fma -# define fma rpl_fma -# endif -_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); -_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); -# else -# if !1 -# undef fma -_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); -# endif -_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fma); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fma -# if HAVE_RAW_DECL_FMA -_GL_WARN_ON_USE (fma, "fma is unportable - " - "use gnulib module fma for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmal -# define fmal rpl_fmal -# endif -_GL_FUNCDECL_RPL (fmal, long double, - (long double x, long double y, long double z)); -_GL_CXXALIAS_RPL (fmal, long double, - (long double x, long double y, long double z)); -# else -# if !1 -# undef fmal -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -# endif -_GL_CXXALIAS_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -_GL_CXXALIASWARN (fmal); -#elif defined GNULIB_POSIXCHECK -# undef fmal -# if HAVE_RAW_DECL_FMAL -_GL_WARN_ON_USE (fmal, "fmal is unportable - " - "use gnulib module fmal for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodf -# define fmodf rpl_fmodf -# endif -_GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); -_GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); -# else -# if !1 -# undef fmodf -_GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (fmodf); -#elif defined GNULIB_POSIXCHECK -# undef fmodf -# if HAVE_RAW_DECL_FMODF -_GL_WARN_ON_USE (fmodf, "fmodf is unportable - " - "use gnulib module fmodf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmod -# define fmod rpl_fmod -# endif -_GL_FUNCDECL_RPL (fmod, double, (double x, double y)); -_GL_CXXALIAS_RPL (fmod, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (fmod, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fmod); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fmod -# if HAVE_RAW_DECL_FMOD -_GL_WARN_ON_USE (fmod, "fmod has portability problems - " - "use gnulib module fmod for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodl -# define fmodl rpl_fmodl -# endif -_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); -# else -# if !1 -# undef fmodl -_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (fmodl); -#elif defined GNULIB_POSIXCHECK -# undef fmodl -# if HAVE_RAW_DECL_FMODL -_GL_WARN_ON_USE (fmodl, "fmodl is unportable - " - "use gnulib module fmodl for portability"); -# endif -#endif - - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpf -# define frexpf rpl_frexpf -# endif -_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); -# else -# if !1 -# undef frexpf -_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); -# endif -_GL_CXXALIASWARN (frexpf); -#elif defined GNULIB_POSIXCHECK -# undef frexpf -# if HAVE_RAW_DECL_FREXPF -_GL_WARN_ON_USE (frexpf, "frexpf is unportable - " - "use gnulib module frexpf for portability"); -# endif -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexp -# define frexp rpl_frexp -# endif -_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); -# else -_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef frexp -/* Assume frexp is always declared. */ -_GL_WARN_ON_USE (frexp, "frexp is unportable - " - "use gnulib module frexp for portability"); -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpl -# define frexpl rpl_frexpl -# endif -_GL_FUNCDECL_RPL (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); -#else -# if !1 -_GL_FUNCDECL_SYS (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -# if 0 -_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); -# endif -#endif -#if 0 && !(0 && !1) -_GL_CXXALIASWARN (frexpl); -#endif -#if !0 && defined GNULIB_POSIXCHECK -# undef frexpl -# if HAVE_RAW_DECL_FREXPL -_GL_WARN_ON_USE (frexpl, "frexpl is unportable - " - "use gnulib module frexpl for portability"); -# endif -#endif - - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotf -# define hypotf rpl_hypotf -# endif -_GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); -_GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (hypotf); -#elif defined GNULIB_POSIXCHECK -# undef hypotf -# if HAVE_RAW_DECL_HYPOTF -_GL_WARN_ON_USE (hypotf, "hypotf is unportable - " - "use gnulib module hypotf for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypot -# define hypot rpl_hypot -# endif -_GL_FUNCDECL_RPL (hypot, double, (double x, double y)); -_GL_CXXALIAS_RPL (hypot, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (hypot, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (hypot); -# endif -#elif defined GNULIB_POSIXCHECK -# undef hypot -# if HAVE_RAW_DECL_HYPOT -_GL_WARN_ON_USE (hypotf, "hypot has portability problems - " - "use gnulib module hypot for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotl -# define hypotl rpl_hypotl -# endif -_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (hypotl); -#elif defined GNULIB_POSIXCHECK -# undef hypotl -# if HAVE_RAW_DECL_HYPOTL -_GL_WARN_ON_USE (hypotl, "hypotl is unportable - " - "use gnulib module hypotl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbf -# define ilogbf rpl_ilogbf -# endif -_GL_FUNCDECL_RPL (ilogbf, int, (float x)); -_GL_CXXALIAS_RPL (ilogbf, int, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIAS_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIASWARN (ilogbf); -#elif defined GNULIB_POSIXCHECK -# undef ilogbf -# if HAVE_RAW_DECL_ILOGBF -_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " - "use gnulib module ilogbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogb -# define ilogb rpl_ilogb -# endif -_GL_FUNCDECL_RPL (ilogb, int, (double x)); -_GL_CXXALIAS_RPL (ilogb, int, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogb, int, (double x)); -# endif -_GL_CXXALIAS_SYS (ilogb, int, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ilogb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef ilogb -# if HAVE_RAW_DECL_ILOGB -_GL_WARN_ON_USE (ilogb, "ilogb is unportable - " - "use gnulib module ilogb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbl -# define ilogbl rpl_ilogbl -# endif -_GL_FUNCDECL_RPL (ilogbl, int, (long double x)); -_GL_CXXALIAS_RPL (ilogbl, int, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIASWARN (ilogbl); -#elif defined GNULIB_POSIXCHECK -# undef ilogbl -# if HAVE_RAW_DECL_ILOGBL -_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " - "use gnulib module ilogbl for portability"); -# endif -#endif - - -/* Return x * 2^exp. */ -#if 0 -# if !1 -# undef ldexpf -_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); -# endif -_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); -_GL_CXXALIASWARN (ldexpf); -#elif defined GNULIB_POSIXCHECK -# undef ldexpf -# if HAVE_RAW_DECL_LDEXPF -_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " - "use gnulib module ldexpf for portability"); -# endif -#endif - -/* Return x * 2^exp. */ -#if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ldexpl -# define ldexpl rpl_ldexpl -# endif -_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); -_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); -#else -# if !1 -_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); -# endif -# if 0 -_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); -# endif -#endif -#if 0 -_GL_CXXALIASWARN (ldexpl); -#endif -#if !0 && defined GNULIB_POSIXCHECK -# undef ldexpl -# if HAVE_RAW_DECL_LDEXPL -_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " - "use gnulib module ldexpl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logf -# define logf rpl_logf -# endif -_GL_FUNCDECL_RPL (logf, float, (float x)); -_GL_CXXALIAS_RPL (logf, float, (float x)); -# else -# if !1 -# undef logf -_GL_FUNCDECL_SYS (logf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logf, float, (float x)); -# endif -_GL_CXXALIASWARN (logf); -#elif defined GNULIB_POSIXCHECK -# undef logf -# if HAVE_RAW_DECL_LOGF -_GL_WARN_ON_USE (logf, "logf is unportable - " - "use gnulib module logf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log -# define log rpl_log -# endif -_GL_FUNCDECL_RPL (log, double, (double x)); -_GL_CXXALIAS_RPL (log, double, (double x)); -# else -_GL_CXXALIAS_SYS (log, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log -# if HAVE_RAW_DECL_LOG -_GL_WARN_ON_USE (log, "log has portability problems - " - "use gnulib module log for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logl -# define logl rpl_logl -# endif -_GL_FUNCDECL_RPL (logl, long double, (long double x)); -_GL_CXXALIAS_RPL (logl, long double, (long double x)); -# else -# if !1 || !1 -# undef logl -_GL_FUNCDECL_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logl); -#elif defined GNULIB_POSIXCHECK -# undef logl -# if HAVE_RAW_DECL_LOGL -_GL_WARN_ON_USE (logl, "logl is unportable - " - "use gnulib module logl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10f -# define log10f rpl_log10f -# endif -_GL_FUNCDECL_RPL (log10f, float, (float x)); -_GL_CXXALIAS_RPL (log10f, float, (float x)); -# else -# if !1 -# undef log10f -_GL_FUNCDECL_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIASWARN (log10f); -#elif defined GNULIB_POSIXCHECK -# undef log10f -# if HAVE_RAW_DECL_LOG10F -_GL_WARN_ON_USE (log10f, "log10f is unportable - " - "use gnulib module log10f for portability"); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10 -# define log10 rpl_log10 -# endif -_GL_FUNCDECL_RPL (log10, double, (double x)); -_GL_CXXALIAS_RPL (log10, double, (double x)); -# else -_GL_CXXALIAS_SYS (log10, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log10); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log10 -# if HAVE_RAW_DECL_LOG10 -_GL_WARN_ON_USE (log10, "log10 has portability problems - " - "use gnulib module log10 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10l -# define log10l rpl_log10l -# endif -_GL_FUNCDECL_RPL (log10l, long double, (long double x)); -_GL_CXXALIAS_RPL (log10l, long double, (long double x)); -# else -# if !1 || !1 -# undef log10l -_GL_FUNCDECL_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log10l); -#elif defined GNULIB_POSIXCHECK -# undef log10l -# if HAVE_RAW_DECL_LOG10L -_GL_WARN_ON_USE (log10l, "log10l is unportable - " - "use gnulib module log10l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pf -# define log1pf rpl_log1pf -# endif -_GL_FUNCDECL_RPL (log1pf, float, (float x)); -_GL_CXXALIAS_RPL (log1pf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIASWARN (log1pf); -#elif defined GNULIB_POSIXCHECK -# undef log1pf -# if HAVE_RAW_DECL_LOG1PF -_GL_WARN_ON_USE (log1pf, "log1pf is unportable - " - "use gnulib module log1pf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1p -# define log1p rpl_log1p -# endif -_GL_FUNCDECL_RPL (log1p, double, (double x)); -_GL_CXXALIAS_RPL (log1p, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1p, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log1p, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log1p); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log1p -# if HAVE_RAW_DECL_LOG1P -_GL_WARN_ON_USE (log1p, "log1p has portability problems - " - "use gnulib module log1p for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pl -# define log1pl rpl_log1pl -# endif -_GL_FUNCDECL_RPL (log1pl, long double, (long double x)); -_GL_CXXALIAS_RPL (log1pl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log1pl); -#elif defined GNULIB_POSIXCHECK -# undef log1pl -# if HAVE_RAW_DECL_LOG1PL -_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " - "use gnulib module log1pl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2f -# define log2f rpl_log2f -# endif -_GL_FUNCDECL_RPL (log2f, float, (float x)); -_GL_CXXALIAS_RPL (log2f, float, (float x)); -# else -# if !1 -# undef log2f -_GL_FUNCDECL_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIASWARN (log2f); -#elif defined GNULIB_POSIXCHECK -# undef log2f -# if HAVE_RAW_DECL_LOG2F -_GL_WARN_ON_USE (log2f, "log2f is unportable - " - "use gnulib module log2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2 -# define log2 rpl_log2 -# endif -_GL_FUNCDECL_RPL (log2, double, (double x)); -_GL_CXXALIAS_RPL (log2, double, (double x)); -# else -# if !1 -# undef log2 -_GL_FUNCDECL_SYS (log2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log2 -# if HAVE_RAW_DECL_LOG2 -_GL_WARN_ON_USE (log2, "log2 is unportable - " - "use gnulib module log2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2l -# define log2l rpl_log2l -# endif -_GL_FUNCDECL_RPL (log2l, long double, (long double x)); -_GL_CXXALIAS_RPL (log2l, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log2l); -#elif defined GNULIB_POSIXCHECK -# undef log2l -# if HAVE_RAW_DECL_LOG2L -_GL_WARN_ON_USE (log2l, "log2l is unportable - " - "use gnulib module log2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbf -# define logbf rpl_logbf -# endif -_GL_FUNCDECL_RPL (logbf, float, (float x)); -_GL_CXXALIAS_RPL (logbf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIASWARN (logbf); -#elif defined GNULIB_POSIXCHECK -# undef logbf -# if HAVE_RAW_DECL_LOGBF -_GL_WARN_ON_USE (logbf, "logbf is unportable - " - "use gnulib module logbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logb -# define logb rpl_logb -# endif -_GL_FUNCDECL_RPL (logb, double, (double x)); -_GL_CXXALIAS_RPL (logb, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logb, double, (double x)); -# endif -_GL_CXXALIAS_SYS (logb, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (logb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef logb -# if HAVE_RAW_DECL_LOGB -_GL_WARN_ON_USE (logb, "logb is unportable - " - "use gnulib module logb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbl -# define logbl rpl_logbl -# endif -_GL_FUNCDECL_RPL (logbl, long double, (long double x)); -_GL_CXXALIAS_RPL (logbl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logbl); -#elif defined GNULIB_POSIXCHECK -# undef logbl -# if HAVE_RAW_DECL_LOGBL -_GL_WARN_ON_USE (logbl, "logbl is unportable - " - "use gnulib module logbl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modff -# define modff rpl_modff -# endif -_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); -# else -# if !1 -# undef modff -_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); -# endif -_GL_CXXALIASWARN (modff); -#elif defined GNULIB_POSIXCHECK -# undef modff -# if HAVE_RAW_DECL_MODFF -_GL_WARN_ON_USE (modff, "modff is unportable - " - "use gnulib module modff for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modf -# define modf rpl_modf -# endif -_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); -# else -_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (modf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef modf -# if HAVE_RAW_DECL_MODF -_GL_WARN_ON_USE (modf, "modf has portability problems - " - "use gnulib module modf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modfl -# define modfl rpl_modfl -# endif -_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); -# else -# if !1 -# undef modfl -_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); -# endif -_GL_CXXALIASWARN (modfl); -#elif defined GNULIB_POSIXCHECK -# undef modfl -# if HAVE_RAW_DECL_MODFL -_GL_WARN_ON_USE (modfl, "modfl is unportable - " - "use gnulib module modfl for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef powf -_GL_FUNCDECL_SYS (powf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (powf, float, (float x, float y)); -_GL_CXXALIASWARN (powf); -#elif defined GNULIB_POSIXCHECK -# undef powf -# if HAVE_RAW_DECL_POWF -_GL_WARN_ON_USE (powf, "powf is unportable - " - "use gnulib module powf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderf -# define remainderf rpl_remainderf -# endif -_GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); -_GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (remainderf); -#elif defined GNULIB_POSIXCHECK -# undef remainderf -# if HAVE_RAW_DECL_REMAINDERF -_GL_WARN_ON_USE (remainderf, "remainderf is unportable - " - "use gnulib module remainderf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainder -# define remainder rpl_remainder -# endif -_GL_FUNCDECL_RPL (remainder, double, (double x, double y)); -_GL_CXXALIAS_RPL (remainder, double, (double x, double y)); -# else -# if !1 || !1 -_GL_FUNCDECL_SYS (remainder, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (remainder, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remainder); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remainder -# if HAVE_RAW_DECL_REMAINDER -_GL_WARN_ON_USE (remainder, "remainder is unportable - " - "use gnulib module remainder for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderl -# define remainderl rpl_remainderl -# endif -_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); -# else -# if !1 -# undef remainderl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); -# endif -# endif -_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (remainderl); -#elif defined GNULIB_POSIXCHECK -# undef remainderl -# if HAVE_RAW_DECL_REMAINDERL -_GL_WARN_ON_USE (remainderl, "remainderl is unportable - " - "use gnulib module remainderl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rintf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (rintf, float, (float x)); -_GL_CXXALIASWARN (rintf); -#elif defined GNULIB_POSIXCHECK -# undef rintf -# if HAVE_RAW_DECL_RINTF -_GL_WARN_ON_USE (rintf, "rintf is unportable - " - "use gnulib module rintf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rint, double, (double x)); -# endif -_GL_CXXALIAS_SYS (rint, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rint); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rint -# if HAVE_RAW_DECL_RINT -_GL_WARN_ON_USE (rint, "rint is unportable - " - "use gnulib module rint for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rintl -# define rintl rpl_rintl -# endif -_GL_FUNCDECL_RPL (rintl, long double, (long double x)); -_GL_CXXALIAS_RPL (rintl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (rintl); -#elif defined GNULIB_POSIXCHECK -# undef rintl -# if HAVE_RAW_DECL_RINTL -_GL_WARN_ON_USE (rintl, "rintl is unportable - " - "use gnulib module rintl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundf -# define roundf rpl_roundf -# endif -_GL_FUNCDECL_RPL (roundf, float, (float x)); -_GL_CXXALIAS_RPL (roundf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIASWARN (roundf); -#elif defined GNULIB_POSIXCHECK -# undef roundf -# if HAVE_RAW_DECL_ROUNDF -_GL_WARN_ON_USE (roundf, "roundf is unportable - " - "use gnulib module roundf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef round -# define round rpl_round -# endif -_GL_FUNCDECL_RPL (round, double, (double x)); -_GL_CXXALIAS_RPL (round, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (round, double, (double x)); -# endif -_GL_CXXALIAS_SYS (round, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (round); -# endif -#elif defined GNULIB_POSIXCHECK -# undef round -# if HAVE_RAW_DECL_ROUND -_GL_WARN_ON_USE (round, "round is unportable - " - "use gnulib module round for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundl -# define roundl rpl_roundl -# endif -_GL_FUNCDECL_RPL (roundl, long double, (long double x)); -_GL_CXXALIAS_RPL (roundl, long double, (long double x)); -# else -# if !1 -# undef roundl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (roundl, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (roundl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (roundl); -#elif defined GNULIB_POSIXCHECK -# undef roundl -# if HAVE_RAW_DECL_ROUNDL -_GL_WARN_ON_USE (roundl, "roundl is unportable - " - "use gnulib module roundl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinf -# define sinf rpl_sinf -# endif -_GL_FUNCDECL_RPL (sinf, float, (float x)); -_GL_CXXALIAS_RPL (sinf, float, (float x)); -# else -# if !1 - # undef sinf -_GL_FUNCDECL_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinf); -#elif defined GNULIB_POSIXCHECK -# undef sinf -# if HAVE_RAW_DECL_SINF -_GL_WARN_ON_USE (sinf, "sinf is unportable - " - "use gnulib module sinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef sinl -_GL_FUNCDECL_SYS (sinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sinl, long double, (long double x)); -_GL_CXXALIASWARN (sinl); -#elif defined GNULIB_POSIXCHECK -# undef sinl -# if HAVE_RAW_DECL_SINL -_GL_WARN_ON_USE (sinl, "sinl is unportable - " - "use gnulib module sinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinhf -# define sinhf rpl_sinhf -# endif -_GL_FUNCDECL_RPL (sinhf, float, (float x)); -_GL_CXXALIAS_RPL (sinhf, float, (float x)); -# else -# if !1 -# undef sinhf -_GL_FUNCDECL_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinhf); -#elif defined GNULIB_POSIXCHECK -# undef sinhf -# if HAVE_RAW_DECL_SINHF -_GL_WARN_ON_USE (sinhf, "sinhf is unportable - " - "use gnulib module sinhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtf -# define sqrtf rpl_sqrtf -# endif -_GL_FUNCDECL_RPL (sqrtf, float, (float x)); -_GL_CXXALIAS_RPL (sqrtf, float, (float x)); -# else -# if !1 -# undef sqrtf -_GL_FUNCDECL_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (sqrtf); -#elif defined GNULIB_POSIXCHECK -# undef sqrtf -# if HAVE_RAW_DECL_SQRTF -_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " - "use gnulib module sqrtf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtl -# define sqrtl rpl_sqrtl -# endif -_GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); -# else -# if !1 || !1 -# undef sqrtl -_GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (sqrtl); -#elif defined GNULIB_POSIXCHECK -# undef sqrtl -# if HAVE_RAW_DECL_SQRTL -_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " - "use gnulib module sqrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanf -# define tanf rpl_tanf -# endif -_GL_FUNCDECL_RPL (tanf, float, (float x)); -_GL_CXXALIAS_RPL (tanf, float, (float x)); -# else -# if !1 -# undef tanf -_GL_FUNCDECL_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanf); -#elif defined GNULIB_POSIXCHECK -# undef tanf -# if HAVE_RAW_DECL_TANF -_GL_WARN_ON_USE (tanf, "tanf is unportable - " - "use gnulib module tanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef tanl -_GL_FUNCDECL_SYS (tanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (tanl, long double, (long double x)); -_GL_CXXALIASWARN (tanl); -#elif defined GNULIB_POSIXCHECK -# undef tanl -# if HAVE_RAW_DECL_TANL -_GL_WARN_ON_USE (tanl, "tanl is unportable - " - "use gnulib module tanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanhf -# define tanhf rpl_tanhf -# endif -_GL_FUNCDECL_RPL (tanhf, float, (float x)); -_GL_CXXALIAS_RPL (tanhf, float, (float x)); -# else -# if !1 -# undef tanhf -_GL_FUNCDECL_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanhf); -#elif defined GNULIB_POSIXCHECK -# undef tanhf -# if HAVE_RAW_DECL_TANHF -_GL_WARN_ON_USE (tanhf, "tanhf is unportable - " - "use gnulib module tanhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncf -# define truncf rpl_truncf -# endif -_GL_FUNCDECL_RPL (truncf, float, (float x)); -_GL_CXXALIAS_RPL (truncf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIASWARN (truncf); -#elif defined GNULIB_POSIXCHECK -# undef truncf -# if HAVE_RAW_DECL_TRUNCF -_GL_WARN_ON_USE (truncf, "truncf is unportable - " - "use gnulib module truncf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef trunc -# define trunc rpl_trunc -# endif -_GL_FUNCDECL_RPL (trunc, double, (double x)); -_GL_CXXALIAS_RPL (trunc, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (trunc, double, (double x)); -# endif -_GL_CXXALIAS_SYS (trunc, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (trunc); -# endif -#elif defined GNULIB_POSIXCHECK -# undef trunc -# if HAVE_RAW_DECL_TRUNC -_GL_WARN_ON_USE (trunc, "trunc is unportable - " - "use gnulib module trunc for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncl -# define truncl rpl_truncl -# endif -_GL_FUNCDECL_RPL (truncl, long double, (long double x)); -_GL_CXXALIAS_RPL (truncl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (truncl); -#elif defined GNULIB_POSIXCHECK -# undef truncl -# if HAVE_RAW_DECL_TRUNCL -_GL_WARN_ON_USE (truncl, "truncl is unportable - " - "use gnulib module truncl for portability"); -# endif -#endif - - -/* Definitions of function-like macros come here, after the function - declarations. */ - - -#if 0 -# if 0 -_GL_EXTERN_C int gl_isfinitef (float x); -_GL_EXTERN_C int gl_isfinited (double x); -_GL_EXTERN_C int gl_isfinitel (long double x); -# undef isfinite -# define isfinite(x) \ - (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ - sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ - gl_isfinitef (x)) -# endif -# ifdef __cplusplus -# if defined isfinite || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) -# undef isfinite -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines isfinite through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) -# define isfinite rpl_isfinite -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isfinite -_GL_WARN_REAL_FLOATING_DECL (isfinite); -# undef isfinite -# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) -# endif -#endif - - -#if 1 -# if 1 -_GL_EXTERN_C int gl_isinff (float x); -_GL_EXTERN_C int gl_isinfd (double x); -_GL_EXTERN_C int gl_isinfl (long double x); -# undef isinf -# define isinf(x) \ - (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ - sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ - gl_isinff (x)) -# endif -# ifdef __cplusplus -# if defined isinf || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) -# undef isinf -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isinf through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) -# define isinf rpl_isinf -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isinf -_GL_WARN_REAL_FLOATING_DECL (isinf); -# undef isinf -# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) -# endif -#endif - - -#if 1 -/* Test for NaN for 'float' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan macro - or (older) isnanf function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) -# elif defined isnan -# undef isnanf -# define isnanf(x) isnan ((float)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanf -# define isnanf rpl_isnanf -_GL_EXTERN_C int isnanf (float x); -# endif -#endif - -#if 1 -/* Test for NaN for 'double' numbers. - This function is a gnulib extension, unlike isnan() which applied only - to 'double' numbers earlier but now is a type-generic macro. */ -# if 1 -/* The original included above provides a declaration of isnan - macro. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnand -# define isnand(x) __builtin_isnan ((double)(x)) -# else -# undef isnand -# define isnand(x) isnan ((double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnand -# define isnand rpl_isnand -_GL_EXTERN_C int isnand (double x); -# endif -#endif - -#if 1 -/* Test for NaN for 'long double' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan - macro or (older) isnanl function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) -# elif defined isnan -# undef isnanl -# define isnanl(x) isnan ((long double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanl -# define isnanl rpl_isnanl -_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; -# endif -#endif - -/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ -#if 1 -# if 1 -/* We can't just use the isnanf macro (e.g.) as exposed by - isnanf.h (e.g.) here, because those may end up being macros - that recursively expand back to isnan. So use the gnulib - replacements for them directly. */ -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) -# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) -# else -_GL_EXTERN_C int rpl_isnanf (float x); -# define gl_isnan_f(x) rpl_isnanf (x) -# endif -# if 1 && __GNUC__ >= 4 -# define gl_isnan_d(x) __builtin_isnan ((double)(x)) -# else -_GL_EXTERN_C int rpl_isnand (double x); -# define gl_isnan_d(x) rpl_isnand (x) -# endif -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) -# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) -# else -_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; -# define gl_isnan_l(x) rpl_isnanl (x) -# endif -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ - sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ - gl_isnan_f (x)) -# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl))) -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ - sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ - __builtin_isnanf ((float)(x))) -# endif -# ifdef __cplusplus -# if defined isnan || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) -# undef isnan -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isnan through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) -# define isnan rpl_isnan -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) -# endif -# endif -# else -/* Ensure isnan is a macro. */ -# ifndef isnan -# define isnan isnan -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isnan -_GL_WARN_REAL_FLOATING_DECL (isnan); -# undef isnan -# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) -# endif -#endif - - -#if 1 -# if (0 \ - && (!defined __cplusplus || __cplusplus < 201103)) -# undef signbit - /* GCC 4.0 and newer provides three built-ins for signbit. */ -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ - sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ - __builtin_signbitf (x)) -# endif -# if 0 && !GNULIB_defined_signbit -# undef signbit -_GL_EXTERN_C int gl_signbitf (float arg); -_GL_EXTERN_C int gl_signbitd (double arg); -_GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ -# define _GL_NUM_UINT_WORDS(type) \ - ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) -# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf -# define gl_signbitf_OPTIMIZED_MACRO -# define gl_signbitf(arg) \ - ({ union { float _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd -# define gl_signbitd_OPTIMIZED_MACRO -# define gl_signbitd(arg) \ - ({ union { double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl -# define gl_signbitl_OPTIMIZED_MACRO -# define gl_signbitl(arg) \ - ({ union { long double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# endif -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ - sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ - gl_signbitf (x)) -# define GNULIB_defined_signbit 1 -# endif -# ifdef __cplusplus -# if defined signbit || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) -# undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines signbit through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) -# define signbit rpl_signbit -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined signbit -_GL_WARN_REAL_FLOATING_DECL (signbit); -# undef signbit -# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) -# endif -#endif - -_GL_INLINE_HEADER_END - -#endif /* _GL_MATH_H */ -#endif /* _GL_MATH_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/stdint.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/stdint.h deleted file mode 100644 index d941efd4d..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/stdint.h +++ /dev/null @@ -1,747 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _GL_STDINT_H - -#if __GNUC__ >= 3 - -#endif - - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#else - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if 1 -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _GL_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#endif - -#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_STDINT_H - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -#include - -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if 1 -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - -#if ! 1 - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h". */ -# if 1 && ! defined _AIX -# include -# endif - -# if 1 - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -# elif 0 - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -# endif - -# if 0 && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -# endif - -# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -/* These are separate macros, because if you try to merge these macros into - a single one, HP-UX cc rejects the resulting expression in constant - expressions. */ -# define _STDINT_UNSIGNED_MIN(bits, zero) \ - (zero) -# define _STDINT_SIGNED_MIN(bits, zero) \ - (~ _STDINT_MAX (1, bits, zero)) - -# define _STDINT_MAX(signed, bits, zero) \ - (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef int8_t -# undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -# define int8_t gl_int8_t -# define uint8_t gl_uint8_t - -# undef int16_t -# undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -# define int16_t gl_int16_t -# define uint16_t gl_uint16_t - -# undef int32_t -# undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -# define int32_t gl_int32_t -# define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -# ifdef INT64_MAX -# define GL_INT64_T -# else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# else -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -# endif - -# ifdef UINT64_MAX -# define GL_UINT64_T -# else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# else -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -# endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -# define _UINT8_T -# define _UINT32_T -# define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef int_least8_t -# undef uint_least8_t -# undef int_least16_t -# undef uint_least16_t -# undef int_least32_t -# undef uint_least32_t -# undef int_least64_t -# undef uint_least64_t -# define int_least8_t int8_t -# define uint_least8_t uint8_t -# define int_least16_t int16_t -# define uint_least16_t uint16_t -# define int_least32_t int32_t -# define uint_least32_t uint32_t -# ifdef GL_INT64_T -# define int_least64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_least64_t uint64_t -# endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -# undef int_fast8_t -# undef uint_fast8_t -# undef int_fast16_t -# undef uint_fast16_t -# undef int_fast32_t -# undef uint_fast32_t -# undef int_fast64_t -# undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -# ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -# else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -# endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -# define int_fast8_t gl_int_fast8_t -# define uint_fast8_t gl_uint_fast8_t -# define int_fast16_t gl_int_fast16_t -# define uint_fast16_t gl_uint_fast16_t -# define int_fast32_t gl_int_fast32_t -# define uint_fast32_t gl_uint_fast32_t -# ifdef GL_INT64_T -# define int_fast64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -# endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -/* kLIBC's defines _INTPTR_T_DECLARED and needs its own - definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and - uintptr_t to avoid conflicting declarations of system functions like - _findclose in . */ -# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) -# undef intptr_t -# undef uintptr_t -# ifdef _WIN64 -typedef long long int gl_intptr_t; -typedef unsigned long long int gl_uintptr_t; -# else -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -# endif -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t -# endif - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -# ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -# endif - -# ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -# endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -# define GNULIB_defined_stdint_types 1 -# endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef INT8_MIN -# undef INT8_MAX -# undef UINT8_MAX -# define INT8_MIN (~ INT8_MAX) -# define INT8_MAX 127 -# define UINT8_MAX 255 - -# undef INT16_MIN -# undef INT16_MAX -# undef UINT16_MAX -# define INT16_MIN (~ INT16_MAX) -# define INT16_MAX 32767 -# define UINT16_MAX 65535 - -# undef INT32_MIN -# undef INT32_MAX -# undef UINT32_MAX -# define INT32_MIN (~ INT32_MAX) -# define INT32_MAX 2147483647 -# define UINT32_MAX 4294967295U - -# if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -# endif - -# if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -# endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef INT_LEAST8_MIN -# undef INT_LEAST8_MAX -# undef UINT_LEAST8_MAX -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST8_MAX INT8_MAX -# define UINT_LEAST8_MAX UINT8_MAX - -# undef INT_LEAST16_MIN -# undef INT_LEAST16_MAX -# undef UINT_LEAST16_MAX -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST16_MAX INT16_MAX -# define UINT_LEAST16_MAX UINT16_MAX - -# undef INT_LEAST32_MIN -# undef INT_LEAST32_MAX -# undef UINT_LEAST32_MAX -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST32_MAX INT32_MAX -# define UINT_LEAST32_MAX UINT32_MAX - -# undef INT_LEAST64_MIN -# undef INT_LEAST64_MAX -# ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -# endif - -# undef UINT_LEAST64_MAX -# ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -# undef INT_FAST8_MIN -# undef INT_FAST8_MAX -# undef UINT_FAST8_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define UINT_FAST8_MAX UCHAR_MAX - -# undef INT_FAST16_MIN -# undef INT_FAST16_MAX -# undef UINT_FAST16_MAX -# define INT_FAST16_MIN INT_FAST32_MIN -# define INT_FAST16_MAX INT_FAST32_MAX -# define UINT_FAST16_MAX UINT_FAST32_MAX - -# undef INT_FAST32_MIN -# undef INT_FAST32_MAX -# undef UINT_FAST32_MAX -# ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -# else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -# endif - -# undef INT_FAST64_MIN -# undef INT_FAST64_MAX -# ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -# endif - -# undef UINT_FAST64_MAX -# ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -# undef INTPTR_MIN -# undef INTPTR_MAX -# undef UINTPTR_MAX -# ifdef _WIN64 -# define INTPTR_MIN LLONG_MIN -# define INTPTR_MAX LLONG_MAX -# define UINTPTR_MAX ULLONG_MAX -# else -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX -# endif - -/* 7.18.2.5. Limits of greatest-width integer types */ - -# ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -# endif - -# ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -# endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -# undef PTRDIFF_MIN -# undef PTRDIFF_MAX -# if 0 -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -# else -# define PTRDIFF_MIN \ - _STDINT_SIGNED_MIN (, 0) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, , 0) -# endif - -/* sig_atomic_t limits */ -# undef SIG_ATOMIC_MIN -# undef SIG_ATOMIC_MAX -# if -# define SIG_ATOMIC_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define SIG_ATOMIC_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define SIG_ATOMIC_MAX \ - _STDINT_MAX (, , \ - 0) - - -/* size_t limit */ -# undef SIZE_MAX -# if 0 -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -# else -# define SIZE_MAX _STDINT_MAX (0, , 0) -# endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -# if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# endif -# undef WCHAR_MIN -# undef WCHAR_MAX -# if -# define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WCHAR_MAX \ - _STDINT_MAX (, , 0) - -/* wint_t limits */ -/* If gnulib's or overrides wint_t, is not - accurate, therefore use the definitions from above. */ -# if !1 -# undef WINT_MIN -# undef WINT_MAX -# if -# define WINT_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WINT_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WINT_MAX \ - _STDINT_MAX (, , 0) -# endif - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -# undef INT8_C -# undef UINT8_C -# define INT8_C(x) x -# define UINT8_C(x) x - -# undef INT16_C -# undef UINT16_C -# define INT16_C(x) x -# define UINT16_C(x) x - -# undef INT32_C -# undef UINT32_C -# define INT32_C(x) x -# define UINT32_C(x) x ## U - -# undef INT64_C -# undef UINT64_C -# if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -# elif defined _MSC_VER -# define INT64_C(x) x##i64 -# else -# define INT64_C(x) x##LL -# endif -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -# elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -# else -# define UINT64_C(x) x##ULL -# endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -# ifndef INTMAX_C -# if LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -# endif - -# ifndef UINTMAX_C -# if ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -# endif - -#endif /* !1 */ - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (!defined UINTMAX_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# ifdef INT8_MAX -# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -# endif -# ifdef UINT8_MAX -# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -# endif -# ifdef INT16_MAX -# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -# endif -# ifdef UINT16_MAX -# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -# endif -# ifdef INT32_MAX -# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -# endif -# ifdef UINT32_MAX -# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -# endif -# ifdef INT64_MAX -# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -# endif -# ifdef UINT64_MAX -# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -# endif -# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -# ifdef WINT_MAX -# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -# endif -# ifdef SIG_ATOMIC_MAX -# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -# endif -#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _GL_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/stdio.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/stdio.h deleted file mode 100644 index 871a0c906..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/gnulib-lib/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_STDIO_H -#define _GL_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 1 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 1 -# if !1 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 0 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 1 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 1 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 0 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 1 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !0 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_STDIO_H */ -#endif /* _GL_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/config.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/config.h deleted file mode 100644 index 1dd5fe629..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/config.h +++ /dev/null @@ -1,387 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#ifndef GTPO_CONFIG_H -#define GTPO_CONFIG_H - -#include "../config.h" -#define DEFAULT_TEXT_DOMAIN "gettext-tools" -#undef DLL_VARIABLE -#define DLL_VARIABLE - -#endif /* GTPO_CONFIG_H */ -#define _gl_convert_FILETIME_to_POSIX libgettextpo__gl_convert_FILETIME_to_POSIX -#define _gl_fstat_by_handle libgettextpo__gl_fstat_by_handle -#define _gl_nothrow_get_osfhandle libgettextpo__gl_nothrow_get_osfhandle -#define _gl_raise_SIGPIPE libgettextpo__gl_raise_SIGPIPE -#define _obstack_allocated_p libgettextpo__obstack_allocated_p -#define _obstack_begin libgettextpo__obstack_begin -#define _obstack_begin_1 libgettextpo__obstack_begin_1 -#define _obstack_free libgettextpo__obstack_free -#define _obstack_memory_used libgettextpo__obstack_memory_used -#define _obstack_newchunk libgettextpo__obstack_newchunk -#define allow_duplicates libgettextpo_allow_duplicates -#define asnprintf libgettextpo_asnprintf -#define asprintf libgettextpo_asprintf -#define base_len libgettextpo_base_len -#define c_strcasecmp libgettextpo_c_strcasecmp -#define c_strncasecmp libgettextpo_c_strncasecmp -#define c_strstr libgettextpo_c_strstr -#define catalog_reader_alloc libgettextpo_catalog_reader_alloc -#define catalog_reader_free libgettextpo_catalog_reader_free -#define catalog_reader_parse libgettextpo_catalog_reader_parse -#define check_message libgettextpo_check_message -#define check_message_list libgettextpo_check_message_list -#define check_msgid_msgstr_format libgettextpo_check_msgid_msgstr_format -#define check_msgid_msgstr_format_i libgettextpo_check_msgid_msgstr_format_i -#define check_plural_eval libgettextpo_check_plural_eval -#define compute_curr_prefix libgettextpo_compute_curr_prefix -#define concatenated_filename libgettextpo_concatenated_filename -#define default_add_message libgettextpo_default_add_message -#define default_catalog_reader_alloc libgettextpo_default_catalog_reader_alloc -#define default_comment libgettextpo_default_comment -#define default_comment_dot libgettextpo_default_comment_dot -#define default_comment_filepos libgettextpo_default_comment_filepos -#define default_comment_special libgettextpo_default_comment_special -#define default_constructor libgettextpo_default_constructor -#define default_destructor libgettextpo_default_destructor -#define default_directive_domain libgettextpo_default_directive_domain -#define default_directive_message libgettextpo_default_directive_message -#define default_parse_brief libgettextpo_default_parse_brief -#define default_parse_debrief libgettextpo_default_parse_debrief -#define default_set_domain libgettextpo_default_set_domain -#define dir_list_append libgettextpo_dir_list_append -#define dir_list_nth libgettextpo_dir_list_nth -#define dir_list_restore libgettextpo_dir_list_restore -#define dir_list_save_reset libgettextpo_dir_list_save_reset -#define dup_cloexec libgettextpo_dup_cloexec -#define error libgettextpo_error -#define error_at_line libgettextpo_error_at_line -#define error_with_progname libgettextpo_error_with_progname -#define execute_all_close_hooks libgettextpo_execute_all_close_hooks -#define execute_all_ioctl_hooks libgettextpo_execute_all_ioctl_hooks -#define execute_close_hooks libgettextpo_execute_close_hooks -#define execute_ioctl_hooks libgettextpo_execute_ioctl_hooks -#define exit_failure libgettextpo_exit_failure -#define extract_plural_expression libgettextpo_extract_plural_expression -#define fcntl libgettextpo_fcntl -#define format_language libgettextpo_format_language -#define format_language_pretty libgettextpo_format_language_pretty -#define formatstring_awk libgettextpo_formatstring_awk -#define formatstring_boost libgettextpo_formatstring_boost -#define formatstring_c libgettextpo_formatstring_c -#define formatstring_csharp libgettextpo_formatstring_csharp -#define formatstring_elisp libgettextpo_formatstring_elisp -#define formatstring_gcc_internal libgettextpo_formatstring_gcc_internal -#define formatstring_gfc_internal libgettextpo_formatstring_gfc_internal -#define formatstring_java libgettextpo_formatstring_java -#define formatstring_java_printf libgettextpo_formatstring_java_printf -#define formatstring_javascript libgettextpo_formatstring_javascript -#define formatstring_kde libgettextpo_formatstring_kde -#define formatstring_kde_kuit libgettextpo_formatstring_kde_kuit -#define formatstring_librep libgettextpo_formatstring_librep -#define formatstring_lisp libgettextpo_formatstring_lisp -#define formatstring_lua libgettextpo_formatstring_lua -#define formatstring_objc libgettextpo_formatstring_objc -#define formatstring_parsers libgettextpo_formatstring_parsers -#define formatstring_pascal libgettextpo_formatstring_pascal -#define formatstring_perl libgettextpo_formatstring_perl -#define formatstring_perl_brace libgettextpo_formatstring_perl_brace -#define formatstring_php libgettextpo_formatstring_php -#define formatstring_python libgettextpo_formatstring_python -#define formatstring_python_brace libgettextpo_formatstring_python_brace -#define formatstring_qt libgettextpo_formatstring_qt -#define formatstring_qt_plural libgettextpo_formatstring_qt_plural -#define formatstring_ruby libgettextpo_formatstring_ruby -#define formatstring_scheme libgettextpo_formatstring_scheme -#define formatstring_sh libgettextpo_formatstring_sh -#define formatstring_smalltalk libgettextpo_formatstring_smalltalk -#define formatstring_tcl libgettextpo_formatstring_tcl -#define formatstring_ycp libgettextpo_formatstring_ycp -#define free_plural_expression libgettextpo_free_plural_expression -#define freea libgettextpo_freea -#define fstrcmp_bounded libgettextpo_fstrcmp_bounded -#define fstrcmp_free_resources libgettextpo_fstrcmp_free_resources -#define fsync libgettextpo_fsync -#define fuzzy_search_goal_function libgettextpo_fuzzy_search_goal_function -#define fwriteerror libgettextpo_fwriteerror -#define fwriteerror_no_ebadf libgettextpo_fwriteerror_no_ebadf -#define gcd libgettextpo_gcd -#define germanic_plural libgettextpo_germanic_plural -#define get_python_format_unnamed_arg_count libgettextpo_get_python_format_unnamed_arg_count -#define get_sysdep_c_format_directives libgettextpo_get_sysdep_c_format_directives -#define getdelim libgettextpo_getdelim -#define getdtablesize libgettextpo_getdtablesize -#define getprogname libgettextpo_getprogname -#define gl_linked_list_implementation libgettextpo_gl_linked_list_implementation -#define gl_msvc_inval_ensure_handler libgettextpo_gl_msvc_inval_ensure_handler -#define glwthread_mutex_destroy libgettextpo_glwthread_mutex_destroy -#define glwthread_mutex_init libgettextpo_glwthread_mutex_init -#define glwthread_mutex_lock libgettextpo_glwthread_mutex_lock -#define glwthread_mutex_trylock libgettextpo_glwthread_mutex_trylock -#define glwthread_mutex_unlock libgettextpo_glwthread_mutex_unlock -#define glwthread_once libgettextpo_glwthread_once -#define glwthread_recmutex_destroy libgettextpo_glwthread_recmutex_destroy -#define glwthread_recmutex_init libgettextpo_glwthread_recmutex_init -#define glwthread_recmutex_lock libgettextpo_glwthread_recmutex_lock -#define glwthread_recmutex_trylock libgettextpo_glwthread_recmutex_trylock -#define glwthread_recmutex_unlock libgettextpo_glwthread_recmutex_unlock -#define glwthread_rwlock_destroy libgettextpo_glwthread_rwlock_destroy -#define glwthread_rwlock_init libgettextpo_glwthread_rwlock_init -#define glwthread_rwlock_rdlock libgettextpo_glwthread_rwlock_rdlock -#define glwthread_rwlock_tryrdlock libgettextpo_glwthread_rwlock_tryrdlock -#define glwthread_rwlock_trywrlock libgettextpo_glwthread_rwlock_trywrlock -#define glwthread_rwlock_unlock libgettextpo_glwthread_rwlock_unlock -#define glwthread_rwlock_wrlock libgettextpo_glwthread_rwlock_wrlock -#define glwthread_tls_get libgettextpo_glwthread_tls_get -#define glwthread_tls_key_create libgettextpo_glwthread_tls_key_create -#define glwthread_tls_key_delete libgettextpo_glwthread_tls_key_delete -#define glwthread_tls_process_destructors libgettextpo_glwthread_tls_process_destructors -#define glwthread_tls_set libgettextpo_glwthread_tls_set -#define gnu_mbswidth libgettextpo_gnu_mbswidth -#define gram_max_allowed_errors libgettextpo_gram_max_allowed_errors -#define gram_pos libgettextpo_gram_pos -#define gram_pos_column libgettextpo_gram_pos_column -#define handle_filepos_comment_option libgettextpo_handle_filepos_comment_option -#define hard_locale libgettextpo_hard_locale -#define hash_destroy libgettextpo_hash_destroy -#define hash_find_entry libgettextpo_hash_find_entry -#define hash_init libgettextpo_hash_init -#define hash_insert_entry libgettextpo_hash_insert_entry -#define hash_iterate libgettextpo_hash_iterate -#define hash_iterate_modify libgettextpo_hash_iterate_modify -#define hash_set_value libgettextpo_hash_set_value -#define iconveh_close libgettextpo_iconveh_close -#define iconveh_open libgettextpo_iconveh_open -#define input_format_po libgettextpo_input_format_po -#define install_sigfpe_handler libgettextpo_install_sigfpe_handler -#define is_ascii_message libgettextpo_is_ascii_message -#define is_ascii_message_list libgettextpo_is_ascii_message_list -#define is_ascii_msgdomain_list libgettextpo_is_ascii_msgdomain_list -#define is_ascii_string libgettextpo_is_ascii_string -#define is_ascii_string_list libgettextpo_is_ascii_string_list -#define last_component libgettextpo_last_component -#define lex_end libgettextpo_lex_end -#define lex_start libgettextpo_lex_start -#define locale_charset libgettextpo_locale_charset -#define make_format_description_string libgettextpo_make_format_description_string -#define make_range_description_string libgettextpo_make_range_description_string -#define markup_parse_context_end_parse libgettextpo_markup_parse_context_end_parse -#define markup_parse_context_free libgettextpo_markup_parse_context_free -#define markup_parse_context_get_error libgettextpo_markup_parse_context_get_error -#define markup_parse_context_new libgettextpo_markup_parse_context_new -#define markup_parse_context_parse libgettextpo_markup_parse_context_parse -#define maybe_print_progname libgettextpo_maybe_print_progname -#define mbsnwidth libgettextpo_mbsnwidth -#define mem_cd_iconv libgettextpo_mem_cd_iconv -#define mem_cd_iconveh libgettextpo_mem_cd_iconveh -#define mem_iconveh libgettextpo_mem_iconveh -#define mem_iconveha libgettextpo_mem_iconveha -#define message_alloc libgettextpo_message_alloc -#define message_comment_append libgettextpo_message_comment_append -#define message_comment_dot_append libgettextpo_message_comment_dot_append -#define message_comment_filepos libgettextpo_message_comment_filepos -#define message_copy libgettextpo_message_copy -#define message_free libgettextpo_message_free -#define message_list_alloc libgettextpo_message_list_alloc -#define message_list_append libgettextpo_message_list_append -#define message_list_copy libgettextpo_message_list_copy -#define message_list_free libgettextpo_message_list_free -#define message_list_insert_at libgettextpo_message_list_insert_at -#define message_list_list_alloc libgettextpo_message_list_list_alloc -#define message_list_list_append libgettextpo_message_list_list_append -#define message_list_list_append_list libgettextpo_message_list_list_append_list -#define message_list_list_free libgettextpo_message_list_list_free -#define message_list_list_search libgettextpo_message_list_list_search -#define message_list_msgids_changed libgettextpo_message_list_msgids_changed -#define message_list_prepend libgettextpo_message_list_prepend -#define message_list_remove_if_not libgettextpo_message_list_remove_if_not -#define message_list_search libgettextpo_message_list_search -#define message_list_search_fuzzy libgettextpo_message_list_search_fuzzy -#define message_page_width_ignore libgettextpo_message_page_width_ignore -#define message_page_width_set libgettextpo_message_page_width_set -#define message_print_comment libgettextpo_message_print_comment -#define message_print_comment_dot libgettextpo_message_print_comment_dot -#define message_print_comment_filepos libgettextpo_message_print_comment_filepos -#define message_print_comment_flags libgettextpo_message_print_comment_flags -#define message_print_style_comment libgettextpo_message_print_style_comment -#define message_print_style_escape libgettextpo_message_print_style_escape -#define message_print_style_filepos libgettextpo_message_print_style_filepos -#define message_print_style_indent libgettextpo_message_print_style_indent -#define message_print_style_uniforum libgettextpo_message_print_style_uniforum -#define mmalloca libgettextpo_mmalloca -#define msgdomain_alloc libgettextpo_msgdomain_alloc -#define msgdomain_free libgettextpo_msgdomain_free -#define msgdomain_list_alloc libgettextpo_msgdomain_list_alloc -#define msgdomain_list_append libgettextpo_msgdomain_list_append -#define msgdomain_list_copy libgettextpo_msgdomain_list_copy -#define msgdomain_list_free libgettextpo_msgdomain_list_free -#define msgdomain_list_print libgettextpo_msgdomain_list_print -#define msgdomain_list_sort_by_filepos libgettextpo_msgdomain_list_sort_by_filepos -#define msgdomain_list_sort_by_msgid libgettextpo_msgdomain_list_sort_by_msgid -#define msgdomain_list_sublist libgettextpo_msgdomain_list_sublist -#define multiline_error libgettextpo_multiline_error -#define multiline_warning libgettextpo_multiline_warning -#define next_prime libgettextpo_next_prime -#define obstack_alloc_failed_handler libgettextpo_obstack_alloc_failed_handler -#define open_catalog_file libgettextpo_open_catalog_file -#define output_format_po libgettextpo_output_format_po -#define parse_plural_expression libgettextpo_parse_plural_expression -#define pass_obsolete_entries libgettextpo_pass_obsolete_entries -#define plural_eval libgettextpo_plural_eval -#define plural_table libgettextpo_plural_table -#define plural_table_size libgettextpo_plural_table_size -#define po_callback_comment libgettextpo_po_callback_comment -#define po_callback_comment_dispatcher libgettextpo_po_callback_comment_dispatcher -#define po_callback_comment_dot libgettextpo_po_callback_comment_dot -#define po_callback_comment_filepos libgettextpo_po_callback_comment_filepos -#define po_callback_comment_special libgettextpo_po_callback_comment_special -#define po_callback_domain libgettextpo_po_callback_domain -#define po_callback_message libgettextpo_po_callback_message -#define po_charset_ascii libgettextpo_po_charset_ascii -#define po_charset_ascii_compatible libgettextpo_po_charset_ascii_compatible -#define po_charset_canonicalize libgettextpo_po_charset_canonicalize -#define po_charset_character_iterator libgettextpo_po_charset_character_iterator -#define po_charset_utf8 libgettextpo_po_charset_utf8 -#define po_error libgettextpo_po_error -#define po_error_at_line libgettextpo_po_error_at_line -#define po_gram_char libgettextpo_po_gram_char -#define po_gram_error libgettextpo_po_gram_error -#define po_gram_error_at_line libgettextpo_po_gram_error_at_line -#define po_gram_lex libgettextpo_po_gram_lex -#define po_gram_lval libgettextpo_po_gram_lval -#define po_gram_nerrs libgettextpo_po_gram_nerrs -#define po_gram_parse libgettextpo_po_gram_parse -#define po_is_charset_weird libgettextpo_po_is_charset_weird -#define po_is_charset_weird_cjk libgettextpo_po_is_charset_weird_cjk -#define po_lex_charset libgettextpo_po_lex_charset -#define po_lex_charset_close libgettextpo_po_lex_charset_close -#define po_lex_charset_init libgettextpo_po_lex_charset_init -#define po_lex_charset_set libgettextpo_po_lex_charset_set -#define po_lex_iconv libgettextpo_po_lex_iconv -#define po_lex_pass_comments libgettextpo_po_lex_pass_comments -#define po_lex_pass_obsolete_entries libgettextpo_po_lex_pass_obsolete_entries -#define po_lex_weird_cjk libgettextpo_po_lex_weird_cjk -#define po_multiline_error libgettextpo_po_multiline_error -#define po_multiline_warning libgettextpo_po_multiline_warning -#define po_parse_comment_special libgettextpo_po_parse_comment_special -#define po_xerror libgettextpo_po_xerror -#define po_xerror2 libgettextpo_po_xerror2 -#define possible_format_p libgettextpo_possible_format_p -#define printf_fetchargs libgettextpo_printf_fetchargs -#define printf_parse libgettextpo_printf_parse -#define rawmemchr libgettextpo_rawmemchr -#define read_catalog_file libgettextpo_read_catalog_file -#define read_catalog_stream libgettextpo_read_catalog_stream -#define register_fd_hook libgettextpo_register_fd_hook -#define relocate libgettextpo_relocate -#define relocate2 libgettextpo_relocate2 -#define rpl_close libgettextpo_rpl_close -#define rpl_dup2 libgettextpo_rpl_dup2 -#define rpl_error_message_count libgettextpo_rpl_error_message_count -#define rpl_error_one_per_line libgettextpo_rpl_error_one_per_line -#define rpl_error_print_progname libgettextpo_rpl_error_print_progname -#define rpl_fdopen libgettextpo_rpl_fdopen -#define rpl_fopen libgettextpo_rpl_fopen -#define rpl_fprintf libgettextpo_rpl_fprintf -#define rpl_fputc libgettextpo_rpl_fputc -#define rpl_fputs libgettextpo_rpl_fputs -#define rpl_fstat libgettextpo_rpl_fstat -#define rpl_fwrite libgettextpo_rpl_fwrite -#define rpl_getline libgettextpo_rpl_getline -#define rpl_malloc libgettextpo_rpl_malloc -#define rpl_mbrtowc libgettextpo_rpl_mbrtowc -#define rpl_mbsinit libgettextpo_rpl_mbsinit -#define rpl_open libgettextpo_rpl_open -#define rpl_printf libgettextpo_rpl_printf -#define rpl_putchar libgettextpo_rpl_putchar -#define rpl_puts libgettextpo_rpl_puts -#define rpl_raise libgettextpo_rpl_raise -#define rpl_realloc libgettextpo_rpl_realloc -#define rpl_signal libgettextpo_rpl_signal -#define rpl_stat libgettextpo_rpl_stat -#define rpl_strerror libgettextpo_rpl_strerror -#define rpl_strstr libgettextpo_rpl_strstr -#define rpl_vfprintf libgettextpo_rpl_vfprintf -#define rpl_vprintf libgettextpo_rpl_vprintf -#define sentence_end libgettextpo_sentence_end -#define sentence_end_required_spaces libgettextpo_sentence_end_required_spaces -#define set_cloexec_flag libgettextpo_set_cloexec_flag -#define set_relocation_prefix libgettextpo_set_relocation_prefix -#define setlocale_null libgettextpo_setlocale_null -#define setlocale_null_r libgettextpo_setlocale_null_r -#define sigaddset libgettextpo_sigaddset -#define sigdelset libgettextpo_sigdelset -#define sigemptyset libgettextpo_sigemptyset -#define sigfillset libgettextpo_sigfillset -#define sigfpe_exit libgettextpo_sigfpe_exit -#define sigismember libgettextpo_sigismember -#define significant_format_p libgettextpo_significant_format_p -#define sigpending libgettextpo_sigpending -#define sigprocmask libgettextpo_sigprocmask -#define stpcpy libgettextpo_stpcpy -#define stpncpy libgettextpo_stpncpy -#define str_cd_iconv libgettextpo_str_cd_iconv -#define str_cd_iconveh libgettextpo_str_cd_iconveh -#define str_iconv libgettextpo_str_iconv -#define str_iconveh libgettextpo_str_iconveh -#define str_iconveha libgettextpo_str_iconveha -#define strchrnul libgettextpo_strchrnul -#define strerror_override libgettextpo_strerror_override -#define string_list_alloc libgettextpo_string_list_alloc -#define string_list_append libgettextpo_string_list_append -#define string_list_append_unique libgettextpo_string_list_append_unique -#define string_list_concat libgettextpo_string_list_concat -#define string_list_concat_destroy libgettextpo_string_list_concat_destroy -#define string_list_destroy libgettextpo_string_list_destroy -#define string_list_free libgettextpo_string_list_free -#define string_list_init libgettextpo_string_list_init -#define string_list_join libgettextpo_string_list_join -#define string_list_member libgettextpo_string_list_member -#define string_list_remove libgettextpo_string_list_remove -#define syntax_check_message_list libgettextpo_syntax_check_message_list -#define syntax_check_name libgettextpo_syntax_check_name -#define textmode_xerror libgettextpo_textmode_xerror -#define textmode_xerror2 libgettextpo_textmode_xerror2 -#define u16_mbtouc_aux libgettextpo_u16_mbtouc_aux -#define u8_check libgettextpo_u8_check -#define u8_conv_from_encoding libgettextpo_u8_conv_from_encoding -#define u8_mblen libgettextpo_u8_mblen -#define u8_mbtouc_aux libgettextpo_u8_mbtouc_aux -#define u8_mbtouc_unsafe_aux libgettextpo_u8_mbtouc_unsafe_aux -#define u8_mbtoucr libgettextpo_u8_mbtoucr -#define u8_next libgettextpo_u8_next -#define u8_possible_linebreaks libgettextpo_u8_possible_linebreaks -#define u8_prev libgettextpo_u8_prev -#define u8_strmbtouc libgettextpo_u8_strmbtouc -#define u8_uctomb_aux libgettextpo_u8_uctomb_aux -#define u8_width_linebreaks libgettextpo_u8_width_linebreaks -#define uc_is_alpha libgettextpo_uc_is_alpha -#define uc_is_space libgettextpo_uc_is_space -#define uc_width libgettextpo_uc_width -#define ulc_width_linebreaks libgettextpo_ulc_width_linebreaks -#define uniconv_register_autodetect libgettextpo_uniconv_register_autodetect -#define unilbrk_is_all_ascii libgettextpo_unilbrk_is_all_ascii -#define unilbrk_is_utf8_encoding libgettextpo_unilbrk_is_utf8_encoding -#define unilbrk_table libgettextpo_unilbrk_table -#define unilbrkprop libgettextpo_unilbrkprop -#define uninstall_sigfpe_handler libgettextpo_uninstall_sigfpe_handler -#define unregister_fd_hook libgettextpo_unregister_fd_hook -#define vasnprintf libgettextpo_vasnprintf -#define vasprintf libgettextpo_vasprintf -#define wcwidth libgettextpo_wcwidth -#define x2realloc libgettextpo_x2realloc -#define xalloc_die libgettextpo_xalloc_die -#define xasprintf libgettextpo_xasprintf -#define xcalloc libgettextpo_xcalloc -#define xconcatenated_filename libgettextpo_xconcatenated_filename -#define xmalloc libgettextpo_xmalloc -#define xmalloc_exit_failure libgettextpo_xmalloc_exit_failure -#define xmem_cd_iconv libgettextpo_xmem_cd_iconv -#define xmemdup libgettextpo_xmemdup -#define xmmalloca libgettextpo_xmmalloca -#define xnmalloc libgettextpo_xnmalloc -#define xrealloc libgettextpo_xrealloc -#define xstr_cd_iconv libgettextpo_xstr_cd_iconv -#define xstr_iconv libgettextpo_xstr_iconv -#define xstrdup libgettextpo_xstrdup -#define xvasprintf libgettextpo_xvasprintf -#define xzalloc libgettextpo_xzalloc diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/stdint.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/stdint.h deleted file mode 100644 index ac35be0a0..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/stdint.h +++ /dev/null @@ -1,747 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _GL_GTPO_STDINT_H - -#if __GNUC__ >= 3 - -#endif - - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#else - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if 1 -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _GL_GTPO_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#endif - -#if ! defined _GL_GTPO_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_GTPO_STDINT_H - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -#include - -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if 1 -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - -#if ! 1 - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h". */ -# if 1 && ! defined _AIX -# include -# endif - -# if 1 - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -# elif 0 - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -# endif - -# if 0 && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -# endif - -# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -/* These are separate macros, because if you try to merge these macros into - a single one, HP-UX cc rejects the resulting expression in constant - expressions. */ -# define _STDINT_UNSIGNED_MIN(bits, zero) \ - (zero) -# define _STDINT_SIGNED_MIN(bits, zero) \ - (~ _STDINT_MAX (1, bits, zero)) - -# define _STDINT_MAX(signed, bits, zero) \ - (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef int8_t -# undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -# define int8_t gl_int8_t -# define uint8_t gl_uint8_t - -# undef int16_t -# undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -# define int16_t gl_int16_t -# define uint16_t gl_uint16_t - -# undef int32_t -# undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -# define int32_t gl_int32_t -# define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -# ifdef INT64_MAX -# define GL_INT64_T -# else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# else -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -# endif - -# ifdef UINT64_MAX -# define GL_UINT64_T -# else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# else -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -# endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -# define _UINT8_T -# define _UINT32_T -# define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef int_least8_t -# undef uint_least8_t -# undef int_least16_t -# undef uint_least16_t -# undef int_least32_t -# undef uint_least32_t -# undef int_least64_t -# undef uint_least64_t -# define int_least8_t int8_t -# define uint_least8_t uint8_t -# define int_least16_t int16_t -# define uint_least16_t uint16_t -# define int_least32_t int32_t -# define uint_least32_t uint32_t -# ifdef GL_INT64_T -# define int_least64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_least64_t uint64_t -# endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -# undef int_fast8_t -# undef uint_fast8_t -# undef int_fast16_t -# undef uint_fast16_t -# undef int_fast32_t -# undef uint_fast32_t -# undef int_fast64_t -# undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -# ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -# else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -# endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -# define int_fast8_t gl_int_fast8_t -# define uint_fast8_t gl_uint_fast8_t -# define int_fast16_t gl_int_fast16_t -# define uint_fast16_t gl_uint_fast16_t -# define int_fast32_t gl_int_fast32_t -# define uint_fast32_t gl_uint_fast32_t -# ifdef GL_INT64_T -# define int_fast64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -# endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -/* kLIBC's defines _INTPTR_T_DECLARED and needs its own - definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and - uintptr_t to avoid conflicting declarations of system functions like - _findclose in . */ -# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) -# undef intptr_t -# undef uintptr_t -# ifdef _WIN64 -typedef long long int gl_intptr_t; -typedef unsigned long long int gl_uintptr_t; -# else -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -# endif -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t -# endif - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -# ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -# endif - -# ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -# endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -# define GNULIB_defined_stdint_types 1 -# endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef INT8_MIN -# undef INT8_MAX -# undef UINT8_MAX -# define INT8_MIN (~ INT8_MAX) -# define INT8_MAX 127 -# define UINT8_MAX 255 - -# undef INT16_MIN -# undef INT16_MAX -# undef UINT16_MAX -# define INT16_MIN (~ INT16_MAX) -# define INT16_MAX 32767 -# define UINT16_MAX 65535 - -# undef INT32_MIN -# undef INT32_MAX -# undef UINT32_MAX -# define INT32_MIN (~ INT32_MAX) -# define INT32_MAX 2147483647 -# define UINT32_MAX 4294967295U - -# if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -# endif - -# if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -# endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef INT_LEAST8_MIN -# undef INT_LEAST8_MAX -# undef UINT_LEAST8_MAX -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST8_MAX INT8_MAX -# define UINT_LEAST8_MAX UINT8_MAX - -# undef INT_LEAST16_MIN -# undef INT_LEAST16_MAX -# undef UINT_LEAST16_MAX -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST16_MAX INT16_MAX -# define UINT_LEAST16_MAX UINT16_MAX - -# undef INT_LEAST32_MIN -# undef INT_LEAST32_MAX -# undef UINT_LEAST32_MAX -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST32_MAX INT32_MAX -# define UINT_LEAST32_MAX UINT32_MAX - -# undef INT_LEAST64_MIN -# undef INT_LEAST64_MAX -# ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -# endif - -# undef UINT_LEAST64_MAX -# ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -# undef INT_FAST8_MIN -# undef INT_FAST8_MAX -# undef UINT_FAST8_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define UINT_FAST8_MAX UCHAR_MAX - -# undef INT_FAST16_MIN -# undef INT_FAST16_MAX -# undef UINT_FAST16_MAX -# define INT_FAST16_MIN INT_FAST32_MIN -# define INT_FAST16_MAX INT_FAST32_MAX -# define UINT_FAST16_MAX UINT_FAST32_MAX - -# undef INT_FAST32_MIN -# undef INT_FAST32_MAX -# undef UINT_FAST32_MAX -# ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -# else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -# endif - -# undef INT_FAST64_MIN -# undef INT_FAST64_MAX -# ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -# endif - -# undef UINT_FAST64_MAX -# ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -# undef INTPTR_MIN -# undef INTPTR_MAX -# undef UINTPTR_MAX -# ifdef _WIN64 -# define INTPTR_MIN LLONG_MIN -# define INTPTR_MAX LLONG_MAX -# define UINTPTR_MAX ULLONG_MAX -# else -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX -# endif - -/* 7.18.2.5. Limits of greatest-width integer types */ - -# ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -# endif - -# ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -# endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -# undef PTRDIFF_MIN -# undef PTRDIFF_MAX -# if 0 -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -# else -# define PTRDIFF_MIN \ - _STDINT_SIGNED_MIN (, 0) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, , 0) -# endif - -/* sig_atomic_t limits */ -# undef SIG_ATOMIC_MIN -# undef SIG_ATOMIC_MAX -# if -# define SIG_ATOMIC_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define SIG_ATOMIC_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define SIG_ATOMIC_MAX \ - _STDINT_MAX (, , \ - 0) - - -/* size_t limit */ -# undef SIZE_MAX -# if 0 -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -# else -# define SIZE_MAX _STDINT_MAX (0, , 0) -# endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -# if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# endif -# undef WCHAR_MIN -# undef WCHAR_MAX -# if -# define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WCHAR_MAX \ - _STDINT_MAX (, , 0) - -/* wint_t limits */ -/* If gnulib's or overrides wint_t, is not - accurate, therefore use the definitions from above. */ -# if !1 -# undef WINT_MIN -# undef WINT_MAX -# if -# define WINT_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WINT_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WINT_MAX \ - _STDINT_MAX (, , 0) -# endif - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -# undef INT8_C -# undef UINT8_C -# define INT8_C(x) x -# define UINT8_C(x) x - -# undef INT16_C -# undef UINT16_C -# define INT16_C(x) x -# define UINT16_C(x) x - -# undef INT32_C -# undef UINT32_C -# define INT32_C(x) x -# define UINT32_C(x) x ## U - -# undef INT64_C -# undef UINT64_C -# if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -# elif defined _MSC_VER -# define INT64_C(x) x##i64 -# else -# define INT64_C(x) x##LL -# endif -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -# elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -# else -# define UINT64_C(x) x##ULL -# endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -# ifndef INTMAX_C -# if LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -# endif - -# ifndef UINTMAX_C -# if ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -# endif - -#endif /* !1 */ - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (!defined UINTMAX_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# ifdef INT8_MAX -# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -# endif -# ifdef UINT8_MAX -# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -# endif -# ifdef INT16_MAX -# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -# endif -# ifdef UINT16_MAX -# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -# endif -# ifdef INT32_MAX -# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -# endif -# ifdef UINT32_MAX -# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -# endif -# ifdef INT64_MAX -# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -# endif -# ifdef UINT64_MAX -# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -# endif -# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -# ifdef WINT_MAX -# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -# endif -# ifdef SIG_ATOMIC_MAX -# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -# endif -#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _GL_GTPO_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _GL_GTPO_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/stdio.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/stdio.h deleted file mode 100644 index 52415f204..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/gettext-tools/libgettextpo/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_GTPO_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_GTPO_STDIO_H -#define _GL_GTPO_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 1 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 1 -# if !1 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 0 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 1 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 1 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 0 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 1 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !0 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_GTPO_STDIO_H */ -#endif /* _GL_GTPO_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/config.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/config.h deleted file mode 100644 index cd58dba0f..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/config.h +++ /dev/null @@ -1,1456 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if you wish *printf() functions that have a safe handling of - non-IEEE-754 'long double' values. */ -#define CHECK_PRINTF_SAFE 1 - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'double'. */ -#define DBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'double'. */ -#define DBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_WORD */ - -/* Define to 1 if // is a file system root distinct from /. */ -#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'float'. */ -#define FLT_EXPBIT0_BIT 23 - -/* Define as the word index where to find the exponent of 'float'. */ -#define FLT_EXPBIT0_WORD 0 - -/* Define as the bit index in the word where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_WORD */ - -/* Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday. */ -#define GETTIMEOFDAY_TIMEZONE void - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module snprintf shall be considered present. */ -#define GNULIB_SNPRINTF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module frexp should be tested. */ -#define GNULIB_TEST_FREXP 1 - -/* Define to 1 when the gnulib module frexpl should be tested. */ -#define GNULIB_TEST_FREXPL 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module fsync should be tested. */ -#define GNULIB_TEST_FSYNC 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module gethostname should be tested. */ -#define GNULIB_TEST_GETHOSTNAME 1 - -/* Define to 1 when the gnulib module gettimeofday should be tested. */ -#define GNULIB_TEST_GETTIMEOFDAY 1 - -/* Define to 1 when the gnulib module isatty should be tested. */ -#define GNULIB_TEST_ISATTY 1 - -/* Define to 1 when the gnulib module isinf should be tested. */ -#define GNULIB_TEST_ISINF 1 - -/* Define to 1 when the gnulib module isnan should be tested. */ -#define GNULIB_TEST_ISNAN 1 - -/* Define to 1 when the gnulib module isnand should be tested. */ -#define GNULIB_TEST_ISNAND 1 - -/* Define to 1 when the gnulib module isnanf should be tested. */ -#define GNULIB_TEST_ISNANF 1 - -/* Define to 1 when the gnulib module isnanl should be tested. */ -#define GNULIB_TEST_ISNANL 1 - -/* Define to 1 when the gnulib module log10 should be tested. */ -#define GNULIB_TEST_LOG10 1 - -/* Define to 1 when the gnulib module malloc-posix should be tested. */ -#define GNULIB_TEST_MALLOC_POSIX 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module read should be tested. */ -#define GNULIB_TEST_READ 1 - -/* Define to 1 when the gnulib module sigaction should be tested. */ -#define GNULIB_TEST_SIGACTION 1 - -/* Define to 1 when the gnulib module signbit should be tested. */ -#define GNULIB_TEST_SIGNBIT 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module snprintf should be tested. */ -#define GNULIB_TEST_SNPRINTF 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module stpcpy should be tested. */ -#define GNULIB_TEST_STPCPY 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module vasprintf should be tested. */ -#define GNULIB_TEST_VASPRINTF 1 - -/* Define to 1 when the gnulib module vsnprintf should be tested. */ -#define GNULIB_TEST_VSNPRINTF 1 - -/* Define to 1 when the gnulib module write should be tested. */ -#define GNULIB_TEST_WRITE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUC 1 - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_NAMESER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define if the copysignf function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNF_IN_LIBC */ - -/* Define if the copysignl function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNL_IN_LIBC */ - -/* Define if the copysign function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGN_IN_LIBC */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. - */ -#define HAVE_DECL_ALARM 0 - -/* Define to 1 if you have the declaration of `copysign', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGN */ - -/* Define to 1 if you have the declaration of `copysignf', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNF */ - -/* Define to 1 if you have the declaration of `copysignl', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNL */ - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. - */ -#define HAVE_DECL_ISINF 1 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `snprintf', and to 0 if you - don't. */ -#define HAVE_DECL_SNPRINTF 0 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VSNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define if the frexpl function is available in libc. */ -/* #undef HAVE_FREXPL_IN_LIBC */ - -/* Define if the frexp function is available in libc. */ -/* #undef HAVE_FREXP_IN_LIBC */ - -/* Define to 1 if you have the `fsync' function. */ -/* #undef HAVE_FSYNC */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `gethostname' function. */ -/* #undef HAVE_GETHOSTNAME */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define to 1 if you have the `getsid' function. */ -/* #undef HAVE_GETSID */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define if the isnan(double) function is available in libc. */ -#define HAVE_ISNAND_IN_LIBC 1 - -/* Define if the isnan(float) function is available in libc. */ -/* #undef HAVE_ISNANF_IN_LIBC */ - -/* Define if the isnan(long double) function is available in libc. */ -/* #undef HAVE_ISNANL_IN_LIBC */ - -/* Define if the ldexpl function is available in libc. */ -#define HAVE_LDEXPL_IN_LIBC 1 - -/* Define if the ldexp function is available in libc. */ -#define HAVE_LDEXP_IN_LIBC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `localtime' function. */ -#define HAVE_LOCALTIME 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define if the 'malloc' function is POSIX compliant. */ -/* #undef HAVE_MALLOC_POSIX */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_LIMITS_H */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_SYS_PARAM_H */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETDB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_H */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -/* #undef HAVE_NL_LANGINFO */ - -/* Define to 1 if the system has obstacks that work with any size object. */ -/* #undef HAVE_OBSTACK */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RESOLV_H */ - -/* Define to 1 if 'long double' and 'double' have the same representation. */ -#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1 - -/* Define to 1 if the system has the type `sa_family_t'. */ -/* #undef HAVE_SA_FAMILY_T */ - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `shutdown' function. */ -/* #undef HAVE_SHUTDOWN */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if you have the `sigaltstack' function. */ -/* #undef HAVE_SIGALTSTACK */ - -/* Define to 1 if the system has the type `siginfo_t'. */ -/* #undef HAVE_SIGINFO_T */ - -/* Define to 1 if you have the `siginterrupt' function. */ -/* #undef HAVE_SIGINTERRUPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if the system has the type `sig_atomic_t'. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the return value of the snprintf function is the number of of - bytes (excluding the terminating NUL) that would have been produced if the - buffer had been large enough. */ -/* #undef HAVE_SNPRINTF_RETVAL_C99 */ - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ -/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ - -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UIO_H */ - -/* Define to 1 if you have the `tcdrain' function. */ -/* #undef HAVE_TCDRAIN */ - -/* Define to 1 if you have the `tcgetattr' function. */ -/* #undef HAVE_TCGETATTR */ - -/* Define if tgetent(), tgetnum(), tgetstr(), tgetflag() are among the termcap - library functions. */ -/* #undef HAVE_TERMCAP */ - -/* Define if setupterm(), tigetnum(), tigetstr(), tigetflag() are among the - termcap library functions. */ -/* #undef HAVE_TERMINFO */ - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define if tparam() is among the termcap library functions. */ -/* #undef HAVE_TPARAM */ - -/* Define to 1 if you have the `uname' function. */ -/* #undef HAVE_UNAME */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if the system has the type 'unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 if you have the `vasnprintf' function. */ -/* #undef HAVE_VASNPRINTF */ - -/* Define to 1 if you have the `vasprintf' function. */ -/* #undef HAVE_VASPRINTF */ - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -/* #undef HAVE_WCSLEN */ - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_WS2TCPIP_H 1 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define HOST_NAME_MAX when does not define it. */ -#define HOST_NAME_MAX 256 - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to 1 if the C compiler is actually a C++ compiler. */ -/* #undef IS_CPLUSPLUS */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'long double'. */ -#define LDBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'long double'. */ -#define LDBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'long - double'. */ -/* #undef LDBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'long double'. */ -/* #undef LDBL_SIGNBIT_WORD */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define if the vasnprintf implementation needs special code for the 'a' and - 'A' directives. */ -#define NEED_PRINTF_DIRECTIVE_A 1 - -/* Define if the vasnprintf implementation needs special code for the 'F' - directive. */ -#define NEED_PRINTF_DIRECTIVE_F 1 - -/* Define if the vasnprintf implementation needs special code for the 'ls' - directive. */ -/* #undef NEED_PRINTF_DIRECTIVE_LS */ - -/* Define if the vasnprintf implementation needs special code for 'double' - arguments. */ -#define NEED_PRINTF_DOUBLE 1 - -/* Define if the vasnprintf implementation needs special code for surviving - out-of-memory conditions. */ -#define NEED_PRINTF_ENOMEM 1 - -/* Define if the vasnprintf implementation needs special code for the ' flag. - */ -#define NEED_PRINTF_FLAG_GROUPING 1 - -/* Define if the vasnprintf implementation needs special code for the '-' - flag. */ -/* #undef NEED_PRINTF_FLAG_LEFTADJUST */ - -/* Define if the vasnprintf implementation needs special code for the 0 flag. - */ -#define NEED_PRINTF_FLAG_ZERO 1 - -/* Define if the vasnprintf implementation needs special code for infinite - 'double' arguments. */ -#define NEED_PRINTF_INFINITE_DOUBLE 1 - -/* Define if the vasnprintf implementation needs special code for infinite - 'long double' arguments. */ -/* #undef NEED_PRINTF_INFINITE_LONG_DOUBLE */ - -/* Define if the vasnprintf implementation needs special code for 'long - double' arguments. */ -#define NEED_PRINTF_LONG_DOUBLE 1 - -/* Define if the vasnprintf implementation needs special code for supporting - large precisions without arbitrary bounds. */ -#define NEED_PRINTF_UNBOUNDED_PRECISION 1 - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "libtextstyle" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define if vasnprintf exists but is overridden by gnulib. */ -/* #undef REPLACE_VASNPRINTF */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Define to a working va_copy macro or replacement. */ -#define VA_COPY va_copy - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define if WSAStartup is needed. */ -#define WINDOWS_SOCKETS 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 in order to get the POSIX compatible declarations of socket - functions. */ -/* #undef _POSIX_PII_SOCKET */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b)) - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Define to long or long long if and don't define. */ -/* #undef intmax_t */ - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define as an integer type suitable for memory locations that can be - accessed atomically even in the presence of asynchronous signals. */ -/* #undef sig_atomic_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* type to use in place of socklen_t if not defined */ -/* #undef socklen_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define as a macro for copying va_list variables. */ -/* #undef va_copy */ - - -/* In order to define all the symbols declared by textstyle.h, do not use - 'inline' functions, even when the compiler would support them. */ -#include "notinline.h" - -/* Ignore DLL_VARIABLE markup that is meant for gettext. */ -#define DLL_VARIABLE - -/* Get LIBTEXTSTYLE_DLL_VARIABLE. */ -#include "textstyle/woe32dll.h" - diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/config.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/config.h deleted file mode 100644 index bd5668611..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/config.h +++ /dev/null @@ -1,1250 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#ifndef LIBTEXTSTYLE_CONFIG_H -#define LIBTEXTSTYLE_CONFIG_H - -#include "../config.h" - -#endif /* LIBTEXTSTYLE_CONFIG_H */ -#define isatty libtextstyle_isatty -#define __oldXMLWDcompatibility libtextstyle___oldXMLWDcompatibility -#define __xmlBufferAllocScheme libtextstyle___xmlBufferAllocScheme -#define __xmlDefaultBufferSize libtextstyle___xmlDefaultBufferSize -#define __xmlDefaultSAXLocator libtextstyle___xmlDefaultSAXLocator -#define __xmlDeregisterNodeDefaultValue libtextstyle___xmlDeregisterNodeDefaultValue -#define __xmlDoValidityCheckingDefaultValue libtextstyle___xmlDoValidityCheckingDefaultValue -#define __xmlErrEncoding libtextstyle___xmlErrEncoding -#define __xmlGenericError libtextstyle___xmlGenericError -#define __xmlGenericErrorContext libtextstyle___xmlGenericErrorContext -#define __xmlGetWarningsDefaultValue libtextstyle___xmlGetWarningsDefaultValue -#define __xmlGlobalInitMutexDestroy libtextstyle___xmlGlobalInitMutexDestroy -#define __xmlGlobalInitMutexLock libtextstyle___xmlGlobalInitMutexLock -#define __xmlGlobalInitMutexUnlock libtextstyle___xmlGlobalInitMutexUnlock -#define __xmlIOErr libtextstyle___xmlIOErr -#define __xmlIndentTreeOutput libtextstyle___xmlIndentTreeOutput -#define __xmlInitializeDict libtextstyle___xmlInitializeDict -#define __xmlKeepBlanksDefaultValue libtextstyle___xmlKeepBlanksDefaultValue -#define __xmlLastError libtextstyle___xmlLastError -#define __xmlLineNumbersDefaultValue libtextstyle___xmlLineNumbersDefaultValue -#define __xmlLoadExtDtdDefaultValue libtextstyle___xmlLoadExtDtdDefaultValue -#define __xmlLoaderErr libtextstyle___xmlLoaderErr -#define __xmlOutputBufferCreateFilenameValue libtextstyle___xmlOutputBufferCreateFilenameValue -#define __xmlParserDebugEntities libtextstyle___xmlParserDebugEntities -#define __xmlParserInputBufferCreateFilename libtextstyle___xmlParserInputBufferCreateFilename -#define __xmlParserInputBufferCreateFilenameValue libtextstyle___xmlParserInputBufferCreateFilenameValue -#define __xmlParserVersion libtextstyle___xmlParserVersion -#define __xmlPedanticParserDefaultValue libtextstyle___xmlPedanticParserDefaultValue -#define __xmlRaiseError libtextstyle___xmlRaiseError -#define __xmlRegisterCallbacks libtextstyle___xmlRegisterCallbacks -#define __xmlRegisterNodeDefaultValue libtextstyle___xmlRegisterNodeDefaultValue -#define __xmlSaveNoEmptyTags libtextstyle___xmlSaveNoEmptyTags -#define __xmlSimpleError libtextstyle___xmlSimpleError -#define __xmlStructuredError libtextstyle___xmlStructuredError -#define __xmlStructuredErrorContext libtextstyle___xmlStructuredErrorContext -#define __xmlSubstituteEntitiesDefaultValue libtextstyle___xmlSubstituteEntitiesDefaultValue -#define __xmlTreeIndentString libtextstyle___xmlTreeIndentString -#define activate_term_non_default_mode libtextstyle_activate_term_non_default_mode -#define activate_term_style_controller libtextstyle_activate_term_style_controller -#define at_fatal_signal libtextstyle_at_fatal_signal -#define base_len libtextstyle_base_len -#define block_fatal_signals libtextstyle_block_fatal_signals -#define c_strcasecmp libtextstyle_c_strcasecmp -#define c_strncasecmp libtextstyle_c_strncasecmp -#define concatenated_filename libtextstyle_concatenated_filename -#define cr_additional_sel_append libtextstyle_cr_additional_sel_append -#define cr_additional_sel_destroy libtextstyle_cr_additional_sel_destroy -#define cr_additional_sel_dump libtextstyle_cr_additional_sel_dump -#define cr_additional_sel_new libtextstyle_cr_additional_sel_new -#define cr_additional_sel_new_with_type libtextstyle_cr_additional_sel_new_with_type -#define cr_additional_sel_one_to_string libtextstyle_cr_additional_sel_one_to_string -#define cr_additional_sel_prepend libtextstyle_cr_additional_sel_prepend -#define cr_additional_sel_set_attr_sel libtextstyle_cr_additional_sel_set_attr_sel -#define cr_additional_sel_set_class_name libtextstyle_cr_additional_sel_set_class_name -#define cr_additional_sel_set_id_name libtextstyle_cr_additional_sel_set_id_name -#define cr_additional_sel_set_pseudo libtextstyle_cr_additional_sel_set_pseudo -#define cr_additional_sel_to_string libtextstyle_cr_additional_sel_to_string -#define cr_attr_sel_append_attr_sel libtextstyle_cr_attr_sel_append_attr_sel -#define cr_attr_sel_destroy libtextstyle_cr_attr_sel_destroy -#define cr_attr_sel_dump libtextstyle_cr_attr_sel_dump -#define cr_attr_sel_new libtextstyle_cr_attr_sel_new -#define cr_attr_sel_prepend_attr_sel libtextstyle_cr_attr_sel_prepend_attr_sel -#define cr_attr_sel_to_string libtextstyle_cr_attr_sel_to_string -#define cr_cascade_destroy libtextstyle_cr_cascade_destroy -#define cr_cascade_get_sheet libtextstyle_cr_cascade_get_sheet -#define cr_cascade_new libtextstyle_cr_cascade_new -#define cr_cascade_ref libtextstyle_cr_cascade_ref -#define cr_cascade_set_sheet libtextstyle_cr_cascade_set_sheet -#define cr_cascade_unref libtextstyle_cr_cascade_unref -#define cr_declaration_append libtextstyle_cr_declaration_append -#define cr_declaration_append2 libtextstyle_cr_declaration_append2 -#define cr_declaration_destroy libtextstyle_cr_declaration_destroy -#define cr_declaration_dump libtextstyle_cr_declaration_dump -#define cr_declaration_dump_one libtextstyle_cr_declaration_dump_one -#define cr_declaration_get_by_prop_name libtextstyle_cr_declaration_get_by_prop_name -#define cr_declaration_get_from_list libtextstyle_cr_declaration_get_from_list -#define cr_declaration_list_to_string libtextstyle_cr_declaration_list_to_string -#define cr_declaration_list_to_string2 libtextstyle_cr_declaration_list_to_string2 -#define cr_declaration_new libtextstyle_cr_declaration_new -#define cr_declaration_nr_props libtextstyle_cr_declaration_nr_props -#define cr_declaration_parse_from_buf libtextstyle_cr_declaration_parse_from_buf -#define cr_declaration_parse_list_from_buf libtextstyle_cr_declaration_parse_list_from_buf -#define cr_declaration_prepend libtextstyle_cr_declaration_prepend -#define cr_declaration_ref libtextstyle_cr_declaration_ref -#define cr_declaration_to_string libtextstyle_cr_declaration_to_string -#define cr_declaration_unlink libtextstyle_cr_declaration_unlink -#define cr_declaration_unref libtextstyle_cr_declaration_unref -#define cr_doc_handler_associate_a_parser libtextstyle_cr_doc_handler_associate_a_parser -#define cr_doc_handler_destroy libtextstyle_cr_doc_handler_destroy -#define cr_doc_handler_get_ctxt libtextstyle_cr_doc_handler_get_ctxt -#define cr_doc_handler_get_result libtextstyle_cr_doc_handler_get_result -#define cr_doc_handler_new libtextstyle_cr_doc_handler_new -#define cr_doc_handler_ref libtextstyle_cr_doc_handler_ref -#define cr_doc_handler_set_ctxt libtextstyle_cr_doc_handler_set_ctxt -#define cr_doc_handler_set_default_sac_handler libtextstyle_cr_doc_handler_set_default_sac_handler -#define cr_doc_handler_set_result libtextstyle_cr_doc_handler_set_result -#define cr_doc_handler_unref libtextstyle_cr_doc_handler_unref -#define cr_enc_handler_convert_input libtextstyle_cr_enc_handler_convert_input -#define cr_enc_handler_get_instance libtextstyle_cr_enc_handler_get_instance -#define cr_enc_handler_resolve_enc_alias libtextstyle_cr_enc_handler_resolve_enc_alias -#define cr_font_family_append libtextstyle_cr_font_family_append -#define cr_font_family_destroy libtextstyle_cr_font_family_destroy -#define cr_font_family_new libtextstyle_cr_font_family_new -#define cr_font_family_prepend libtextstyle_cr_font_family_prepend -#define cr_font_family_set_name libtextstyle_cr_font_family_set_name -#define cr_font_family_to_string libtextstyle_cr_font_family_to_string -#define cr_font_size_adjust_destroy libtextstyle_cr_font_size_adjust_destroy -#define cr_font_size_adjust_new libtextstyle_cr_font_size_adjust_new -#define cr_font_size_adjust_to_string libtextstyle_cr_font_size_adjust_to_string -#define cr_font_size_clear libtextstyle_cr_font_size_clear -#define cr_font_size_copy libtextstyle_cr_font_size_copy -#define cr_font_size_destroy libtextstyle_cr_font_size_destroy -#define cr_font_size_get_larger_predefined_font_size libtextstyle_cr_font_size_get_larger_predefined_font_size -#define cr_font_size_get_smaller_predefined_font_size libtextstyle_cr_font_size_get_smaller_predefined_font_size -#define cr_font_size_is_predefined_absolute_font_size libtextstyle_cr_font_size_is_predefined_absolute_font_size -#define cr_font_size_is_set_to_inherit libtextstyle_cr_font_size_is_set_to_inherit -#define cr_font_size_new libtextstyle_cr_font_size_new -#define cr_font_size_set_absolute_font_size libtextstyle_cr_font_size_set_absolute_font_size -#define cr_font_size_set_predefined_absolute_font_size libtextstyle_cr_font_size_set_predefined_absolute_font_size -#define cr_font_size_set_relative_font_size libtextstyle_cr_font_size_set_relative_font_size -#define cr_font_size_set_to_inherit libtextstyle_cr_font_size_set_to_inherit -#define cr_font_size_to_string libtextstyle_cr_font_size_to_string -#define cr_font_stretch_to_string libtextstyle_cr_font_stretch_to_string -#define cr_font_style_to_string libtextstyle_cr_font_style_to_string -#define cr_font_variant_to_string libtextstyle_cr_font_variant_to_string -#define cr_font_weight_get_bolder libtextstyle_cr_font_weight_get_bolder -#define cr_font_weight_to_string libtextstyle_cr_font_weight_to_string -#define cr_input_consume_char libtextstyle_cr_input_consume_char -#define cr_input_consume_chars libtextstyle_cr_input_consume_chars -#define cr_input_consume_white_spaces libtextstyle_cr_input_consume_white_spaces -#define cr_input_destroy libtextstyle_cr_input_destroy -#define cr_input_end_of_input libtextstyle_cr_input_end_of_input -#define cr_input_get_byte_addr libtextstyle_cr_input_get_byte_addr -#define cr_input_get_column_num libtextstyle_cr_input_get_column_num -#define cr_input_get_cur_byte_addr libtextstyle_cr_input_get_cur_byte_addr -#define cr_input_get_cur_index libtextstyle_cr_input_get_cur_index -#define cr_input_get_cur_pos libtextstyle_cr_input_get_cur_pos -#define cr_input_get_end_of_file libtextstyle_cr_input_get_end_of_file -#define cr_input_get_end_of_line libtextstyle_cr_input_get_end_of_line -#define cr_input_get_line_num libtextstyle_cr_input_get_line_num -#define cr_input_get_nb_bytes_left libtextstyle_cr_input_get_nb_bytes_left -#define cr_input_get_parsing_location libtextstyle_cr_input_get_parsing_location -#define cr_input_increment_col_num libtextstyle_cr_input_increment_col_num -#define cr_input_increment_line_num libtextstyle_cr_input_increment_line_num -#define cr_input_new_from_buf libtextstyle_cr_input_new_from_buf -#define cr_input_new_from_uri libtextstyle_cr_input_new_from_uri -#define cr_input_peek_byte libtextstyle_cr_input_peek_byte -#define cr_input_peek_byte2 libtextstyle_cr_input_peek_byte2 -#define cr_input_peek_char libtextstyle_cr_input_peek_char -#define cr_input_read_byte libtextstyle_cr_input_read_byte -#define cr_input_read_char libtextstyle_cr_input_read_char -#define cr_input_ref libtextstyle_cr_input_ref -#define cr_input_seek_index libtextstyle_cr_input_seek_index -#define cr_input_set_column_num libtextstyle_cr_input_set_column_num -#define cr_input_set_cur_index libtextstyle_cr_input_set_cur_index -#define cr_input_set_cur_pos libtextstyle_cr_input_set_cur_pos -#define cr_input_set_end_of_file libtextstyle_cr_input_set_end_of_file -#define cr_input_set_end_of_line libtextstyle_cr_input_set_end_of_line -#define cr_input_set_line_num libtextstyle_cr_input_set_line_num -#define cr_input_unref libtextstyle_cr_input_unref -#define cr_num_copy libtextstyle_cr_num_copy -#define cr_num_destroy libtextstyle_cr_num_destroy -#define cr_num_dup libtextstyle_cr_num_dup -#define cr_num_is_fixed_length libtextstyle_cr_num_is_fixed_length -#define cr_num_new libtextstyle_cr_num_new -#define cr_num_new_with_val libtextstyle_cr_num_new_with_val -#define cr_num_set libtextstyle_cr_num_set -#define cr_num_to_string libtextstyle_cr_num_to_string -#define cr_om_parser_destroy libtextstyle_cr_om_parser_destroy -#define cr_om_parser_new libtextstyle_cr_om_parser_new -#define cr_om_parser_parse_buf libtextstyle_cr_om_parser_parse_buf -#define cr_om_parser_parse_file libtextstyle_cr_om_parser_parse_file -#define cr_om_parser_parse_paths_to_cascade libtextstyle_cr_om_parser_parse_paths_to_cascade -#define cr_om_parser_simply_parse_buf libtextstyle_cr_om_parser_simply_parse_buf -#define cr_om_parser_simply_parse_file libtextstyle_cr_om_parser_simply_parse_file -#define cr_om_parser_simply_parse_paths_to_cascade libtextstyle_cr_om_parser_simply_parse_paths_to_cascade -#define cr_parser_destroy libtextstyle_cr_parser_destroy -#define cr_parser_get_parsing_location libtextstyle_cr_parser_get_parsing_location -#define cr_parser_get_sac_handler libtextstyle_cr_parser_get_sac_handler -#define cr_parser_get_tknzr libtextstyle_cr_parser_get_tknzr -#define cr_parser_get_use_core_grammar libtextstyle_cr_parser_get_use_core_grammar -#define cr_parser_new libtextstyle_cr_parser_new -#define cr_parser_new_from_buf libtextstyle_cr_parser_new_from_buf -#define cr_parser_new_from_file libtextstyle_cr_parser_new_from_file -#define cr_parser_new_from_input libtextstyle_cr_parser_new_from_input -#define cr_parser_parse libtextstyle_cr_parser_parse -#define cr_parser_parse_buf libtextstyle_cr_parser_parse_buf -#define cr_parser_parse_charset libtextstyle_cr_parser_parse_charset -#define cr_parser_parse_declaration libtextstyle_cr_parser_parse_declaration -#define cr_parser_parse_expr libtextstyle_cr_parser_parse_expr -#define cr_parser_parse_file libtextstyle_cr_parser_parse_file -#define cr_parser_parse_font_face libtextstyle_cr_parser_parse_font_face -#define cr_parser_parse_import libtextstyle_cr_parser_parse_import -#define cr_parser_parse_media libtextstyle_cr_parser_parse_media -#define cr_parser_parse_page libtextstyle_cr_parser_parse_page -#define cr_parser_parse_prio libtextstyle_cr_parser_parse_prio -#define cr_parser_parse_ruleset libtextstyle_cr_parser_parse_ruleset -#define cr_parser_parse_statement_core libtextstyle_cr_parser_parse_statement_core -#define cr_parser_parse_term libtextstyle_cr_parser_parse_term -#define cr_parser_set_default_sac_handler libtextstyle_cr_parser_set_default_sac_handler -#define cr_parser_set_sac_handler libtextstyle_cr_parser_set_sac_handler -#define cr_parser_set_tknzr libtextstyle_cr_parser_set_tknzr -#define cr_parser_set_use_core_grammar libtextstyle_cr_parser_set_use_core_grammar -#define cr_parser_try_to_skip_spaces_and_comments libtextstyle_cr_parser_try_to_skip_spaces_and_comments -#define cr_parsing_location_copy libtextstyle_cr_parsing_location_copy -#define cr_parsing_location_destroy libtextstyle_cr_parsing_location_destroy -#define cr_parsing_location_dump libtextstyle_cr_parsing_location_dump -#define cr_parsing_location_init libtextstyle_cr_parsing_location_init -#define cr_parsing_location_new libtextstyle_cr_parsing_location_new -#define cr_parsing_location_to_string libtextstyle_cr_parsing_location_to_string -#define cr_prop_list_append libtextstyle_cr_prop_list_append -#define cr_prop_list_append2 libtextstyle_cr_prop_list_append2 -#define cr_prop_list_destroy libtextstyle_cr_prop_list_destroy -#define cr_prop_list_get_decl libtextstyle_cr_prop_list_get_decl -#define cr_prop_list_get_next libtextstyle_cr_prop_list_get_next -#define cr_prop_list_get_prev libtextstyle_cr_prop_list_get_prev -#define cr_prop_list_get_prop libtextstyle_cr_prop_list_get_prop -#define cr_prop_list_lookup_prop libtextstyle_cr_prop_list_lookup_prop -#define cr_prop_list_prepend libtextstyle_cr_prop_list_prepend -#define cr_prop_list_prepend2 libtextstyle_cr_prop_list_prepend2 -#define cr_prop_list_set_decl libtextstyle_cr_prop_list_set_decl -#define cr_prop_list_set_prop libtextstyle_cr_prop_list_set_prop -#define cr_prop_list_unlink libtextstyle_cr_prop_list_unlink -#define cr_pseudo_destroy libtextstyle_cr_pseudo_destroy -#define cr_pseudo_dump libtextstyle_cr_pseudo_dump -#define cr_pseudo_new libtextstyle_cr_pseudo_new -#define cr_pseudo_to_string libtextstyle_cr_pseudo_to_string -#define cr_rgb_compute_from_percentage libtextstyle_cr_rgb_compute_from_percentage -#define cr_rgb_copy libtextstyle_cr_rgb_copy -#define cr_rgb_destroy libtextstyle_cr_rgb_destroy -#define cr_rgb_dump libtextstyle_cr_rgb_dump -#define cr_rgb_is_set_to_inherit libtextstyle_cr_rgb_is_set_to_inherit -#define cr_rgb_is_set_to_transparent libtextstyle_cr_rgb_is_set_to_transparent -#define cr_rgb_new libtextstyle_cr_rgb_new -#define cr_rgb_new_with_vals libtextstyle_cr_rgb_new_with_vals -#define cr_rgb_parse_from_buf libtextstyle_cr_rgb_parse_from_buf -#define cr_rgb_set libtextstyle_cr_rgb_set -#define cr_rgb_set_from_hex_str libtextstyle_cr_rgb_set_from_hex_str -#define cr_rgb_set_from_name libtextstyle_cr_rgb_set_from_name -#define cr_rgb_set_from_rgb libtextstyle_cr_rgb_set_from_rgb -#define cr_rgb_set_from_term libtextstyle_cr_rgb_set_from_term -#define cr_rgb_set_to_inherit libtextstyle_cr_rgb_set_to_inherit -#define cr_rgb_set_to_transparent libtextstyle_cr_rgb_set_to_transparent -#define cr_rgb_to_string libtextstyle_cr_rgb_to_string -#define cr_sel_eng_destroy libtextstyle_cr_sel_eng_destroy -#define cr_sel_eng_get_matched_properties_from_cascade libtextstyle_cr_sel_eng_get_matched_properties_from_cascade -#define cr_sel_eng_get_matched_rulesets libtextstyle_cr_sel_eng_get_matched_rulesets -#define cr_sel_eng_get_matched_style libtextstyle_cr_sel_eng_get_matched_style -#define cr_sel_eng_get_pseudo_class_selector_handler libtextstyle_cr_sel_eng_get_pseudo_class_selector_handler -#define cr_sel_eng_matches_node libtextstyle_cr_sel_eng_matches_node -#define cr_sel_eng_new libtextstyle_cr_sel_eng_new -#define cr_sel_eng_register_pseudo_class_sel_handler libtextstyle_cr_sel_eng_register_pseudo_class_sel_handler -#define cr_sel_eng_unregister_all_pseudo_class_sel_handlers libtextstyle_cr_sel_eng_unregister_all_pseudo_class_sel_handlers -#define cr_sel_eng_unregister_pseudo_class_sel_handler libtextstyle_cr_sel_eng_unregister_pseudo_class_sel_handler -#define cr_selector_append libtextstyle_cr_selector_append -#define cr_selector_append_simple_sel libtextstyle_cr_selector_append_simple_sel -#define cr_selector_destroy libtextstyle_cr_selector_destroy -#define cr_selector_dump libtextstyle_cr_selector_dump -#define cr_selector_new libtextstyle_cr_selector_new -#define cr_selector_parse_from_buf libtextstyle_cr_selector_parse_from_buf -#define cr_selector_prepend libtextstyle_cr_selector_prepend -#define cr_selector_ref libtextstyle_cr_selector_ref -#define cr_selector_to_string libtextstyle_cr_selector_to_string -#define cr_selector_unref libtextstyle_cr_selector_unref -#define cr_simple_sel_append_simple_sel libtextstyle_cr_simple_sel_append_simple_sel -#define cr_simple_sel_compute_specificity libtextstyle_cr_simple_sel_compute_specificity -#define cr_simple_sel_destroy libtextstyle_cr_simple_sel_destroy -#define cr_simple_sel_dump libtextstyle_cr_simple_sel_dump -#define cr_simple_sel_new libtextstyle_cr_simple_sel_new -#define cr_simple_sel_one_to_string libtextstyle_cr_simple_sel_one_to_string -#define cr_simple_sel_prepend_simple_sel libtextstyle_cr_simple_sel_prepend_simple_sel -#define cr_simple_sel_to_string libtextstyle_cr_simple_sel_to_string -#define cr_statement_append libtextstyle_cr_statement_append -#define cr_statement_at_charset_rule_get_charset libtextstyle_cr_statement_at_charset_rule_get_charset -#define cr_statement_at_charset_rule_parse_from_buf libtextstyle_cr_statement_at_charset_rule_parse_from_buf -#define cr_statement_at_charset_rule_set_charset libtextstyle_cr_statement_at_charset_rule_set_charset -#define cr_statement_at_font_face_rule_add_decl libtextstyle_cr_statement_at_font_face_rule_add_decl -#define cr_statement_at_font_face_rule_get_decls libtextstyle_cr_statement_at_font_face_rule_get_decls -#define cr_statement_at_font_face_rule_set_decls libtextstyle_cr_statement_at_font_face_rule_set_decls -#define cr_statement_at_import_rule_get_imported_sheet libtextstyle_cr_statement_at_import_rule_get_imported_sheet -#define cr_statement_at_import_rule_get_url libtextstyle_cr_statement_at_import_rule_get_url -#define cr_statement_at_import_rule_parse_from_buf libtextstyle_cr_statement_at_import_rule_parse_from_buf -#define cr_statement_at_import_rule_set_imported_sheet libtextstyle_cr_statement_at_import_rule_set_imported_sheet -#define cr_statement_at_import_rule_set_url libtextstyle_cr_statement_at_import_rule_set_url -#define cr_statement_at_media_get_from_list libtextstyle_cr_statement_at_media_get_from_list -#define cr_statement_at_media_nr_rules libtextstyle_cr_statement_at_media_nr_rules -#define cr_statement_at_media_rule_parse_from_buf libtextstyle_cr_statement_at_media_rule_parse_from_buf -#define cr_statement_at_page_rule_get_declarations libtextstyle_cr_statement_at_page_rule_get_declarations -#define cr_statement_at_page_rule_parse_from_buf libtextstyle_cr_statement_at_page_rule_parse_from_buf -#define cr_statement_at_page_rule_set_declarations libtextstyle_cr_statement_at_page_rule_set_declarations -#define cr_statement_destroy libtextstyle_cr_statement_destroy -#define cr_statement_does_buf_parses_against_core libtextstyle_cr_statement_does_buf_parses_against_core -#define cr_statement_dump libtextstyle_cr_statement_dump -#define cr_statement_dump_charset libtextstyle_cr_statement_dump_charset -#define cr_statement_dump_font_face_rule libtextstyle_cr_statement_dump_font_face_rule -#define cr_statement_dump_import_rule libtextstyle_cr_statement_dump_import_rule -#define cr_statement_dump_media_rule libtextstyle_cr_statement_dump_media_rule -#define cr_statement_dump_page libtextstyle_cr_statement_dump_page -#define cr_statement_dump_ruleset libtextstyle_cr_statement_dump_ruleset -#define cr_statement_font_face_rule_parse_from_buf libtextstyle_cr_statement_font_face_rule_parse_from_buf -#define cr_statement_get_from_list libtextstyle_cr_statement_get_from_list -#define cr_statement_get_parent_sheet libtextstyle_cr_statement_get_parent_sheet -#define cr_statement_list_to_string libtextstyle_cr_statement_list_to_string -#define cr_statement_new_at_charset_rule libtextstyle_cr_statement_new_at_charset_rule -#define cr_statement_new_at_font_face_rule libtextstyle_cr_statement_new_at_font_face_rule -#define cr_statement_new_at_import_rule libtextstyle_cr_statement_new_at_import_rule -#define cr_statement_new_at_media_rule libtextstyle_cr_statement_new_at_media_rule -#define cr_statement_new_at_page_rule libtextstyle_cr_statement_new_at_page_rule -#define cr_statement_new_ruleset libtextstyle_cr_statement_new_ruleset -#define cr_statement_nr_rules libtextstyle_cr_statement_nr_rules -#define cr_statement_parse_from_buf libtextstyle_cr_statement_parse_from_buf -#define cr_statement_prepend libtextstyle_cr_statement_prepend -#define cr_statement_ruleset_append_decl libtextstyle_cr_statement_ruleset_append_decl -#define cr_statement_ruleset_append_decl2 libtextstyle_cr_statement_ruleset_append_decl2 -#define cr_statement_ruleset_get_declarations libtextstyle_cr_statement_ruleset_get_declarations -#define cr_statement_ruleset_get_sel_list libtextstyle_cr_statement_ruleset_get_sel_list -#define cr_statement_ruleset_parse_from_buf libtextstyle_cr_statement_ruleset_parse_from_buf -#define cr_statement_ruleset_set_decl_list libtextstyle_cr_statement_ruleset_set_decl_list -#define cr_statement_ruleset_set_sel_list libtextstyle_cr_statement_ruleset_set_sel_list -#define cr_statement_set_parent_sheet libtextstyle_cr_statement_set_parent_sheet -#define cr_statement_to_string libtextstyle_cr_statement_to_string -#define cr_statement_unlink libtextstyle_cr_statement_unlink -#define cr_string_destroy libtextstyle_cr_string_destroy -#define cr_string_dup libtextstyle_cr_string_dup -#define cr_string_dup2 libtextstyle_cr_string_dup2 -#define cr_string_new libtextstyle_cr_string_new -#define cr_string_new_from_gstring libtextstyle_cr_string_new_from_gstring -#define cr_string_new_from_string libtextstyle_cr_string_new_from_string -#define cr_string_peek_raw_str libtextstyle_cr_string_peek_raw_str -#define cr_string_peek_raw_str_len libtextstyle_cr_string_peek_raw_str_len -#define cr_style_border_style_to_string libtextstyle_cr_style_border_style_to_string -#define cr_style_copy libtextstyle_cr_style_copy -#define cr_style_destroy libtextstyle_cr_style_destroy -#define cr_style_display_type_to_string libtextstyle_cr_style_display_type_to_string -#define cr_style_dup libtextstyle_cr_style_dup -#define cr_style_float_type_to_string libtextstyle_cr_style_float_type_to_string -#define cr_style_new libtextstyle_cr_style_new -#define cr_style_num_prop_val_to_string libtextstyle_cr_style_num_prop_val_to_string -#define cr_style_position_type_to_string libtextstyle_cr_style_position_type_to_string -#define cr_style_ref libtextstyle_cr_style_ref -#define cr_style_resolve_inherited_properties libtextstyle_cr_style_resolve_inherited_properties -#define cr_style_rgb_prop_val_to_string libtextstyle_cr_style_rgb_prop_val_to_string -#define cr_style_set_props_to_default_values libtextstyle_cr_style_set_props_to_default_values -#define cr_style_set_props_to_initial_values libtextstyle_cr_style_set_props_to_initial_values -#define cr_style_set_style_from_decl libtextstyle_cr_style_set_style_from_decl -#define cr_style_to_string libtextstyle_cr_style_to_string -#define cr_style_unref libtextstyle_cr_style_unref -#define cr_style_white_space_type_to_string libtextstyle_cr_style_white_space_type_to_string -#define cr_stylesheet_destroy libtextstyle_cr_stylesheet_destroy -#define cr_stylesheet_dump libtextstyle_cr_stylesheet_dump -#define cr_stylesheet_new libtextstyle_cr_stylesheet_new -#define cr_stylesheet_nr_rules libtextstyle_cr_stylesheet_nr_rules -#define cr_stylesheet_ref libtextstyle_cr_stylesheet_ref -#define cr_stylesheet_statement_get_from_list libtextstyle_cr_stylesheet_statement_get_from_list -#define cr_stylesheet_to_string libtextstyle_cr_stylesheet_to_string -#define cr_stylesheet_unref libtextstyle_cr_stylesheet_unref -#define cr_term_append_term libtextstyle_cr_term_append_term -#define cr_term_destroy libtextstyle_cr_term_destroy -#define cr_term_dump libtextstyle_cr_term_dump -#define cr_term_get_from_list libtextstyle_cr_term_get_from_list -#define cr_term_new libtextstyle_cr_term_new -#define cr_term_nr_values libtextstyle_cr_term_nr_values -#define cr_term_one_to_string libtextstyle_cr_term_one_to_string -#define cr_term_parse_expression_from_buf libtextstyle_cr_term_parse_expression_from_buf -#define cr_term_prepend_term libtextstyle_cr_term_prepend_term -#define cr_term_ref libtextstyle_cr_term_ref -#define cr_term_set_function libtextstyle_cr_term_set_function -#define cr_term_set_hash libtextstyle_cr_term_set_hash -#define cr_term_set_ident libtextstyle_cr_term_set_ident -#define cr_term_set_number libtextstyle_cr_term_set_number -#define cr_term_set_rgb libtextstyle_cr_term_set_rgb -#define cr_term_set_string libtextstyle_cr_term_set_string -#define cr_term_set_uri libtextstyle_cr_term_set_uri -#define cr_term_to_string libtextstyle_cr_term_to_string -#define cr_term_unref libtextstyle_cr_term_unref -#define cr_tknzr_consume_chars libtextstyle_cr_tknzr_consume_chars -#define cr_tknzr_destroy libtextstyle_cr_tknzr_destroy -#define cr_tknzr_get_cur_byte_addr libtextstyle_cr_tknzr_get_cur_byte_addr -#define cr_tknzr_get_cur_pos libtextstyle_cr_tknzr_get_cur_pos -#define cr_tknzr_get_input libtextstyle_cr_tknzr_get_input -#define cr_tknzr_get_nb_bytes_left libtextstyle_cr_tknzr_get_nb_bytes_left -#define cr_tknzr_get_next_token libtextstyle_cr_tknzr_get_next_token -#define cr_tknzr_get_parsing_location libtextstyle_cr_tknzr_get_parsing_location -#define cr_tknzr_new libtextstyle_cr_tknzr_new -#define cr_tknzr_new_from_buf libtextstyle_cr_tknzr_new_from_buf -#define cr_tknzr_new_from_uri libtextstyle_cr_tknzr_new_from_uri -#define cr_tknzr_parse_token libtextstyle_cr_tknzr_parse_token -#define cr_tknzr_peek_byte libtextstyle_cr_tknzr_peek_byte -#define cr_tknzr_peek_byte2 libtextstyle_cr_tknzr_peek_byte2 -#define cr_tknzr_peek_char libtextstyle_cr_tknzr_peek_char -#define cr_tknzr_read_byte libtextstyle_cr_tknzr_read_byte -#define cr_tknzr_read_char libtextstyle_cr_tknzr_read_char -#define cr_tknzr_ref libtextstyle_cr_tknzr_ref -#define cr_tknzr_seek_index libtextstyle_cr_tknzr_seek_index -#define cr_tknzr_set_cur_pos libtextstyle_cr_tknzr_set_cur_pos -#define cr_tknzr_set_input libtextstyle_cr_tknzr_set_input -#define cr_tknzr_unget_token libtextstyle_cr_tknzr_unget_token -#define cr_tknzr_unref libtextstyle_cr_tknzr_unref -#define cr_token_destroy libtextstyle_cr_token_destroy -#define cr_token_new libtextstyle_cr_token_new -#define cr_token_set_angle libtextstyle_cr_token_set_angle -#define cr_token_set_atkeyword libtextstyle_cr_token_set_atkeyword -#define cr_token_set_bc libtextstyle_cr_token_set_bc -#define cr_token_set_bo libtextstyle_cr_token_set_bo -#define cr_token_set_cbc libtextstyle_cr_token_set_cbc -#define cr_token_set_cbo libtextstyle_cr_token_set_cbo -#define cr_token_set_cdc libtextstyle_cr_token_set_cdc -#define cr_token_set_cdo libtextstyle_cr_token_set_cdo -#define cr_token_set_charset_sym libtextstyle_cr_token_set_charset_sym -#define cr_token_set_comment libtextstyle_cr_token_set_comment -#define cr_token_set_dashmatch libtextstyle_cr_token_set_dashmatch -#define cr_token_set_delim libtextstyle_cr_token_set_delim -#define cr_token_set_dimen libtextstyle_cr_token_set_dimen -#define cr_token_set_ems libtextstyle_cr_token_set_ems -#define cr_token_set_exs libtextstyle_cr_token_set_exs -#define cr_token_set_font_face_sym libtextstyle_cr_token_set_font_face_sym -#define cr_token_set_freq libtextstyle_cr_token_set_freq -#define cr_token_set_function libtextstyle_cr_token_set_function -#define cr_token_set_hash libtextstyle_cr_token_set_hash -#define cr_token_set_ident libtextstyle_cr_token_set_ident -#define cr_token_set_import_sym libtextstyle_cr_token_set_import_sym -#define cr_token_set_important_sym libtextstyle_cr_token_set_important_sym -#define cr_token_set_includes libtextstyle_cr_token_set_includes -#define cr_token_set_length libtextstyle_cr_token_set_length -#define cr_token_set_media_sym libtextstyle_cr_token_set_media_sym -#define cr_token_set_number libtextstyle_cr_token_set_number -#define cr_token_set_page_sym libtextstyle_cr_token_set_page_sym -#define cr_token_set_pc libtextstyle_cr_token_set_pc -#define cr_token_set_percentage libtextstyle_cr_token_set_percentage -#define cr_token_set_po libtextstyle_cr_token_set_po -#define cr_token_set_rgb libtextstyle_cr_token_set_rgb -#define cr_token_set_s libtextstyle_cr_token_set_s -#define cr_token_set_semicolon libtextstyle_cr_token_set_semicolon -#define cr_token_set_string libtextstyle_cr_token_set_string -#define cr_token_set_time libtextstyle_cr_token_set_time -#define cr_token_set_uri libtextstyle_cr_token_set_uri -#define cr_utils_dump_n_chars libtextstyle_cr_utils_dump_n_chars -#define cr_utils_dump_n_chars2 libtextstyle_cr_utils_dump_n_chars2 -#define cr_utils_dup_glist_of_cr_string libtextstyle_cr_utils_dup_glist_of_cr_string -#define cr_utils_dup_glist_of_string libtextstyle_cr_utils_dup_glist_of_string -#define cr_utils_is_hexa_char libtextstyle_cr_utils_is_hexa_char -#define cr_utils_is_newline libtextstyle_cr_utils_is_newline -#define cr_utils_is_nonascii libtextstyle_cr_utils_is_nonascii -#define cr_utils_is_white_space libtextstyle_cr_utils_is_white_space -#define cr_utils_read_char_from_utf8_buf libtextstyle_cr_utils_read_char_from_utf8_buf -#define cr_utils_ucs1_str_len_as_utf8 libtextstyle_cr_utils_ucs1_str_len_as_utf8 -#define cr_utils_ucs1_str_to_utf8 libtextstyle_cr_utils_ucs1_str_to_utf8 -#define cr_utils_ucs1_to_utf8 libtextstyle_cr_utils_ucs1_to_utf8 -#define cr_utils_ucs4_str_len_as_utf8 libtextstyle_cr_utils_ucs4_str_len_as_utf8 -#define cr_utils_ucs4_str_to_utf8 libtextstyle_cr_utils_ucs4_str_to_utf8 -#define cr_utils_ucs4_to_utf8 libtextstyle_cr_utils_ucs4_to_utf8 -#define cr_utils_utf8_str_len_as_ucs1 libtextstyle_cr_utils_utf8_str_len_as_ucs1 -#define cr_utils_utf8_str_len_as_ucs4 libtextstyle_cr_utils_utf8_str_len_as_ucs4 -#define cr_utils_utf8_str_to_ucs1 libtextstyle_cr_utils_utf8_str_to_ucs1 -#define cr_utils_utf8_str_to_ucs4 libtextstyle_cr_utils_utf8_str_to_ucs4 -#define cr_utils_utf8_to_ucs1 libtextstyle_cr_utils_utf8_to_ucs1 -#define cr_utils_utf8_to_ucs4 libtextstyle_cr_utils_utf8_to_ucs4 -#define deactivate_term_non_default_mode libtextstyle_deactivate_term_non_default_mode -#define deactivate_term_style_controller libtextstyle_deactivate_term_style_controller -#define dup_cloexec libtextstyle_dup_cloexec -#define execute_all_close_hooks libtextstyle_execute_all_close_hooks -#define execute_all_ioctl_hooks libtextstyle_execute_all_ioctl_hooks -#define execute_close_hooks libtextstyle_execute_close_hooks -#define execute_ioctl_hooks libtextstyle_execute_ioctl_hooks -#define exit_failure libtextstyle_exit_failure -#define fd_ostream_typeinfo libtextstyle_fd_ostream_typeinfo -#define fd_ostream_vtable libtextstyle_fd_ostream_vtable -#define file_ostream_typeinfo libtextstyle_file_ostream_typeinfo -#define file_ostream_vtable libtextstyle_file_ostream_vtable -#define freea libtextstyle_freea -#define full_write libtextstyle_full_write -#define g_ascii_dtostr libtextstyle_g_ascii_dtostr -#define g_ascii_formatd libtextstyle_g_ascii_formatd -#define g_ascii_strcasecmp libtextstyle_g_ascii_strcasecmp -#define g_ascii_strup libtextstyle_g_ascii_strup -#define g_ascii_table libtextstyle_g_ascii_table -#define g_ascii_toupper libtextstyle_g_ascii_toupper -#define g_hash_table_insert libtextstyle_g_hash_table_insert -#define g_hash_table_lookup libtextstyle_g_hash_table_lookup -#define g_hash_table_new libtextstyle_g_hash_table_new -#define g_hash_table_new_full libtextstyle_g_hash_table_new_full -#define g_list_append libtextstyle_g_list_append -#define g_list_delete_link libtextstyle_g_list_delete_link -#define g_list_free libtextstyle_g_list_free -#define g_list_last libtextstyle_g_list_last -#define g_list_prepend libtextstyle_g_list_prepend -#define g_log libtextstyle_g_log -#define g_printerr libtextstyle_g_printerr -#define g_spaced_primes_closest libtextstyle_g_spaced_primes_closest -#define g_stpcpy libtextstyle_g_stpcpy -#define g_str_equal libtextstyle_g_str_equal -#define g_str_hash libtextstyle_g_str_hash -#define g_strconcat libtextstyle_g_strconcat -#define g_strdup libtextstyle_g_strdup -#define g_strdup_printf libtextstyle_g_strdup_printf -#define g_strdup_vprintf libtextstyle_g_strdup_vprintf -#define g_string_append libtextstyle_g_string_append -#define g_string_append_c libtextstyle_g_string_append_c -#define g_string_append_len libtextstyle_g_string_append_len -#define g_string_append_printf libtextstyle_g_string_append_printf -#define g_string_append_unichar libtextstyle_g_string_append_unichar -#define g_string_free libtextstyle_g_string_free -#define g_string_insert_c libtextstyle_g_string_insert_c -#define g_string_insert_len libtextstyle_g_string_insert_len -#define g_string_insert_unichar libtextstyle_g_string_insert_unichar -#define g_string_new libtextstyle_g_string_new -#define g_string_new_len libtextstyle_g_string_new_len -#define g_string_sized_new libtextstyle_g_string_sized_new -#define g_strndup libtextstyle_g_strndup -#define g_strstr_len libtextstyle_g_strstr_len -#define g_warning libtextstyle_g_warning -#define get_fatal_signal_set libtextstyle_get_fatal_signal_set -#define get_fatal_signals libtextstyle_get_fatal_signals -#define get_ppid_of libtextstyle_get_ppid_of -#define get_progname_of libtextstyle_get_progname_of -#define getprogname libtextstyle_getprogname -#define gl_array_list_implementation libtextstyle_gl_array_list_implementation -#define gl_sockets_cleanup libtextstyle_gl_sockets_cleanup -#define gl_sockets_startup libtextstyle_gl_sockets_startup -#define hash_destroy libtextstyle_hash_destroy -#define hash_find_entry libtextstyle_hash_find_entry -#define hash_init libtextstyle_hash_init -#define hash_insert_entry libtextstyle_hash_insert_entry -#define hash_iterate libtextstyle_hash_iterate -#define hash_iterate_modify libtextstyle_hash_iterate_modify -#define hash_set_value libtextstyle_hash_set_value -#define html_ostream_typeinfo libtextstyle_html_ostream_typeinfo -#define html_ostream_vtable libtextstyle_html_ostream_vtable -#define html_styled_ostream_typeinfo libtextstyle_html_styled_ostream_typeinfo -#define html_styled_ostream_vtable libtextstyle_html_styled_ostream_vtable -#define iconv_ostream_typeinfo libtextstyle_iconv_ostream_typeinfo -#define iconv_ostream_vtable libtextstyle_iconv_ostream_vtable -#define initGenericErrorDefaultFunc libtextstyle_initGenericErrorDefaultFunc -#define inputPop libtextstyle_inputPop -#define inputPush libtextstyle_inputPush -#define isolat1ToUTF8 libtextstyle_isolat1ToUTF8 -#define last_component libtextstyle_last_component -#define libxml_domnode_binary_insertion_sort libtextstyle_libxml_domnode_binary_insertion_sort -#define libxml_domnode_tim_sort libtextstyle_libxml_domnode_tim_sort -#define memory_ostream__contents libtextstyle_memory_ostream__contents -#define memory_ostream_typeinfo libtextstyle_memory_ostream_typeinfo -#define memory_ostream_vtable libtextstyle_memory_ostream_vtable -#define mmalloca libtextstyle_mmalloca -#define namePop libtextstyle_namePop -#define namePush libtextstyle_namePush -#define next_prime libtextstyle_next_prime -#define nodePop libtextstyle_nodePop -#define nodePush libtextstyle_nodePush -#define noop_styled_ostream_typeinfo libtextstyle_noop_styled_ostream_typeinfo -#define noop_styled_ostream_vtable libtextstyle_noop_styled_ostream_vtable -#define oldXMLWDcompatibility libtextstyle_oldXMLWDcompatibility -#define ostream__flush libtextstyle_ostream__flush -#define ostream__free libtextstyle_ostream__free -#define ostream__write_mem libtextstyle_ostream__write_mem -#define ostream_typeinfo libtextstyle_ostream_typeinfo -#define ostream_vtable libtextstyle_ostream_vtable -#define printf_frexp libtextstyle_printf_frexp -#define printf_frexpl libtextstyle_printf_frexpl -#define register_fd_hook libtextstyle_register_fd_hook -#define safe_read libtextstyle_safe_read -#define safe_write libtextstyle_safe_write -#define set_cloexec_flag libtextstyle_set_cloexec_flag -#define styled_ostream__begin_use_class libtextstyle_styled_ostream__begin_use_class -#define styled_ostream__end_use_class libtextstyle_styled_ostream__end_use_class -#define styled_ostream__flush libtextstyle_styled_ostream__flush -#define styled_ostream__flush_to_current_style libtextstyle_styled_ostream__flush_to_current_style -#define styled_ostream__free libtextstyle_styled_ostream__free -#define styled_ostream__get_hyperlink_id libtextstyle_styled_ostream__get_hyperlink_id -#define styled_ostream__get_hyperlink_ref libtextstyle_styled_ostream__get_hyperlink_ref -#define styled_ostream__set_hyperlink libtextstyle_styled_ostream__set_hyperlink -#define styled_ostream__write_mem libtextstyle_styled_ostream__write_mem -#define styled_ostream_typeinfo libtextstyle_styled_ostream_typeinfo -#define styled_ostream_vtable libtextstyle_styled_ostream_vtable -#define term_ostream_typeinfo libtextstyle_term_ostream_typeinfo -#define term_ostream_vtable libtextstyle_term_ostream_vtable -#define term_styled_ostream_typeinfo libtextstyle_term_styled_ostream_typeinfo -#define term_styled_ostream_vtable libtextstyle_term_styled_ostream_vtable -#define u8_mbtouc libtextstyle_u8_mbtouc -#define unblock_fatal_signals libtextstyle_unblock_fatal_signals -#define unregister_fd_hook libtextstyle_unregister_fd_hook -#define x2realloc libtextstyle_x2realloc -#define xalloc_die libtextstyle_xalloc_die -#define xasprintf libtextstyle_xasprintf -#define xcalloc libtextstyle_xcalloc -#define xconcatenated_filename libtextstyle_xconcatenated_filename -#define xgethostname libtextstyle_xgethostname -#define xmalloc libtextstyle_xmalloc -#define xmalloc_exit_failure libtextstyle_xmalloc_exit_failure -#define xmemdup libtextstyle_xmemdup -#define xmlAddAttributeDecl libtextstyle_xmlAddAttributeDecl -#define xmlAddChild libtextstyle_xmlAddChild -#define xmlAddChildList libtextstyle_xmlAddChildList -#define xmlAddDocEntity libtextstyle_xmlAddDocEntity -#define xmlAddDtdEntity libtextstyle_xmlAddDtdEntity -#define xmlAddElementDecl libtextstyle_xmlAddElementDecl -#define xmlAddEncodingAlias libtextstyle_xmlAddEncodingAlias -#define xmlAddID libtextstyle_xmlAddID -#define xmlAddNextSibling libtextstyle_xmlAddNextSibling -#define xmlAddNotationDecl libtextstyle_xmlAddNotationDecl -#define xmlAddPrevSibling libtextstyle_xmlAddPrevSibling -#define xmlAddRef libtextstyle_xmlAddRef -#define xmlAddSibling libtextstyle_xmlAddSibling -#define xmlAllocParserInputBuffer libtextstyle_xmlAllocParserInputBuffer -#define xmlBufAdd libtextstyle_xmlBufAdd -#define xmlBufAddHead libtextstyle_xmlBufAddHead -#define xmlBufAddLen libtextstyle_xmlBufAddLen -#define xmlBufAvail libtextstyle_xmlBufAvail -#define xmlBufBackToBuffer libtextstyle_xmlBufBackToBuffer -#define xmlBufCCat libtextstyle_xmlBufCCat -#define xmlBufCat libtextstyle_xmlBufCat -#define xmlBufContent libtextstyle_xmlBufContent -#define xmlBufCreate libtextstyle_xmlBufCreate -#define xmlBufCreateSize libtextstyle_xmlBufCreateSize -#define xmlBufCreateStatic libtextstyle_xmlBufCreateStatic -#define xmlBufDetach libtextstyle_xmlBufDetach -#define xmlBufDump libtextstyle_xmlBufDump -#define xmlBufEmpty libtextstyle_xmlBufEmpty -#define xmlBufEnd libtextstyle_xmlBufEnd -#define xmlBufErase libtextstyle_xmlBufErase -#define xmlBufFree libtextstyle_xmlBufFree -#define xmlBufFromBuffer libtextstyle_xmlBufFromBuffer -#define xmlBufGetAllocationScheme libtextstyle_xmlBufGetAllocationScheme -#define xmlBufGetInputBase libtextstyle_xmlBufGetInputBase -#define xmlBufGetNodeContent libtextstyle_xmlBufGetNodeContent -#define xmlBufGrow libtextstyle_xmlBufGrow -#define xmlBufInflate libtextstyle_xmlBufInflate -#define xmlBufIsEmpty libtextstyle_xmlBufIsEmpty -#define xmlBufLength libtextstyle_xmlBufLength -#define xmlBufMergeBuffer libtextstyle_xmlBufMergeBuffer -#define xmlBufResetInput libtextstyle_xmlBufResetInput -#define xmlBufResize libtextstyle_xmlBufResize -#define xmlBufSetAllocationScheme libtextstyle_xmlBufSetAllocationScheme -#define xmlBufSetInputBaseCur libtextstyle_xmlBufSetInputBaseCur -#define xmlBufShrink libtextstyle_xmlBufShrink -#define xmlBufUse libtextstyle_xmlBufUse -#define xmlBufWriteCHAR libtextstyle_xmlBufWriteCHAR -#define xmlBufWriteChar libtextstyle_xmlBufWriteChar -#define xmlBufWriteQuotedString libtextstyle_xmlBufWriteQuotedString -#define xmlBufferAdd libtextstyle_xmlBufferAdd -#define xmlBufferAddHead libtextstyle_xmlBufferAddHead -#define xmlBufferAllocScheme libtextstyle_xmlBufferAllocScheme -#define xmlBufferCCat libtextstyle_xmlBufferCCat -#define xmlBufferCat libtextstyle_xmlBufferCat -#define xmlBufferContent libtextstyle_xmlBufferContent -#define xmlBufferCreate libtextstyle_xmlBufferCreate -#define xmlBufferCreateSize libtextstyle_xmlBufferCreateSize -#define xmlBufferCreateStatic libtextstyle_xmlBufferCreateStatic -#define xmlBufferDetach libtextstyle_xmlBufferDetach -#define xmlBufferDump libtextstyle_xmlBufferDump -#define xmlBufferEmpty libtextstyle_xmlBufferEmpty -#define xmlBufferFree libtextstyle_xmlBufferFree -#define xmlBufferGrow libtextstyle_xmlBufferGrow -#define xmlBufferLength libtextstyle_xmlBufferLength -#define xmlBufferResize libtextstyle_xmlBufferResize -#define xmlBufferSetAllocationScheme libtextstyle_xmlBufferSetAllocationScheme -#define xmlBufferShrink libtextstyle_xmlBufferShrink -#define xmlBufferWriteCHAR libtextstyle_xmlBufferWriteCHAR -#define xmlBufferWriteChar libtextstyle_xmlBufferWriteChar -#define xmlBufferWriteQuotedString libtextstyle_xmlBufferWriteQuotedString -#define xmlBuildQName libtextstyle_xmlBuildQName -#define xmlBuildRelativeURI libtextstyle_xmlBuildRelativeURI -#define xmlBuildURI libtextstyle_xmlBuildURI -#define xmlByteConsumed libtextstyle_xmlByteConsumed -#define xmlCanonicPath libtextstyle_xmlCanonicPath -#define xmlCharEncCloseFunc libtextstyle_xmlCharEncCloseFunc -#define xmlCharEncFirstLine libtextstyle_xmlCharEncFirstLine -#define xmlCharEncFirstLineInput libtextstyle_xmlCharEncFirstLineInput -#define xmlCharEncFirstLineInt libtextstyle_xmlCharEncFirstLineInt -#define xmlCharEncInFunc libtextstyle_xmlCharEncInFunc -#define xmlCharEncInput libtextstyle_xmlCharEncInput -#define xmlCharEncOutFunc libtextstyle_xmlCharEncOutFunc -#define xmlCharInRange libtextstyle_xmlCharInRange -#define xmlCharStrdup libtextstyle_xmlCharStrdup -#define xmlCharStrndup libtextstyle_xmlCharStrndup -#define xmlCheckFilename libtextstyle_xmlCheckFilename -#define xmlCheckHTTPInput libtextstyle_xmlCheckHTTPInput -#define xmlCheckLanguageID libtextstyle_xmlCheckLanguageID -#define xmlCheckUTF8 libtextstyle_xmlCheckUTF8 -#define xmlCheckVersion libtextstyle_xmlCheckVersion -#define xmlChildElementCount libtextstyle_xmlChildElementCount -#define xmlCleanupCharEncodingHandlers libtextstyle_xmlCleanupCharEncodingHandlers -#define xmlCleanupEncodingAliases libtextstyle_xmlCleanupEncodingAliases -#define xmlCleanupGlobals libtextstyle_xmlCleanupGlobals -#define xmlCleanupInputCallbacks libtextstyle_xmlCleanupInputCallbacks -#define xmlCleanupMemory libtextstyle_xmlCleanupMemory -#define xmlCleanupParser libtextstyle_xmlCleanupParser -#define xmlCleanupThreads libtextstyle_xmlCleanupThreads -#define xmlClearNodeInfoSeq libtextstyle_xmlClearNodeInfoSeq -#define xmlClearParserCtxt libtextstyle_xmlClearParserCtxt -#define xmlCopyAttributeTable libtextstyle_xmlCopyAttributeTable -#define xmlCopyChar libtextstyle_xmlCopyChar -#define xmlCopyCharMultiByte libtextstyle_xmlCopyCharMultiByte -#define xmlCopyDoc libtextstyle_xmlCopyDoc -#define xmlCopyDocElementContent libtextstyle_xmlCopyDocElementContent -#define xmlCopyDtd libtextstyle_xmlCopyDtd -#define xmlCopyElementContent libtextstyle_xmlCopyElementContent -#define xmlCopyElementTable libtextstyle_xmlCopyElementTable -#define xmlCopyEntitiesTable libtextstyle_xmlCopyEntitiesTable -#define xmlCopyEnumeration libtextstyle_xmlCopyEnumeration -#define xmlCopyError libtextstyle_xmlCopyError -#define xmlCopyNamespace libtextstyle_xmlCopyNamespace -#define xmlCopyNamespaceList libtextstyle_xmlCopyNamespaceList -#define xmlCopyNode libtextstyle_xmlCopyNode -#define xmlCopyNodeList libtextstyle_xmlCopyNodeList -#define xmlCopyNotationTable libtextstyle_xmlCopyNotationTable -#define xmlCopyProp libtextstyle_xmlCopyProp -#define xmlCopyPropList libtextstyle_xmlCopyPropList -#define xmlCreateDocParserCtxt libtextstyle_xmlCreateDocParserCtxt -#define xmlCreateEntitiesTable libtextstyle_xmlCreateEntitiesTable -#define xmlCreateEntityParserCtxt libtextstyle_xmlCreateEntityParserCtxt -#define xmlCreateEnumeration libtextstyle_xmlCreateEnumeration -#define xmlCreateFileParserCtxt libtextstyle_xmlCreateFileParserCtxt -#define xmlCreateIOParserCtxt libtextstyle_xmlCreateIOParserCtxt -#define xmlCreateIntSubset libtextstyle_xmlCreateIntSubset -#define xmlCreateMemoryParserCtxt libtextstyle_xmlCreateMemoryParserCtxt -#define xmlCreateURI libtextstyle_xmlCreateURI -#define xmlCreateURLParserCtxt libtextstyle_xmlCreateURLParserCtxt -#define xmlCtxtGetLastError libtextstyle_xmlCtxtGetLastError -#define xmlCtxtReadDoc libtextstyle_xmlCtxtReadDoc -#define xmlCtxtReadFd libtextstyle_xmlCtxtReadFd -#define xmlCtxtReadFile libtextstyle_xmlCtxtReadFile -#define xmlCtxtReadIO libtextstyle_xmlCtxtReadIO -#define xmlCtxtReadMemory libtextstyle_xmlCtxtReadMemory -#define xmlCtxtReset libtextstyle_xmlCtxtReset -#define xmlCtxtResetLastError libtextstyle_xmlCtxtResetLastError -#define xmlCtxtResetPush libtextstyle_xmlCtxtResetPush -#define xmlCtxtUseOptions libtextstyle_xmlCtxtUseOptions -#define xmlCurrentChar libtextstyle_xmlCurrentChar -#define xmlDOMWrapAdoptNode libtextstyle_xmlDOMWrapAdoptNode -#define xmlDOMWrapCloneNode libtextstyle_xmlDOMWrapCloneNode -#define xmlDOMWrapFreeCtxt libtextstyle_xmlDOMWrapFreeCtxt -#define xmlDOMWrapNewCtxt libtextstyle_xmlDOMWrapNewCtxt -#define xmlDOMWrapReconcileNamespaces libtextstyle_xmlDOMWrapReconcileNamespaces -#define xmlDOMWrapRemoveNode libtextstyle_xmlDOMWrapRemoveNode -#define xmlDefaultBufferSize libtextstyle_xmlDefaultBufferSize -#define xmlDefaultSAXHandlerInit libtextstyle_xmlDefaultSAXHandlerInit -#define xmlDefaultSAXLocator libtextstyle_xmlDefaultSAXLocator -#define xmlDelEncodingAlias libtextstyle_xmlDelEncodingAlias -#define xmlDeregisterNodeDefault libtextstyle_xmlDeregisterNodeDefault -#define xmlDeregisterNodeDefaultValue libtextstyle_xmlDeregisterNodeDefaultValue -#define xmlDetectCharEncoding libtextstyle_xmlDetectCharEncoding -#define xmlDictCleanup libtextstyle_xmlDictCleanup -#define xmlDictCreate libtextstyle_xmlDictCreate -#define xmlDictCreateSub libtextstyle_xmlDictCreateSub -#define xmlDictExists libtextstyle_xmlDictExists -#define xmlDictFree libtextstyle_xmlDictFree -#define xmlDictGetUsage libtextstyle_xmlDictGetUsage -#define xmlDictLookup libtextstyle_xmlDictLookup -#define xmlDictOwns libtextstyle_xmlDictOwns -#define xmlDictQLookup libtextstyle_xmlDictQLookup -#define xmlDictReference libtextstyle_xmlDictReference -#define xmlDictSetLimit libtextstyle_xmlDictSetLimit -#define xmlDictSize libtextstyle_xmlDictSize -#define xmlDoValidityCheckingDefaultValue libtextstyle_xmlDoValidityCheckingDefaultValue -#define xmlDocCopyNode libtextstyle_xmlDocCopyNode -#define xmlDocCopyNodeList libtextstyle_xmlDocCopyNodeList -#define xmlDocGetRootElement libtextstyle_xmlDocGetRootElement -#define xmlDocSetRootElement libtextstyle_xmlDocSetRootElement -#define xmlEncodeAttributeEntities libtextstyle_xmlEncodeAttributeEntities -#define xmlEncodeEntitiesReentrant libtextstyle_xmlEncodeEntitiesReentrant -#define xmlEncodeSpecialChars libtextstyle_xmlEncodeSpecialChars -#define xmlErrMemory libtextstyle_xmlErrMemory -#define xmlEscapeFormatString libtextstyle_xmlEscapeFormatString -#define xmlFileClose libtextstyle_xmlFileClose -#define xmlFileMatch libtextstyle_xmlFileMatch -#define xmlFileOpen libtextstyle_xmlFileOpen -#define xmlFileRead libtextstyle_xmlFileRead -#define xmlFindCharEncodingHandler libtextstyle_xmlFindCharEncodingHandler -#define xmlFirstElementChild libtextstyle_xmlFirstElementChild -#define xmlFree libtextstyle_xmlFree -#define xmlFreeAttributeTable libtextstyle_xmlFreeAttributeTable -#define xmlFreeDoc libtextstyle_xmlFreeDoc -#define xmlFreeDocElementContent libtextstyle_xmlFreeDocElementContent -#define xmlFreeDtd libtextstyle_xmlFreeDtd -#define xmlFreeElementContent libtextstyle_xmlFreeElementContent -#define xmlFreeElementTable libtextstyle_xmlFreeElementTable -#define xmlFreeEntitiesTable libtextstyle_xmlFreeEntitiesTable -#define xmlFreeEnumeration libtextstyle_xmlFreeEnumeration -#define xmlFreeIDTable libtextstyle_xmlFreeIDTable -#define xmlFreeInputStream libtextstyle_xmlFreeInputStream -#define xmlFreeMutex libtextstyle_xmlFreeMutex -#define xmlFreeNode libtextstyle_xmlFreeNode -#define xmlFreeNodeList libtextstyle_xmlFreeNodeList -#define xmlFreeNotationTable libtextstyle_xmlFreeNotationTable -#define xmlFreeNs libtextstyle_xmlFreeNs -#define xmlFreeNsList libtextstyle_xmlFreeNsList -#define xmlFreeParserCtxt libtextstyle_xmlFreeParserCtxt -#define xmlFreeParserInputBuffer libtextstyle_xmlFreeParserInputBuffer -#define xmlFreeProp libtextstyle_xmlFreeProp -#define xmlFreePropList libtextstyle_xmlFreePropList -#define xmlFreeRMutex libtextstyle_xmlFreeRMutex -#define xmlFreeRefTable libtextstyle_xmlFreeRefTable -#define xmlFreeURI libtextstyle_xmlFreeURI -#define xmlGcMemGet libtextstyle_xmlGcMemGet -#define xmlGcMemSetup libtextstyle_xmlGcMemSetup -#define xmlGenericError libtextstyle_xmlGenericError -#define xmlGenericErrorContext libtextstyle_xmlGenericErrorContext -#define xmlGenericErrorDefaultFunc libtextstyle_xmlGenericErrorDefaultFunc -#define xmlGetBufferAllocationScheme libtextstyle_xmlGetBufferAllocationScheme -#define xmlGetCharEncodingHandler libtextstyle_xmlGetCharEncodingHandler -#define xmlGetCharEncodingName libtextstyle_xmlGetCharEncodingName -#define xmlGetCompressMode libtextstyle_xmlGetCompressMode -#define xmlGetDocCompressMode libtextstyle_xmlGetDocCompressMode -#define xmlGetDocEntity libtextstyle_xmlGetDocEntity -#define xmlGetDtdAttrDesc libtextstyle_xmlGetDtdAttrDesc -#define xmlGetDtdElementDesc libtextstyle_xmlGetDtdElementDesc -#define xmlGetDtdEntity libtextstyle_xmlGetDtdEntity -#define xmlGetDtdNotationDesc libtextstyle_xmlGetDtdNotationDesc -#define xmlGetDtdQAttrDesc libtextstyle_xmlGetDtdQAttrDesc -#define xmlGetDtdQElementDesc libtextstyle_xmlGetDtdQElementDesc -#define xmlGetEncodingAlias libtextstyle_xmlGetEncodingAlias -#define xmlGetExternalEntityLoader libtextstyle_xmlGetExternalEntityLoader -#define xmlGetGlobalState libtextstyle_xmlGetGlobalState -#define xmlGetID libtextstyle_xmlGetID -#define xmlGetIntSubset libtextstyle_xmlGetIntSubset -#define xmlGetLastChild libtextstyle_xmlGetLastChild -#define xmlGetLastError libtextstyle_xmlGetLastError -#define xmlGetLineNo libtextstyle_xmlGetLineNo -#define xmlGetNoNsProp libtextstyle_xmlGetNoNsProp -#define xmlGetNodePath libtextstyle_xmlGetNodePath -#define xmlGetNsList libtextstyle_xmlGetNsList -#define xmlGetNsProp libtextstyle_xmlGetNsProp -#define xmlGetParameterEntity libtextstyle_xmlGetParameterEntity -#define xmlGetPredefinedEntity libtextstyle_xmlGetPredefinedEntity -#define xmlGetProp libtextstyle_xmlGetProp -#define xmlGetRefs libtextstyle_xmlGetRefs -#define xmlGetThreadId libtextstyle_xmlGetThreadId -#define xmlGetUTF8Char libtextstyle_xmlGetUTF8Char -#define xmlGetWarningsDefaultValue libtextstyle_xmlGetWarningsDefaultValue -#define xmlHasFeature libtextstyle_xmlHasFeature -#define xmlHasNsProp libtextstyle_xmlHasNsProp -#define xmlHasProp libtextstyle_xmlHasProp -#define xmlHashAddEntry libtextstyle_xmlHashAddEntry -#define xmlHashAddEntry2 libtextstyle_xmlHashAddEntry2 -#define xmlHashAddEntry3 libtextstyle_xmlHashAddEntry3 -#define xmlHashCopy libtextstyle_xmlHashCopy -#define xmlHashCreate libtextstyle_xmlHashCreate -#define xmlHashCreateDict libtextstyle_xmlHashCreateDict -#define xmlHashDefaultDeallocator libtextstyle_xmlHashDefaultDeallocator -#define xmlHashFree libtextstyle_xmlHashFree -#define xmlHashLookup libtextstyle_xmlHashLookup -#define xmlHashLookup2 libtextstyle_xmlHashLookup2 -#define xmlHashLookup3 libtextstyle_xmlHashLookup3 -#define xmlHashQLookup libtextstyle_xmlHashQLookup -#define xmlHashQLookup2 libtextstyle_xmlHashQLookup2 -#define xmlHashQLookup3 libtextstyle_xmlHashQLookup3 -#define xmlHashRemoveEntry libtextstyle_xmlHashRemoveEntry -#define xmlHashRemoveEntry2 libtextstyle_xmlHashRemoveEntry2 -#define xmlHashRemoveEntry3 libtextstyle_xmlHashRemoveEntry3 -#define xmlHashScan libtextstyle_xmlHashScan -#define xmlHashScan3 libtextstyle_xmlHashScan3 -#define xmlHashScanFull libtextstyle_xmlHashScanFull -#define xmlHashScanFull3 libtextstyle_xmlHashScanFull3 -#define xmlHashSize libtextstyle_xmlHashSize -#define xmlHashUpdateEntry libtextstyle_xmlHashUpdateEntry -#define xmlHashUpdateEntry2 libtextstyle_xmlHashUpdateEntry2 -#define xmlHashUpdateEntry3 libtextstyle_xmlHashUpdateEntry3 -#define xmlIndentTreeOutput libtextstyle_xmlIndentTreeOutput -#define xmlInitCharEncodingHandlers libtextstyle_xmlInitCharEncodingHandlers -#define xmlInitGlobals libtextstyle_xmlInitGlobals -#define xmlInitMemory libtextstyle_xmlInitMemory -#define xmlInitNodeInfoSeq libtextstyle_xmlInitNodeInfoSeq -#define xmlInitParser libtextstyle_xmlInitParser -#define xmlInitParserCtxt libtextstyle_xmlInitParserCtxt -#define xmlInitThreads libtextstyle_xmlInitThreads -#define xmlInitializeDict libtextstyle_xmlInitializeDict -#define xmlInitializeGlobalState libtextstyle_xmlInitializeGlobalState -#define xmlInputReadCallbackNop libtextstyle_xmlInputReadCallbackNop -#define xmlIsBaseChar libtextstyle_xmlIsBaseChar -#define xmlIsBaseCharGroup libtextstyle_xmlIsBaseCharGroup -#define xmlIsBlank libtextstyle_xmlIsBlank -#define xmlIsBlankNode libtextstyle_xmlIsBlankNode -#define xmlIsChar libtextstyle_xmlIsChar -#define xmlIsCharGroup libtextstyle_xmlIsCharGroup -#define xmlIsCombining libtextstyle_xmlIsCombining -#define xmlIsCombiningGroup libtextstyle_xmlIsCombiningGroup -#define xmlIsDigit libtextstyle_xmlIsDigit -#define xmlIsDigitGroup libtextstyle_xmlIsDigitGroup -#define xmlIsExtender libtextstyle_xmlIsExtender -#define xmlIsExtenderGroup libtextstyle_xmlIsExtenderGroup -#define xmlIsID libtextstyle_xmlIsID -#define xmlIsIdeographic libtextstyle_xmlIsIdeographic -#define xmlIsIdeographicGroup libtextstyle_xmlIsIdeographicGroup -#define xmlIsLetter libtextstyle_xmlIsLetter -#define xmlIsMainThread libtextstyle_xmlIsMainThread -#define xmlIsMixedElement libtextstyle_xmlIsMixedElement -#define xmlIsPubidChar libtextstyle_xmlIsPubidChar -#define xmlIsPubidChar_tab libtextstyle_xmlIsPubidChar_tab -#define xmlIsRef libtextstyle_xmlIsRef -#define xmlIsXHTML libtextstyle_xmlIsXHTML -#define xmlKeepBlanksDefault libtextstyle_xmlKeepBlanksDefault -#define xmlKeepBlanksDefaultValue libtextstyle_xmlKeepBlanksDefaultValue -#define xmlLastElementChild libtextstyle_xmlLastElementChild -#define xmlLastError libtextstyle_xmlLastError -#define xmlLineNumbersDefault libtextstyle_xmlLineNumbersDefault -#define xmlLineNumbersDefaultValue libtextstyle_xmlLineNumbersDefaultValue -#define xmlLinkGetData libtextstyle_xmlLinkGetData -#define xmlListAppend libtextstyle_xmlListAppend -#define xmlListClear libtextstyle_xmlListClear -#define xmlListCopy libtextstyle_xmlListCopy -#define xmlListCreate libtextstyle_xmlListCreate -#define xmlListDelete libtextstyle_xmlListDelete -#define xmlListDup libtextstyle_xmlListDup -#define xmlListEmpty libtextstyle_xmlListEmpty -#define xmlListEnd libtextstyle_xmlListEnd -#define xmlListFront libtextstyle_xmlListFront -#define xmlListInsert libtextstyle_xmlListInsert -#define xmlListMerge libtextstyle_xmlListMerge -#define xmlListPopBack libtextstyle_xmlListPopBack -#define xmlListPopFront libtextstyle_xmlListPopFront -#define xmlListPushBack libtextstyle_xmlListPushBack -#define xmlListPushFront libtextstyle_xmlListPushFront -#define xmlListRemoveAll libtextstyle_xmlListRemoveAll -#define xmlListRemoveFirst libtextstyle_xmlListRemoveFirst -#define xmlListRemoveLast libtextstyle_xmlListRemoveLast -#define xmlListReverse libtextstyle_xmlListReverse -#define xmlListReverseSearch libtextstyle_xmlListReverseSearch -#define xmlListReverseWalk libtextstyle_xmlListReverseWalk -#define xmlListSearch libtextstyle_xmlListSearch -#define xmlListSize libtextstyle_xmlListSize -#define xmlListSort libtextstyle_xmlListSort -#define xmlListWalk libtextstyle_xmlListWalk -#define xmlLoadExtDtdDefaultValue libtextstyle_xmlLoadExtDtdDefaultValue -#define xmlLoadExternalEntity libtextstyle_xmlLoadExternalEntity -#define xmlLockLibrary libtextstyle_xmlLockLibrary -#define xmlMalloc libtextstyle_xmlMalloc -#define xmlMallocAtomic libtextstyle_xmlMallocAtomic -#define xmlMallocAtomicLoc libtextstyle_xmlMallocAtomicLoc -#define xmlMallocBreakpoint libtextstyle_xmlMallocBreakpoint -#define xmlMallocLoc libtextstyle_xmlMallocLoc -#define xmlMemBlocks libtextstyle_xmlMemBlocks -#define xmlMemDisplay libtextstyle_xmlMemDisplay -#define xmlMemDisplayLast libtextstyle_xmlMemDisplayLast -#define xmlMemFree libtextstyle_xmlMemFree -#define xmlMemGet libtextstyle_xmlMemGet -#define xmlMemMalloc libtextstyle_xmlMemMalloc -#define xmlMemRealloc libtextstyle_xmlMemRealloc -#define xmlMemSetup libtextstyle_xmlMemSetup -#define xmlMemShow libtextstyle_xmlMemShow -#define xmlMemStrdup libtextstyle_xmlMemStrdup -#define xmlMemStrdupLoc libtextstyle_xmlMemStrdupLoc -#define xmlMemUsed libtextstyle_xmlMemUsed -#define xmlMemoryDump libtextstyle_xmlMemoryDump -#define xmlMemoryStrdup libtextstyle_xmlMemoryStrdup -#define xmlMutexLock libtextstyle_xmlMutexLock -#define xmlMutexUnlock libtextstyle_xmlMutexUnlock -#define xmlNewCDataBlock libtextstyle_xmlNewCDataBlock -#define xmlNewCharEncodingHandler libtextstyle_xmlNewCharEncodingHandler -#define xmlNewCharRef libtextstyle_xmlNewCharRef -#define xmlNewChild libtextstyle_xmlNewChild -#define xmlNewComment libtextstyle_xmlNewComment -#define xmlNewDoc libtextstyle_xmlNewDoc -#define xmlNewDocComment libtextstyle_xmlNewDocComment -#define xmlNewDocElementContent libtextstyle_xmlNewDocElementContent -#define xmlNewDocFragment libtextstyle_xmlNewDocFragment -#define xmlNewDocNode libtextstyle_xmlNewDocNode -#define xmlNewDocNodeEatName libtextstyle_xmlNewDocNodeEatName -#define xmlNewDocPI libtextstyle_xmlNewDocPI -#define xmlNewDocProp libtextstyle_xmlNewDocProp -#define xmlNewDocRawNode libtextstyle_xmlNewDocRawNode -#define xmlNewDocText libtextstyle_xmlNewDocText -#define xmlNewDocTextLen libtextstyle_xmlNewDocTextLen -#define xmlNewDtd libtextstyle_xmlNewDtd -#define xmlNewElementContent libtextstyle_xmlNewElementContent -#define xmlNewEntity libtextstyle_xmlNewEntity -#define xmlNewEntityInputStream libtextstyle_xmlNewEntityInputStream -#define xmlNewIOInputStream libtextstyle_xmlNewIOInputStream -#define xmlNewInputFromFile libtextstyle_xmlNewInputFromFile -#define xmlNewInputStream libtextstyle_xmlNewInputStream -#define xmlNewMutex libtextstyle_xmlNewMutex -#define xmlNewNode libtextstyle_xmlNewNode -#define xmlNewNodeEatName libtextstyle_xmlNewNodeEatName -#define xmlNewNs libtextstyle_xmlNewNs -#define xmlNewNsProp libtextstyle_xmlNewNsProp -#define xmlNewNsPropEatName libtextstyle_xmlNewNsPropEatName -#define xmlNewPI libtextstyle_xmlNewPI -#define xmlNewParserCtxt libtextstyle_xmlNewParserCtxt -#define xmlNewProp libtextstyle_xmlNewProp -#define xmlNewRMutex libtextstyle_xmlNewRMutex -#define xmlNewReference libtextstyle_xmlNewReference -#define xmlNewStringInputStream libtextstyle_xmlNewStringInputStream -#define xmlNewText libtextstyle_xmlNewText -#define xmlNewTextChild libtextstyle_xmlNewTextChild -#define xmlNewTextLen libtextstyle_xmlNewTextLen -#define xmlNextChar libtextstyle_xmlNextChar -#define xmlNextElementSibling libtextstyle_xmlNextElementSibling -#define xmlNoNetExternalEntityLoader libtextstyle_xmlNoNetExternalEntityLoader -#define xmlNodeAddContent libtextstyle_xmlNodeAddContent -#define xmlNodeAddContentLen libtextstyle_xmlNodeAddContentLen -#define xmlNodeBufGetContent libtextstyle_xmlNodeBufGetContent -#define xmlNodeGetBase libtextstyle_xmlNodeGetBase -#define xmlNodeGetContent libtextstyle_xmlNodeGetContent -#define xmlNodeGetLang libtextstyle_xmlNodeGetLang -#define xmlNodeGetSpacePreserve libtextstyle_xmlNodeGetSpacePreserve -#define xmlNodeIsText libtextstyle_xmlNodeIsText -#define xmlNodeListGetRawString libtextstyle_xmlNodeListGetRawString -#define xmlNodeListGetString libtextstyle_xmlNodeListGetString -#define xmlNodeSetBase libtextstyle_xmlNodeSetBase -#define xmlNodeSetContent libtextstyle_xmlNodeSetContent -#define xmlNodeSetContentLen libtextstyle_xmlNodeSetContentLen -#define xmlNodeSetLang libtextstyle_xmlNodeSetLang -#define xmlNodeSetName libtextstyle_xmlNodeSetName -#define xmlNodeSetSpacePreserve libtextstyle_xmlNodeSetSpacePreserve -#define xmlNormalizeURIPath libtextstyle_xmlNormalizeURIPath -#define xmlNormalizeWindowsPath libtextstyle_xmlNormalizeWindowsPath -#define xmlOutputBufferCreateFilenameDefault libtextstyle_xmlOutputBufferCreateFilenameDefault -#define xmlOutputBufferCreateFilenameValue libtextstyle_xmlOutputBufferCreateFilenameValue -#define xmlParseAttValue libtextstyle_xmlParseAttValue -#define xmlParseAttributeListDecl libtextstyle_xmlParseAttributeListDecl -#define xmlParseAttributeType libtextstyle_xmlParseAttributeType -#define xmlParseCDSect libtextstyle_xmlParseCDSect -#define xmlParseCharData libtextstyle_xmlParseCharData -#define xmlParseCharEncoding libtextstyle_xmlParseCharEncoding -#define xmlParseCharRef libtextstyle_xmlParseCharRef -#define xmlParseComment libtextstyle_xmlParseComment -#define xmlParseContent libtextstyle_xmlParseContent -#define xmlParseCtxtExternalEntity libtextstyle_xmlParseCtxtExternalEntity -#define xmlParseDefaultDecl libtextstyle_xmlParseDefaultDecl -#define xmlParseDocTypeDecl libtextstyle_xmlParseDocTypeDecl -#define xmlParseDocument libtextstyle_xmlParseDocument -#define xmlParseElement libtextstyle_xmlParseElement -#define xmlParseElementChildrenContentDecl libtextstyle_xmlParseElementChildrenContentDecl -#define xmlParseElementContentDecl libtextstyle_xmlParseElementContentDecl -#define xmlParseElementDecl libtextstyle_xmlParseElementDecl -#define xmlParseElementMixedContentDecl libtextstyle_xmlParseElementMixedContentDecl -#define xmlParseEncName libtextstyle_xmlParseEncName -#define xmlParseEncodingDecl libtextstyle_xmlParseEncodingDecl -#define xmlParseEntityDecl libtextstyle_xmlParseEntityDecl -#define xmlParseEntityRef libtextstyle_xmlParseEntityRef -#define xmlParseEntityValue libtextstyle_xmlParseEntityValue -#define xmlParseEnumeratedType libtextstyle_xmlParseEnumeratedType -#define xmlParseEnumerationType libtextstyle_xmlParseEnumerationType -#define xmlParseExtParsedEnt libtextstyle_xmlParseExtParsedEnt -#define xmlParseExternalID libtextstyle_xmlParseExternalID -#define xmlParseExternalSubset libtextstyle_xmlParseExternalSubset -#define xmlParseInNodeContext libtextstyle_xmlParseInNodeContext -#define xmlParseMarkupDecl libtextstyle_xmlParseMarkupDecl -#define xmlParseMisc libtextstyle_xmlParseMisc -#define xmlParseName libtextstyle_xmlParseName -#define xmlParseNmtoken libtextstyle_xmlParseNmtoken -#define xmlParseNotationDecl libtextstyle_xmlParseNotationDecl -#define xmlParseNotationType libtextstyle_xmlParseNotationType -#define xmlParsePEReference libtextstyle_xmlParsePEReference -#define xmlParsePI libtextstyle_xmlParsePI -#define xmlParsePITarget libtextstyle_xmlParsePITarget -#define xmlParsePubidLiteral libtextstyle_xmlParsePubidLiteral -#define xmlParseReference libtextstyle_xmlParseReference -#define xmlParseSDDecl libtextstyle_xmlParseSDDecl -#define xmlParseSystemLiteral libtextstyle_xmlParseSystemLiteral -#define xmlParseTextDecl libtextstyle_xmlParseTextDecl -#define xmlParseURI libtextstyle_xmlParseURI -#define xmlParseURIRaw libtextstyle_xmlParseURIRaw -#define xmlParseURIReference libtextstyle_xmlParseURIReference -#define xmlParseVersionInfo libtextstyle_xmlParseVersionInfo -#define xmlParseVersionNum libtextstyle_xmlParseVersionNum -#define xmlParseXMLDecl libtextstyle_xmlParseXMLDecl -#define xmlParserAddNodeInfo libtextstyle_xmlParserAddNodeInfo -#define xmlParserDebugEntities libtextstyle_xmlParserDebugEntities -#define xmlParserError libtextstyle_xmlParserError -#define xmlParserFindNodeInfo libtextstyle_xmlParserFindNodeInfo -#define xmlParserFindNodeInfoIndex libtextstyle_xmlParserFindNodeInfoIndex -#define xmlParserGetDirectory libtextstyle_xmlParserGetDirectory -#define xmlParserHandlePEReference libtextstyle_xmlParserHandlePEReference -#define xmlParserInputBufferCreateFd libtextstyle_xmlParserInputBufferCreateFd -#define xmlParserInputBufferCreateFile libtextstyle_xmlParserInputBufferCreateFile -#define xmlParserInputBufferCreateFilename libtextstyle_xmlParserInputBufferCreateFilename -#define xmlParserInputBufferCreateFilenameDefault libtextstyle_xmlParserInputBufferCreateFilenameDefault -#define xmlParserInputBufferCreateFilenameValue libtextstyle_xmlParserInputBufferCreateFilenameValue -#define xmlParserInputBufferCreateIO libtextstyle_xmlParserInputBufferCreateIO -#define xmlParserInputBufferCreateMem libtextstyle_xmlParserInputBufferCreateMem -#define xmlParserInputBufferCreateStatic libtextstyle_xmlParserInputBufferCreateStatic -#define xmlParserInputBufferGrow libtextstyle_xmlParserInputBufferGrow -#define xmlParserInputBufferPush libtextstyle_xmlParserInputBufferPush -#define xmlParserInputBufferRead libtextstyle_xmlParserInputBufferRead -#define xmlParserInputGrow libtextstyle_xmlParserInputGrow -#define xmlParserInputRead libtextstyle_xmlParserInputRead -#define xmlParserInputShrink libtextstyle_xmlParserInputShrink -#define xmlParserMaxDepth libtextstyle_xmlParserMaxDepth -#define xmlParserPrintFileContext libtextstyle_xmlParserPrintFileContext -#define xmlParserPrintFileInfo libtextstyle_xmlParserPrintFileInfo -#define xmlParserValidityError libtextstyle_xmlParserValidityError -#define xmlParserValidityWarning libtextstyle_xmlParserValidityWarning -#define xmlParserVersion libtextstyle_xmlParserVersion -#define xmlParserWarning libtextstyle_xmlParserWarning -#define xmlPathToURI libtextstyle_xmlPathToURI -#define xmlPedanticParserDefault libtextstyle_xmlPedanticParserDefault -#define xmlPedanticParserDefaultValue libtextstyle_xmlPedanticParserDefaultValue -#define xmlPopInput libtextstyle_xmlPopInput -#define xmlPopInputCallbacks libtextstyle_xmlPopInputCallbacks -#define xmlPreviousElementSibling libtextstyle_xmlPreviousElementSibling -#define xmlPrintURI libtextstyle_xmlPrintURI -#define xmlPushInput libtextstyle_xmlPushInput -#define xmlRMutexLock libtextstyle_xmlRMutexLock -#define xmlRMutexUnlock libtextstyle_xmlRMutexUnlock -#define xmlReadDoc libtextstyle_xmlReadDoc -#define xmlReadFd libtextstyle_xmlReadFd -#define xmlReadFile libtextstyle_xmlReadFile -#define xmlReadIO libtextstyle_xmlReadIO -#define xmlReadMemory libtextstyle_xmlReadMemory -#define xmlRealloc libtextstyle_xmlRealloc -#define xmlReallocLoc libtextstyle_xmlReallocLoc -#define xmlReconciliateNs libtextstyle_xmlReconciliateNs -#define xmlRegisterCharEncodingHandler libtextstyle_xmlRegisterCharEncodingHandler -#define xmlRegisterDefaultInputCallbacks libtextstyle_xmlRegisterDefaultInputCallbacks -#define xmlRegisterInputCallbacks libtextstyle_xmlRegisterInputCallbacks -#define xmlRegisterNodeDefault libtextstyle_xmlRegisterNodeDefault -#define xmlRegisterNodeDefaultValue libtextstyle_xmlRegisterNodeDefaultValue -#define xmlRemoveID libtextstyle_xmlRemoveID -#define xmlRemoveProp libtextstyle_xmlRemoveProp -#define xmlRemoveRef libtextstyle_xmlRemoveRef -#define xmlReplaceNode libtextstyle_xmlReplaceNode -#define xmlResetError libtextstyle_xmlResetError -#define xmlResetLastError libtextstyle_xmlResetLastError -#define xmlSAX2AttributeDecl libtextstyle_xmlSAX2AttributeDecl -#define xmlSAX2CDataBlock libtextstyle_xmlSAX2CDataBlock -#define xmlSAX2Characters libtextstyle_xmlSAX2Characters -#define xmlSAX2Comment libtextstyle_xmlSAX2Comment -#define xmlSAX2ElementDecl libtextstyle_xmlSAX2ElementDecl -#define xmlSAX2EndDocument libtextstyle_xmlSAX2EndDocument -#define xmlSAX2EndElementNs libtextstyle_xmlSAX2EndElementNs -#define xmlSAX2EntityDecl libtextstyle_xmlSAX2EntityDecl -#define xmlSAX2ExternalSubset libtextstyle_xmlSAX2ExternalSubset -#define xmlSAX2GetColumnNumber libtextstyle_xmlSAX2GetColumnNumber -#define xmlSAX2GetEntity libtextstyle_xmlSAX2GetEntity -#define xmlSAX2GetLineNumber libtextstyle_xmlSAX2GetLineNumber -#define xmlSAX2GetParameterEntity libtextstyle_xmlSAX2GetParameterEntity -#define xmlSAX2GetPublicId libtextstyle_xmlSAX2GetPublicId -#define xmlSAX2GetSystemId libtextstyle_xmlSAX2GetSystemId -#define xmlSAX2HasExternalSubset libtextstyle_xmlSAX2HasExternalSubset -#define xmlSAX2HasInternalSubset libtextstyle_xmlSAX2HasInternalSubset -#define xmlSAX2IgnorableWhitespace libtextstyle_xmlSAX2IgnorableWhitespace -#define xmlSAX2InitDefaultSAXHandler libtextstyle_xmlSAX2InitDefaultSAXHandler -#define xmlSAX2InternalSubset libtextstyle_xmlSAX2InternalSubset -#define xmlSAX2IsStandalone libtextstyle_xmlSAX2IsStandalone -#define xmlSAX2NotationDecl libtextstyle_xmlSAX2NotationDecl -#define xmlSAX2ProcessingInstruction libtextstyle_xmlSAX2ProcessingInstruction -#define xmlSAX2Reference libtextstyle_xmlSAX2Reference -#define xmlSAX2ResolveEntity libtextstyle_xmlSAX2ResolveEntity -#define xmlSAX2SetDocumentLocator libtextstyle_xmlSAX2SetDocumentLocator -#define xmlSAX2StartDocument libtextstyle_xmlSAX2StartDocument -#define xmlSAX2StartElementNs libtextstyle_xmlSAX2StartElementNs -#define xmlSAX2UnparsedEntityDecl libtextstyle_xmlSAX2UnparsedEntityDecl -#define xmlSAXVersion libtextstyle_xmlSAXVersion -#define xmlSaveNoEmptyTags libtextstyle_xmlSaveNoEmptyTags -#define xmlSaveUri libtextstyle_xmlSaveUri -#define xmlSearchNs libtextstyle_xmlSearchNs -#define xmlSearchNsByHref libtextstyle_xmlSearchNsByHref -#define xmlSetBufferAllocationScheme libtextstyle_xmlSetBufferAllocationScheme -#define xmlSetCompressMode libtextstyle_xmlSetCompressMode -#define xmlSetDocCompressMode libtextstyle_xmlSetDocCompressMode -#define xmlSetExternalEntityLoader libtextstyle_xmlSetExternalEntityLoader -#define xmlSetGenericErrorFunc libtextstyle_xmlSetGenericErrorFunc -#define xmlSetListDoc libtextstyle_xmlSetListDoc -#define xmlSetNs libtextstyle_xmlSetNs -#define xmlSetNsProp libtextstyle_xmlSetNsProp -#define xmlSetProp libtextstyle_xmlSetProp -#define xmlSetStructuredErrorFunc libtextstyle_xmlSetStructuredErrorFunc -#define xmlSetTreeDoc libtextstyle_xmlSetTreeDoc -#define xmlSkipBlankChars libtextstyle_xmlSkipBlankChars -#define xmlSnprintfElementContent libtextstyle_xmlSnprintfElementContent -#define xmlSplitQName libtextstyle_xmlSplitQName -#define xmlSplitQName2 libtextstyle_xmlSplitQName2 -#define xmlSplitQName3 libtextstyle_xmlSplitQName3 -#define xmlStopParser libtextstyle_xmlStopParser -#define xmlStrEqual libtextstyle_xmlStrEqual -#define xmlStrPrintf libtextstyle_xmlStrPrintf -#define xmlStrQEqual libtextstyle_xmlStrQEqual -#define xmlStrVPrintf libtextstyle_xmlStrVPrintf -#define xmlStrcasecmp libtextstyle_xmlStrcasecmp -#define xmlStrcasestr libtextstyle_xmlStrcasestr -#define xmlStrcat libtextstyle_xmlStrcat -#define xmlStrchr libtextstyle_xmlStrchr -#define xmlStrcmp libtextstyle_xmlStrcmp -#define xmlStrdup libtextstyle_xmlStrdup -#define xmlStringComment libtextstyle_xmlStringComment -#define xmlStringCurrentChar libtextstyle_xmlStringCurrentChar -#define xmlStringDecodeEntities libtextstyle_xmlStringDecodeEntities -#define xmlStringGetNodeList libtextstyle_xmlStringGetNodeList -#define xmlStringLenDecodeEntities libtextstyle_xmlStringLenDecodeEntities -#define xmlStringLenGetNodeList libtextstyle_xmlStringLenGetNodeList -#define xmlStringText libtextstyle_xmlStringText -#define xmlStringTextNoenc libtextstyle_xmlStringTextNoenc -#define xmlStrlen libtextstyle_xmlStrlen -#define xmlStrncasecmp libtextstyle_xmlStrncasecmp -#define xmlStrncat libtextstyle_xmlStrncat -#define xmlStrncatNew libtextstyle_xmlStrncatNew -#define xmlStrncmp libtextstyle_xmlStrncmp -#define xmlStrndup libtextstyle_xmlStrndup -#define xmlStrstr libtextstyle_xmlStrstr -#define xmlStrsub libtextstyle_xmlStrsub -#define xmlStructuredError libtextstyle_xmlStructuredError -#define xmlStructuredErrorContext libtextstyle_xmlStructuredErrorContext -#define xmlSubstituteEntitiesDefault libtextstyle_xmlSubstituteEntitiesDefault -#define xmlSubstituteEntitiesDefaultValue libtextstyle_xmlSubstituteEntitiesDefaultValue -#define xmlSwitchEncoding libtextstyle_xmlSwitchEncoding -#define xmlSwitchInputEncoding libtextstyle_xmlSwitchInputEncoding -#define xmlSwitchToEncoding libtextstyle_xmlSwitchToEncoding -#define xmlTextConcat libtextstyle_xmlTextConcat -#define xmlTextMerge libtextstyle_xmlTextMerge -#define xmlThrDefBufferAllocScheme libtextstyle_xmlThrDefBufferAllocScheme -#define xmlThrDefDefaultBufferSize libtextstyle_xmlThrDefDefaultBufferSize -#define xmlThrDefDeregisterNodeDefault libtextstyle_xmlThrDefDeregisterNodeDefault -#define xmlThrDefDoValidityCheckingDefaultValue libtextstyle_xmlThrDefDoValidityCheckingDefaultValue -#define xmlThrDefGetWarningsDefaultValue libtextstyle_xmlThrDefGetWarningsDefaultValue -#define xmlThrDefIndentTreeOutput libtextstyle_xmlThrDefIndentTreeOutput -#define xmlThrDefKeepBlanksDefaultValue libtextstyle_xmlThrDefKeepBlanksDefaultValue -#define xmlThrDefLineNumbersDefaultValue libtextstyle_xmlThrDefLineNumbersDefaultValue -#define xmlThrDefLoadExtDtdDefaultValue libtextstyle_xmlThrDefLoadExtDtdDefaultValue -#define xmlThrDefOutputBufferCreateFilenameDefault libtextstyle_xmlThrDefOutputBufferCreateFilenameDefault -#define xmlThrDefParserDebugEntities libtextstyle_xmlThrDefParserDebugEntities -#define xmlThrDefParserInputBufferCreateFilenameDefault libtextstyle_xmlThrDefParserInputBufferCreateFilenameDefault -#define xmlThrDefPedanticParserDefaultValue libtextstyle_xmlThrDefPedanticParserDefaultValue -#define xmlThrDefRegisterNodeDefault libtextstyle_xmlThrDefRegisterNodeDefault -#define xmlThrDefSaveNoEmptyTags libtextstyle_xmlThrDefSaveNoEmptyTags -#define xmlThrDefSetGenericErrorFunc libtextstyle_xmlThrDefSetGenericErrorFunc -#define xmlThrDefSetStructuredErrorFunc libtextstyle_xmlThrDefSetStructuredErrorFunc -#define xmlThrDefSubstituteEntitiesDefaultValue libtextstyle_xmlThrDefSubstituteEntitiesDefaultValue -#define xmlThrDefTreeIndentString libtextstyle_xmlThrDefTreeIndentString -#define xmlTreeIndentString libtextstyle_xmlTreeIndentString -#define xmlURIEscape libtextstyle_xmlURIEscape -#define xmlURIEscapeStr libtextstyle_xmlURIEscapeStr -#define xmlURIUnescapeString libtextstyle_xmlURIUnescapeString -#define xmlUTF8Charcmp libtextstyle_xmlUTF8Charcmp -#define xmlUTF8Size libtextstyle_xmlUTF8Size -#define xmlUTF8Strlen libtextstyle_xmlUTF8Strlen -#define xmlUTF8Strloc libtextstyle_xmlUTF8Strloc -#define xmlUTF8Strndup libtextstyle_xmlUTF8Strndup -#define xmlUTF8Strpos libtextstyle_xmlUTF8Strpos -#define xmlUTF8Strsize libtextstyle_xmlUTF8Strsize -#define xmlUTF8Strsub libtextstyle_xmlUTF8Strsub -#define xmlUnlinkNode libtextstyle_xmlUnlinkNode -#define xmlUnlockLibrary libtextstyle_xmlUnlockLibrary -#define xmlUnsetNsProp libtextstyle_xmlUnsetNsProp -#define xmlUnsetProp libtextstyle_xmlUnsetProp -#define xmlValidateNCName libtextstyle_xmlValidateNCName -#define xmlValidateNMToken libtextstyle_xmlValidateNMToken -#define xmlValidateName libtextstyle_xmlValidateName -#define xmlValidateQName libtextstyle_xmlValidateQName -#define xnmalloc libtextstyle_xnmalloc -#define xrealloc libtextstyle_xrealloc -#define xstrdup libtextstyle_xstrdup -#define xvasprintf libtextstyle_xvasprintf -#define xzalloc libtextstyle_xzalloc diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/math.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/math.h deleted file mode 100644 index 735b287c5..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/math.h +++ /dev/null @@ -1,3008 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_LTS_MATH_H - -#if __GNUC__ >= 3 - -#endif - - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h" - -#ifndef _GL_LTS_MATH_H -#define _GL_LTS_MATH_H - -/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ -#if defined __VMS && ! defined NAN -# include -#endif - -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif -_GL_INLINE_HEADER_BEGIN -#ifndef _GL_MATH_INLINE -# define _GL_MATH_INLINE _GL_INLINE -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -#ifdef __cplusplus -/* Helper macros to define type-generic function FUNC as overloaded functions, - rather than as macros like in C. POSIX declares these with an argument of - real-floating (that is, one of float, double, or long double). */ -# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ -static inline int \ -_gl_cxx_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -static inline int \ -_gl_cxx_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -static inline int \ -_gl_cxx_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \ -_GL_BEGIN_NAMESPACE \ -inline rettype \ -rpl_func (float f) \ -{ \ - return _gl_cxx_ ## func ## f (f); \ -} \ -inline rettype \ -rpl_func (double d) \ -{ \ - return _gl_cxx_ ## func ## d (d); \ -} \ -inline rettype \ -rpl_func (long double l) \ -{ \ - return _gl_cxx_ ## func ## l (l); \ -} \ -_GL_END_NAMESPACE -#endif - -/* Helper macros to define a portability warning for the - classification macro FUNC called with VALUE. POSIX declares the - classification macros with an argument of real-floating (that is, - one of float, double, or long double). */ -#define _GL_WARN_REAL_FLOATING_DECL(func) \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ - (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ - : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ - : rpl_ ## func ## l (value)) - - -#if 0 -/* Pull in a function that fixes the 'int' to 'long double' conversion - of glibc 2.7. */ -_GL_EXTERN_C void _Qp_itoq (long double *, int); -static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; -#endif - - -/* For clang: Use __has_builtin to determine whether a builtin is available. */ -#ifndef __has_builtin -# define __has_builtin(name) 0 -#endif - - -/* POSIX allows platforms that don't support NAN. But all major - machines in the past 15 years have supported something close to - IEEE NaN, so we define this unconditionally. We also must define - it on platforms like Solaris 10, where NAN is present but defined - as a function pointer rather than a floating point constant. */ -#if !defined NAN || 0 -# if !GNULIB_defined_NAN -# undef NAN - /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler - choke on the expression 0.0 / 0.0. */ -# if defined __DECC || defined _MSC_VER -_GL_MATH_INLINE float -_NaN () -{ - static float zero = 0.0f; - return zero / zero; -} -# define NAN (_NaN()) -# else -# define NAN (0.0f / 0.0f) -# endif -# define GNULIB_defined_NAN 1 -# endif -#endif - -/* Solaris 10 defines HUGE_VAL, but as a function pointer rather - than a floating point constant. */ -#if 0 -# undef HUGE_VALF -# define HUGE_VALF (1.0f / 0.0f) -# undef HUGE_VAL -# define HUGE_VAL (1.0 / 0.0) -# undef HUGE_VALL -# define HUGE_VALL (1.0L / 0.0L) -#endif - -/* HUGE_VALF is a 'float' Infinity. */ -#ifndef HUGE_VALF -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ -# define HUGE_VALF (1e25f * 1e25f) -# else -# define HUGE_VALF (1.0f / 0.0f) -# endif -#endif - -/* HUGE_VAL is a 'double' Infinity. */ -#ifndef HUGE_VAL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ -# define HUGE_VAL (1e250 * 1e250) -# else -# define HUGE_VAL (1.0 / 0.0) -# endif -#endif - -/* HUGE_VALL is a 'long double' Infinity. */ -#ifndef HUGE_VALL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ -# define HUGE_VALL (1e250L * 1e250L) -# else -# define HUGE_VALL (1.0L / 0.0L) -# endif -#endif - - -#if defined FP_ILOGB0 && defined FP_ILOGBNAN - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */ -# if defined __HAIKU__ - /* Haiku: match what ilogb() does */ -# undef FP_ILOGB0 -# undef FP_ILOGBNAN -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#else - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ -# if defined __NetBSD__ || defined __sgi - /* NetBSD, IRIX 6.5: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# elif defined _AIX - /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# elif defined __sun - /* Solaris 9: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# else - /* Gnulib defined values. */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef acosf -# define acosf rpl_acosf -# endif -_GL_FUNCDECL_RPL (acosf, float, (float x)); -_GL_CXXALIAS_RPL (acosf, float, (float x)); -# else -# if !1 -# undef acosf -_GL_FUNCDECL_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIASWARN (acosf); -#elif defined GNULIB_POSIXCHECK -# undef acosf -# if HAVE_RAW_DECL_ACOSF -_GL_WARN_ON_USE (acosf, "acosf is unportable - " - "use gnulib module acosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef acosl -_GL_FUNCDECL_SYS (acosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (acosl, long double, (long double x)); -_GL_CXXALIASWARN (acosl); -#elif defined GNULIB_POSIXCHECK -# undef acosl -# if HAVE_RAW_DECL_ACOSL -_GL_WARN_ON_USE (acosl, "acosl is unportable - " - "use gnulib module acosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef asinf -# define asinf rpl_asinf -# endif -_GL_FUNCDECL_RPL (asinf, float, (float x)); -_GL_CXXALIAS_RPL (asinf, float, (float x)); -# else -# if !1 -# undef asinf -_GL_FUNCDECL_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIASWARN (asinf); -#elif defined GNULIB_POSIXCHECK -# undef asinf -# if HAVE_RAW_DECL_ASINF -_GL_WARN_ON_USE (asinf, "asinf is unportable - " - "use gnulib module asinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef asinl -_GL_FUNCDECL_SYS (asinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (asinl, long double, (long double x)); -_GL_CXXALIASWARN (asinl); -#elif defined GNULIB_POSIXCHECK -# undef asinl -# if HAVE_RAW_DECL_ASINL -_GL_WARN_ON_USE (asinl, "asinl is unportable - " - "use gnulib module asinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atanf -# define atanf rpl_atanf -# endif -_GL_FUNCDECL_RPL (atanf, float, (float x)); -_GL_CXXALIAS_RPL (atanf, float, (float x)); -# else -# if !1 -# undef atanf -_GL_FUNCDECL_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIASWARN (atanf); -#elif defined GNULIB_POSIXCHECK -# undef atanf -# if HAVE_RAW_DECL_ATANF -_GL_WARN_ON_USE (atanf, "atanf is unportable - " - "use gnulib module atanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef atanl -_GL_FUNCDECL_SYS (atanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (atanl, long double, (long double x)); -_GL_CXXALIASWARN (atanl); -#elif defined GNULIB_POSIXCHECK -# undef atanl -# if HAVE_RAW_DECL_ATANL -_GL_WARN_ON_USE (atanl, "atanl is unportable - " - "use gnulib module atanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atan2f -# define atan2f rpl_atan2f -# endif -_GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); -_GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); -# else -# if !1 -# undef atan2f -_GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIASWARN (atan2f); -#elif defined GNULIB_POSIXCHECK -# undef atan2f -# if HAVE_RAW_DECL_ATAN2F -_GL_WARN_ON_USE (atan2f, "atan2f is unportable - " - "use gnulib module atan2f for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtf -# define cbrtf rpl_cbrtf -# endif -_GL_FUNCDECL_RPL (cbrtf, float, (float x)); -_GL_CXXALIAS_RPL (cbrtf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (cbrtf); -#elif defined GNULIB_POSIXCHECK -# undef cbrtf -# if HAVE_RAW_DECL_CBRTF -_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " - "use gnulib module cbrtf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (cbrt, double, (double x)); -# endif -_GL_CXXALIAS_SYS (cbrt, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (cbrt); -# endif -#elif defined GNULIB_POSIXCHECK -# undef cbrt -# if HAVE_RAW_DECL_CBRT -_GL_WARN_ON_USE (cbrt, "cbrt is unportable - " - "use gnulib module cbrt for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtl -# define cbrtl rpl_cbrtl -# endif -_GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (cbrtl); -#elif defined GNULIB_POSIXCHECK -# undef cbrtl -# if HAVE_RAW_DECL_CBRTL -_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " - "use gnulib module cbrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceilf -# define ceilf rpl_ceilf -# endif -_GL_FUNCDECL_RPL (ceilf, float, (float x)); -_GL_CXXALIAS_RPL (ceilf, float, (float x)); -# else -# if !1 -# undef ceilf -_GL_FUNCDECL_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIASWARN (ceilf); -#elif defined GNULIB_POSIXCHECK -# undef ceilf -# if HAVE_RAW_DECL_CEILF -_GL_WARN_ON_USE (ceilf, "ceilf is unportable - " - "use gnulib module ceilf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceil -# define ceil rpl_ceil -# endif -_GL_FUNCDECL_RPL (ceil, double, (double x)); -_GL_CXXALIAS_RPL (ceil, double, (double x)); -# else -_GL_CXXALIAS_SYS (ceil, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ceil); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceill -# define ceill rpl_ceill -# endif -_GL_FUNCDECL_RPL (ceill, long double, (long double x)); -_GL_CXXALIAS_RPL (ceill, long double, (long double x)); -# else -# if !1 -# undef ceill -_GL_FUNCDECL_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIASWARN (ceill); -#elif defined GNULIB_POSIXCHECK -# undef ceill -# if HAVE_RAW_DECL_CEILL -_GL_WARN_ON_USE (ceill, "ceill is unportable - " - "use gnulib module ceill for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef copysignf -_GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); -_GL_CXXALIASWARN (copysignf); -#elif defined GNULIB_POSIXCHECK -# undef copysignf -# if HAVE_RAW_DECL_COPYSIGNF -_GL_WARN_ON_USE (copysignf, "copysignf is unportable - " - "use gnulib module copysignf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysign, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (copysign, double, (double x, double y)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (copysign); -# endif -#elif defined GNULIB_POSIXCHECK -# undef copysign -# if HAVE_RAW_DECL_COPYSIGN -_GL_WARN_ON_USE (copysign, "copysign is unportable - " - "use gnulib module copysign for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); -_GL_CXXALIASWARN (copysignl); -#elif defined GNULIB_POSIXCHECK -# undef copysignl -# if HAVE_RAW_DECL_COPYSIGNL -_GL_WARN_ON_USE (copysign, "copysignl is unportable - " - "use gnulib module copysignl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cosf -# define cosf rpl_cosf -# endif -_GL_FUNCDECL_RPL (cosf, float, (float x)); -_GL_CXXALIAS_RPL (cosf, float, (float x)); -# else -# if !1 -# undef cosf -_GL_FUNCDECL_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIASWARN (cosf); -#elif defined GNULIB_POSIXCHECK -# undef cosf -# if HAVE_RAW_DECL_COSF -_GL_WARN_ON_USE (cosf, "cosf is unportable - " - "use gnulib module cosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef cosl -_GL_FUNCDECL_SYS (cosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cosl, long double, (long double x)); -_GL_CXXALIASWARN (cosl); -#elif defined GNULIB_POSIXCHECK -# undef cosl -# if HAVE_RAW_DECL_COSL -_GL_WARN_ON_USE (cosl, "cosl is unportable - " - "use gnulib module cosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef coshf -# define coshf rpl_coshf -# endif -_GL_FUNCDECL_RPL (coshf, float, (float x)); -_GL_CXXALIAS_RPL (coshf, float, (float x)); -# else -# if !1 -# undef coshf -_GL_FUNCDECL_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIASWARN (coshf); -#elif defined GNULIB_POSIXCHECK -# undef coshf -# if HAVE_RAW_DECL_COSHF -_GL_WARN_ON_USE (coshf, "coshf is unportable - " - "use gnulib module coshf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expf -# define expf rpl_expf -# endif -_GL_FUNCDECL_RPL (expf, float, (float x)); -_GL_CXXALIAS_RPL (expf, float, (float x)); -# else -# if !1 -# undef expf -_GL_FUNCDECL_SYS (expf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expf, float, (float x)); -# endif -_GL_CXXALIASWARN (expf); -#elif defined GNULIB_POSIXCHECK -# undef expf -# if HAVE_RAW_DECL_EXPF -_GL_WARN_ON_USE (expf, "expf is unportable - " - "use gnulib module expf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expl -# define expl rpl_expl -# endif -_GL_FUNCDECL_RPL (expl, long double, (long double x)); -_GL_CXXALIAS_RPL (expl, long double, (long double x)); -# else -# if !1 || !1 -# undef expl -_GL_FUNCDECL_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expl); -#elif defined GNULIB_POSIXCHECK -# undef expl -# if HAVE_RAW_DECL_EXPL -_GL_WARN_ON_USE (expl, "expl is unportable - " - "use gnulib module expl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (exp2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (exp2f, float, (float x)); -_GL_CXXALIASWARN (exp2f); -#elif defined GNULIB_POSIXCHECK -# undef exp2f -# if HAVE_RAW_DECL_EXP2F -_GL_WARN_ON_USE (exp2f, "exp2f is unportable - " - "use gnulib module exp2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2 -# define exp2 rpl_exp2 -# endif -_GL_FUNCDECL_RPL (exp2, double, (double x)); -_GL_CXXALIAS_RPL (exp2, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (exp2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (exp2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (exp2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef exp2 -# if HAVE_RAW_DECL_EXP2 -_GL_WARN_ON_USE (exp2, "exp2 is unportable - " - "use gnulib module exp2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2l -# define exp2l rpl_exp2l -# endif -_GL_FUNCDECL_RPL (exp2l, long double, (long double x)); -_GL_CXXALIAS_RPL (exp2l, long double, (long double x)); -# else -# if !1 -# undef exp2l -_GL_FUNCDECL_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (exp2l); -#elif defined GNULIB_POSIXCHECK -# undef exp2l -# if HAVE_RAW_DECL_EXP2L -_GL_WARN_ON_USE (exp2l, "exp2l is unportable - " - "use gnulib module exp2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1f -# define expm1f rpl_expm1f -# endif -_GL_FUNCDECL_RPL (expm1f, float, (float x)); -_GL_CXXALIAS_RPL (expm1f, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIASWARN (expm1f); -#elif defined GNULIB_POSIXCHECK -# undef expm1f -# if HAVE_RAW_DECL_EXPM1F -_GL_WARN_ON_USE (expm1f, "expm1f is unportable - " - "use gnulib module expm1f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1 -# define expm1 rpl_expm1 -# endif -_GL_FUNCDECL_RPL (expm1, double, (double x)); -_GL_CXXALIAS_RPL (expm1, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1, double, (double x)); -# endif -_GL_CXXALIAS_SYS (expm1, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (expm1); -# endif -#elif defined GNULIB_POSIXCHECK -# undef expm1 -# if HAVE_RAW_DECL_EXPM1 -_GL_WARN_ON_USE (expm1, "expm1 is unportable - " - "use gnulib module expm1 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1l -# define expm1l rpl_expm1l -# endif -_GL_FUNCDECL_RPL (expm1l, long double, (long double x)); -_GL_CXXALIAS_RPL (expm1l, long double, (long double x)); -# else -# if !1 -# undef expm1l -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (expm1l, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (expm1l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expm1l); -#elif defined GNULIB_POSIXCHECK -# undef expm1l -# if HAVE_RAW_DECL_EXPM1L -_GL_WARN_ON_USE (expm1l, "expm1l is unportable - " - "use gnulib module expm1l for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef fabsf -_GL_FUNCDECL_SYS (fabsf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (fabsf, float, (float x)); -_GL_CXXALIASWARN (fabsf); -#elif defined GNULIB_POSIXCHECK -# undef fabsf -# if HAVE_RAW_DECL_FABSF -_GL_WARN_ON_USE (fabsf, "fabsf is unportable - " - "use gnulib module fabsf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fabsl -# define fabsl rpl_fabsl -# endif -_GL_FUNCDECL_RPL (fabsl, long double, (long double x)); -_GL_CXXALIAS_RPL (fabsl, long double, (long double x)); -# else -# if !1 -# undef fabsl -_GL_FUNCDECL_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (fabsl); -#elif defined GNULIB_POSIXCHECK -# undef fabsl -# if HAVE_RAW_DECL_FABSL -_GL_WARN_ON_USE (fabsl, "fabsl is unportable - " - "use gnulib module fabsl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorf -# define floorf rpl_floorf -# endif -_GL_FUNCDECL_RPL (floorf, float, (float x)); -_GL_CXXALIAS_RPL (floorf, float, (float x)); -# else -# if !1 -# undef floorf -_GL_FUNCDECL_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIASWARN (floorf); -#elif defined GNULIB_POSIXCHECK -# undef floorf -# if HAVE_RAW_DECL_FLOORF -_GL_WARN_ON_USE (floorf, "floorf is unportable - " - "use gnulib module floorf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floor -# define floor rpl_floor -# endif -_GL_FUNCDECL_RPL (floor, double, (double x)); -_GL_CXXALIAS_RPL (floor, double, (double x)); -# else -_GL_CXXALIAS_SYS (floor, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (floor); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorl -# define floorl rpl_floorl -# endif -_GL_FUNCDECL_RPL (floorl, long double, (long double x)); -_GL_CXXALIAS_RPL (floorl, long double, (long double x)); -# else -# if !1 -# undef floorl -_GL_FUNCDECL_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (floorl); -#elif defined GNULIB_POSIXCHECK -# undef floorl -# if HAVE_RAW_DECL_FLOORL -_GL_WARN_ON_USE (floorl, "floorl is unportable - " - "use gnulib module floorl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmaf -# define fmaf rpl_fmaf -# endif -_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); -_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); -# else -# if !1 -# undef fmaf -_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIASWARN (fmaf); -#elif defined GNULIB_POSIXCHECK -# undef fmaf -# if HAVE_RAW_DECL_FMAF -_GL_WARN_ON_USE (fmaf, "fmaf is unportable - " - "use gnulib module fmaf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fma -# define fma rpl_fma -# endif -_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); -_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); -# else -# if !1 -# undef fma -_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); -# endif -_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fma); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fma -# if HAVE_RAW_DECL_FMA -_GL_WARN_ON_USE (fma, "fma is unportable - " - "use gnulib module fma for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmal -# define fmal rpl_fmal -# endif -_GL_FUNCDECL_RPL (fmal, long double, - (long double x, long double y, long double z)); -_GL_CXXALIAS_RPL (fmal, long double, - (long double x, long double y, long double z)); -# else -# if !1 -# undef fmal -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -# endif -_GL_CXXALIAS_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -_GL_CXXALIASWARN (fmal); -#elif defined GNULIB_POSIXCHECK -# undef fmal -# if HAVE_RAW_DECL_FMAL -_GL_WARN_ON_USE (fmal, "fmal is unportable - " - "use gnulib module fmal for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodf -# define fmodf rpl_fmodf -# endif -_GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); -_GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); -# else -# if !1 -# undef fmodf -_GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (fmodf); -#elif defined GNULIB_POSIXCHECK -# undef fmodf -# if HAVE_RAW_DECL_FMODF -_GL_WARN_ON_USE (fmodf, "fmodf is unportable - " - "use gnulib module fmodf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmod -# define fmod rpl_fmod -# endif -_GL_FUNCDECL_RPL (fmod, double, (double x, double y)); -_GL_CXXALIAS_RPL (fmod, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (fmod, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fmod); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fmod -# if HAVE_RAW_DECL_FMOD -_GL_WARN_ON_USE (fmod, "fmod has portability problems - " - "use gnulib module fmod for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodl -# define fmodl rpl_fmodl -# endif -_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); -# else -# if !1 -# undef fmodl -_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (fmodl); -#elif defined GNULIB_POSIXCHECK -# undef fmodl -# if HAVE_RAW_DECL_FMODL -_GL_WARN_ON_USE (fmodl, "fmodl is unportable - " - "use gnulib module fmodl for portability"); -# endif -#endif - - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpf -# define frexpf rpl_frexpf -# endif -_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); -# else -# if !1 -# undef frexpf -_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); -# endif -_GL_CXXALIASWARN (frexpf); -#elif defined GNULIB_POSIXCHECK -# undef frexpf -# if HAVE_RAW_DECL_FREXPF -_GL_WARN_ON_USE (frexpf, "frexpf is unportable - " - "use gnulib module frexpf for portability"); -# endif -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexp -# define frexp rpl_frexp -# endif -_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); -# else -_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef frexp -/* Assume frexp is always declared. */ -_GL_WARN_ON_USE (frexp, "frexp is unportable - " - "use gnulib module frexp for portability"); -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 1 && 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpl -# define frexpl rpl_frexpl -# endif -_GL_FUNCDECL_RPL (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); -#else -# if !1 -_GL_FUNCDECL_SYS (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -# if 1 -_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); -# endif -#endif -#if 1 && !(1 && !1) -_GL_CXXALIASWARN (frexpl); -#endif -#if !1 && defined GNULIB_POSIXCHECK -# undef frexpl -# if HAVE_RAW_DECL_FREXPL -_GL_WARN_ON_USE (frexpl, "frexpl is unportable - " - "use gnulib module frexpl for portability"); -# endif -#endif - - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotf -# define hypotf rpl_hypotf -# endif -_GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); -_GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (hypotf); -#elif defined GNULIB_POSIXCHECK -# undef hypotf -# if HAVE_RAW_DECL_HYPOTF -_GL_WARN_ON_USE (hypotf, "hypotf is unportable - " - "use gnulib module hypotf for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypot -# define hypot rpl_hypot -# endif -_GL_FUNCDECL_RPL (hypot, double, (double x, double y)); -_GL_CXXALIAS_RPL (hypot, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (hypot, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (hypot); -# endif -#elif defined GNULIB_POSIXCHECK -# undef hypot -# if HAVE_RAW_DECL_HYPOT -_GL_WARN_ON_USE (hypotf, "hypot has portability problems - " - "use gnulib module hypot for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotl -# define hypotl rpl_hypotl -# endif -_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (hypotl); -#elif defined GNULIB_POSIXCHECK -# undef hypotl -# if HAVE_RAW_DECL_HYPOTL -_GL_WARN_ON_USE (hypotl, "hypotl is unportable - " - "use gnulib module hypotl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbf -# define ilogbf rpl_ilogbf -# endif -_GL_FUNCDECL_RPL (ilogbf, int, (float x)); -_GL_CXXALIAS_RPL (ilogbf, int, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIAS_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIASWARN (ilogbf); -#elif defined GNULIB_POSIXCHECK -# undef ilogbf -# if HAVE_RAW_DECL_ILOGBF -_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " - "use gnulib module ilogbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogb -# define ilogb rpl_ilogb -# endif -_GL_FUNCDECL_RPL (ilogb, int, (double x)); -_GL_CXXALIAS_RPL (ilogb, int, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogb, int, (double x)); -# endif -_GL_CXXALIAS_SYS (ilogb, int, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ilogb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef ilogb -# if HAVE_RAW_DECL_ILOGB -_GL_WARN_ON_USE (ilogb, "ilogb is unportable - " - "use gnulib module ilogb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbl -# define ilogbl rpl_ilogbl -# endif -_GL_FUNCDECL_RPL (ilogbl, int, (long double x)); -_GL_CXXALIAS_RPL (ilogbl, int, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIASWARN (ilogbl); -#elif defined GNULIB_POSIXCHECK -# undef ilogbl -# if HAVE_RAW_DECL_ILOGBL -_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " - "use gnulib module ilogbl for portability"); -# endif -#endif - - -/* Return x * 2^exp. */ -#if 0 -# if !1 -# undef ldexpf -_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); -# endif -_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); -_GL_CXXALIASWARN (ldexpf); -#elif defined GNULIB_POSIXCHECK -# undef ldexpf -# if HAVE_RAW_DECL_LDEXPF -_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " - "use gnulib module ldexpf for portability"); -# endif -#endif - -/* Return x * 2^exp. */ -#if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ldexpl -# define ldexpl rpl_ldexpl -# endif -_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); -_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); -#else -# if !1 -_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); -# endif -# if 0 -_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); -# endif -#endif -#if 0 -_GL_CXXALIASWARN (ldexpl); -#endif -#if !0 && defined GNULIB_POSIXCHECK -# undef ldexpl -# if HAVE_RAW_DECL_LDEXPL -_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " - "use gnulib module ldexpl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logf -# define logf rpl_logf -# endif -_GL_FUNCDECL_RPL (logf, float, (float x)); -_GL_CXXALIAS_RPL (logf, float, (float x)); -# else -# if !1 -# undef logf -_GL_FUNCDECL_SYS (logf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logf, float, (float x)); -# endif -_GL_CXXALIASWARN (logf); -#elif defined GNULIB_POSIXCHECK -# undef logf -# if HAVE_RAW_DECL_LOGF -_GL_WARN_ON_USE (logf, "logf is unportable - " - "use gnulib module logf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log -# define log rpl_log -# endif -_GL_FUNCDECL_RPL (log, double, (double x)); -_GL_CXXALIAS_RPL (log, double, (double x)); -# else -_GL_CXXALIAS_SYS (log, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log -# if HAVE_RAW_DECL_LOG -_GL_WARN_ON_USE (log, "log has portability problems - " - "use gnulib module log for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logl -# define logl rpl_logl -# endif -_GL_FUNCDECL_RPL (logl, long double, (long double x)); -_GL_CXXALIAS_RPL (logl, long double, (long double x)); -# else -# if !1 || !1 -# undef logl -_GL_FUNCDECL_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logl); -#elif defined GNULIB_POSIXCHECK -# undef logl -# if HAVE_RAW_DECL_LOGL -_GL_WARN_ON_USE (logl, "logl is unportable - " - "use gnulib module logl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10f -# define log10f rpl_log10f -# endif -_GL_FUNCDECL_RPL (log10f, float, (float x)); -_GL_CXXALIAS_RPL (log10f, float, (float x)); -# else -# if !1 -# undef log10f -_GL_FUNCDECL_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIASWARN (log10f); -#elif defined GNULIB_POSIXCHECK -# undef log10f -# if HAVE_RAW_DECL_LOG10F -_GL_WARN_ON_USE (log10f, "log10f is unportable - " - "use gnulib module log10f for portability"); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10 -# define log10 rpl_log10 -# endif -_GL_FUNCDECL_RPL (log10, double, (double x)); -_GL_CXXALIAS_RPL (log10, double, (double x)); -# else -_GL_CXXALIAS_SYS (log10, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log10); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log10 -# if HAVE_RAW_DECL_LOG10 -_GL_WARN_ON_USE (log10, "log10 has portability problems - " - "use gnulib module log10 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10l -# define log10l rpl_log10l -# endif -_GL_FUNCDECL_RPL (log10l, long double, (long double x)); -_GL_CXXALIAS_RPL (log10l, long double, (long double x)); -# else -# if !1 || !1 -# undef log10l -_GL_FUNCDECL_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log10l); -#elif defined GNULIB_POSIXCHECK -# undef log10l -# if HAVE_RAW_DECL_LOG10L -_GL_WARN_ON_USE (log10l, "log10l is unportable - " - "use gnulib module log10l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pf -# define log1pf rpl_log1pf -# endif -_GL_FUNCDECL_RPL (log1pf, float, (float x)); -_GL_CXXALIAS_RPL (log1pf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIASWARN (log1pf); -#elif defined GNULIB_POSIXCHECK -# undef log1pf -# if HAVE_RAW_DECL_LOG1PF -_GL_WARN_ON_USE (log1pf, "log1pf is unportable - " - "use gnulib module log1pf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1p -# define log1p rpl_log1p -# endif -_GL_FUNCDECL_RPL (log1p, double, (double x)); -_GL_CXXALIAS_RPL (log1p, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1p, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log1p, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log1p); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log1p -# if HAVE_RAW_DECL_LOG1P -_GL_WARN_ON_USE (log1p, "log1p has portability problems - " - "use gnulib module log1p for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pl -# define log1pl rpl_log1pl -# endif -_GL_FUNCDECL_RPL (log1pl, long double, (long double x)); -_GL_CXXALIAS_RPL (log1pl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log1pl); -#elif defined GNULIB_POSIXCHECK -# undef log1pl -# if HAVE_RAW_DECL_LOG1PL -_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " - "use gnulib module log1pl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2f -# define log2f rpl_log2f -# endif -_GL_FUNCDECL_RPL (log2f, float, (float x)); -_GL_CXXALIAS_RPL (log2f, float, (float x)); -# else -# if !1 -# undef log2f -_GL_FUNCDECL_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIASWARN (log2f); -#elif defined GNULIB_POSIXCHECK -# undef log2f -# if HAVE_RAW_DECL_LOG2F -_GL_WARN_ON_USE (log2f, "log2f is unportable - " - "use gnulib module log2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2 -# define log2 rpl_log2 -# endif -_GL_FUNCDECL_RPL (log2, double, (double x)); -_GL_CXXALIAS_RPL (log2, double, (double x)); -# else -# if !1 -# undef log2 -_GL_FUNCDECL_SYS (log2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log2 -# if HAVE_RAW_DECL_LOG2 -_GL_WARN_ON_USE (log2, "log2 is unportable - " - "use gnulib module log2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2l -# define log2l rpl_log2l -# endif -_GL_FUNCDECL_RPL (log2l, long double, (long double x)); -_GL_CXXALIAS_RPL (log2l, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log2l); -#elif defined GNULIB_POSIXCHECK -# undef log2l -# if HAVE_RAW_DECL_LOG2L -_GL_WARN_ON_USE (log2l, "log2l is unportable - " - "use gnulib module log2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbf -# define logbf rpl_logbf -# endif -_GL_FUNCDECL_RPL (logbf, float, (float x)); -_GL_CXXALIAS_RPL (logbf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIASWARN (logbf); -#elif defined GNULIB_POSIXCHECK -# undef logbf -# if HAVE_RAW_DECL_LOGBF -_GL_WARN_ON_USE (logbf, "logbf is unportable - " - "use gnulib module logbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logb -# define logb rpl_logb -# endif -_GL_FUNCDECL_RPL (logb, double, (double x)); -_GL_CXXALIAS_RPL (logb, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logb, double, (double x)); -# endif -_GL_CXXALIAS_SYS (logb, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (logb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef logb -# if HAVE_RAW_DECL_LOGB -_GL_WARN_ON_USE (logb, "logb is unportable - " - "use gnulib module logb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbl -# define logbl rpl_logbl -# endif -_GL_FUNCDECL_RPL (logbl, long double, (long double x)); -_GL_CXXALIAS_RPL (logbl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logbl); -#elif defined GNULIB_POSIXCHECK -# undef logbl -# if HAVE_RAW_DECL_LOGBL -_GL_WARN_ON_USE (logbl, "logbl is unportable - " - "use gnulib module logbl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modff -# define modff rpl_modff -# endif -_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); -# else -# if !1 -# undef modff -_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); -# endif -_GL_CXXALIASWARN (modff); -#elif defined GNULIB_POSIXCHECK -# undef modff -# if HAVE_RAW_DECL_MODFF -_GL_WARN_ON_USE (modff, "modff is unportable - " - "use gnulib module modff for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modf -# define modf rpl_modf -# endif -_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); -# else -_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (modf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef modf -# if HAVE_RAW_DECL_MODF -_GL_WARN_ON_USE (modf, "modf has portability problems - " - "use gnulib module modf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modfl -# define modfl rpl_modfl -# endif -_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); -# else -# if !1 -# undef modfl -_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); -# endif -_GL_CXXALIASWARN (modfl); -#elif defined GNULIB_POSIXCHECK -# undef modfl -# if HAVE_RAW_DECL_MODFL -_GL_WARN_ON_USE (modfl, "modfl is unportable - " - "use gnulib module modfl for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef powf -_GL_FUNCDECL_SYS (powf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (powf, float, (float x, float y)); -_GL_CXXALIASWARN (powf); -#elif defined GNULIB_POSIXCHECK -# undef powf -# if HAVE_RAW_DECL_POWF -_GL_WARN_ON_USE (powf, "powf is unportable - " - "use gnulib module powf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderf -# define remainderf rpl_remainderf -# endif -_GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); -_GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (remainderf); -#elif defined GNULIB_POSIXCHECK -# undef remainderf -# if HAVE_RAW_DECL_REMAINDERF -_GL_WARN_ON_USE (remainderf, "remainderf is unportable - " - "use gnulib module remainderf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainder -# define remainder rpl_remainder -# endif -_GL_FUNCDECL_RPL (remainder, double, (double x, double y)); -_GL_CXXALIAS_RPL (remainder, double, (double x, double y)); -# else -# if !1 || !1 -_GL_FUNCDECL_SYS (remainder, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (remainder, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remainder); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remainder -# if HAVE_RAW_DECL_REMAINDER -_GL_WARN_ON_USE (remainder, "remainder is unportable - " - "use gnulib module remainder for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderl -# define remainderl rpl_remainderl -# endif -_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); -# else -# if !1 -# undef remainderl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); -# endif -# endif -_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (remainderl); -#elif defined GNULIB_POSIXCHECK -# undef remainderl -# if HAVE_RAW_DECL_REMAINDERL -_GL_WARN_ON_USE (remainderl, "remainderl is unportable - " - "use gnulib module remainderl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rintf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (rintf, float, (float x)); -_GL_CXXALIASWARN (rintf); -#elif defined GNULIB_POSIXCHECK -# undef rintf -# if HAVE_RAW_DECL_RINTF -_GL_WARN_ON_USE (rintf, "rintf is unportable - " - "use gnulib module rintf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rint, double, (double x)); -# endif -_GL_CXXALIAS_SYS (rint, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rint); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rint -# if HAVE_RAW_DECL_RINT -_GL_WARN_ON_USE (rint, "rint is unportable - " - "use gnulib module rint for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rintl -# define rintl rpl_rintl -# endif -_GL_FUNCDECL_RPL (rintl, long double, (long double x)); -_GL_CXXALIAS_RPL (rintl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (rintl); -#elif defined GNULIB_POSIXCHECK -# undef rintl -# if HAVE_RAW_DECL_RINTL -_GL_WARN_ON_USE (rintl, "rintl is unportable - " - "use gnulib module rintl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundf -# define roundf rpl_roundf -# endif -_GL_FUNCDECL_RPL (roundf, float, (float x)); -_GL_CXXALIAS_RPL (roundf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIASWARN (roundf); -#elif defined GNULIB_POSIXCHECK -# undef roundf -# if HAVE_RAW_DECL_ROUNDF -_GL_WARN_ON_USE (roundf, "roundf is unportable - " - "use gnulib module roundf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef round -# define round rpl_round -# endif -_GL_FUNCDECL_RPL (round, double, (double x)); -_GL_CXXALIAS_RPL (round, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (round, double, (double x)); -# endif -_GL_CXXALIAS_SYS (round, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (round); -# endif -#elif defined GNULIB_POSIXCHECK -# undef round -# if HAVE_RAW_DECL_ROUND -_GL_WARN_ON_USE (round, "round is unportable - " - "use gnulib module round for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundl -# define roundl rpl_roundl -# endif -_GL_FUNCDECL_RPL (roundl, long double, (long double x)); -_GL_CXXALIAS_RPL (roundl, long double, (long double x)); -# else -# if !1 -# undef roundl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (roundl, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (roundl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (roundl); -#elif defined GNULIB_POSIXCHECK -# undef roundl -# if HAVE_RAW_DECL_ROUNDL -_GL_WARN_ON_USE (roundl, "roundl is unportable - " - "use gnulib module roundl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinf -# define sinf rpl_sinf -# endif -_GL_FUNCDECL_RPL (sinf, float, (float x)); -_GL_CXXALIAS_RPL (sinf, float, (float x)); -# else -# if !1 - # undef sinf -_GL_FUNCDECL_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinf); -#elif defined GNULIB_POSIXCHECK -# undef sinf -# if HAVE_RAW_DECL_SINF -_GL_WARN_ON_USE (sinf, "sinf is unportable - " - "use gnulib module sinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef sinl -_GL_FUNCDECL_SYS (sinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sinl, long double, (long double x)); -_GL_CXXALIASWARN (sinl); -#elif defined GNULIB_POSIXCHECK -# undef sinl -# if HAVE_RAW_DECL_SINL -_GL_WARN_ON_USE (sinl, "sinl is unportable - " - "use gnulib module sinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinhf -# define sinhf rpl_sinhf -# endif -_GL_FUNCDECL_RPL (sinhf, float, (float x)); -_GL_CXXALIAS_RPL (sinhf, float, (float x)); -# else -# if !1 -# undef sinhf -_GL_FUNCDECL_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinhf); -#elif defined GNULIB_POSIXCHECK -# undef sinhf -# if HAVE_RAW_DECL_SINHF -_GL_WARN_ON_USE (sinhf, "sinhf is unportable - " - "use gnulib module sinhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtf -# define sqrtf rpl_sqrtf -# endif -_GL_FUNCDECL_RPL (sqrtf, float, (float x)); -_GL_CXXALIAS_RPL (sqrtf, float, (float x)); -# else -# if !1 -# undef sqrtf -_GL_FUNCDECL_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (sqrtf); -#elif defined GNULIB_POSIXCHECK -# undef sqrtf -# if HAVE_RAW_DECL_SQRTF -_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " - "use gnulib module sqrtf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtl -# define sqrtl rpl_sqrtl -# endif -_GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); -# else -# if !1 || !1 -# undef sqrtl -_GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (sqrtl); -#elif defined GNULIB_POSIXCHECK -# undef sqrtl -# if HAVE_RAW_DECL_SQRTL -_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " - "use gnulib module sqrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanf -# define tanf rpl_tanf -# endif -_GL_FUNCDECL_RPL (tanf, float, (float x)); -_GL_CXXALIAS_RPL (tanf, float, (float x)); -# else -# if !1 -# undef tanf -_GL_FUNCDECL_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanf); -#elif defined GNULIB_POSIXCHECK -# undef tanf -# if HAVE_RAW_DECL_TANF -_GL_WARN_ON_USE (tanf, "tanf is unportable - " - "use gnulib module tanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef tanl -_GL_FUNCDECL_SYS (tanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (tanl, long double, (long double x)); -_GL_CXXALIASWARN (tanl); -#elif defined GNULIB_POSIXCHECK -# undef tanl -# if HAVE_RAW_DECL_TANL -_GL_WARN_ON_USE (tanl, "tanl is unportable - " - "use gnulib module tanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanhf -# define tanhf rpl_tanhf -# endif -_GL_FUNCDECL_RPL (tanhf, float, (float x)); -_GL_CXXALIAS_RPL (tanhf, float, (float x)); -# else -# if !1 -# undef tanhf -_GL_FUNCDECL_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanhf); -#elif defined GNULIB_POSIXCHECK -# undef tanhf -# if HAVE_RAW_DECL_TANHF -_GL_WARN_ON_USE (tanhf, "tanhf is unportable - " - "use gnulib module tanhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncf -# define truncf rpl_truncf -# endif -_GL_FUNCDECL_RPL (truncf, float, (float x)); -_GL_CXXALIAS_RPL (truncf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIASWARN (truncf); -#elif defined GNULIB_POSIXCHECK -# undef truncf -# if HAVE_RAW_DECL_TRUNCF -_GL_WARN_ON_USE (truncf, "truncf is unportable - " - "use gnulib module truncf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef trunc -# define trunc rpl_trunc -# endif -_GL_FUNCDECL_RPL (trunc, double, (double x)); -_GL_CXXALIAS_RPL (trunc, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (trunc, double, (double x)); -# endif -_GL_CXXALIAS_SYS (trunc, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (trunc); -# endif -#elif defined GNULIB_POSIXCHECK -# undef trunc -# if HAVE_RAW_DECL_TRUNC -_GL_WARN_ON_USE (trunc, "trunc is unportable - " - "use gnulib module trunc for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncl -# define truncl rpl_truncl -# endif -_GL_FUNCDECL_RPL (truncl, long double, (long double x)); -_GL_CXXALIAS_RPL (truncl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (truncl); -#elif defined GNULIB_POSIXCHECK -# undef truncl -# if HAVE_RAW_DECL_TRUNCL -_GL_WARN_ON_USE (truncl, "truncl is unportable - " - "use gnulib module truncl for portability"); -# endif -#endif - - -/* Definitions of function-like macros come here, after the function - declarations. */ - - -#if 0 -# if 0 -_GL_EXTERN_C int gl_isfinitef (float x); -_GL_EXTERN_C int gl_isfinited (double x); -_GL_EXTERN_C int gl_isfinitel (long double x); -# undef isfinite -# define isfinite(x) \ - (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ - sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ - gl_isfinitef (x)) -# endif -# ifdef __cplusplus -# if defined isfinite || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) -# undef isfinite -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines isfinite through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) -# define isfinite rpl_isfinite -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isfinite -_GL_WARN_REAL_FLOATING_DECL (isfinite); -# undef isfinite -# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) -# endif -#endif - - -#if 1 -# if 1 -_GL_EXTERN_C int gl_isinff (float x); -_GL_EXTERN_C int gl_isinfd (double x); -_GL_EXTERN_C int gl_isinfl (long double x); -# undef isinf -# define isinf(x) \ - (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ - sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ - gl_isinff (x)) -# endif -# ifdef __cplusplus -# if defined isinf || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) -# undef isinf -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isinf through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) -# define isinf rpl_isinf -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isinf -_GL_WARN_REAL_FLOATING_DECL (isinf); -# undef isinf -# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) -# endif -#endif - - -#if 1 -/* Test for NaN for 'float' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan macro - or (older) isnanf function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) -# elif defined isnan -# undef isnanf -# define isnanf(x) isnan ((float)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanf -# define isnanf rpl_isnanf -_GL_EXTERN_C int isnanf (float x); -# endif -#endif - -#if 1 -/* Test for NaN for 'double' numbers. - This function is a gnulib extension, unlike isnan() which applied only - to 'double' numbers earlier but now is a type-generic macro. */ -# if 1 -/* The original included above provides a declaration of isnan - macro. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnand -# define isnand(x) __builtin_isnan ((double)(x)) -# else -# undef isnand -# define isnand(x) isnan ((double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnand -# define isnand rpl_isnand -_GL_EXTERN_C int isnand (double x); -# endif -#endif - -#if 1 -/* Test for NaN for 'long double' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan - macro or (older) isnanl function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) -# elif defined isnan -# undef isnanl -# define isnanl(x) isnan ((long double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanl -# define isnanl rpl_isnanl -_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; -# endif -#endif - -/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ -#if 1 -# if 1 -/* We can't just use the isnanf macro (e.g.) as exposed by - isnanf.h (e.g.) here, because those may end up being macros - that recursively expand back to isnan. So use the gnulib - replacements for them directly. */ -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) -# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) -# else -_GL_EXTERN_C int rpl_isnanf (float x); -# define gl_isnan_f(x) rpl_isnanf (x) -# endif -# if 1 && __GNUC__ >= 4 -# define gl_isnan_d(x) __builtin_isnan ((double)(x)) -# else -_GL_EXTERN_C int rpl_isnand (double x); -# define gl_isnan_d(x) rpl_isnand (x) -# endif -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) -# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) -# else -_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; -# define gl_isnan_l(x) rpl_isnanl (x) -# endif -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ - sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ - gl_isnan_f (x)) -# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl))) -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ - sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ - __builtin_isnanf ((float)(x))) -# endif -# ifdef __cplusplus -# if defined isnan || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) -# undef isnan -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isnan through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) -# define isnan rpl_isnan -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) -# endif -# endif -# else -/* Ensure isnan is a macro. */ -# ifndef isnan -# define isnan isnan -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isnan -_GL_WARN_REAL_FLOATING_DECL (isnan); -# undef isnan -# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) -# endif -#endif - - -#if 1 -# if (0 \ - && (!defined __cplusplus || __cplusplus < 201103)) -# undef signbit - /* GCC 4.0 and newer provides three built-ins for signbit. */ -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ - sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ - __builtin_signbitf (x)) -# endif -# if 0 && !GNULIB_defined_signbit -# undef signbit -_GL_EXTERN_C int gl_signbitf (float arg); -_GL_EXTERN_C int gl_signbitd (double arg); -_GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ -# define _GL_NUM_UINT_WORDS(type) \ - ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) -# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf -# define gl_signbitf_OPTIMIZED_MACRO -# define gl_signbitf(arg) \ - ({ union { float _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd -# define gl_signbitd_OPTIMIZED_MACRO -# define gl_signbitd(arg) \ - ({ union { double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl -# define gl_signbitl_OPTIMIZED_MACRO -# define gl_signbitl(arg) \ - ({ union { long double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# endif -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ - sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ - gl_signbitf (x)) -# define GNULIB_defined_signbit 1 -# endif -# ifdef __cplusplus -# if defined signbit || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) -# undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines signbit through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) -# define signbit rpl_signbit -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined signbit -_GL_WARN_REAL_FLOATING_DECL (signbit); -# undef signbit -# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) -# endif -#endif - -_GL_INLINE_HEADER_END - -#endif /* _GL_LTS_MATH_H */ -#endif /* _GL_LTS_MATH_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/stdio.h b/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/stdio.h deleted file mode 100644 index c0777b16a..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/Win32/libtextstyle/lib/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_LTS_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_LTS_STDIO_H -#define _GL_LTS_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 0 && (0 || 0)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 0 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 0 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 1 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if 0 -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 0 && (0 || 0)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ( - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ( - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ( - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 1 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !0 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 0 && (0 || 0)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 0 && (0 || 0)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_LTS_STDIO_H */ -#endif /* _GL_LTS_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/config.h b/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/config.h deleted file mode 100644 index 0b09c8b17..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/config.h +++ /dev/null @@ -1,1542 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if // is a file system root distinct from /. */ -#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the file system. */ -#define ENABLE_RELOCATABLE 1 - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like 'struct s { int n; short - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate - the size in bytes of such a struct containing an N-element array. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ -/* #undef FUNC_REALPATH_WORKS */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize-lgpl shall be considered present. */ -#define GNULIB_CANONICALIZE_LGPL 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fwriteerror shall be considered present. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module sigpipe shall be considered present. */ -#define GNULIB_SIGPIPE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to 1 when the gnulib module canonicalize_file_name should be tested. - */ -#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module environ should be tested. */ -#define GNULIB_TEST_ENVIRON 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module getopt-posix should be tested. */ -#define GNULIB_TEST_GETOPT_POSIX 1 - -/* Define to 1 when the gnulib module iswblank should be tested. */ -#define GNULIB_TEST_ISWBLANK 1 - -/* Define to 1 when the gnulib module iswdigit should be tested. */ -#define GNULIB_TEST_ISWDIGIT 1 - -/* Define to 1 when the gnulib module iswxdigit should be tested. */ -#define GNULIB_TEST_ISWXDIGIT 1 - -/* Define to 1 when the gnulib module localename should be tested. */ -#define GNULIB_TEST_LOCALENAME 1 - -/* Define to 1 when the gnulib module lstat should be tested. */ -#define GNULIB_TEST_LSTAT 1 - -/* Define to 1 when the gnulib module mbrtowc should be tested. */ -#define GNULIB_TEST_MBRTOWC 1 - -/* Define to 1 when the gnulib module mbsinit should be tested. */ -#define GNULIB_TEST_MBSINIT 1 - -/* Define to 1 when the gnulib module mbslen should be tested. */ -#define GNULIB_TEST_MBSLEN 1 - -/* Define to 1 when the gnulib module mbsstr should be tested. */ -#define GNULIB_TEST_MBSSTR 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module readlink should be tested. */ -#define GNULIB_TEST_READLINK 1 - -/* Define to 1 when the gnulib module realpath should be tested. */ -#define GNULIB_TEST_REALPATH 1 - -/* Define to 1 when the gnulib module setlocale should be tested. */ -#define GNULIB_TEST_SETLOCALE 1 - -/* Define to 1 when the gnulib module setlocale_null should be tested. */ -#define GNULIB_TEST_SETLOCALE_NULL 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module strnlen should be tested. */ -#define GNULIB_TEST_STRNLEN 1 - -/* Define to 1 when the gnulib module wcwidth should be tested. */ -#define GNULIB_TEST_WCWIDTH 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUCR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-uctomb shall be considered present. */ -#define GNULIB_UNISTR_U8_UCTOMB 1 - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the Mac OS X function - CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define to 1 if you have the `copy_file_range' function. */ -/* #undef HAVE_COPY_FILE_RANGE */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `iswblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISWBLANK 1 - -/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBRTOWC */ - -/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you - don't. */ -#define HAVE_DECL_MBSINIT 1 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. - */ -#define HAVE_DECL_SETENV 0 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 1 - -/* Define to 1 if you have the declaration of `towlower', and to 0 if you - don't. */ -/* #undef HAVE_DECL_TOWLOWER */ - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 0 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the `duplocale' function. */ -/* #undef HAVE_DUPLOCALE */ - -/* Define if you have the declaration of environ. */ -#define HAVE_ENVIRON_DECL 1 - -/* Define if the locale_t type contains insufficient information, as on - OpenBSD. */ -/* #undef HAVE_FAKE_LOCALES */ - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the `freelocale' function. */ -/* #undef HAVE_FREELOCALE */ - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the `getlocalename_l' function. */ -/* #undef HAVE_GETLOCALENAME_L */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getopt_long_only' function. */ -/* #undef HAVE_GETOPT_LONG_ONLY */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ICONV_H 1 - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the `iswblank' function. */ -#define HAVE_ISWBLANK 1 - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define if you have and nl_langinfo(CODESET). */ -/* #undef HAVE_LANGINFO_CODESET */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LANGINFO_H */ - -/* Define if your file defines LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACH_O_DYLD_H */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the `mbsinit' function. */ -/* #undef HAVE_MBSINIT */ - -/* Define to 1 if you have the `mbslen' function. */ -/* #undef HAVE_MBSLEN */ - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define if the locale_t type does not contain the name of each locale - category. */ -/* #undef HAVE_NAMELESS_LOCALES */ - -/* Define to 1 if you have the `newlocale' function. */ -/* #undef HAVE_NEWLOCALE */ - -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the `readlinkat' function. */ -/* #undef HAVE_READLINKAT */ - -/* Define to 1 if you have the `realpath' function. */ -/* #undef HAVE_REALPATH */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the locale_t type is as on Solaris 11.4. */ -/* #undef HAVE_SOLARIS114_LOCALES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CDEFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the `towlower' function. */ -/* #undef HAVE_TOWLOWER */ - -/* Define to 1 if you have the `tsearch' function. */ -/* #undef HAVE_TSEARCH */ - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if the system has the type 'unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define to 1 if you have the `uselocale' function. */ -/* #undef HAVE_USELOCALE */ - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -/* #undef HAVE_WCSLEN */ - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -/* #undef HAVE_WCWIDTH */ - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define if the uselocale function exists any may safely be called. */ -/* #undef HAVE_WORKING_USELOCALE */ - -/* Define to 1 if you have the `wprintf' function. */ -#define HAVE_WPRINTF 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_XLOCALE_H */ - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -#define INSTALLPREFIX "/cygdrive/c/software.b/gettext-0.21" - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing - slash. */ -/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Define if the mbrtowc function does not return (size_t) -2 for empty input. - */ -#define MBRTOWC_EMPTY_INPUT_BUG 1 - -/* Define if the mbrtowc function may signal encoding errors in the C locale. - */ -/* #undef MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ */ - -/* Define if the mbrtowc function has the NULL pwc argument bug. */ -/* #undef MBRTOWC_NULL_ARG1_BUG */ - -/* Define if the mbrtowc function has the NULL string argument bug. */ -/* #undef MBRTOWC_NULL_ARG2_BUG */ - -/* Define if the mbrtowc function does not return 0 for a NUL character. */ -/* #undef MBRTOWC_NUL_RETVAL_BUG */ - -/* Define if the mbrtowc function returns a wrong return value. */ -#define MBRTOWC_RETVAL_BUG 1 - -/* Define if the mbrtowc function stores a wide character when reporting - incomplete input. */ -#define MBRTOWC_STORES_INCOMPLETE_BUG 1 - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define to 1 to enable general improvements of setlocale. */ -#define NEED_SETLOCALE_IMPROVED 1 - -/* Define to 1 to enable a multithread-safety fix of setlocale. */ -#define NEED_SETLOCALE_MTSAFE 0 - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "gettext-runtime" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "bug-gettext@gnu.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gettext-runtime" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-runtime 0.21" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gettext-runtime" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.21" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -/* #undef READLINK_TRAILING_SLASH_BUG */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ALL_MTSAFE 1 - -/* Define to 1 if setlocale (category, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ONE_MTSAFE 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define to the prefix of C symbols at the assembler and linker level, either - an underscore or empty. */ -#define USER_LABEL_PREFIX - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define when --enable-shared is used on mingw or Cygwin. */ -#define WOE32DLL 1 - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 on Solaris. */ -/* #undef _LCONV_C99 */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#ifndef _GL_UNUSED -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -# else -# define _GL_UNUSED -# endif -#endif - -/* The __pure__ attribute was added in gcc 2.96. */ -#ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define _GL_ATTRIBUTE_PURE /* empty */ -# endif -#endif - - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded - - - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#if defined __EMX__ && !defined __KLIBC__ -# include "intl/os2compat.h" -#endif - diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/gnulib-lib/stdint.h b/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/gnulib-lib/stdint.h deleted file mode 100644 index d941efd4d..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/gnulib-lib/stdint.h +++ /dev/null @@ -1,747 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _GL_STDINT_H - -#if __GNUC__ >= 3 - -#endif - - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#else - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if 1 -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _GL_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#endif - -#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_STDINT_H - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -#include - -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if 1 -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - -#if ! 1 - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h". */ -# if 1 && ! defined _AIX -# include -# endif - -# if 1 - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -# elif 0 - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -# endif - -# if 0 && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -# endif - -# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -/* These are separate macros, because if you try to merge these macros into - a single one, HP-UX cc rejects the resulting expression in constant - expressions. */ -# define _STDINT_UNSIGNED_MIN(bits, zero) \ - (zero) -# define _STDINT_SIGNED_MIN(bits, zero) \ - (~ _STDINT_MAX (1, bits, zero)) - -# define _STDINT_MAX(signed, bits, zero) \ - (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef int8_t -# undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -# define int8_t gl_int8_t -# define uint8_t gl_uint8_t - -# undef int16_t -# undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -# define int16_t gl_int16_t -# define uint16_t gl_uint16_t - -# undef int32_t -# undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -# define int32_t gl_int32_t -# define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -# ifdef INT64_MAX -# define GL_INT64_T -# else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# else -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -# endif - -# ifdef UINT64_MAX -# define GL_UINT64_T -# else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# else -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -# endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -# define _UINT8_T -# define _UINT32_T -# define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef int_least8_t -# undef uint_least8_t -# undef int_least16_t -# undef uint_least16_t -# undef int_least32_t -# undef uint_least32_t -# undef int_least64_t -# undef uint_least64_t -# define int_least8_t int8_t -# define uint_least8_t uint8_t -# define int_least16_t int16_t -# define uint_least16_t uint16_t -# define int_least32_t int32_t -# define uint_least32_t uint32_t -# ifdef GL_INT64_T -# define int_least64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_least64_t uint64_t -# endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -# undef int_fast8_t -# undef uint_fast8_t -# undef int_fast16_t -# undef uint_fast16_t -# undef int_fast32_t -# undef uint_fast32_t -# undef int_fast64_t -# undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -# ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -# else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -# endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -# define int_fast8_t gl_int_fast8_t -# define uint_fast8_t gl_uint_fast8_t -# define int_fast16_t gl_int_fast16_t -# define uint_fast16_t gl_uint_fast16_t -# define int_fast32_t gl_int_fast32_t -# define uint_fast32_t gl_uint_fast32_t -# ifdef GL_INT64_T -# define int_fast64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -# endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -/* kLIBC's defines _INTPTR_T_DECLARED and needs its own - definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and - uintptr_t to avoid conflicting declarations of system functions like - _findclose in . */ -# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) -# undef intptr_t -# undef uintptr_t -# ifdef _WIN64 -typedef long long int gl_intptr_t; -typedef unsigned long long int gl_uintptr_t; -# else -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -# endif -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t -# endif - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -# ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -# endif - -# ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -# endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -# define GNULIB_defined_stdint_types 1 -# endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef INT8_MIN -# undef INT8_MAX -# undef UINT8_MAX -# define INT8_MIN (~ INT8_MAX) -# define INT8_MAX 127 -# define UINT8_MAX 255 - -# undef INT16_MIN -# undef INT16_MAX -# undef UINT16_MAX -# define INT16_MIN (~ INT16_MAX) -# define INT16_MAX 32767 -# define UINT16_MAX 65535 - -# undef INT32_MIN -# undef INT32_MAX -# undef UINT32_MAX -# define INT32_MIN (~ INT32_MAX) -# define INT32_MAX 2147483647 -# define UINT32_MAX 4294967295U - -# if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -# endif - -# if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -# endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef INT_LEAST8_MIN -# undef INT_LEAST8_MAX -# undef UINT_LEAST8_MAX -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST8_MAX INT8_MAX -# define UINT_LEAST8_MAX UINT8_MAX - -# undef INT_LEAST16_MIN -# undef INT_LEAST16_MAX -# undef UINT_LEAST16_MAX -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST16_MAX INT16_MAX -# define UINT_LEAST16_MAX UINT16_MAX - -# undef INT_LEAST32_MIN -# undef INT_LEAST32_MAX -# undef UINT_LEAST32_MAX -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST32_MAX INT32_MAX -# define UINT_LEAST32_MAX UINT32_MAX - -# undef INT_LEAST64_MIN -# undef INT_LEAST64_MAX -# ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -# endif - -# undef UINT_LEAST64_MAX -# ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -# undef INT_FAST8_MIN -# undef INT_FAST8_MAX -# undef UINT_FAST8_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define UINT_FAST8_MAX UCHAR_MAX - -# undef INT_FAST16_MIN -# undef INT_FAST16_MAX -# undef UINT_FAST16_MAX -# define INT_FAST16_MIN INT_FAST32_MIN -# define INT_FAST16_MAX INT_FAST32_MAX -# define UINT_FAST16_MAX UINT_FAST32_MAX - -# undef INT_FAST32_MIN -# undef INT_FAST32_MAX -# undef UINT_FAST32_MAX -# ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -# else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -# endif - -# undef INT_FAST64_MIN -# undef INT_FAST64_MAX -# ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -# endif - -# undef UINT_FAST64_MAX -# ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -# undef INTPTR_MIN -# undef INTPTR_MAX -# undef UINTPTR_MAX -# ifdef _WIN64 -# define INTPTR_MIN LLONG_MIN -# define INTPTR_MAX LLONG_MAX -# define UINTPTR_MAX ULLONG_MAX -# else -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX -# endif - -/* 7.18.2.5. Limits of greatest-width integer types */ - -# ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -# endif - -# ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -# endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -# undef PTRDIFF_MIN -# undef PTRDIFF_MAX -# if 0 -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -# else -# define PTRDIFF_MIN \ - _STDINT_SIGNED_MIN (, 0) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, , 0) -# endif - -/* sig_atomic_t limits */ -# undef SIG_ATOMIC_MIN -# undef SIG_ATOMIC_MAX -# if -# define SIG_ATOMIC_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define SIG_ATOMIC_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define SIG_ATOMIC_MAX \ - _STDINT_MAX (, , \ - 0) - - -/* size_t limit */ -# undef SIZE_MAX -# if 0 -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -# else -# define SIZE_MAX _STDINT_MAX (0, , 0) -# endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -# if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# endif -# undef WCHAR_MIN -# undef WCHAR_MAX -# if -# define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WCHAR_MAX \ - _STDINT_MAX (, , 0) - -/* wint_t limits */ -/* If gnulib's or overrides wint_t, is not - accurate, therefore use the definitions from above. */ -# if !1 -# undef WINT_MIN -# undef WINT_MAX -# if -# define WINT_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WINT_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WINT_MAX \ - _STDINT_MAX (, , 0) -# endif - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -# undef INT8_C -# undef UINT8_C -# define INT8_C(x) x -# define UINT8_C(x) x - -# undef INT16_C -# undef UINT16_C -# define INT16_C(x) x -# define UINT16_C(x) x - -# undef INT32_C -# undef UINT32_C -# define INT32_C(x) x -# define UINT32_C(x) x ## U - -# undef INT64_C -# undef UINT64_C -# if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -# elif defined _MSC_VER -# define INT64_C(x) x##i64 -# else -# define INT64_C(x) x##LL -# endif -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -# elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -# else -# define UINT64_C(x) x##ULL -# endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -# ifndef INTMAX_C -# if LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -# endif - -# ifndef UINTMAX_C -# if ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -# endif - -#endif /* !1 */ - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (!defined UINTMAX_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# ifdef INT8_MAX -# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -# endif -# ifdef UINT8_MAX -# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -# endif -# ifdef INT16_MAX -# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -# endif -# ifdef UINT16_MAX -# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -# endif -# ifdef INT32_MAX -# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -# endif -# ifdef UINT32_MAX -# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -# endif -# ifdef INT64_MAX -# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -# endif -# ifdef UINT64_MAX -# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -# endif -# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -# ifdef WINT_MAX -# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -# endif -# ifdef SIG_ATOMIC_MAX -# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -# endif -#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _GL_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/gnulib-lib/stdio.h b/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/gnulib-lib/stdio.h deleted file mode 100644 index e2c8acb84..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-runtime/gnulib-lib/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_STDIO_H -#define _GL_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 0 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 0 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 1 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if 0 -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 0 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_STDIO_H */ -#endif /* _GL_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/config.h b/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/config.h deleted file mode 100644 index a283d0d95..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/config.h +++ /dev/null @@ -1,2872 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - - -/* Default value for alignment of strings in .mo file. */ -#define DEFAULT_OUTPUT_ALIGNMENT 1 - - -/* Define this to an absolute name of . */ -/* #undef ABSOLUTE_LIBXML2_LIBXML_XMLEXPORTS_H */ - -/* Define this to an absolute name of . */ -/* #undef ABSOLUTE_LIBXML2_LIBXML_XMLVERSION_H */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'double'. */ -#define DBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'double'. */ -#define DBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_WORD */ - -/* the name of the file descriptor member of DIR */ -/* #undef DIR_FD_MEMBER_NAME */ - -#ifdef DIR_FD_MEMBER_NAME -# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME) -#else -# define DIR_TO_FD(Dir_p) -1 -#endif - - -/* Define to 1 if // is a file system root distinct from /. */ -#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the file system. */ -#define ENABLE_RELOCATABLE 1 - -/* Define according to the byte order of the target machine: 1 for big endian, - 0 for little endian. */ -#define ENDIANNESS 0 - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like 'struct s { int n; short - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate - the size in bytes of such a struct containing an N-element array. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'float'. */ -#define FLT_EXPBIT0_BIT 23 - -/* Define as the word index where to find the exponent of 'float'. */ -#define FLT_EXPBIT0_WORD 0 - -/* Define as the bit index in the word where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_WORD */ - -/* Define to 1 if fopen() fails to recognize a trailing slash. */ -#define FOPEN_TRAILING_SLASH_BUG 1 - -/* Define to 1 if the system's ftello function has the Solaris bug. */ -/* #undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE */ - -/* Define to 1 if mkdir mistakenly creates a directory given with a trailing - dot component. */ -#define FUNC_MKDIR_DOT_BUG 1 - -/* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */ -/* #undef FUNC_NL_LANGINFO_YESEXPR_WORKS */ - -/* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ -/* #undef FUNC_REALPATH_WORKS */ - -/* Define to 1 if ungetc is broken when used on arbitrary bytes. */ -/* #undef FUNC_UNGETC_BROKEN */ - -/* Define to 1 if futimesat mishandles a NULL file name. */ -/* #undef FUTIMESAT_NULL_BUG */ - -/* Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday. */ -#define GETTIMEOFDAY_TIMEZONE void - -/* Define to 1 if getxattr works with XATTR_NAME_POSIX_ACL_ACCESS and - XATTR_NAME_POSIX_ACL_DEFAULT. */ -/* #undef GETXATTR_WITH_POSIX_ACLS */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize shall be considered present. */ -#define GNULIB_CANONICALIZE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize-lgpl shall be considered present. */ -#define GNULIB_CANONICALIZE_LGPL 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fd-safer-flag shall be considered present. */ -#define GNULIB_FD_SAFER_FLAG 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module filenamecat shall be considered present. */ -#define GNULIB_FILENAMECAT IN_GETTEXT_TOOLS_GNULIB_TESTS - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fopen-gnu shall be considered present. */ -#define GNULIB_FOPEN_GNU 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fwriteerror shall be considered present. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module isblank shall be considered present. */ -#define GNULIB_ISBLANK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module pipe2-safer shall be considered present. */ -#define GNULIB_PIPE2_SAFER 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define when the error facility is replaced by gnulib. */ -#define GNULIB_REPLACE_ERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module sigpipe shall be considered present. */ -#define GNULIB_SIGPIPE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module snprintf shall be considered present. */ -#define GNULIB_SNPRINTF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror_r-posix shall be considered present. */ -#define GNULIB_STRERROR_R_POSIX IN_GETTEXT_TOOLS_GNULIB_TESTS - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module tempname shall be considered present. */ -#define GNULIB_TEMPNAME 1 - -/* Define to 1 when the gnulib module accept should be tested. */ -#define GNULIB_TEST_ACCEPT 1 - -/* Define to 1 when the gnulib module access should be tested. */ -#define GNULIB_TEST_ACCESS 1 - -/* Define to 1 when the gnulib module bind should be tested. */ -#define GNULIB_TEST_BIND 1 - -/* Define to 1 when the gnulib module btowc should be tested. */ -#define GNULIB_TEST_BTOWC 1 - -/* Define to 1 when the gnulib module canonicalize should be tested. */ -#define GNULIB_TEST_CANONICALIZE 1 - -/* Define to 1 when the gnulib module canonicalize_file_name should be tested. - */ -#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module closedir should be tested. */ -#define GNULIB_TEST_CLOSEDIR 1 - -/* Define to 1 when the gnulib module connect should be tested. */ -#define GNULIB_TEST_CONNECT 1 - -/* Define to 1 when the gnulib module copy-file-range should be tested. */ -#define GNULIB_TEST_COPY_FILE_RANGE 1 - -/* Define to 1 when the gnulib module creat should be tested. */ -#define GNULIB_TEST_CREAT 1 - -/* Define to 1 when the gnulib module dirfd should be tested. */ -#define GNULIB_TEST_DIRFD 1 - -/* Define to 1 when the gnulib module dup should be tested. */ -#define GNULIB_TEST_DUP 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module environ should be tested. */ -#define GNULIB_TEST_ENVIRON 1 - -/* Define to 1 when the gnulib module explicit_bzero should be tested. */ -#define GNULIB_TEST_EXPLICIT_BZERO 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module fdopen should be tested. */ -#define GNULIB_TEST_FDOPEN 1 - -/* Define to 1 when the gnulib module fnmatch should be tested. */ -#define GNULIB_TEST_FNMATCH 1 - -/* Define to 1 when the gnulib module fopen should be tested. */ -#define GNULIB_TEST_FOPEN 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module fsync should be tested. */ -#define GNULIB_TEST_FSYNC 1 - -/* Define to 1 when the gnulib module ftell should be tested. */ -#define GNULIB_TEST_FTELL 1 - -/* Define to 1 when the gnulib module ftello should be tested. */ -#define GNULIB_TEST_FTELLO 1 - -/* Define to 1 when the gnulib module ftruncate should be tested. */ -#define GNULIB_TEST_FTRUNCATE 1 - -/* Define to 1 when the gnulib module getcwd should be tested. */ -#define GNULIB_TEST_GETCWD 1 - -/* Define to 1 when the gnulib module getdelim should be tested. */ -#define GNULIB_TEST_GETDELIM 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module getline should be tested. */ -#define GNULIB_TEST_GETLINE 1 - -/* Define to 1 when the gnulib module getopt-posix should be tested. */ -#define GNULIB_TEST_GETOPT_POSIX 1 - -/* Define to 1 when the gnulib module getpagesize should be tested. */ -#define GNULIB_TEST_GETPAGESIZE 1 - -/* Define to 1 when the gnulib module getrandom should be tested. */ -#define GNULIB_TEST_GETRANDOM 1 - -/* Define to 1 when the gnulib module gettimeofday should be tested. */ -#define GNULIB_TEST_GETTIMEOFDAY 1 - -/* Define to 1 when the gnulib module ioctl should be tested. */ -#define GNULIB_TEST_IOCTL 1 - -/* Define to 1 when the gnulib module isinf should be tested. */ -#define GNULIB_TEST_ISINF 1 - -/* Define to 1 when the gnulib module isnan should be tested. */ -#define GNULIB_TEST_ISNAN 1 - -/* Define to 1 when the gnulib module isnand should be tested. */ -#define GNULIB_TEST_ISNAND 1 - -/* Define to 1 when the gnulib module isnanf should be tested. */ -#define GNULIB_TEST_ISNANF 1 - -/* Define to 1 when the gnulib module isnanl should be tested. */ -#define GNULIB_TEST_ISNANL 1 - -/* Define to 1 when the gnulib module iswblank should be tested. */ -#define GNULIB_TEST_ISWBLANK 1 - -/* Define to 1 when the gnulib module iswdigit should be tested. */ -#define GNULIB_TEST_ISWDIGIT 1 - -/* Define to 1 when the gnulib module iswxdigit should be tested. */ -#define GNULIB_TEST_ISWXDIGIT 1 - -/* Define to 1 when the gnulib module listen should be tested. */ -#define GNULIB_TEST_LISTEN 1 - -/* Define to 1 when the gnulib module localeconv should be tested. */ -#define GNULIB_TEST_LOCALECONV 1 - -/* Define to 1 when the gnulib module localename should be tested. */ -#define GNULIB_TEST_LOCALENAME 1 - -/* Define to 1 when the gnulib module localtime should be tested. */ -#define GNULIB_TEST_LOCALTIME 1 - -/* Define to 1 when the gnulib module log10 should be tested. */ -#define GNULIB_TEST_LOG10 1 - -/* Define to 1 when the gnulib module lseek should be tested. */ -#define GNULIB_TEST_LSEEK 1 - -/* Define to 1 when the gnulib module lstat should be tested. */ -#define GNULIB_TEST_LSTAT 1 - -/* Define to 1 when the gnulib module malloc-posix should be tested. */ -#define GNULIB_TEST_MALLOC_POSIX 1 - -/* Define to 1 when the gnulib module mbrlen should be tested. */ -#define GNULIB_TEST_MBRLEN 1 - -/* Define to 1 when the gnulib module mbrtowc should be tested. */ -#define GNULIB_TEST_MBRTOWC 1 - -/* Define to 1 when the gnulib module mbsinit should be tested. */ -#define GNULIB_TEST_MBSINIT 1 - -/* Define to 1 when the gnulib module mbslen should be tested. */ -#define GNULIB_TEST_MBSLEN 1 - -/* Define to 1 when the gnulib module mbsrtowcs should be tested. */ -#define GNULIB_TEST_MBSRTOWCS 1 - -/* Define to 1 when the gnulib module mbsstr should be tested. */ -#define GNULIB_TEST_MBSSTR 1 - -/* Define to 1 when the gnulib module mbtowc should be tested. */ -#define GNULIB_TEST_MBTOWC 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module mempcpy should be tested. */ -#define GNULIB_TEST_MEMPCPY 1 - -/* Define to 1 when the gnulib module mkdtemp should be tested. */ -#define GNULIB_TEST_MKDTEMP 1 - -/* Define to 1 when the gnulib module nanosleep should be tested. */ -#define GNULIB_TEST_NANOSLEEP 1 - -/* Define to 1 when the gnulib module nl_langinfo should be tested. */ -#define GNULIB_TEST_NL_LANGINFO 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module opendir should be tested. */ -#define GNULIB_TEST_OPENDIR 1 - -/* Define to 1 when the gnulib module perror should be tested. */ -#define GNULIB_TEST_PERROR 1 - -/* Define to 1 when the gnulib module pipe should be tested. */ -#define GNULIB_TEST_PIPE 1 - -/* Define to 1 when the gnulib module pipe2 should be tested. */ -#define GNULIB_TEST_PIPE2 1 - -/* Define to 1 when the gnulib module posix_spawnattr_destroy should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1 - -/* Define to 1 when the gnulib module posix_spawnattr_init should be tested. - */ -#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1 - -/* Define to 1 when the gnulib module posix_spawnattr_setflags should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1 - -/* Define to 1 when the gnulib module posix_spawnattr_setsigmask should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1 - -/* Define to 1 when the gnulib module posix_spawnp should be tested. */ -#define GNULIB_TEST_POSIX_SPAWNP 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_addclose should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_adddup2 should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_addopen should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_destroy should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_init should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1 - -/* Define to 1 when the gnulib module pthread_sigmask should be tested. */ -#define GNULIB_TEST_PTHREAD_SIGMASK 1 - -/* Define to 1 when the gnulib module pthread-thread should be tested. */ -#define GNULIB_TEST_PTHREAD_THREAD 1 - -/* Define to 1 when the gnulib module putenv should be tested. */ -#define GNULIB_TEST_PUTENV 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module rawmemchr should be tested. */ -#define GNULIB_TEST_RAWMEMCHR 1 - -/* Define to 1 when the gnulib module read should be tested. */ -#define GNULIB_TEST_READ 1 - -/* Define to 1 when the gnulib module readdir should be tested. */ -#define GNULIB_TEST_READDIR 1 - -/* Define to 1 when the gnulib module readlink should be tested. */ -#define GNULIB_TEST_READLINK 1 - -/* Define to 1 when the gnulib module realloc-posix should be tested. */ -#define GNULIB_TEST_REALLOC_POSIX 1 - -/* Define to 1 when the gnulib module realpath should be tested. */ -#define GNULIB_TEST_REALPATH 1 - -/* Define to 1 when the gnulib module rmdir should be tested. */ -#define GNULIB_TEST_RMDIR 1 - -/* Define to 1 when the gnulib module secure_getenv should be tested. */ -#define GNULIB_TEST_SECURE_GETENV 1 - -/* Define to 1 when the gnulib module select should be tested. */ -#define GNULIB_TEST_SELECT 1 - -/* Define to 1 when the gnulib module setenv should be tested. */ -#define GNULIB_TEST_SETENV 1 - -/* Define to 1 when the gnulib module setlocale should be tested. */ -#define GNULIB_TEST_SETLOCALE 1 - -/* Define to 1 when the gnulib module setlocale_null should be tested. */ -#define GNULIB_TEST_SETLOCALE_NULL 1 - -/* Define to 1 when the gnulib module setsockopt should be tested. */ -#define GNULIB_TEST_SETSOCKOPT 1 - -/* Define to 1 when the gnulib module sigaction should be tested. */ -#define GNULIB_TEST_SIGACTION 1 - -/* Define to 1 when the gnulib module signbit should be tested. */ -#define GNULIB_TEST_SIGNBIT 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module sleep should be tested. */ -#define GNULIB_TEST_SLEEP 1 - -/* Define to 1 when the gnulib module snprintf should be tested. */ -#define GNULIB_TEST_SNPRINTF 1 - -/* Define to 1 when the gnulib module socket should be tested. */ -#define GNULIB_TEST_SOCKET 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module stpcpy should be tested. */ -#define GNULIB_TEST_STPCPY 1 - -/* Define to 1 when the gnulib module stpncpy should be tested. */ -#define GNULIB_TEST_STPNCPY 1 - -/* Define to 1 when the gnulib module strchrnul should be tested. */ -#define GNULIB_TEST_STRCHRNUL 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module strerror_r should be tested. */ -#define GNULIB_TEST_STRERROR_R 1 - -/* Define to 1 when the gnulib module strnlen should be tested. */ -#define GNULIB_TEST_STRNLEN 1 - -/* Define to 1 when the gnulib module strpbrk should be tested. */ -#define GNULIB_TEST_STRPBRK 1 - -/* Define to 1 when the gnulib module strstr should be tested. */ -#define GNULIB_TEST_STRSTR 1 - -/* Define to 1 when the gnulib module symlink should be tested. */ -#define GNULIB_TEST_SYMLINK 1 - -/* Define to 1 when the gnulib module unlink should be tested. */ -#define GNULIB_TEST_UNLINK 1 - -/* Define to 1 when the gnulib module unsetenv should be tested. */ -#define GNULIB_TEST_UNSETENV 1 - -/* Define to 1 when the gnulib module usleep should be tested. */ -#define GNULIB_TEST_USLEEP 1 - -/* Define to 1 when the gnulib module utime should be tested. */ -#define GNULIB_TEST_UTIME 1 - -/* Define to 1 when the gnulib module vasprintf should be tested. */ -#define GNULIB_TEST_VASPRINTF 1 - -/* Define to 1 when the gnulib module vsnprintf should be tested. */ -#define GNULIB_TEST_VSNPRINTF 1 - -/* Define to 1 when the gnulib module waitpid should be tested. */ -#define GNULIB_TEST_WAITPID 1 - -/* Define to 1 when the gnulib module wcrtomb should be tested. */ -#define GNULIB_TEST_WCRTOMB 1 - -/* Define to 1 when the gnulib module wctob should be tested. */ -#define GNULIB_TEST_WCTOB 1 - -/* Define to 1 when the gnulib module wctomb should be tested. */ -#define GNULIB_TEST_WCTOMB 1 - -/* Define to 1 when the gnulib module wcwidth should be tested. */ -#define GNULIB_TEST_WCWIDTH 1 - -/* Define to 1 when the gnulib module wmemchr should be tested. */ -#define GNULIB_TEST_WMEMCHR 1 - -/* Define to 1 when the gnulib module wmempcpy should be tested. */ -#define GNULIB_TEST_WMEMPCPY 1 - -/* Define to 1 when the gnulib module write should be tested. */ -#define GNULIB_TEST_WRITE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u16-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U16_MBTOUC 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUC 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUCR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc-unsafe shall be considered - present. */ -#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-uctomb shall be considered present. */ -#define GNULIB_UNISTR_U8_UCTOMB 1 - -/* Define to 1 if you have the `aclsort' function. */ -/* #undef HAVE_ACLSORT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ACLV_H */ - -/* Define to 1 if you have the `aclx_get' function. */ -/* #undef HAVE_ACLX_GET */ - -/* Define to 1 if you have the `acl_copy_ext_native' function. */ -/* #undef HAVE_ACL_COPY_EXT_NATIVE */ - -/* Define to 1 if you have the `acl_create_entry_np' function. */ -/* #undef HAVE_ACL_CREATE_ENTRY_NP */ - -/* Define to 1 if you have the `acl_delete_def_file' function. */ -/* #undef HAVE_ACL_DELETE_DEF_FILE */ - -/* Define to 1 if you have the `acl_delete_fd_np' function. */ -/* #undef HAVE_ACL_DELETE_FD_NP */ - -/* Define to 1 if you have the `acl_delete_file_np' function. */ -/* #undef HAVE_ACL_DELETE_FILE_NP */ - -/* Define to 1 if you have the `acl_entries' function. */ -/* #undef HAVE_ACL_ENTRIES */ - -/* Define to 1 if you have the `acl_extended_file' function. */ -/* #undef HAVE_ACL_EXTENDED_FILE */ - -/* Define to 1 if the constant ACL_FIRST_ENTRY exists. */ -/* #undef HAVE_ACL_FIRST_ENTRY */ - -/* Define to 1 if you have the `acl_free' function. */ -/* #undef HAVE_ACL_FREE */ - -/* Define to 1 if you have the `acl_free_text' function. */ -/* #undef HAVE_ACL_FREE_TEXT */ - -/* Define to 1 if you have the `acl_from_mode' function. */ -/* #undef HAVE_ACL_FROM_MODE */ - -/* Define to 1 if you have the `acl_from_text' function. */ -/* #undef HAVE_ACL_FROM_TEXT */ - -/* Define to 1 if you have the `acl_get_fd' function. */ -/* #undef HAVE_ACL_GET_FD */ - -/* Define to 1 if you have the `acl_get_file' function. */ -/* #undef HAVE_ACL_GET_FILE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ACL_LIBACL_H */ - -/* Define to 1 if you have the `acl_set_fd' function. */ -/* #undef HAVE_ACL_SET_FD */ - -/* Define to 1 if you have the `acl_set_file' function. */ -/* #undef HAVE_ACL_SET_FILE */ - -/* Define to 1 if you have the `acl_to_short_text' function. */ -/* #undef HAVE_ACL_TO_SHORT_TEXT */ - -/* Define to 1 if you have the `acl_trivial' function. */ -/* #undef HAVE_ACL_TRIVIAL */ - -/* Define to 1 if the ACL type ACL_TYPE_EXTENDED exists. */ -/* #undef HAVE_ACL_TYPE_EXTENDED */ - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_NAMESER_H */ - -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_BCRYPT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if you have the `btowc' function. */ -#define HAVE_BTOWC 1 - -/* Define to 1 if nanosleep mishandles large arguments. */ -/* #undef HAVE_BUG_BIG_NANOSLEEP */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BYTESWAP_H */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the `catgets' function. */ -/* #undef HAVE_CATGETS */ - -/* Define to 1 if you have the Mac OS X function - CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define to 1 if you have the `chown' function. */ -/* #undef HAVE_CHOWN */ - -/* Define to 1 if you have the `chsize' function. */ -#define HAVE_CHSIZE 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -/* #undef HAVE_CLOCK_GETTIME */ - -/* Define to 1 if you have the `clock_settime' function. */ -/* #undef HAVE_CLOCK_SETTIME */ - -/* Define to 1 if you have the `closedir' function. */ -/* #undef HAVE_CLOSEDIR */ - -/* Define to 1 if you have the `confstr' function. */ -/* #undef HAVE_CONFSTR */ - -/* Define if the copysignf function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNF_IN_LIBC */ - -/* Define if the copysignl function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNL_IN_LIBC */ - -/* Define if the copysign function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGN_IN_LIBC */ - -/* Define to 1 if you have the `copy_file_range' function. */ -/* #undef HAVE_COPY_FILE_RANGE */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. - */ -#define HAVE_DECL_ALARM 0 - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `copysign', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGN */ - -/* Define to 1 if you have the declaration of `copysignf', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNF */ - -/* Define to 1 if you have the declaration of `copysignl', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNL */ - -/* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't. - */ -#define HAVE_DECL_DIRFD 0 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't. - */ -#define HAVE_DECL_FTELLO 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getdelim', and to 0 if you - don't. */ -#define HAVE_DECL_GETDELIM 0 - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `getline', and to 0 if you - don't. */ -#define HAVE_DECL_GETLINE 0 - -/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you - don't. */ -#define HAVE_DECL_INET_PTON 1 - -/* Define to 1 if you have the declaration of `isblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISBLANK 1 - -/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. - */ -#define HAVE_DECL_ISINF 1 - -/* Define to 1 if you have the declaration of `iswblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISWBLANK 1 - -/* Define to 1 if you have the declaration of `mbrlen', and to 0 if you don't. - */ -/* #undef HAVE_DECL_MBRLEN */ - -/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBRTOWC */ - -/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you - don't. */ -#define HAVE_DECL_MBSINIT 1 - -/* Define to 1 if you have the declaration of `mbsrtowcs', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBSRTOWCS */ - -/* Define to 1 if you have a declaration of mbswidth() in , and to 0 - otherwise. */ -#define HAVE_DECL_MBSWIDTH_IN_WCHAR_H 0 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. - */ -#define HAVE_DECL_SETENV 0 - -/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't. - */ -#define HAVE_DECL_SLEEP 0 - -/* Define to 1 if you have the declaration of `snprintf', and to 0 if you - don't. */ -#define HAVE_DECL_SNPRINTF 0 - -/* Define to 1 if you have the declaration of `stpncpy', and to 0 if you - don't. */ -#define HAVE_DECL_STPNCPY 0 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 1 - -/* Define to 1 if you have the declaration of `towlower', and to 0 if you - don't. */ -/* #undef HAVE_DECL_TOWLOWER */ - -/* Define to 1 if you have the declaration of `unsetenv', and to 0 if you - don't. */ -#define HAVE_DECL_UNSETENV 0 - -/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VSNPRINTF 1 - -/* Define to 1 if you have the declaration of `wcrtomb', and to 0 if you - don't. */ -/* #undef HAVE_DECL_WCRTOMB */ - -/* Define to 1 if you have the declaration of `wctob', and to 0 if you don't. - */ -/* #undef HAVE_DECL_WCTOB */ - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 0 - -/* Define to 1 if you have the declaration of `_putenv', and to 0 if you - don't. */ -#define HAVE_DECL__PUTENV 1 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DIRENT_H */ - -/* Define to 1 if you have the `dirfd' function. */ -/* #undef HAVE_DIRFD */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DL_H */ - -/* Define to 1 if you have the `duplocale' function. */ -/* #undef HAVE_DUPLOCALE */ - -/* Define if you have the declaration of environ. */ -#define HAVE_ENVIRON_DECL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the `explicit_bzero' function. */ -/* #undef HAVE_EXPLICIT_BZERO */ - -/* Define to 1 if you have the `explicit_memset' function. */ -/* #undef HAVE_EXPLICIT_MEMSET */ - -/* Define to 1 if you have the `facl' function. */ -/* #undef HAVE_FACL */ - -/* Define if the locale_t type contains insufficient information, as on - OpenBSD. */ -/* #undef HAVE_FAKE_LOCALES */ - -/* Define to 1 if you have the `fchmod' function. */ -/* #undef HAVE_FCHMOD */ - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `flockfile' function. */ -/* #undef HAVE_FLOCKFILE */ - -/* Define to 1 if you have the `fnmatch' function. */ -/* #undef HAVE_FNMATCH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FNMATCH_H */ - -/* Define to 1 if you have the `fork' function. */ -/* #undef HAVE_FORK */ - -/* Define to 1 if you have the `freelocale' function. */ -/* #undef HAVE_FREELOCALE */ - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -/* #undef HAVE_FSEEKO */ - -/* Define to 1 if you have the `fsync' function. */ -/* #undef HAVE_FSYNC */ - -/* Define to 1 if you have the `ftruncate' function. */ -/* #undef HAVE_FTRUNCATE */ - -/* Define to 1 if you have the `funlockfile' function. */ -/* #undef HAVE_FUNLOCKFILE */ - -/* Define to 1 if you have the `futimens' function. */ -/* #undef HAVE_FUTIMENS */ - -/* Define to 1 if you have the `futimes' function. */ -/* #undef HAVE_FUTIMES */ - -/* Define to 1 if you have the `futimesat' function. */ -/* #undef HAVE_FUTIMESAT */ - -/* Define to 1 if you have the `getacl' function. */ -/* #undef HAVE_GETACL */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getdelim' function. */ -/* #undef HAVE_GETDELIM */ - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the `gethostbyname' function. */ -/* #undef HAVE_GETHOSTBYNAME */ - -/* Define to 1 if you have the `gethostname' function. */ -/* #undef HAVE_GETHOSTNAME */ - -/* Define to 1 if you have the `getlocalename_l' function. */ -/* #undef HAVE_GETLOCALENAME_L */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getopt_long_only' function. */ -/* #undef HAVE_GETOPT_LONG_ONLY */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define to 1 if you have the `getppriv' function. */ -/* #undef HAVE_GETPPRIV */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define to 1 if you have the `getrandom' function. */ -/* #undef HAVE_GETRANDOM */ - -/* Define to 1 if you have the `getrlimit' function. */ -/* #undef HAVE_GETRLIMIT */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ICONV_H 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -/* #undef HAVE_INET_NTOP */ - -/* Define to 1 if you have the `inet_pton' function. */ -/* #undef HAVE_INET_PTON */ - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the `ioctl' function. */ -/* #undef HAVE_IOCTL */ - -/* Define to 1 if defines AF_INET. */ -#define HAVE_IPV4 1 - -/* Define if defines AF_INET6. */ -#define HAVE_IPV6 1 - -/* Define to 1 if you have the `isascii' function. */ -/* #undef HAVE_ISASCII */ - -/* Define to 1 if you have the `isblank' function. */ -#define HAVE_ISBLANK 1 - -/* Define if the isnan(double) function is available in libc. */ -#define HAVE_ISNAND_IN_LIBC 1 - -/* Define if the isnan(float) function is available in libc. */ -/* #undef HAVE_ISNANF_IN_LIBC */ - -/* Define if the isnan(long double) function is available in libc. */ -/* #undef HAVE_ISNANL_IN_LIBC */ - -/* Define to 1 if you have the `issetugid' function. */ -/* #undef HAVE_ISSETUGID */ - -/* Define to 1 if you have the `iswblank' function. */ -#define HAVE_ISWBLANK 1 - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define to 1 if you have the `iswctype' function. */ -#define HAVE_ISWCTYPE 1 - -/* Define if you have and nl_langinfo(CODESET). */ -/* #undef HAVE_LANGINFO_CODESET */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LANGINFO_H */ - -/* Define if your file defines LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBINTL_H 1 - -/* Define if you have the libtextstyle library. */ -/* #undef HAVE_LIBTEXTSTYLE */ - -/* Define if you have the libunistring library. */ -/* #undef HAVE_LIBUNISTRING */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBXML2_LIBXML_XMLEXPORTS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBXML2_LIBXML_XMLVERSION_H 1 - -/* Define to 1 if the bcrypt library is guaranteed to be present. */ -#define HAVE_LIB_BCRYPT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `localtime' function. */ -#define HAVE_LOCALTIME 1 - -/* Define to 1 if you support file names longer than 14 characters. */ -#define HAVE_LONG_FILE_NAMES 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the `lutimes' function. */ -/* #undef HAVE_LUTIMES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACH_O_DYLD_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define if the 'malloc' function is POSIX compliant. */ -/* #undef HAVE_MALLOC_POSIX */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the `mbrlen' function. */ -#define HAVE_MBRLEN 1 - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the `mbsinit' function. */ -/* #undef HAVE_MBSINIT */ - -/* Define to 1 if you have the `mbslen' function. */ -/* #undef HAVE_MBSLEN */ - -/* Define to 1 if you have the `mbsrtowcs' function. */ -#define HAVE_MBSRTOWCS 1 - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `mbtowc' function. */ -#define HAVE_MBTOWC 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ - -/* Define to 1 if you have the `memset' function. */ -/* #undef HAVE_MEMSET */ - -/* Define to 1 if you have the `memset_s' function. */ -/* #undef HAVE_MEMSET_S */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_LIMITS_H */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_SYS_PARAM_H */ - -/* Define to 1 if you have the `mkdtemp' function. */ -/* #undef HAVE_MKDTEMP */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 if you have the `mquery' function. */ -/* #undef HAVE_MQUERY */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define if the locale_t type does not contain the name of each locale - category. */ -/* #undef HAVE_NAMELESS_LOCALES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETDB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_H */ - -/* Define to 1 if you have the `newlocale' function. */ -/* #undef HAVE_NEWLOCALE */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -/* #undef HAVE_NL_LANGINFO */ - -/* Define to 1 if the system has obstacks that work with any size object. */ -/* #undef HAVE_OBSTACK */ - -/* Define to 1 if you have the `opendir' function. */ -/* #undef HAVE_OPENDIR */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OS_H */ - -/* Define to 1 if you have the `pathconf' function. */ -/* #undef HAVE_PATHCONF */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PATHS_H */ - -/* Define to 1 if you have the `pipe' function. */ -/* #undef HAVE_PIPE */ - -/* Define to 1 if you have the `pipe2' function. */ -/* #undef HAVE_PIPE2 */ - -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - -/* Define to 1 if you have the `posix_spawn' function. */ -/* #undef HAVE_POSIX_SPAWN */ - -/* Define to 1 if the system has the type `posix_spawnattr_t'. */ -/* #undef HAVE_POSIX_SPAWNATTR_T */ - -/* Define to 1 if the system has the type `posix_spawn_file_actions_t'. */ -/* #undef HAVE_POSIX_SPAWN_FILE_ACTIONS_T */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PRIV_H */ - -/* Define to 1 if you have the `pstat_getprocvm' function. */ -/* #undef HAVE_PSTAT_GETPROCVM */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define to 1 if you have the `pthread_atfork' function. */ -/* #undef HAVE_PTHREAD_ATFORK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PTHREAD_H */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if the pthread_sigmask function can be used (despite bugs). */ -/* #undef HAVE_PTHREAD_SIGMASK */ - -/* Define to 1 if the system has the type `pthread_spinlock_t'. */ -/* #undef HAVE_PTHREAD_SPINLOCK_T */ - -/* Define to 1 if the system has the type `pthread_t'. */ -/* #undef HAVE_PTHREAD_T */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PWD_H */ - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `rawmemchr' function. */ -/* #undef HAVE_RAWMEMCHR */ - -/* Define to 1 if you have the `readdir' function. */ -/* #undef HAVE_READDIR */ - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the `readlinkat' function. */ -/* #undef HAVE_READLINKAT */ - -/* Define if the 'realloc' function is POSIX compliant. */ -/* #undef HAVE_REALLOC_POSIX */ - -/* Define to 1 if you have the `realpath' function. */ -/* #undef HAVE_REALPATH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RESOLV_H */ - -/* Define to 1 if 'long double' and 'double' have the same representation. */ -#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1 - -/* Define to 1 if the system has the type `sa_family_t'. */ -/* #undef HAVE_SA_FAMILY_T */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SCHED_H */ - -/* Define to 1 if you have the `sched_setparam' function. */ -/* #undef HAVE_SCHED_SETPARAM */ - -/* Define to 1 if you have the `sched_setscheduler' function. */ -/* #undef HAVE_SCHED_SETSCHEDULER */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `secure_getenv' function. */ -/* #undef HAVE_SECURE_GETENV */ - -/* Define to 1 if you have the `select' function. */ -/* #undef HAVE_SELECT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SEMAPHORE_H */ - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `setegid' function. */ -/* #undef HAVE_SETEGID */ - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `seteuid' function. */ -/* #undef HAVE_SETEUID */ - -/* Define to 1 if you have the `setrlimit' function. */ -/* #undef HAVE_SETRLIMIT */ - -/* Define to 1 if you have the `shutdown' function. */ -/* #undef HAVE_SHUTDOWN */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if you have the `sigaltstack' function. */ -/* #undef HAVE_SIGALTSTACK */ - -/* Define to 1 if defines the siginfo_t type, and struct sigaction - has the sa_sigaction member and the SA_SIGINFO flag. */ -/* #undef HAVE_SIGINFO */ - -/* Define to 1 if the system has the type `siginfo_t'. */ -/* #undef HAVE_SIGINFO_T */ - -/* Define to 1 if you have the `siginterrupt' function. */ -/* #undef HAVE_SIGINTERRUPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if the system has the type `sig_atomic_t'. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if you have the `sleep' function. */ -/* #undef HAVE_SLEEP */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the return value of the snprintf function is the number of of - bytes (excluding the terminating NUL) that would have been produced if the - buffer had been large enough. */ -/* #undef HAVE_SNPRINTF_RETVAL_C99 */ - -/* Define if the locale_t type is as on Solaris 11.4. */ -/* #undef HAVE_SOLARIS114_LOCALES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SPAWN_H */ - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if you have the `statacl' function. */ -/* #undef HAVE_STATACL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define if you have the stpncpy() function and it works. */ -/* #undef HAVE_STPNCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strchrnul' function. */ -/* #undef HAVE_STRCHRNUL */ - -/* Define to 1 if you have the `strcspn' function. */ -#define HAVE_STRCSPN 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strpbrk' function. */ -#define HAVE_STRPBRK 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `decimal_point' is a member of `struct lconv'. */ -/* #undef HAVE_STRUCT_LCONV_DECIMAL_POINT */ - -/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ -/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ - -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ACL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CDEFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOCTL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_RANDOM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_WAIT_H */ - -/* Define to 1 if you have the `tcdrain' function. */ -/* #undef HAVE_TCDRAIN */ - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the `towlower' function. */ -/* #undef HAVE_TOWLOWER */ - -/* Define to 1 if you have the `tsearch' function. */ -/* #undef HAVE_TSEARCH */ - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if you have the `unsetenv' function. */ -/* #undef HAVE_UNSETENV */ - -/* Define to 1 if the system has the type `unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define to 1 if you have the `uselocale' function. */ -/* #undef HAVE_USELOCALE */ - -/* Define to 1 if you have the `usleep' function. */ -/* #undef HAVE_USLEEP */ - -/* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 - -/* Define to 1 if you have the `utimensat' function. */ -/* #undef HAVE_UTIMENSAT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UTIME_H */ - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 if you have the `vasnprintf' function. */ -/* #undef HAVE_VASNPRINTF */ - -/* Define to 1 if you have the `vasprintf' function. */ -/* #undef HAVE_VASPRINTF */ - -/* Define to 1 if you have the `vfork' function. */ -/* #undef HAVE_VFORK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VFORK_H */ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if you have the `waitid' function. */ -/* #undef HAVE_WAITID */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -/* #undef HAVE_WCSLEN */ - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if you have the `wctob' function. */ -#define HAVE_WCTOB 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -/* #undef HAVE_WCWIDTH */ - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if you have the `wmempcpy' function. */ -/* #undef HAVE_WMEMPCPY */ - -/* Define to 1 if `fork' works. */ -/* #undef HAVE_WORKING_FORK */ - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define if the uselocale function exists any may safely be called. */ -/* #undef HAVE_WORKING_USELOCALE */ - -/* Define if utimes works properly. */ -/* #undef HAVE_WORKING_UTIMES */ - -/* Define to 1 if `vfork' works. */ -/* #undef HAVE_WORKING_VFORK */ - -/* Define to 1 if you have the `wprintf' function. */ -#define HAVE_WPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WS2TCPIP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_XLOCALE_H */ - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_ftelli64' function. */ -#define HAVE__FTELLI64 1 - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if the compiler supports __builtin_expect, - and to 2 if does. */ -/* #undef HAVE___BUILTIN_EXPECT */ -#ifndef HAVE___BUILTIN_EXPECT -# define __builtin_expect(e, c) (e) -#elif HAVE___BUILTIN_EXPECT == 2 -# include -#endif - - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define to 1 if the compiler supports the keyword '__inline'. */ -#define HAVE___INLINE 1 - -/* Define to 1 if you have the `__secure_getenv' function. */ -/* #undef HAVE___SECURE_GETENV */ - -/* Define to 1 if you have the `__xpg_strerror_r' function. */ -/* #undef HAVE___XPG_STRERROR_R */ - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -#define INSTALLPREFIX "/cygdrive/c/software.b/gettext-0.21" - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'long double'. */ -#define LDBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'long double'. */ -#define LDBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'long - double'. */ -/* #undef LDBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'long double'. */ -/* #undef LDBL_SIGNBIT_WORD */ - -/* Define if libxml is being used as a static library. */ -/* #undef LIBXML_STATIC */ - -/* Define to 1 if lseek does not detect pipes. */ -#define LSEEK_PIPE_BROKEN 1 - -/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing - slash. */ -/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Define if the mbrtowc function does not return (size_t) -2 for empty input. - */ -#define MBRTOWC_EMPTY_INPUT_BUG 1 - -/* Define if the mbrtowc function may signal encoding errors in the C locale. - */ -/* #undef MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ */ - -/* Define if the mbrtowc function has the NULL pwc argument bug. */ -/* #undef MBRTOWC_NULL_ARG1_BUG */ - -/* Define if the mbrtowc function has the NULL string argument bug. */ -/* #undef MBRTOWC_NULL_ARG2_BUG */ - -/* Define if the mbrtowc function does not return 0 for a NUL character. */ -/* #undef MBRTOWC_NUL_RETVAL_BUG */ - -/* Define if the mbrtowc function returns a wrong return value. */ -#define MBRTOWC_RETVAL_BUG 1 - -/* Define if the mbrtowc function stores a wide character when reporting - incomplete input. */ -#define MBRTOWC_STORES_INCOMPLETE_BUG 1 - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define to 1 on musl libc. */ -/* #undef MUSL_LIBC */ - -/* Define to 1 to enable general improvements of setlocale. */ -#define NEED_SETLOCALE_IMPROVED 1 - -/* Define to 1 to enable a multithread-safety fix of setlocale. */ -#define NEED_SETLOCALE_MTSAFE 0 - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "gettext-tools" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "bug-gettext@gnu.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gettext-tools" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-tools 0.21" - -/* Define to the suffix of this package */ -#define PACKAGE_SUFFIX "-0.21" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gettext-tools" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.21" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if pthread_create is an inline function. */ -/* #undef PTHREAD_CREATE_IS_INLINE */ - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to 1 if pthread_sigmask(), when it fails, returns -1 and sets errno. - */ -/* #undef PTHREAD_SIGMASK_FAILS_WITH_ERRNO */ - -/* Define to 1 if pthread_sigmask may return 0 and have no effect. */ -/* #undef PTHREAD_SIGMASK_INEFFECTIVE */ - -/* Define to 1 if pthread_sigmask() unblocks signals incorrectly. */ -/* #undef PTHREAD_SIGMASK_UNBLOCK_BUG */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -/* #undef READLINK_TRAILING_SLASH_BUG */ - -/* Define to 1 if gnulib's dirfd() replacement is used. */ -/* #undef REPLACE_DIRFD */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define if nl_langinfo exists but is overridden by gnulib. */ -/* #undef REPLACE_NL_LANGINFO */ - -/* Define if gnulib uses its own posix_spawn and posix_spawnp functions. */ -#define REPLACE_POSIX_SPAWN 1 - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define if vasnprintf exists but is overridden by gnulib. */ -/* #undef REPLACE_VASNPRINTF */ - -/* Define as const if the declaration of setlocale() needs const. */ -#define SETLOCALE_CONST - -/* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ALL_MTSAFE 1 - -/* Define to 1 if setlocale (category, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ONE_MTSAFE 1 - -/* File name of the Bourne shell. */ -#if defined __CYGWIN__ || defined __ANDROID__ -/* Omit the directory part because - - For 32-bit Cygwin programs in a 64-bit Cygwin environment, the Cygwin - mounts are not visible. - - On Android, /bin/sh does not exist. It's /system/bin/sh instead. */ -# define BOURNE_SHELL "sh" -#else -# define BOURNE_SHELL "/bin/sh" -#endif - -/* Define if lists must be signal-safe. */ -#define SIGNAL_SAFE_LIST 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define to 1 if unlink (dir) cannot possibly succeed. */ -#define UNLINK_CANNOT_UNLINK_DIR 1 - -/* Define to 1 if unlink() on a parent directory may succeed */ -/* #undef UNLINK_PARENT_BUG */ - -/* Define to the prefix of C symbols at the assembler and linker level, either - an underscore or empty. */ -#define USER_LABEL_PREFIX - -/* Define to nonzero if you want access control list support. */ -#define USE_ACL 0 - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Define to a working va_copy macro or replacement. */ -#define VA_COPY va_copy - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to 1 if unsetenv returns void instead of int. */ -/* #undef VOID_UNSETENV */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define if the wcrtomb function does not work in the C locale. */ -/* #undef WCRTOMB_C_LOCALE_BUG */ - -/* Define if the wcrtomb function has an incorrect return value. */ -/* #undef WCRTOMB_RETVAL_BUG */ - -/* Define if WSAStartup is needed. */ -#define WINDOWS_SOCKETS 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define when --enable-shared is used on mingw or Cygwin. */ -#define WOE32DLL 1 - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 to internationalize bison runtime messages. */ -#define YYENABLE_NLS 1 - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -/* #undef _LARGEFILE_SOURCE */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 on Solaris. */ -/* #undef _LCONV_C99 */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 in order to get the POSIX compatible declarations of socket - functions. */ -/* #undef _POSIX_PII_SOCKET */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define if you want to include , so that it consistently - overrides 's RE_DUP_MAX. */ -#define _REGEX_INCLUDE_LIMITS_H 1 - -/* Define if you want regoff_t to be at least as wide POSIX requires. */ -#define _REGEX_LARGE_OFFSETS 1 - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Define as 'access' if you don't have the eaccess() function. */ -#define eaccess access - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b)) - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#ifndef _GL_UNUSED -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -# else -# define _GL_UNUSED -# endif -#endif - -/* The __pure__ attribute was added in gcc 2.96. */ -#ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define _GL_ATTRIBUTE_PURE /* empty */ -# endif -#endif - - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Define to long or long long if and don't define. */ -/* #undef intmax_t */ - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `long int' if does not define. */ -/* #undef off_t */ - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to rpl_re_comp if the replacement should be used. */ -#define re_comp rpl_re_comp - -/* Define to rpl_re_compile_fastmap if the replacement should be used. */ -#define re_compile_fastmap rpl_re_compile_fastmap - -/* Define to rpl_re_compile_pattern if the replacement should be used. */ -#define re_compile_pattern rpl_re_compile_pattern - -/* Define to rpl_re_exec if the replacement should be used. */ -#define re_exec rpl_re_exec - -/* Define to rpl_re_match if the replacement should be used. */ -#define re_match rpl_re_match - -/* Define to rpl_re_match_2 if the replacement should be used. */ -#define re_match_2 rpl_re_match_2 - -/* Define to rpl_re_search if the replacement should be used. */ -#define re_search rpl_re_search - -/* Define to rpl_re_search_2 if the replacement should be used. */ -#define re_search_2 rpl_re_search_2 - -/* Define to rpl_re_set_registers if the replacement should be used. */ -#define re_set_registers rpl_re_set_registers - -/* Define to rpl_re_set_syntax if the replacement should be used. */ -#define re_set_syntax rpl_re_set_syntax - -/* Define to rpl_re_syntax_options if the replacement should be used. */ -#define re_syntax_options rpl_re_syntax_options - -/* Define to rpl_regcomp if the replacement should be used. */ -#define regcomp rpl_regcomp - -/* Define to rpl_regerror if the replacement should be used. */ -#define regerror rpl_regerror - -/* Define to rpl_regexec if the replacement should be used. */ -#define regexec rpl_regexec - -/* Define to rpl_regfree if the replacement should be used. */ -#define regfree rpl_regfree - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define as an integer type suitable for memory locations that can be - accessed atomically even in the presence of asynchronous signals. */ -/* #undef sig_atomic_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* type to use in place of socklen_t if not defined */ -/* #undef socklen_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - -/* Define to an unsigned 32-bit type if lacks this type. */ -#define useconds_t unsigned int - -/* Define as a macro for copying va_list variables. */ -/* #undef va_copy */ - -/* Define as `fork' if `vfork' does not work. */ -#define vfork fork - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded - - - -#ifndef ENDIANNESS -# if defined __BIG_ENDIAN__ -# define ENDIANNESS 0 -# endif -# if defined __LITTLE_ENDIAN__ -# define ENDIANNESS 0 -# endif -#endif - - - -/* A file name cannot consist of any character possible. INVALID_PATH_CHAR - contains the characters not allowed. */ -#if defined _MSC_VER || defined __MINGW32__ -/* Woe32. This string is valid for Windows NT/2000. On Windows 95/98/ME some - few characters in the range 0x80..0xff are invalid as well, but this doesn't - matter much for our purposes. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\"*/:<>?\\|" -#elif defined MSDOS -/* Something like this for MSDOG. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 \177\\:." -#else -/* Unix. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 \177/" -#endif - -/* This is the page width for the message_print function. It should - not be set to more than 79 characters (Emacs users will appreciate - it). It is used to wrap the msgid and msgstr strings, and also to - wrap the file position (#:) comments. */ -#define PAGE_WIDTH 79 - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if defined WOE32DLL && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#if defined __EMX__ && !defined __KLIBC__ -# include "intl/os2compat.h" -#endif - diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/configmake.h b/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/configmake.h deleted file mode 100644 index 3521af1a1..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/configmake.h +++ /dev/null @@ -1,31 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#if HAVE_WINSOCK2_H -# include /* avoid mingw pollution on DATADIR */ -#endif -#define PREFIX "/cygdrive/c/software.b/gettext-0.21" -#define EXEC_PREFIX "/cygdrive/c/software.b/gettext-0.21" -#define BINDIR "/cygdrive/c/software.b/gettext-0.21/bin" -#define SBINDIR "/cygdrive/c/software.b/gettext-0.21/sbin" -#define LIBEXECDIR "/cygdrive/c/software.b/gettext-0.21/libexec" -#define DATAROOTDIR "/cygdrive/c/software.b/gettext-0.21/share" -#define DATADIR "/cygdrive/c/software.b/gettext-0.21/share" -#define SYSCONFDIR "/cygdrive/c/software.b/gettext-0.21/etc" -#define SHAREDSTATEDIR "/cygdrive/c/software.b/gettext-0.21/com" -#define LOCALSTATEDIR "/cygdrive/c/software.b/gettext-0.21/var" -#define RUNSTATEDIR "/cygdrive/c/software.b/gettext-0.21/var/run" -#define INCLUDEDIR "/cygdrive/c/software.b/gettext-0.21/include" -#define OLDINCLUDEDIR "/usr/include" -#define DOCDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define INFODIR "/cygdrive/c/software.b/gettext-0.21/share/info" -#define HTMLDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define DVIDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define PDFDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define PSDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define LIBDIR "/cygdrive/c/software.b/gettext-0.21/lib" -#define LISPDIR "/cygdrive/c/software.b/gettext-0.21/share/emacs/site-lisp" -#define LOCALEDIR "/cygdrive/c/software.b/gettext-0.21/share/locale" -#define MANDIR "/cygdrive/c/software.b/gettext-0.21/share/man" -#define PKGDATADIR "/cygdrive/c/software.b/gettext-0.21/share/gettext" -#define PKGINCLUDEDIR "/cygdrive/c/software.b/gettext-0.21/include/gettext-tools" -#define PKGLIBDIR "/cygdrive/c/software.b/gettext-0.21/lib/gettext-tools" -#define PKGLIBEXECDIR "/cygdrive/c/software.b/gettext-0.21/libexec/gettext-tools" diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/math.h b/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/math.h deleted file mode 100644 index fc00cbb1c..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/math.h +++ /dev/null @@ -1,3008 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_MATH_H - -#if __GNUC__ >= 3 - -#endif - - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h" - -#ifndef _GL_MATH_H -#define _GL_MATH_H - -/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ -#if defined __VMS && ! defined NAN -# include -#endif - -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif -_GL_INLINE_HEADER_BEGIN -#ifndef _GL_MATH_INLINE -# define _GL_MATH_INLINE _GL_INLINE -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -#ifdef __cplusplus -/* Helper macros to define type-generic function FUNC as overloaded functions, - rather than as macros like in C. POSIX declares these with an argument of - real-floating (that is, one of float, double, or long double). */ -# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ -static inline int \ -_gl_cxx_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -static inline int \ -_gl_cxx_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -static inline int \ -_gl_cxx_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \ -_GL_BEGIN_NAMESPACE \ -inline rettype \ -rpl_func (float f) \ -{ \ - return _gl_cxx_ ## func ## f (f); \ -} \ -inline rettype \ -rpl_func (double d) \ -{ \ - return _gl_cxx_ ## func ## d (d); \ -} \ -inline rettype \ -rpl_func (long double l) \ -{ \ - return _gl_cxx_ ## func ## l (l); \ -} \ -_GL_END_NAMESPACE -#endif - -/* Helper macros to define a portability warning for the - classification macro FUNC called with VALUE. POSIX declares the - classification macros with an argument of real-floating (that is, - one of float, double, or long double). */ -#define _GL_WARN_REAL_FLOATING_DECL(func) \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ - (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ - : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ - : rpl_ ## func ## l (value)) - - -#if 0 -/* Pull in a function that fixes the 'int' to 'long double' conversion - of glibc 2.7. */ -_GL_EXTERN_C void _Qp_itoq (long double *, int); -static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; -#endif - - -/* For clang: Use __has_builtin to determine whether a builtin is available. */ -#ifndef __has_builtin -# define __has_builtin(name) 0 -#endif - - -/* POSIX allows platforms that don't support NAN. But all major - machines in the past 15 years have supported something close to - IEEE NaN, so we define this unconditionally. We also must define - it on platforms like Solaris 10, where NAN is present but defined - as a function pointer rather than a floating point constant. */ -#if !defined NAN || 0 -# if !GNULIB_defined_NAN -# undef NAN - /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler - choke on the expression 0.0 / 0.0. */ -# if defined __DECC || defined _MSC_VER -_GL_MATH_INLINE float -_NaN () -{ - static float zero = 0.0f; - return zero / zero; -} -# define NAN (_NaN()) -# else -# define NAN (0.0f / 0.0f) -# endif -# define GNULIB_defined_NAN 1 -# endif -#endif - -/* Solaris 10 defines HUGE_VAL, but as a function pointer rather - than a floating point constant. */ -#if 0 -# undef HUGE_VALF -# define HUGE_VALF (1.0f / 0.0f) -# undef HUGE_VAL -# define HUGE_VAL (1.0 / 0.0) -# undef HUGE_VALL -# define HUGE_VALL (1.0L / 0.0L) -#endif - -/* HUGE_VALF is a 'float' Infinity. */ -#ifndef HUGE_VALF -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ -# define HUGE_VALF (1e25f * 1e25f) -# else -# define HUGE_VALF (1.0f / 0.0f) -# endif -#endif - -/* HUGE_VAL is a 'double' Infinity. */ -#ifndef HUGE_VAL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ -# define HUGE_VAL (1e250 * 1e250) -# else -# define HUGE_VAL (1.0 / 0.0) -# endif -#endif - -/* HUGE_VALL is a 'long double' Infinity. */ -#ifndef HUGE_VALL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ -# define HUGE_VALL (1e250L * 1e250L) -# else -# define HUGE_VALL (1.0L / 0.0L) -# endif -#endif - - -#if defined FP_ILOGB0 && defined FP_ILOGBNAN - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */ -# if defined __HAIKU__ - /* Haiku: match what ilogb() does */ -# undef FP_ILOGB0 -# undef FP_ILOGBNAN -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#else - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ -# if defined __NetBSD__ || defined __sgi - /* NetBSD, IRIX 6.5: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# elif defined _AIX - /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# elif defined __sun - /* Solaris 9: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# else - /* Gnulib defined values. */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef acosf -# define acosf rpl_acosf -# endif -_GL_FUNCDECL_RPL (acosf, float, (float x)); -_GL_CXXALIAS_RPL (acosf, float, (float x)); -# else -# if !1 -# undef acosf -_GL_FUNCDECL_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIASWARN (acosf); -#elif defined GNULIB_POSIXCHECK -# undef acosf -# if HAVE_RAW_DECL_ACOSF -_GL_WARN_ON_USE (acosf, "acosf is unportable - " - "use gnulib module acosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef acosl -_GL_FUNCDECL_SYS (acosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (acosl, long double, (long double x)); -_GL_CXXALIASWARN (acosl); -#elif defined GNULIB_POSIXCHECK -# undef acosl -# if HAVE_RAW_DECL_ACOSL -_GL_WARN_ON_USE (acosl, "acosl is unportable - " - "use gnulib module acosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef asinf -# define asinf rpl_asinf -# endif -_GL_FUNCDECL_RPL (asinf, float, (float x)); -_GL_CXXALIAS_RPL (asinf, float, (float x)); -# else -# if !1 -# undef asinf -_GL_FUNCDECL_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIASWARN (asinf); -#elif defined GNULIB_POSIXCHECK -# undef asinf -# if HAVE_RAW_DECL_ASINF -_GL_WARN_ON_USE (asinf, "asinf is unportable - " - "use gnulib module asinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef asinl -_GL_FUNCDECL_SYS (asinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (asinl, long double, (long double x)); -_GL_CXXALIASWARN (asinl); -#elif defined GNULIB_POSIXCHECK -# undef asinl -# if HAVE_RAW_DECL_ASINL -_GL_WARN_ON_USE (asinl, "asinl is unportable - " - "use gnulib module asinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atanf -# define atanf rpl_atanf -# endif -_GL_FUNCDECL_RPL (atanf, float, (float x)); -_GL_CXXALIAS_RPL (atanf, float, (float x)); -# else -# if !1 -# undef atanf -_GL_FUNCDECL_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIASWARN (atanf); -#elif defined GNULIB_POSIXCHECK -# undef atanf -# if HAVE_RAW_DECL_ATANF -_GL_WARN_ON_USE (atanf, "atanf is unportable - " - "use gnulib module atanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef atanl -_GL_FUNCDECL_SYS (atanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (atanl, long double, (long double x)); -_GL_CXXALIASWARN (atanl); -#elif defined GNULIB_POSIXCHECK -# undef atanl -# if HAVE_RAW_DECL_ATANL -_GL_WARN_ON_USE (atanl, "atanl is unportable - " - "use gnulib module atanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atan2f -# define atan2f rpl_atan2f -# endif -_GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); -_GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); -# else -# if !1 -# undef atan2f -_GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIASWARN (atan2f); -#elif defined GNULIB_POSIXCHECK -# undef atan2f -# if HAVE_RAW_DECL_ATAN2F -_GL_WARN_ON_USE (atan2f, "atan2f is unportable - " - "use gnulib module atan2f for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtf -# define cbrtf rpl_cbrtf -# endif -_GL_FUNCDECL_RPL (cbrtf, float, (float x)); -_GL_CXXALIAS_RPL (cbrtf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (cbrtf); -#elif defined GNULIB_POSIXCHECK -# undef cbrtf -# if HAVE_RAW_DECL_CBRTF -_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " - "use gnulib module cbrtf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (cbrt, double, (double x)); -# endif -_GL_CXXALIAS_SYS (cbrt, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (cbrt); -# endif -#elif defined GNULIB_POSIXCHECK -# undef cbrt -# if HAVE_RAW_DECL_CBRT -_GL_WARN_ON_USE (cbrt, "cbrt is unportable - " - "use gnulib module cbrt for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtl -# define cbrtl rpl_cbrtl -# endif -_GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (cbrtl); -#elif defined GNULIB_POSIXCHECK -# undef cbrtl -# if HAVE_RAW_DECL_CBRTL -_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " - "use gnulib module cbrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceilf -# define ceilf rpl_ceilf -# endif -_GL_FUNCDECL_RPL (ceilf, float, (float x)); -_GL_CXXALIAS_RPL (ceilf, float, (float x)); -# else -# if !1 -# undef ceilf -_GL_FUNCDECL_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIASWARN (ceilf); -#elif defined GNULIB_POSIXCHECK -# undef ceilf -# if HAVE_RAW_DECL_CEILF -_GL_WARN_ON_USE (ceilf, "ceilf is unportable - " - "use gnulib module ceilf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceil -# define ceil rpl_ceil -# endif -_GL_FUNCDECL_RPL (ceil, double, (double x)); -_GL_CXXALIAS_RPL (ceil, double, (double x)); -# else -_GL_CXXALIAS_SYS (ceil, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ceil); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceill -# define ceill rpl_ceill -# endif -_GL_FUNCDECL_RPL (ceill, long double, (long double x)); -_GL_CXXALIAS_RPL (ceill, long double, (long double x)); -# else -# if !1 -# undef ceill -_GL_FUNCDECL_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIASWARN (ceill); -#elif defined GNULIB_POSIXCHECK -# undef ceill -# if HAVE_RAW_DECL_CEILL -_GL_WARN_ON_USE (ceill, "ceill is unportable - " - "use gnulib module ceill for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef copysignf -_GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); -_GL_CXXALIASWARN (copysignf); -#elif defined GNULIB_POSIXCHECK -# undef copysignf -# if HAVE_RAW_DECL_COPYSIGNF -_GL_WARN_ON_USE (copysignf, "copysignf is unportable - " - "use gnulib module copysignf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysign, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (copysign, double, (double x, double y)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (copysign); -# endif -#elif defined GNULIB_POSIXCHECK -# undef copysign -# if HAVE_RAW_DECL_COPYSIGN -_GL_WARN_ON_USE (copysign, "copysign is unportable - " - "use gnulib module copysign for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); -_GL_CXXALIASWARN (copysignl); -#elif defined GNULIB_POSIXCHECK -# undef copysignl -# if HAVE_RAW_DECL_COPYSIGNL -_GL_WARN_ON_USE (copysign, "copysignl is unportable - " - "use gnulib module copysignl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cosf -# define cosf rpl_cosf -# endif -_GL_FUNCDECL_RPL (cosf, float, (float x)); -_GL_CXXALIAS_RPL (cosf, float, (float x)); -# else -# if !1 -# undef cosf -_GL_FUNCDECL_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIASWARN (cosf); -#elif defined GNULIB_POSIXCHECK -# undef cosf -# if HAVE_RAW_DECL_COSF -_GL_WARN_ON_USE (cosf, "cosf is unportable - " - "use gnulib module cosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef cosl -_GL_FUNCDECL_SYS (cosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cosl, long double, (long double x)); -_GL_CXXALIASWARN (cosl); -#elif defined GNULIB_POSIXCHECK -# undef cosl -# if HAVE_RAW_DECL_COSL -_GL_WARN_ON_USE (cosl, "cosl is unportable - " - "use gnulib module cosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef coshf -# define coshf rpl_coshf -# endif -_GL_FUNCDECL_RPL (coshf, float, (float x)); -_GL_CXXALIAS_RPL (coshf, float, (float x)); -# else -# if !1 -# undef coshf -_GL_FUNCDECL_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIASWARN (coshf); -#elif defined GNULIB_POSIXCHECK -# undef coshf -# if HAVE_RAW_DECL_COSHF -_GL_WARN_ON_USE (coshf, "coshf is unportable - " - "use gnulib module coshf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expf -# define expf rpl_expf -# endif -_GL_FUNCDECL_RPL (expf, float, (float x)); -_GL_CXXALIAS_RPL (expf, float, (float x)); -# else -# if !1 -# undef expf -_GL_FUNCDECL_SYS (expf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expf, float, (float x)); -# endif -_GL_CXXALIASWARN (expf); -#elif defined GNULIB_POSIXCHECK -# undef expf -# if HAVE_RAW_DECL_EXPF -_GL_WARN_ON_USE (expf, "expf is unportable - " - "use gnulib module expf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expl -# define expl rpl_expl -# endif -_GL_FUNCDECL_RPL (expl, long double, (long double x)); -_GL_CXXALIAS_RPL (expl, long double, (long double x)); -# else -# if !1 || !1 -# undef expl -_GL_FUNCDECL_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expl); -#elif defined GNULIB_POSIXCHECK -# undef expl -# if HAVE_RAW_DECL_EXPL -_GL_WARN_ON_USE (expl, "expl is unportable - " - "use gnulib module expl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (exp2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (exp2f, float, (float x)); -_GL_CXXALIASWARN (exp2f); -#elif defined GNULIB_POSIXCHECK -# undef exp2f -# if HAVE_RAW_DECL_EXP2F -_GL_WARN_ON_USE (exp2f, "exp2f is unportable - " - "use gnulib module exp2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2 -# define exp2 rpl_exp2 -# endif -_GL_FUNCDECL_RPL (exp2, double, (double x)); -_GL_CXXALIAS_RPL (exp2, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (exp2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (exp2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (exp2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef exp2 -# if HAVE_RAW_DECL_EXP2 -_GL_WARN_ON_USE (exp2, "exp2 is unportable - " - "use gnulib module exp2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2l -# define exp2l rpl_exp2l -# endif -_GL_FUNCDECL_RPL (exp2l, long double, (long double x)); -_GL_CXXALIAS_RPL (exp2l, long double, (long double x)); -# else -# if !1 -# undef exp2l -_GL_FUNCDECL_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (exp2l); -#elif defined GNULIB_POSIXCHECK -# undef exp2l -# if HAVE_RAW_DECL_EXP2L -_GL_WARN_ON_USE (exp2l, "exp2l is unportable - " - "use gnulib module exp2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1f -# define expm1f rpl_expm1f -# endif -_GL_FUNCDECL_RPL (expm1f, float, (float x)); -_GL_CXXALIAS_RPL (expm1f, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIASWARN (expm1f); -#elif defined GNULIB_POSIXCHECK -# undef expm1f -# if HAVE_RAW_DECL_EXPM1F -_GL_WARN_ON_USE (expm1f, "expm1f is unportable - " - "use gnulib module expm1f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1 -# define expm1 rpl_expm1 -# endif -_GL_FUNCDECL_RPL (expm1, double, (double x)); -_GL_CXXALIAS_RPL (expm1, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1, double, (double x)); -# endif -_GL_CXXALIAS_SYS (expm1, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (expm1); -# endif -#elif defined GNULIB_POSIXCHECK -# undef expm1 -# if HAVE_RAW_DECL_EXPM1 -_GL_WARN_ON_USE (expm1, "expm1 is unportable - " - "use gnulib module expm1 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1l -# define expm1l rpl_expm1l -# endif -_GL_FUNCDECL_RPL (expm1l, long double, (long double x)); -_GL_CXXALIAS_RPL (expm1l, long double, (long double x)); -# else -# if !1 -# undef expm1l -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (expm1l, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (expm1l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expm1l); -#elif defined GNULIB_POSIXCHECK -# undef expm1l -# if HAVE_RAW_DECL_EXPM1L -_GL_WARN_ON_USE (expm1l, "expm1l is unportable - " - "use gnulib module expm1l for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef fabsf -_GL_FUNCDECL_SYS (fabsf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (fabsf, float, (float x)); -_GL_CXXALIASWARN (fabsf); -#elif defined GNULIB_POSIXCHECK -# undef fabsf -# if HAVE_RAW_DECL_FABSF -_GL_WARN_ON_USE (fabsf, "fabsf is unportable - " - "use gnulib module fabsf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fabsl -# define fabsl rpl_fabsl -# endif -_GL_FUNCDECL_RPL (fabsl, long double, (long double x)); -_GL_CXXALIAS_RPL (fabsl, long double, (long double x)); -# else -# if !1 -# undef fabsl -_GL_FUNCDECL_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (fabsl); -#elif defined GNULIB_POSIXCHECK -# undef fabsl -# if HAVE_RAW_DECL_FABSL -_GL_WARN_ON_USE (fabsl, "fabsl is unportable - " - "use gnulib module fabsl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorf -# define floorf rpl_floorf -# endif -_GL_FUNCDECL_RPL (floorf, float, (float x)); -_GL_CXXALIAS_RPL (floorf, float, (float x)); -# else -# if !1 -# undef floorf -_GL_FUNCDECL_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIASWARN (floorf); -#elif defined GNULIB_POSIXCHECK -# undef floorf -# if HAVE_RAW_DECL_FLOORF -_GL_WARN_ON_USE (floorf, "floorf is unportable - " - "use gnulib module floorf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floor -# define floor rpl_floor -# endif -_GL_FUNCDECL_RPL (floor, double, (double x)); -_GL_CXXALIAS_RPL (floor, double, (double x)); -# else -_GL_CXXALIAS_SYS (floor, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (floor); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorl -# define floorl rpl_floorl -# endif -_GL_FUNCDECL_RPL (floorl, long double, (long double x)); -_GL_CXXALIAS_RPL (floorl, long double, (long double x)); -# else -# if !1 -# undef floorl -_GL_FUNCDECL_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (floorl); -#elif defined GNULIB_POSIXCHECK -# undef floorl -# if HAVE_RAW_DECL_FLOORL -_GL_WARN_ON_USE (floorl, "floorl is unportable - " - "use gnulib module floorl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmaf -# define fmaf rpl_fmaf -# endif -_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); -_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); -# else -# if !1 -# undef fmaf -_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIASWARN (fmaf); -#elif defined GNULIB_POSIXCHECK -# undef fmaf -# if HAVE_RAW_DECL_FMAF -_GL_WARN_ON_USE (fmaf, "fmaf is unportable - " - "use gnulib module fmaf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fma -# define fma rpl_fma -# endif -_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); -_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); -# else -# if !1 -# undef fma -_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); -# endif -_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fma); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fma -# if HAVE_RAW_DECL_FMA -_GL_WARN_ON_USE (fma, "fma is unportable - " - "use gnulib module fma for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmal -# define fmal rpl_fmal -# endif -_GL_FUNCDECL_RPL (fmal, long double, - (long double x, long double y, long double z)); -_GL_CXXALIAS_RPL (fmal, long double, - (long double x, long double y, long double z)); -# else -# if !1 -# undef fmal -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -# endif -_GL_CXXALIAS_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -_GL_CXXALIASWARN (fmal); -#elif defined GNULIB_POSIXCHECK -# undef fmal -# if HAVE_RAW_DECL_FMAL -_GL_WARN_ON_USE (fmal, "fmal is unportable - " - "use gnulib module fmal for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodf -# define fmodf rpl_fmodf -# endif -_GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); -_GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); -# else -# if !1 -# undef fmodf -_GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (fmodf); -#elif defined GNULIB_POSIXCHECK -# undef fmodf -# if HAVE_RAW_DECL_FMODF -_GL_WARN_ON_USE (fmodf, "fmodf is unportable - " - "use gnulib module fmodf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmod -# define fmod rpl_fmod -# endif -_GL_FUNCDECL_RPL (fmod, double, (double x, double y)); -_GL_CXXALIAS_RPL (fmod, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (fmod, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fmod); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fmod -# if HAVE_RAW_DECL_FMOD -_GL_WARN_ON_USE (fmod, "fmod has portability problems - " - "use gnulib module fmod for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodl -# define fmodl rpl_fmodl -# endif -_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); -# else -# if !1 -# undef fmodl -_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (fmodl); -#elif defined GNULIB_POSIXCHECK -# undef fmodl -# if HAVE_RAW_DECL_FMODL -_GL_WARN_ON_USE (fmodl, "fmodl is unportable - " - "use gnulib module fmodl for portability"); -# endif -#endif - - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpf -# define frexpf rpl_frexpf -# endif -_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); -# else -# if !1 -# undef frexpf -_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); -# endif -_GL_CXXALIASWARN (frexpf); -#elif defined GNULIB_POSIXCHECK -# undef frexpf -# if HAVE_RAW_DECL_FREXPF -_GL_WARN_ON_USE (frexpf, "frexpf is unportable - " - "use gnulib module frexpf for portability"); -# endif -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexp -# define frexp rpl_frexp -# endif -_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); -# else -_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef frexp -/* Assume frexp is always declared. */ -_GL_WARN_ON_USE (frexp, "frexp is unportable - " - "use gnulib module frexp for portability"); -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpl -# define frexpl rpl_frexpl -# endif -_GL_FUNCDECL_RPL (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); -#else -# if !1 -_GL_FUNCDECL_SYS (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -# if 0 -_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); -# endif -#endif -#if 0 && !(0 && !1) -_GL_CXXALIASWARN (frexpl); -#endif -#if !0 && defined GNULIB_POSIXCHECK -# undef frexpl -# if HAVE_RAW_DECL_FREXPL -_GL_WARN_ON_USE (frexpl, "frexpl is unportable - " - "use gnulib module frexpl for portability"); -# endif -#endif - - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotf -# define hypotf rpl_hypotf -# endif -_GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); -_GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (hypotf); -#elif defined GNULIB_POSIXCHECK -# undef hypotf -# if HAVE_RAW_DECL_HYPOTF -_GL_WARN_ON_USE (hypotf, "hypotf is unportable - " - "use gnulib module hypotf for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypot -# define hypot rpl_hypot -# endif -_GL_FUNCDECL_RPL (hypot, double, (double x, double y)); -_GL_CXXALIAS_RPL (hypot, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (hypot, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (hypot); -# endif -#elif defined GNULIB_POSIXCHECK -# undef hypot -# if HAVE_RAW_DECL_HYPOT -_GL_WARN_ON_USE (hypotf, "hypot has portability problems - " - "use gnulib module hypot for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotl -# define hypotl rpl_hypotl -# endif -_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (hypotl); -#elif defined GNULIB_POSIXCHECK -# undef hypotl -# if HAVE_RAW_DECL_HYPOTL -_GL_WARN_ON_USE (hypotl, "hypotl is unportable - " - "use gnulib module hypotl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbf -# define ilogbf rpl_ilogbf -# endif -_GL_FUNCDECL_RPL (ilogbf, int, (float x)); -_GL_CXXALIAS_RPL (ilogbf, int, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIAS_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIASWARN (ilogbf); -#elif defined GNULIB_POSIXCHECK -# undef ilogbf -# if HAVE_RAW_DECL_ILOGBF -_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " - "use gnulib module ilogbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogb -# define ilogb rpl_ilogb -# endif -_GL_FUNCDECL_RPL (ilogb, int, (double x)); -_GL_CXXALIAS_RPL (ilogb, int, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogb, int, (double x)); -# endif -_GL_CXXALIAS_SYS (ilogb, int, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ilogb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef ilogb -# if HAVE_RAW_DECL_ILOGB -_GL_WARN_ON_USE (ilogb, "ilogb is unportable - " - "use gnulib module ilogb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbl -# define ilogbl rpl_ilogbl -# endif -_GL_FUNCDECL_RPL (ilogbl, int, (long double x)); -_GL_CXXALIAS_RPL (ilogbl, int, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIASWARN (ilogbl); -#elif defined GNULIB_POSIXCHECK -# undef ilogbl -# if HAVE_RAW_DECL_ILOGBL -_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " - "use gnulib module ilogbl for portability"); -# endif -#endif - - -/* Return x * 2^exp. */ -#if 0 -# if !1 -# undef ldexpf -_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); -# endif -_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); -_GL_CXXALIASWARN (ldexpf); -#elif defined GNULIB_POSIXCHECK -# undef ldexpf -# if HAVE_RAW_DECL_LDEXPF -_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " - "use gnulib module ldexpf for portability"); -# endif -#endif - -/* Return x * 2^exp. */ -#if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ldexpl -# define ldexpl rpl_ldexpl -# endif -_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); -_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); -#else -# if !1 -_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); -# endif -# if 0 -_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); -# endif -#endif -#if 0 -_GL_CXXALIASWARN (ldexpl); -#endif -#if !0 && defined GNULIB_POSIXCHECK -# undef ldexpl -# if HAVE_RAW_DECL_LDEXPL -_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " - "use gnulib module ldexpl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logf -# define logf rpl_logf -# endif -_GL_FUNCDECL_RPL (logf, float, (float x)); -_GL_CXXALIAS_RPL (logf, float, (float x)); -# else -# if !1 -# undef logf -_GL_FUNCDECL_SYS (logf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logf, float, (float x)); -# endif -_GL_CXXALIASWARN (logf); -#elif defined GNULIB_POSIXCHECK -# undef logf -# if HAVE_RAW_DECL_LOGF -_GL_WARN_ON_USE (logf, "logf is unportable - " - "use gnulib module logf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log -# define log rpl_log -# endif -_GL_FUNCDECL_RPL (log, double, (double x)); -_GL_CXXALIAS_RPL (log, double, (double x)); -# else -_GL_CXXALIAS_SYS (log, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log -# if HAVE_RAW_DECL_LOG -_GL_WARN_ON_USE (log, "log has portability problems - " - "use gnulib module log for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logl -# define logl rpl_logl -# endif -_GL_FUNCDECL_RPL (logl, long double, (long double x)); -_GL_CXXALIAS_RPL (logl, long double, (long double x)); -# else -# if !1 || !1 -# undef logl -_GL_FUNCDECL_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logl); -#elif defined GNULIB_POSIXCHECK -# undef logl -# if HAVE_RAW_DECL_LOGL -_GL_WARN_ON_USE (logl, "logl is unportable - " - "use gnulib module logl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10f -# define log10f rpl_log10f -# endif -_GL_FUNCDECL_RPL (log10f, float, (float x)); -_GL_CXXALIAS_RPL (log10f, float, (float x)); -# else -# if !1 -# undef log10f -_GL_FUNCDECL_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIASWARN (log10f); -#elif defined GNULIB_POSIXCHECK -# undef log10f -# if HAVE_RAW_DECL_LOG10F -_GL_WARN_ON_USE (log10f, "log10f is unportable - " - "use gnulib module log10f for portability"); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10 -# define log10 rpl_log10 -# endif -_GL_FUNCDECL_RPL (log10, double, (double x)); -_GL_CXXALIAS_RPL (log10, double, (double x)); -# else -_GL_CXXALIAS_SYS (log10, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log10); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log10 -# if HAVE_RAW_DECL_LOG10 -_GL_WARN_ON_USE (log10, "log10 has portability problems - " - "use gnulib module log10 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10l -# define log10l rpl_log10l -# endif -_GL_FUNCDECL_RPL (log10l, long double, (long double x)); -_GL_CXXALIAS_RPL (log10l, long double, (long double x)); -# else -# if !1 || !1 -# undef log10l -_GL_FUNCDECL_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log10l); -#elif defined GNULIB_POSIXCHECK -# undef log10l -# if HAVE_RAW_DECL_LOG10L -_GL_WARN_ON_USE (log10l, "log10l is unportable - " - "use gnulib module log10l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pf -# define log1pf rpl_log1pf -# endif -_GL_FUNCDECL_RPL (log1pf, float, (float x)); -_GL_CXXALIAS_RPL (log1pf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIASWARN (log1pf); -#elif defined GNULIB_POSIXCHECK -# undef log1pf -# if HAVE_RAW_DECL_LOG1PF -_GL_WARN_ON_USE (log1pf, "log1pf is unportable - " - "use gnulib module log1pf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1p -# define log1p rpl_log1p -# endif -_GL_FUNCDECL_RPL (log1p, double, (double x)); -_GL_CXXALIAS_RPL (log1p, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1p, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log1p, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log1p); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log1p -# if HAVE_RAW_DECL_LOG1P -_GL_WARN_ON_USE (log1p, "log1p has portability problems - " - "use gnulib module log1p for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pl -# define log1pl rpl_log1pl -# endif -_GL_FUNCDECL_RPL (log1pl, long double, (long double x)); -_GL_CXXALIAS_RPL (log1pl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log1pl); -#elif defined GNULIB_POSIXCHECK -# undef log1pl -# if HAVE_RAW_DECL_LOG1PL -_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " - "use gnulib module log1pl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2f -# define log2f rpl_log2f -# endif -_GL_FUNCDECL_RPL (log2f, float, (float x)); -_GL_CXXALIAS_RPL (log2f, float, (float x)); -# else -# if !1 -# undef log2f -_GL_FUNCDECL_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIASWARN (log2f); -#elif defined GNULIB_POSIXCHECK -# undef log2f -# if HAVE_RAW_DECL_LOG2F -_GL_WARN_ON_USE (log2f, "log2f is unportable - " - "use gnulib module log2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2 -# define log2 rpl_log2 -# endif -_GL_FUNCDECL_RPL (log2, double, (double x)); -_GL_CXXALIAS_RPL (log2, double, (double x)); -# else -# if !1 -# undef log2 -_GL_FUNCDECL_SYS (log2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log2 -# if HAVE_RAW_DECL_LOG2 -_GL_WARN_ON_USE (log2, "log2 is unportable - " - "use gnulib module log2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2l -# define log2l rpl_log2l -# endif -_GL_FUNCDECL_RPL (log2l, long double, (long double x)); -_GL_CXXALIAS_RPL (log2l, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log2l); -#elif defined GNULIB_POSIXCHECK -# undef log2l -# if HAVE_RAW_DECL_LOG2L -_GL_WARN_ON_USE (log2l, "log2l is unportable - " - "use gnulib module log2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbf -# define logbf rpl_logbf -# endif -_GL_FUNCDECL_RPL (logbf, float, (float x)); -_GL_CXXALIAS_RPL (logbf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIASWARN (logbf); -#elif defined GNULIB_POSIXCHECK -# undef logbf -# if HAVE_RAW_DECL_LOGBF -_GL_WARN_ON_USE (logbf, "logbf is unportable - " - "use gnulib module logbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logb -# define logb rpl_logb -# endif -_GL_FUNCDECL_RPL (logb, double, (double x)); -_GL_CXXALIAS_RPL (logb, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logb, double, (double x)); -# endif -_GL_CXXALIAS_SYS (logb, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (logb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef logb -# if HAVE_RAW_DECL_LOGB -_GL_WARN_ON_USE (logb, "logb is unportable - " - "use gnulib module logb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbl -# define logbl rpl_logbl -# endif -_GL_FUNCDECL_RPL (logbl, long double, (long double x)); -_GL_CXXALIAS_RPL (logbl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logbl); -#elif defined GNULIB_POSIXCHECK -# undef logbl -# if HAVE_RAW_DECL_LOGBL -_GL_WARN_ON_USE (logbl, "logbl is unportable - " - "use gnulib module logbl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modff -# define modff rpl_modff -# endif -_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); -# else -# if !1 -# undef modff -_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); -# endif -_GL_CXXALIASWARN (modff); -#elif defined GNULIB_POSIXCHECK -# undef modff -# if HAVE_RAW_DECL_MODFF -_GL_WARN_ON_USE (modff, "modff is unportable - " - "use gnulib module modff for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modf -# define modf rpl_modf -# endif -_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); -# else -_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (modf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef modf -# if HAVE_RAW_DECL_MODF -_GL_WARN_ON_USE (modf, "modf has portability problems - " - "use gnulib module modf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modfl -# define modfl rpl_modfl -# endif -_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); -# else -# if !1 -# undef modfl -_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); -# endif -_GL_CXXALIASWARN (modfl); -#elif defined GNULIB_POSIXCHECK -# undef modfl -# if HAVE_RAW_DECL_MODFL -_GL_WARN_ON_USE (modfl, "modfl is unportable - " - "use gnulib module modfl for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef powf -_GL_FUNCDECL_SYS (powf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (powf, float, (float x, float y)); -_GL_CXXALIASWARN (powf); -#elif defined GNULIB_POSIXCHECK -# undef powf -# if HAVE_RAW_DECL_POWF -_GL_WARN_ON_USE (powf, "powf is unportable - " - "use gnulib module powf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderf -# define remainderf rpl_remainderf -# endif -_GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); -_GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (remainderf); -#elif defined GNULIB_POSIXCHECK -# undef remainderf -# if HAVE_RAW_DECL_REMAINDERF -_GL_WARN_ON_USE (remainderf, "remainderf is unportable - " - "use gnulib module remainderf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainder -# define remainder rpl_remainder -# endif -_GL_FUNCDECL_RPL (remainder, double, (double x, double y)); -_GL_CXXALIAS_RPL (remainder, double, (double x, double y)); -# else -# if !1 || !1 -_GL_FUNCDECL_SYS (remainder, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (remainder, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remainder); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remainder -# if HAVE_RAW_DECL_REMAINDER -_GL_WARN_ON_USE (remainder, "remainder is unportable - " - "use gnulib module remainder for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderl -# define remainderl rpl_remainderl -# endif -_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); -# else -# if !1 -# undef remainderl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); -# endif -# endif -_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (remainderl); -#elif defined GNULIB_POSIXCHECK -# undef remainderl -# if HAVE_RAW_DECL_REMAINDERL -_GL_WARN_ON_USE (remainderl, "remainderl is unportable - " - "use gnulib module remainderl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rintf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (rintf, float, (float x)); -_GL_CXXALIASWARN (rintf); -#elif defined GNULIB_POSIXCHECK -# undef rintf -# if HAVE_RAW_DECL_RINTF -_GL_WARN_ON_USE (rintf, "rintf is unportable - " - "use gnulib module rintf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rint, double, (double x)); -# endif -_GL_CXXALIAS_SYS (rint, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rint); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rint -# if HAVE_RAW_DECL_RINT -_GL_WARN_ON_USE (rint, "rint is unportable - " - "use gnulib module rint for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rintl -# define rintl rpl_rintl -# endif -_GL_FUNCDECL_RPL (rintl, long double, (long double x)); -_GL_CXXALIAS_RPL (rintl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (rintl); -#elif defined GNULIB_POSIXCHECK -# undef rintl -# if HAVE_RAW_DECL_RINTL -_GL_WARN_ON_USE (rintl, "rintl is unportable - " - "use gnulib module rintl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundf -# define roundf rpl_roundf -# endif -_GL_FUNCDECL_RPL (roundf, float, (float x)); -_GL_CXXALIAS_RPL (roundf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIASWARN (roundf); -#elif defined GNULIB_POSIXCHECK -# undef roundf -# if HAVE_RAW_DECL_ROUNDF -_GL_WARN_ON_USE (roundf, "roundf is unportable - " - "use gnulib module roundf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef round -# define round rpl_round -# endif -_GL_FUNCDECL_RPL (round, double, (double x)); -_GL_CXXALIAS_RPL (round, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (round, double, (double x)); -# endif -_GL_CXXALIAS_SYS (round, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (round); -# endif -#elif defined GNULIB_POSIXCHECK -# undef round -# if HAVE_RAW_DECL_ROUND -_GL_WARN_ON_USE (round, "round is unportable - " - "use gnulib module round for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundl -# define roundl rpl_roundl -# endif -_GL_FUNCDECL_RPL (roundl, long double, (long double x)); -_GL_CXXALIAS_RPL (roundl, long double, (long double x)); -# else -# if !1 -# undef roundl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (roundl, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (roundl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (roundl); -#elif defined GNULIB_POSIXCHECK -# undef roundl -# if HAVE_RAW_DECL_ROUNDL -_GL_WARN_ON_USE (roundl, "roundl is unportable - " - "use gnulib module roundl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinf -# define sinf rpl_sinf -# endif -_GL_FUNCDECL_RPL (sinf, float, (float x)); -_GL_CXXALIAS_RPL (sinf, float, (float x)); -# else -# if !1 - # undef sinf -_GL_FUNCDECL_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinf); -#elif defined GNULIB_POSIXCHECK -# undef sinf -# if HAVE_RAW_DECL_SINF -_GL_WARN_ON_USE (sinf, "sinf is unportable - " - "use gnulib module sinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef sinl -_GL_FUNCDECL_SYS (sinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sinl, long double, (long double x)); -_GL_CXXALIASWARN (sinl); -#elif defined GNULIB_POSIXCHECK -# undef sinl -# if HAVE_RAW_DECL_SINL -_GL_WARN_ON_USE (sinl, "sinl is unportable - " - "use gnulib module sinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinhf -# define sinhf rpl_sinhf -# endif -_GL_FUNCDECL_RPL (sinhf, float, (float x)); -_GL_CXXALIAS_RPL (sinhf, float, (float x)); -# else -# if !1 -# undef sinhf -_GL_FUNCDECL_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinhf); -#elif defined GNULIB_POSIXCHECK -# undef sinhf -# if HAVE_RAW_DECL_SINHF -_GL_WARN_ON_USE (sinhf, "sinhf is unportable - " - "use gnulib module sinhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtf -# define sqrtf rpl_sqrtf -# endif -_GL_FUNCDECL_RPL (sqrtf, float, (float x)); -_GL_CXXALIAS_RPL (sqrtf, float, (float x)); -# else -# if !1 -# undef sqrtf -_GL_FUNCDECL_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (sqrtf); -#elif defined GNULIB_POSIXCHECK -# undef sqrtf -# if HAVE_RAW_DECL_SQRTF -_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " - "use gnulib module sqrtf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtl -# define sqrtl rpl_sqrtl -# endif -_GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); -# else -# if !1 || !1 -# undef sqrtl -_GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (sqrtl); -#elif defined GNULIB_POSIXCHECK -# undef sqrtl -# if HAVE_RAW_DECL_SQRTL -_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " - "use gnulib module sqrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanf -# define tanf rpl_tanf -# endif -_GL_FUNCDECL_RPL (tanf, float, (float x)); -_GL_CXXALIAS_RPL (tanf, float, (float x)); -# else -# if !1 -# undef tanf -_GL_FUNCDECL_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanf); -#elif defined GNULIB_POSIXCHECK -# undef tanf -# if HAVE_RAW_DECL_TANF -_GL_WARN_ON_USE (tanf, "tanf is unportable - " - "use gnulib module tanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef tanl -_GL_FUNCDECL_SYS (tanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (tanl, long double, (long double x)); -_GL_CXXALIASWARN (tanl); -#elif defined GNULIB_POSIXCHECK -# undef tanl -# if HAVE_RAW_DECL_TANL -_GL_WARN_ON_USE (tanl, "tanl is unportable - " - "use gnulib module tanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanhf -# define tanhf rpl_tanhf -# endif -_GL_FUNCDECL_RPL (tanhf, float, (float x)); -_GL_CXXALIAS_RPL (tanhf, float, (float x)); -# else -# if !1 -# undef tanhf -_GL_FUNCDECL_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanhf); -#elif defined GNULIB_POSIXCHECK -# undef tanhf -# if HAVE_RAW_DECL_TANHF -_GL_WARN_ON_USE (tanhf, "tanhf is unportable - " - "use gnulib module tanhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncf -# define truncf rpl_truncf -# endif -_GL_FUNCDECL_RPL (truncf, float, (float x)); -_GL_CXXALIAS_RPL (truncf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIASWARN (truncf); -#elif defined GNULIB_POSIXCHECK -# undef truncf -# if HAVE_RAW_DECL_TRUNCF -_GL_WARN_ON_USE (truncf, "truncf is unportable - " - "use gnulib module truncf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef trunc -# define trunc rpl_trunc -# endif -_GL_FUNCDECL_RPL (trunc, double, (double x)); -_GL_CXXALIAS_RPL (trunc, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (trunc, double, (double x)); -# endif -_GL_CXXALIAS_SYS (trunc, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (trunc); -# endif -#elif defined GNULIB_POSIXCHECK -# undef trunc -# if HAVE_RAW_DECL_TRUNC -_GL_WARN_ON_USE (trunc, "trunc is unportable - " - "use gnulib module trunc for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncl -# define truncl rpl_truncl -# endif -_GL_FUNCDECL_RPL (truncl, long double, (long double x)); -_GL_CXXALIAS_RPL (truncl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (truncl); -#elif defined GNULIB_POSIXCHECK -# undef truncl -# if HAVE_RAW_DECL_TRUNCL -_GL_WARN_ON_USE (truncl, "truncl is unportable - " - "use gnulib module truncl for portability"); -# endif -#endif - - -/* Definitions of function-like macros come here, after the function - declarations. */ - - -#if 0 -# if 0 -_GL_EXTERN_C int gl_isfinitef (float x); -_GL_EXTERN_C int gl_isfinited (double x); -_GL_EXTERN_C int gl_isfinitel (long double x); -# undef isfinite -# define isfinite(x) \ - (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ - sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ - gl_isfinitef (x)) -# endif -# ifdef __cplusplus -# if defined isfinite || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) -# undef isfinite -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines isfinite through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) -# define isfinite rpl_isfinite -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isfinite -_GL_WARN_REAL_FLOATING_DECL (isfinite); -# undef isfinite -# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) -# endif -#endif - - -#if 1 -# if 1 -_GL_EXTERN_C int gl_isinff (float x); -_GL_EXTERN_C int gl_isinfd (double x); -_GL_EXTERN_C int gl_isinfl (long double x); -# undef isinf -# define isinf(x) \ - (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ - sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ - gl_isinff (x)) -# endif -# ifdef __cplusplus -# if defined isinf || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) -# undef isinf -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isinf through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) -# define isinf rpl_isinf -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isinf -_GL_WARN_REAL_FLOATING_DECL (isinf); -# undef isinf -# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) -# endif -#endif - - -#if 1 -/* Test for NaN for 'float' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan macro - or (older) isnanf function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) -# elif defined isnan -# undef isnanf -# define isnanf(x) isnan ((float)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanf -# define isnanf rpl_isnanf -_GL_EXTERN_C int isnanf (float x); -# endif -#endif - -#if 1 -/* Test for NaN for 'double' numbers. - This function is a gnulib extension, unlike isnan() which applied only - to 'double' numbers earlier but now is a type-generic macro. */ -# if 1 -/* The original included above provides a declaration of isnan - macro. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnand -# define isnand(x) __builtin_isnan ((double)(x)) -# else -# undef isnand -# define isnand(x) isnan ((double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnand -# define isnand rpl_isnand -_GL_EXTERN_C int isnand (double x); -# endif -#endif - -#if 1 -/* Test for NaN for 'long double' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan - macro or (older) isnanl function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) -# elif defined isnan -# undef isnanl -# define isnanl(x) isnan ((long double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanl -# define isnanl rpl_isnanl -_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; -# endif -#endif - -/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ -#if 1 -# if 1 -/* We can't just use the isnanf macro (e.g.) as exposed by - isnanf.h (e.g.) here, because those may end up being macros - that recursively expand back to isnan. So use the gnulib - replacements for them directly. */ -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) -# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) -# else -_GL_EXTERN_C int rpl_isnanf (float x); -# define gl_isnan_f(x) rpl_isnanf (x) -# endif -# if 1 && __GNUC__ >= 4 -# define gl_isnan_d(x) __builtin_isnan ((double)(x)) -# else -_GL_EXTERN_C int rpl_isnand (double x); -# define gl_isnan_d(x) rpl_isnand (x) -# endif -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) -# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) -# else -_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; -# define gl_isnan_l(x) rpl_isnanl (x) -# endif -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ - sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ - gl_isnan_f (x)) -# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl))) -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ - sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ - __builtin_isnanf ((float)(x))) -# endif -# ifdef __cplusplus -# if defined isnan || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) -# undef isnan -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isnan through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) -# define isnan rpl_isnan -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) -# endif -# endif -# else -/* Ensure isnan is a macro. */ -# ifndef isnan -# define isnan isnan -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isnan -_GL_WARN_REAL_FLOATING_DECL (isnan); -# undef isnan -# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) -# endif -#endif - - -#if 1 -# if (0 \ - && (!defined __cplusplus || __cplusplus < 201103)) -# undef signbit - /* GCC 4.0 and newer provides three built-ins for signbit. */ -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ - sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ - __builtin_signbitf (x)) -# endif -# if 0 && !GNULIB_defined_signbit -# undef signbit -_GL_EXTERN_C int gl_signbitf (float arg); -_GL_EXTERN_C int gl_signbitd (double arg); -_GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ -# define _GL_NUM_UINT_WORDS(type) \ - ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) -# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf -# define gl_signbitf_OPTIMIZED_MACRO -# define gl_signbitf(arg) \ - ({ union { float _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd -# define gl_signbitd_OPTIMIZED_MACRO -# define gl_signbitd(arg) \ - ({ union { double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl -# define gl_signbitl_OPTIMIZED_MACRO -# define gl_signbitl(arg) \ - ({ union { long double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# endif -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ - sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ - gl_signbitf (x)) -# define GNULIB_defined_signbit 1 -# endif -# ifdef __cplusplus -# if defined signbit || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) -# undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines signbit through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) -# define signbit rpl_signbit -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined signbit -_GL_WARN_REAL_FLOATING_DECL (signbit); -# undef signbit -# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) -# endif -#endif - -_GL_INLINE_HEADER_END - -#endif /* _GL_MATH_H */ -#endif /* _GL_MATH_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/stdint.h b/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/stdint.h deleted file mode 100644 index d941efd4d..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/stdint.h +++ /dev/null @@ -1,747 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _GL_STDINT_H - -#if __GNUC__ >= 3 - -#endif - - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#else - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if 1 -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _GL_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#endif - -#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_STDINT_H - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -#include - -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if 1 -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - -#if ! 1 - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h". */ -# if 1 && ! defined _AIX -# include -# endif - -# if 1 - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -# elif 0 - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -# endif - -# if 0 && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -# endif - -# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -/* These are separate macros, because if you try to merge these macros into - a single one, HP-UX cc rejects the resulting expression in constant - expressions. */ -# define _STDINT_UNSIGNED_MIN(bits, zero) \ - (zero) -# define _STDINT_SIGNED_MIN(bits, zero) \ - (~ _STDINT_MAX (1, bits, zero)) - -# define _STDINT_MAX(signed, bits, zero) \ - (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef int8_t -# undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -# define int8_t gl_int8_t -# define uint8_t gl_uint8_t - -# undef int16_t -# undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -# define int16_t gl_int16_t -# define uint16_t gl_uint16_t - -# undef int32_t -# undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -# define int32_t gl_int32_t -# define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -# ifdef INT64_MAX -# define GL_INT64_T -# else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# else -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -# endif - -# ifdef UINT64_MAX -# define GL_UINT64_T -# else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# else -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -# endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -# define _UINT8_T -# define _UINT32_T -# define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef int_least8_t -# undef uint_least8_t -# undef int_least16_t -# undef uint_least16_t -# undef int_least32_t -# undef uint_least32_t -# undef int_least64_t -# undef uint_least64_t -# define int_least8_t int8_t -# define uint_least8_t uint8_t -# define int_least16_t int16_t -# define uint_least16_t uint16_t -# define int_least32_t int32_t -# define uint_least32_t uint32_t -# ifdef GL_INT64_T -# define int_least64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_least64_t uint64_t -# endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -# undef int_fast8_t -# undef uint_fast8_t -# undef int_fast16_t -# undef uint_fast16_t -# undef int_fast32_t -# undef uint_fast32_t -# undef int_fast64_t -# undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -# ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -# else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -# endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -# define int_fast8_t gl_int_fast8_t -# define uint_fast8_t gl_uint_fast8_t -# define int_fast16_t gl_int_fast16_t -# define uint_fast16_t gl_uint_fast16_t -# define int_fast32_t gl_int_fast32_t -# define uint_fast32_t gl_uint_fast32_t -# ifdef GL_INT64_T -# define int_fast64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -# endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -/* kLIBC's defines _INTPTR_T_DECLARED and needs its own - definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and - uintptr_t to avoid conflicting declarations of system functions like - _findclose in . */ -# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) -# undef intptr_t -# undef uintptr_t -# ifdef _WIN64 -typedef long long int gl_intptr_t; -typedef unsigned long long int gl_uintptr_t; -# else -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -# endif -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t -# endif - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -# ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -# endif - -# ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -# endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -# define GNULIB_defined_stdint_types 1 -# endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef INT8_MIN -# undef INT8_MAX -# undef UINT8_MAX -# define INT8_MIN (~ INT8_MAX) -# define INT8_MAX 127 -# define UINT8_MAX 255 - -# undef INT16_MIN -# undef INT16_MAX -# undef UINT16_MAX -# define INT16_MIN (~ INT16_MAX) -# define INT16_MAX 32767 -# define UINT16_MAX 65535 - -# undef INT32_MIN -# undef INT32_MAX -# undef UINT32_MAX -# define INT32_MIN (~ INT32_MAX) -# define INT32_MAX 2147483647 -# define UINT32_MAX 4294967295U - -# if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -# endif - -# if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -# endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef INT_LEAST8_MIN -# undef INT_LEAST8_MAX -# undef UINT_LEAST8_MAX -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST8_MAX INT8_MAX -# define UINT_LEAST8_MAX UINT8_MAX - -# undef INT_LEAST16_MIN -# undef INT_LEAST16_MAX -# undef UINT_LEAST16_MAX -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST16_MAX INT16_MAX -# define UINT_LEAST16_MAX UINT16_MAX - -# undef INT_LEAST32_MIN -# undef INT_LEAST32_MAX -# undef UINT_LEAST32_MAX -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST32_MAX INT32_MAX -# define UINT_LEAST32_MAX UINT32_MAX - -# undef INT_LEAST64_MIN -# undef INT_LEAST64_MAX -# ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -# endif - -# undef UINT_LEAST64_MAX -# ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -# undef INT_FAST8_MIN -# undef INT_FAST8_MAX -# undef UINT_FAST8_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define UINT_FAST8_MAX UCHAR_MAX - -# undef INT_FAST16_MIN -# undef INT_FAST16_MAX -# undef UINT_FAST16_MAX -# define INT_FAST16_MIN INT_FAST32_MIN -# define INT_FAST16_MAX INT_FAST32_MAX -# define UINT_FAST16_MAX UINT_FAST32_MAX - -# undef INT_FAST32_MIN -# undef INT_FAST32_MAX -# undef UINT_FAST32_MAX -# ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -# else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -# endif - -# undef INT_FAST64_MIN -# undef INT_FAST64_MAX -# ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -# endif - -# undef UINT_FAST64_MAX -# ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -# undef INTPTR_MIN -# undef INTPTR_MAX -# undef UINTPTR_MAX -# ifdef _WIN64 -# define INTPTR_MIN LLONG_MIN -# define INTPTR_MAX LLONG_MAX -# define UINTPTR_MAX ULLONG_MAX -# else -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX -# endif - -/* 7.18.2.5. Limits of greatest-width integer types */ - -# ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -# endif - -# ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -# endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -# undef PTRDIFF_MIN -# undef PTRDIFF_MAX -# if 0 -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -# else -# define PTRDIFF_MIN \ - _STDINT_SIGNED_MIN (, 0) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, , 0) -# endif - -/* sig_atomic_t limits */ -# undef SIG_ATOMIC_MIN -# undef SIG_ATOMIC_MAX -# if -# define SIG_ATOMIC_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define SIG_ATOMIC_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define SIG_ATOMIC_MAX \ - _STDINT_MAX (, , \ - 0) - - -/* size_t limit */ -# undef SIZE_MAX -# if 0 -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -# else -# define SIZE_MAX _STDINT_MAX (0, , 0) -# endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -# if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# endif -# undef WCHAR_MIN -# undef WCHAR_MAX -# if -# define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WCHAR_MAX \ - _STDINT_MAX (, , 0) - -/* wint_t limits */ -/* If gnulib's or overrides wint_t, is not - accurate, therefore use the definitions from above. */ -# if !1 -# undef WINT_MIN -# undef WINT_MAX -# if -# define WINT_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WINT_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WINT_MAX \ - _STDINT_MAX (, , 0) -# endif - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -# undef INT8_C -# undef UINT8_C -# define INT8_C(x) x -# define UINT8_C(x) x - -# undef INT16_C -# undef UINT16_C -# define INT16_C(x) x -# define UINT16_C(x) x - -# undef INT32_C -# undef UINT32_C -# define INT32_C(x) x -# define UINT32_C(x) x ## U - -# undef INT64_C -# undef UINT64_C -# if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -# elif defined _MSC_VER -# define INT64_C(x) x##i64 -# else -# define INT64_C(x) x##LL -# endif -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -# elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -# else -# define UINT64_C(x) x##ULL -# endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -# ifndef INTMAX_C -# if LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -# endif - -# ifndef UINTMAX_C -# if ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -# endif - -#endif /* !1 */ - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (!defined UINTMAX_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# ifdef INT8_MAX -# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -# endif -# ifdef UINT8_MAX -# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -# endif -# ifdef INT16_MAX -# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -# endif -# ifdef UINT16_MAX -# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -# endif -# ifdef INT32_MAX -# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -# endif -# ifdef UINT32_MAX -# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -# endif -# ifdef INT64_MAX -# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -# endif -# ifdef UINT64_MAX -# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -# endif -# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -# ifdef WINT_MAX -# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -# endif -# ifdef SIG_ATOMIC_MAX -# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -# endif -#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _GL_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/stdio.h b/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/stdio.h deleted file mode 100644 index 05d9f0778..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/gnulib-lib/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_STDIO_H -#define _GL_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 1 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 1 -# if !1 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 0 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 1 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 1 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 0 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 1 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !0 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_STDIO_H */ -#endif /* _GL_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/libgettextpo/stdint.h b/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/libgettextpo/stdint.h deleted file mode 100644 index ac35be0a0..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/libgettextpo/stdint.h +++ /dev/null @@ -1,747 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _GL_GTPO_STDINT_H - -#if __GNUC__ >= 3 - -#endif - - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#else - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if 1 -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _GL_GTPO_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h" -#endif - -#if ! defined _GL_GTPO_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_GTPO_STDINT_H - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -#include - -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if 1 -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - -#if ! 1 - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdint.h". */ -# if 1 && ! defined _AIX -# include -# endif - -# if 1 - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -# elif 0 - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -# endif - -# if 0 && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -# endif - -# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -/* These are separate macros, because if you try to merge these macros into - a single one, HP-UX cc rejects the resulting expression in constant - expressions. */ -# define _STDINT_UNSIGNED_MIN(bits, zero) \ - (zero) -# define _STDINT_SIGNED_MIN(bits, zero) \ - (~ _STDINT_MAX (1, bits, zero)) - -# define _STDINT_MAX(signed, bits, zero) \ - (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef int8_t -# undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -# define int8_t gl_int8_t -# define uint8_t gl_uint8_t - -# undef int16_t -# undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -# define int16_t gl_int16_t -# define uint16_t gl_uint16_t - -# undef int32_t -# undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -# define int32_t gl_int32_t -# define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -# ifdef INT64_MAX -# define GL_INT64_T -# else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# else -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -# endif - -# ifdef UINT64_MAX -# define GL_UINT64_T -# else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# else -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -# endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -# define _UINT8_T -# define _UINT32_T -# define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef int_least8_t -# undef uint_least8_t -# undef int_least16_t -# undef uint_least16_t -# undef int_least32_t -# undef uint_least32_t -# undef int_least64_t -# undef uint_least64_t -# define int_least8_t int8_t -# define uint_least8_t uint8_t -# define int_least16_t int16_t -# define uint_least16_t uint16_t -# define int_least32_t int32_t -# define uint_least32_t uint32_t -# ifdef GL_INT64_T -# define int_least64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_least64_t uint64_t -# endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -# undef int_fast8_t -# undef uint_fast8_t -# undef int_fast16_t -# undef uint_fast16_t -# undef int_fast32_t -# undef uint_fast32_t -# undef int_fast64_t -# undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -# ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -# else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -# endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -# define int_fast8_t gl_int_fast8_t -# define uint_fast8_t gl_uint_fast8_t -# define int_fast16_t gl_int_fast16_t -# define uint_fast16_t gl_uint_fast16_t -# define int_fast32_t gl_int_fast32_t -# define uint_fast32_t gl_uint_fast32_t -# ifdef GL_INT64_T -# define int_fast64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -# endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -/* kLIBC's defines _INTPTR_T_DECLARED and needs its own - definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and - uintptr_t to avoid conflicting declarations of system functions like - _findclose in . */ -# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) -# undef intptr_t -# undef uintptr_t -# ifdef _WIN64 -typedef long long int gl_intptr_t; -typedef unsigned long long int gl_uintptr_t; -# else -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -# endif -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t -# endif - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -# ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -# endif - -# ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -# endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -# define GNULIB_defined_stdint_types 1 -# endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef INT8_MIN -# undef INT8_MAX -# undef UINT8_MAX -# define INT8_MIN (~ INT8_MAX) -# define INT8_MAX 127 -# define UINT8_MAX 255 - -# undef INT16_MIN -# undef INT16_MAX -# undef UINT16_MAX -# define INT16_MIN (~ INT16_MAX) -# define INT16_MAX 32767 -# define UINT16_MAX 65535 - -# undef INT32_MIN -# undef INT32_MAX -# undef UINT32_MAX -# define INT32_MIN (~ INT32_MAX) -# define INT32_MAX 2147483647 -# define UINT32_MAX 4294967295U - -# if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -# endif - -# if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -# endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef INT_LEAST8_MIN -# undef INT_LEAST8_MAX -# undef UINT_LEAST8_MAX -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST8_MAX INT8_MAX -# define UINT_LEAST8_MAX UINT8_MAX - -# undef INT_LEAST16_MIN -# undef INT_LEAST16_MAX -# undef UINT_LEAST16_MAX -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST16_MAX INT16_MAX -# define UINT_LEAST16_MAX UINT16_MAX - -# undef INT_LEAST32_MIN -# undef INT_LEAST32_MAX -# undef UINT_LEAST32_MAX -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST32_MAX INT32_MAX -# define UINT_LEAST32_MAX UINT32_MAX - -# undef INT_LEAST64_MIN -# undef INT_LEAST64_MAX -# ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -# endif - -# undef UINT_LEAST64_MAX -# ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -# undef INT_FAST8_MIN -# undef INT_FAST8_MAX -# undef UINT_FAST8_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define UINT_FAST8_MAX UCHAR_MAX - -# undef INT_FAST16_MIN -# undef INT_FAST16_MAX -# undef UINT_FAST16_MAX -# define INT_FAST16_MIN INT_FAST32_MIN -# define INT_FAST16_MAX INT_FAST32_MAX -# define UINT_FAST16_MAX UINT_FAST32_MAX - -# undef INT_FAST32_MIN -# undef INT_FAST32_MAX -# undef UINT_FAST32_MAX -# ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -# else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -# endif - -# undef INT_FAST64_MIN -# undef INT_FAST64_MAX -# ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -# endif - -# undef UINT_FAST64_MAX -# ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -# undef INTPTR_MIN -# undef INTPTR_MAX -# undef UINTPTR_MAX -# ifdef _WIN64 -# define INTPTR_MIN LLONG_MIN -# define INTPTR_MAX LLONG_MAX -# define UINTPTR_MAX ULLONG_MAX -# else -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX -# endif - -/* 7.18.2.5. Limits of greatest-width integer types */ - -# ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -# endif - -# ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -# endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -# undef PTRDIFF_MIN -# undef PTRDIFF_MAX -# if 0 -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -# else -# define PTRDIFF_MIN \ - _STDINT_SIGNED_MIN (, 0) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, , 0) -# endif - -/* sig_atomic_t limits */ -# undef SIG_ATOMIC_MIN -# undef SIG_ATOMIC_MAX -# if -# define SIG_ATOMIC_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define SIG_ATOMIC_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define SIG_ATOMIC_MAX \ - _STDINT_MAX (, , \ - 0) - - -/* size_t limit */ -# undef SIZE_MAX -# if 0 -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -# else -# define SIZE_MAX _STDINT_MAX (0, , 0) -# endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -# if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# endif -# undef WCHAR_MIN -# undef WCHAR_MAX -# if -# define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WCHAR_MAX \ - _STDINT_MAX (, , 0) - -/* wint_t limits */ -/* If gnulib's or overrides wint_t, is not - accurate, therefore use the definitions from above. */ -# if !1 -# undef WINT_MIN -# undef WINT_MAX -# if -# define WINT_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WINT_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WINT_MAX \ - _STDINT_MAX (, , 0) -# endif - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -# undef INT8_C -# undef UINT8_C -# define INT8_C(x) x -# define UINT8_C(x) x - -# undef INT16_C -# undef UINT16_C -# define INT16_C(x) x -# define UINT16_C(x) x - -# undef INT32_C -# undef UINT32_C -# define INT32_C(x) x -# define UINT32_C(x) x ## U - -# undef INT64_C -# undef UINT64_C -# if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -# elif defined _MSC_VER -# define INT64_C(x) x##i64 -# else -# define INT64_C(x) x##LL -# endif -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -# elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -# else -# define UINT64_C(x) x##ULL -# endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -# ifndef INTMAX_C -# if LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -# endif - -# ifndef UINTMAX_C -# if ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -# endif - -#endif /* !1 */ - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (!defined UINTMAX_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# ifdef INT8_MAX -# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -# endif -# ifdef UINT8_MAX -# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -# endif -# ifdef INT16_MAX -# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -# endif -# ifdef UINT16_MAX -# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -# endif -# ifdef INT32_MAX -# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -# endif -# ifdef UINT32_MAX -# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -# endif -# ifdef INT64_MAX -# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -# endif -# ifdef UINT64_MAX -# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -# endif -# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -# ifdef WINT_MAX -# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -# endif -# ifdef SIG_ATOMIC_MAX -# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -# endif -#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _GL_GTPO_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _GL_GTPO_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/libgettextpo/stdio.h b/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/libgettextpo/stdio.h deleted file mode 100644 index 10d2d3741..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/gettext-tools/libgettextpo/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_GTPO_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_GTPO_STDIO_H -#define _GL_GTPO_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 1 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 1 -# if !1 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 0 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 1 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 1 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 0 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 1 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !0 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_GTPO_STDIO_H */ -#endif /* _GL_GTPO_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/config.h b/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/config.h deleted file mode 100644 index cd58dba0f..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/config.h +++ /dev/null @@ -1,1456 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if you wish *printf() functions that have a safe handling of - non-IEEE-754 'long double' values. */ -#define CHECK_PRINTF_SAFE 1 - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'double'. */ -#define DBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'double'. */ -#define DBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_WORD */ - -/* Define to 1 if // is a file system root distinct from /. */ -#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'float'. */ -#define FLT_EXPBIT0_BIT 23 - -/* Define as the word index where to find the exponent of 'float'. */ -#define FLT_EXPBIT0_WORD 0 - -/* Define as the bit index in the word where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_WORD */ - -/* Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday. */ -#define GETTIMEOFDAY_TIMEZONE void - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module snprintf shall be considered present. */ -#define GNULIB_SNPRINTF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module frexp should be tested. */ -#define GNULIB_TEST_FREXP 1 - -/* Define to 1 when the gnulib module frexpl should be tested. */ -#define GNULIB_TEST_FREXPL 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module fsync should be tested. */ -#define GNULIB_TEST_FSYNC 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module gethostname should be tested. */ -#define GNULIB_TEST_GETHOSTNAME 1 - -/* Define to 1 when the gnulib module gettimeofday should be tested. */ -#define GNULIB_TEST_GETTIMEOFDAY 1 - -/* Define to 1 when the gnulib module isatty should be tested. */ -#define GNULIB_TEST_ISATTY 1 - -/* Define to 1 when the gnulib module isinf should be tested. */ -#define GNULIB_TEST_ISINF 1 - -/* Define to 1 when the gnulib module isnan should be tested. */ -#define GNULIB_TEST_ISNAN 1 - -/* Define to 1 when the gnulib module isnand should be tested. */ -#define GNULIB_TEST_ISNAND 1 - -/* Define to 1 when the gnulib module isnanf should be tested. */ -#define GNULIB_TEST_ISNANF 1 - -/* Define to 1 when the gnulib module isnanl should be tested. */ -#define GNULIB_TEST_ISNANL 1 - -/* Define to 1 when the gnulib module log10 should be tested. */ -#define GNULIB_TEST_LOG10 1 - -/* Define to 1 when the gnulib module malloc-posix should be tested. */ -#define GNULIB_TEST_MALLOC_POSIX 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module read should be tested. */ -#define GNULIB_TEST_READ 1 - -/* Define to 1 when the gnulib module sigaction should be tested. */ -#define GNULIB_TEST_SIGACTION 1 - -/* Define to 1 when the gnulib module signbit should be tested. */ -#define GNULIB_TEST_SIGNBIT 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module snprintf should be tested. */ -#define GNULIB_TEST_SNPRINTF 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module stpcpy should be tested. */ -#define GNULIB_TEST_STPCPY 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module vasprintf should be tested. */ -#define GNULIB_TEST_VASPRINTF 1 - -/* Define to 1 when the gnulib module vsnprintf should be tested. */ -#define GNULIB_TEST_VSNPRINTF 1 - -/* Define to 1 when the gnulib module write should be tested. */ -#define GNULIB_TEST_WRITE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUC 1 - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_NAMESER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define if the copysignf function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNF_IN_LIBC */ - -/* Define if the copysignl function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNL_IN_LIBC */ - -/* Define if the copysign function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGN_IN_LIBC */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. - */ -#define HAVE_DECL_ALARM 0 - -/* Define to 1 if you have the declaration of `copysign', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGN */ - -/* Define to 1 if you have the declaration of `copysignf', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNF */ - -/* Define to 1 if you have the declaration of `copysignl', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNL */ - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. - */ -#define HAVE_DECL_ISINF 1 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `snprintf', and to 0 if you - don't. */ -#define HAVE_DECL_SNPRINTF 0 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VSNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define if the frexpl function is available in libc. */ -/* #undef HAVE_FREXPL_IN_LIBC */ - -/* Define if the frexp function is available in libc. */ -/* #undef HAVE_FREXP_IN_LIBC */ - -/* Define to 1 if you have the `fsync' function. */ -/* #undef HAVE_FSYNC */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `gethostname' function. */ -/* #undef HAVE_GETHOSTNAME */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define to 1 if you have the `getsid' function. */ -/* #undef HAVE_GETSID */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define if the isnan(double) function is available in libc. */ -#define HAVE_ISNAND_IN_LIBC 1 - -/* Define if the isnan(float) function is available in libc. */ -/* #undef HAVE_ISNANF_IN_LIBC */ - -/* Define if the isnan(long double) function is available in libc. */ -/* #undef HAVE_ISNANL_IN_LIBC */ - -/* Define if the ldexpl function is available in libc. */ -#define HAVE_LDEXPL_IN_LIBC 1 - -/* Define if the ldexp function is available in libc. */ -#define HAVE_LDEXP_IN_LIBC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `localtime' function. */ -#define HAVE_LOCALTIME 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define if the 'malloc' function is POSIX compliant. */ -/* #undef HAVE_MALLOC_POSIX */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_LIMITS_H */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_SYS_PARAM_H */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETDB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_H */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -/* #undef HAVE_NL_LANGINFO */ - -/* Define to 1 if the system has obstacks that work with any size object. */ -/* #undef HAVE_OBSTACK */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RESOLV_H */ - -/* Define to 1 if 'long double' and 'double' have the same representation. */ -#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1 - -/* Define to 1 if the system has the type `sa_family_t'. */ -/* #undef HAVE_SA_FAMILY_T */ - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `shutdown' function. */ -/* #undef HAVE_SHUTDOWN */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if you have the `sigaltstack' function. */ -/* #undef HAVE_SIGALTSTACK */ - -/* Define to 1 if the system has the type `siginfo_t'. */ -/* #undef HAVE_SIGINFO_T */ - -/* Define to 1 if you have the `siginterrupt' function. */ -/* #undef HAVE_SIGINTERRUPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if the system has the type `sig_atomic_t'. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the return value of the snprintf function is the number of of - bytes (excluding the terminating NUL) that would have been produced if the - buffer had been large enough. */ -/* #undef HAVE_SNPRINTF_RETVAL_C99 */ - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ -/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ - -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UIO_H */ - -/* Define to 1 if you have the `tcdrain' function. */ -/* #undef HAVE_TCDRAIN */ - -/* Define to 1 if you have the `tcgetattr' function. */ -/* #undef HAVE_TCGETATTR */ - -/* Define if tgetent(), tgetnum(), tgetstr(), tgetflag() are among the termcap - library functions. */ -/* #undef HAVE_TERMCAP */ - -/* Define if setupterm(), tigetnum(), tigetstr(), tigetflag() are among the - termcap library functions. */ -/* #undef HAVE_TERMINFO */ - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define if tparam() is among the termcap library functions. */ -/* #undef HAVE_TPARAM */ - -/* Define to 1 if you have the `uname' function. */ -/* #undef HAVE_UNAME */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if the system has the type 'unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 if you have the `vasnprintf' function. */ -/* #undef HAVE_VASNPRINTF */ - -/* Define to 1 if you have the `vasprintf' function. */ -/* #undef HAVE_VASPRINTF */ - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -/* #undef HAVE_WCSLEN */ - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_WS2TCPIP_H 1 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define HOST_NAME_MAX when does not define it. */ -#define HOST_NAME_MAX 256 - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to 1 if the C compiler is actually a C++ compiler. */ -/* #undef IS_CPLUSPLUS */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'long double'. */ -#define LDBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'long double'. */ -#define LDBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'long - double'. */ -/* #undef LDBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'long double'. */ -/* #undef LDBL_SIGNBIT_WORD */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define if the vasnprintf implementation needs special code for the 'a' and - 'A' directives. */ -#define NEED_PRINTF_DIRECTIVE_A 1 - -/* Define if the vasnprintf implementation needs special code for the 'F' - directive. */ -#define NEED_PRINTF_DIRECTIVE_F 1 - -/* Define if the vasnprintf implementation needs special code for the 'ls' - directive. */ -/* #undef NEED_PRINTF_DIRECTIVE_LS */ - -/* Define if the vasnprintf implementation needs special code for 'double' - arguments. */ -#define NEED_PRINTF_DOUBLE 1 - -/* Define if the vasnprintf implementation needs special code for surviving - out-of-memory conditions. */ -#define NEED_PRINTF_ENOMEM 1 - -/* Define if the vasnprintf implementation needs special code for the ' flag. - */ -#define NEED_PRINTF_FLAG_GROUPING 1 - -/* Define if the vasnprintf implementation needs special code for the '-' - flag. */ -/* #undef NEED_PRINTF_FLAG_LEFTADJUST */ - -/* Define if the vasnprintf implementation needs special code for the 0 flag. - */ -#define NEED_PRINTF_FLAG_ZERO 1 - -/* Define if the vasnprintf implementation needs special code for infinite - 'double' arguments. */ -#define NEED_PRINTF_INFINITE_DOUBLE 1 - -/* Define if the vasnprintf implementation needs special code for infinite - 'long double' arguments. */ -/* #undef NEED_PRINTF_INFINITE_LONG_DOUBLE */ - -/* Define if the vasnprintf implementation needs special code for 'long - double' arguments. */ -#define NEED_PRINTF_LONG_DOUBLE 1 - -/* Define if the vasnprintf implementation needs special code for supporting - large precisions without arbitrary bounds. */ -#define NEED_PRINTF_UNBOUNDED_PRECISION 1 - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "libtextstyle" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define if vasnprintf exists but is overridden by gnulib. */ -/* #undef REPLACE_VASNPRINTF */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Define to a working va_copy macro or replacement. */ -#define VA_COPY va_copy - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define if WSAStartup is needed. */ -#define WINDOWS_SOCKETS 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 in order to get the POSIX compatible declarations of socket - functions. */ -/* #undef _POSIX_PII_SOCKET */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b)) - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Define to long or long long if and don't define. */ -/* #undef intmax_t */ - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define as an integer type suitable for memory locations that can be - accessed atomically even in the presence of asynchronous signals. */ -/* #undef sig_atomic_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* type to use in place of socklen_t if not defined */ -/* #undef socklen_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define as a macro for copying va_list variables. */ -/* #undef va_copy */ - - -/* In order to define all the symbols declared by textstyle.h, do not use - 'inline' functions, even when the compiler would support them. */ -#include "notinline.h" - -/* Ignore DLL_VARIABLE markup that is meant for gettext. */ -#define DLL_VARIABLE - -/* Get LIBTEXTSTYLE_DLL_VARIABLE. */ -#include "textstyle/woe32dll.h" - diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/config.h b/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/config.h deleted file mode 100644 index bd5668611..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/config.h +++ /dev/null @@ -1,1250 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#ifndef LIBTEXTSTYLE_CONFIG_H -#define LIBTEXTSTYLE_CONFIG_H - -#include "../config.h" - -#endif /* LIBTEXTSTYLE_CONFIG_H */ -#define isatty libtextstyle_isatty -#define __oldXMLWDcompatibility libtextstyle___oldXMLWDcompatibility -#define __xmlBufferAllocScheme libtextstyle___xmlBufferAllocScheme -#define __xmlDefaultBufferSize libtextstyle___xmlDefaultBufferSize -#define __xmlDefaultSAXLocator libtextstyle___xmlDefaultSAXLocator -#define __xmlDeregisterNodeDefaultValue libtextstyle___xmlDeregisterNodeDefaultValue -#define __xmlDoValidityCheckingDefaultValue libtextstyle___xmlDoValidityCheckingDefaultValue -#define __xmlErrEncoding libtextstyle___xmlErrEncoding -#define __xmlGenericError libtextstyle___xmlGenericError -#define __xmlGenericErrorContext libtextstyle___xmlGenericErrorContext -#define __xmlGetWarningsDefaultValue libtextstyle___xmlGetWarningsDefaultValue -#define __xmlGlobalInitMutexDestroy libtextstyle___xmlGlobalInitMutexDestroy -#define __xmlGlobalInitMutexLock libtextstyle___xmlGlobalInitMutexLock -#define __xmlGlobalInitMutexUnlock libtextstyle___xmlGlobalInitMutexUnlock -#define __xmlIOErr libtextstyle___xmlIOErr -#define __xmlIndentTreeOutput libtextstyle___xmlIndentTreeOutput -#define __xmlInitializeDict libtextstyle___xmlInitializeDict -#define __xmlKeepBlanksDefaultValue libtextstyle___xmlKeepBlanksDefaultValue -#define __xmlLastError libtextstyle___xmlLastError -#define __xmlLineNumbersDefaultValue libtextstyle___xmlLineNumbersDefaultValue -#define __xmlLoadExtDtdDefaultValue libtextstyle___xmlLoadExtDtdDefaultValue -#define __xmlLoaderErr libtextstyle___xmlLoaderErr -#define __xmlOutputBufferCreateFilenameValue libtextstyle___xmlOutputBufferCreateFilenameValue -#define __xmlParserDebugEntities libtextstyle___xmlParserDebugEntities -#define __xmlParserInputBufferCreateFilename libtextstyle___xmlParserInputBufferCreateFilename -#define __xmlParserInputBufferCreateFilenameValue libtextstyle___xmlParserInputBufferCreateFilenameValue -#define __xmlParserVersion libtextstyle___xmlParserVersion -#define __xmlPedanticParserDefaultValue libtextstyle___xmlPedanticParserDefaultValue -#define __xmlRaiseError libtextstyle___xmlRaiseError -#define __xmlRegisterCallbacks libtextstyle___xmlRegisterCallbacks -#define __xmlRegisterNodeDefaultValue libtextstyle___xmlRegisterNodeDefaultValue -#define __xmlSaveNoEmptyTags libtextstyle___xmlSaveNoEmptyTags -#define __xmlSimpleError libtextstyle___xmlSimpleError -#define __xmlStructuredError libtextstyle___xmlStructuredError -#define __xmlStructuredErrorContext libtextstyle___xmlStructuredErrorContext -#define __xmlSubstituteEntitiesDefaultValue libtextstyle___xmlSubstituteEntitiesDefaultValue -#define __xmlTreeIndentString libtextstyle___xmlTreeIndentString -#define activate_term_non_default_mode libtextstyle_activate_term_non_default_mode -#define activate_term_style_controller libtextstyle_activate_term_style_controller -#define at_fatal_signal libtextstyle_at_fatal_signal -#define base_len libtextstyle_base_len -#define block_fatal_signals libtextstyle_block_fatal_signals -#define c_strcasecmp libtextstyle_c_strcasecmp -#define c_strncasecmp libtextstyle_c_strncasecmp -#define concatenated_filename libtextstyle_concatenated_filename -#define cr_additional_sel_append libtextstyle_cr_additional_sel_append -#define cr_additional_sel_destroy libtextstyle_cr_additional_sel_destroy -#define cr_additional_sel_dump libtextstyle_cr_additional_sel_dump -#define cr_additional_sel_new libtextstyle_cr_additional_sel_new -#define cr_additional_sel_new_with_type libtextstyle_cr_additional_sel_new_with_type -#define cr_additional_sel_one_to_string libtextstyle_cr_additional_sel_one_to_string -#define cr_additional_sel_prepend libtextstyle_cr_additional_sel_prepend -#define cr_additional_sel_set_attr_sel libtextstyle_cr_additional_sel_set_attr_sel -#define cr_additional_sel_set_class_name libtextstyle_cr_additional_sel_set_class_name -#define cr_additional_sel_set_id_name libtextstyle_cr_additional_sel_set_id_name -#define cr_additional_sel_set_pseudo libtextstyle_cr_additional_sel_set_pseudo -#define cr_additional_sel_to_string libtextstyle_cr_additional_sel_to_string -#define cr_attr_sel_append_attr_sel libtextstyle_cr_attr_sel_append_attr_sel -#define cr_attr_sel_destroy libtextstyle_cr_attr_sel_destroy -#define cr_attr_sel_dump libtextstyle_cr_attr_sel_dump -#define cr_attr_sel_new libtextstyle_cr_attr_sel_new -#define cr_attr_sel_prepend_attr_sel libtextstyle_cr_attr_sel_prepend_attr_sel -#define cr_attr_sel_to_string libtextstyle_cr_attr_sel_to_string -#define cr_cascade_destroy libtextstyle_cr_cascade_destroy -#define cr_cascade_get_sheet libtextstyle_cr_cascade_get_sheet -#define cr_cascade_new libtextstyle_cr_cascade_new -#define cr_cascade_ref libtextstyle_cr_cascade_ref -#define cr_cascade_set_sheet libtextstyle_cr_cascade_set_sheet -#define cr_cascade_unref libtextstyle_cr_cascade_unref -#define cr_declaration_append libtextstyle_cr_declaration_append -#define cr_declaration_append2 libtextstyle_cr_declaration_append2 -#define cr_declaration_destroy libtextstyle_cr_declaration_destroy -#define cr_declaration_dump libtextstyle_cr_declaration_dump -#define cr_declaration_dump_one libtextstyle_cr_declaration_dump_one -#define cr_declaration_get_by_prop_name libtextstyle_cr_declaration_get_by_prop_name -#define cr_declaration_get_from_list libtextstyle_cr_declaration_get_from_list -#define cr_declaration_list_to_string libtextstyle_cr_declaration_list_to_string -#define cr_declaration_list_to_string2 libtextstyle_cr_declaration_list_to_string2 -#define cr_declaration_new libtextstyle_cr_declaration_new -#define cr_declaration_nr_props libtextstyle_cr_declaration_nr_props -#define cr_declaration_parse_from_buf libtextstyle_cr_declaration_parse_from_buf -#define cr_declaration_parse_list_from_buf libtextstyle_cr_declaration_parse_list_from_buf -#define cr_declaration_prepend libtextstyle_cr_declaration_prepend -#define cr_declaration_ref libtextstyle_cr_declaration_ref -#define cr_declaration_to_string libtextstyle_cr_declaration_to_string -#define cr_declaration_unlink libtextstyle_cr_declaration_unlink -#define cr_declaration_unref libtextstyle_cr_declaration_unref -#define cr_doc_handler_associate_a_parser libtextstyle_cr_doc_handler_associate_a_parser -#define cr_doc_handler_destroy libtextstyle_cr_doc_handler_destroy -#define cr_doc_handler_get_ctxt libtextstyle_cr_doc_handler_get_ctxt -#define cr_doc_handler_get_result libtextstyle_cr_doc_handler_get_result -#define cr_doc_handler_new libtextstyle_cr_doc_handler_new -#define cr_doc_handler_ref libtextstyle_cr_doc_handler_ref -#define cr_doc_handler_set_ctxt libtextstyle_cr_doc_handler_set_ctxt -#define cr_doc_handler_set_default_sac_handler libtextstyle_cr_doc_handler_set_default_sac_handler -#define cr_doc_handler_set_result libtextstyle_cr_doc_handler_set_result -#define cr_doc_handler_unref libtextstyle_cr_doc_handler_unref -#define cr_enc_handler_convert_input libtextstyle_cr_enc_handler_convert_input -#define cr_enc_handler_get_instance libtextstyle_cr_enc_handler_get_instance -#define cr_enc_handler_resolve_enc_alias libtextstyle_cr_enc_handler_resolve_enc_alias -#define cr_font_family_append libtextstyle_cr_font_family_append -#define cr_font_family_destroy libtextstyle_cr_font_family_destroy -#define cr_font_family_new libtextstyle_cr_font_family_new -#define cr_font_family_prepend libtextstyle_cr_font_family_prepend -#define cr_font_family_set_name libtextstyle_cr_font_family_set_name -#define cr_font_family_to_string libtextstyle_cr_font_family_to_string -#define cr_font_size_adjust_destroy libtextstyle_cr_font_size_adjust_destroy -#define cr_font_size_adjust_new libtextstyle_cr_font_size_adjust_new -#define cr_font_size_adjust_to_string libtextstyle_cr_font_size_adjust_to_string -#define cr_font_size_clear libtextstyle_cr_font_size_clear -#define cr_font_size_copy libtextstyle_cr_font_size_copy -#define cr_font_size_destroy libtextstyle_cr_font_size_destroy -#define cr_font_size_get_larger_predefined_font_size libtextstyle_cr_font_size_get_larger_predefined_font_size -#define cr_font_size_get_smaller_predefined_font_size libtextstyle_cr_font_size_get_smaller_predefined_font_size -#define cr_font_size_is_predefined_absolute_font_size libtextstyle_cr_font_size_is_predefined_absolute_font_size -#define cr_font_size_is_set_to_inherit libtextstyle_cr_font_size_is_set_to_inherit -#define cr_font_size_new libtextstyle_cr_font_size_new -#define cr_font_size_set_absolute_font_size libtextstyle_cr_font_size_set_absolute_font_size -#define cr_font_size_set_predefined_absolute_font_size libtextstyle_cr_font_size_set_predefined_absolute_font_size -#define cr_font_size_set_relative_font_size libtextstyle_cr_font_size_set_relative_font_size -#define cr_font_size_set_to_inherit libtextstyle_cr_font_size_set_to_inherit -#define cr_font_size_to_string libtextstyle_cr_font_size_to_string -#define cr_font_stretch_to_string libtextstyle_cr_font_stretch_to_string -#define cr_font_style_to_string libtextstyle_cr_font_style_to_string -#define cr_font_variant_to_string libtextstyle_cr_font_variant_to_string -#define cr_font_weight_get_bolder libtextstyle_cr_font_weight_get_bolder -#define cr_font_weight_to_string libtextstyle_cr_font_weight_to_string -#define cr_input_consume_char libtextstyle_cr_input_consume_char -#define cr_input_consume_chars libtextstyle_cr_input_consume_chars -#define cr_input_consume_white_spaces libtextstyle_cr_input_consume_white_spaces -#define cr_input_destroy libtextstyle_cr_input_destroy -#define cr_input_end_of_input libtextstyle_cr_input_end_of_input -#define cr_input_get_byte_addr libtextstyle_cr_input_get_byte_addr -#define cr_input_get_column_num libtextstyle_cr_input_get_column_num -#define cr_input_get_cur_byte_addr libtextstyle_cr_input_get_cur_byte_addr -#define cr_input_get_cur_index libtextstyle_cr_input_get_cur_index -#define cr_input_get_cur_pos libtextstyle_cr_input_get_cur_pos -#define cr_input_get_end_of_file libtextstyle_cr_input_get_end_of_file -#define cr_input_get_end_of_line libtextstyle_cr_input_get_end_of_line -#define cr_input_get_line_num libtextstyle_cr_input_get_line_num -#define cr_input_get_nb_bytes_left libtextstyle_cr_input_get_nb_bytes_left -#define cr_input_get_parsing_location libtextstyle_cr_input_get_parsing_location -#define cr_input_increment_col_num libtextstyle_cr_input_increment_col_num -#define cr_input_increment_line_num libtextstyle_cr_input_increment_line_num -#define cr_input_new_from_buf libtextstyle_cr_input_new_from_buf -#define cr_input_new_from_uri libtextstyle_cr_input_new_from_uri -#define cr_input_peek_byte libtextstyle_cr_input_peek_byte -#define cr_input_peek_byte2 libtextstyle_cr_input_peek_byte2 -#define cr_input_peek_char libtextstyle_cr_input_peek_char -#define cr_input_read_byte libtextstyle_cr_input_read_byte -#define cr_input_read_char libtextstyle_cr_input_read_char -#define cr_input_ref libtextstyle_cr_input_ref -#define cr_input_seek_index libtextstyle_cr_input_seek_index -#define cr_input_set_column_num libtextstyle_cr_input_set_column_num -#define cr_input_set_cur_index libtextstyle_cr_input_set_cur_index -#define cr_input_set_cur_pos libtextstyle_cr_input_set_cur_pos -#define cr_input_set_end_of_file libtextstyle_cr_input_set_end_of_file -#define cr_input_set_end_of_line libtextstyle_cr_input_set_end_of_line -#define cr_input_set_line_num libtextstyle_cr_input_set_line_num -#define cr_input_unref libtextstyle_cr_input_unref -#define cr_num_copy libtextstyle_cr_num_copy -#define cr_num_destroy libtextstyle_cr_num_destroy -#define cr_num_dup libtextstyle_cr_num_dup -#define cr_num_is_fixed_length libtextstyle_cr_num_is_fixed_length -#define cr_num_new libtextstyle_cr_num_new -#define cr_num_new_with_val libtextstyle_cr_num_new_with_val -#define cr_num_set libtextstyle_cr_num_set -#define cr_num_to_string libtextstyle_cr_num_to_string -#define cr_om_parser_destroy libtextstyle_cr_om_parser_destroy -#define cr_om_parser_new libtextstyle_cr_om_parser_new -#define cr_om_parser_parse_buf libtextstyle_cr_om_parser_parse_buf -#define cr_om_parser_parse_file libtextstyle_cr_om_parser_parse_file -#define cr_om_parser_parse_paths_to_cascade libtextstyle_cr_om_parser_parse_paths_to_cascade -#define cr_om_parser_simply_parse_buf libtextstyle_cr_om_parser_simply_parse_buf -#define cr_om_parser_simply_parse_file libtextstyle_cr_om_parser_simply_parse_file -#define cr_om_parser_simply_parse_paths_to_cascade libtextstyle_cr_om_parser_simply_parse_paths_to_cascade -#define cr_parser_destroy libtextstyle_cr_parser_destroy -#define cr_parser_get_parsing_location libtextstyle_cr_parser_get_parsing_location -#define cr_parser_get_sac_handler libtextstyle_cr_parser_get_sac_handler -#define cr_parser_get_tknzr libtextstyle_cr_parser_get_tknzr -#define cr_parser_get_use_core_grammar libtextstyle_cr_parser_get_use_core_grammar -#define cr_parser_new libtextstyle_cr_parser_new -#define cr_parser_new_from_buf libtextstyle_cr_parser_new_from_buf -#define cr_parser_new_from_file libtextstyle_cr_parser_new_from_file -#define cr_parser_new_from_input libtextstyle_cr_parser_new_from_input -#define cr_parser_parse libtextstyle_cr_parser_parse -#define cr_parser_parse_buf libtextstyle_cr_parser_parse_buf -#define cr_parser_parse_charset libtextstyle_cr_parser_parse_charset -#define cr_parser_parse_declaration libtextstyle_cr_parser_parse_declaration -#define cr_parser_parse_expr libtextstyle_cr_parser_parse_expr -#define cr_parser_parse_file libtextstyle_cr_parser_parse_file -#define cr_parser_parse_font_face libtextstyle_cr_parser_parse_font_face -#define cr_parser_parse_import libtextstyle_cr_parser_parse_import -#define cr_parser_parse_media libtextstyle_cr_parser_parse_media -#define cr_parser_parse_page libtextstyle_cr_parser_parse_page -#define cr_parser_parse_prio libtextstyle_cr_parser_parse_prio -#define cr_parser_parse_ruleset libtextstyle_cr_parser_parse_ruleset -#define cr_parser_parse_statement_core libtextstyle_cr_parser_parse_statement_core -#define cr_parser_parse_term libtextstyle_cr_parser_parse_term -#define cr_parser_set_default_sac_handler libtextstyle_cr_parser_set_default_sac_handler -#define cr_parser_set_sac_handler libtextstyle_cr_parser_set_sac_handler -#define cr_parser_set_tknzr libtextstyle_cr_parser_set_tknzr -#define cr_parser_set_use_core_grammar libtextstyle_cr_parser_set_use_core_grammar -#define cr_parser_try_to_skip_spaces_and_comments libtextstyle_cr_parser_try_to_skip_spaces_and_comments -#define cr_parsing_location_copy libtextstyle_cr_parsing_location_copy -#define cr_parsing_location_destroy libtextstyle_cr_parsing_location_destroy -#define cr_parsing_location_dump libtextstyle_cr_parsing_location_dump -#define cr_parsing_location_init libtextstyle_cr_parsing_location_init -#define cr_parsing_location_new libtextstyle_cr_parsing_location_new -#define cr_parsing_location_to_string libtextstyle_cr_parsing_location_to_string -#define cr_prop_list_append libtextstyle_cr_prop_list_append -#define cr_prop_list_append2 libtextstyle_cr_prop_list_append2 -#define cr_prop_list_destroy libtextstyle_cr_prop_list_destroy -#define cr_prop_list_get_decl libtextstyle_cr_prop_list_get_decl -#define cr_prop_list_get_next libtextstyle_cr_prop_list_get_next -#define cr_prop_list_get_prev libtextstyle_cr_prop_list_get_prev -#define cr_prop_list_get_prop libtextstyle_cr_prop_list_get_prop -#define cr_prop_list_lookup_prop libtextstyle_cr_prop_list_lookup_prop -#define cr_prop_list_prepend libtextstyle_cr_prop_list_prepend -#define cr_prop_list_prepend2 libtextstyle_cr_prop_list_prepend2 -#define cr_prop_list_set_decl libtextstyle_cr_prop_list_set_decl -#define cr_prop_list_set_prop libtextstyle_cr_prop_list_set_prop -#define cr_prop_list_unlink libtextstyle_cr_prop_list_unlink -#define cr_pseudo_destroy libtextstyle_cr_pseudo_destroy -#define cr_pseudo_dump libtextstyle_cr_pseudo_dump -#define cr_pseudo_new libtextstyle_cr_pseudo_new -#define cr_pseudo_to_string libtextstyle_cr_pseudo_to_string -#define cr_rgb_compute_from_percentage libtextstyle_cr_rgb_compute_from_percentage -#define cr_rgb_copy libtextstyle_cr_rgb_copy -#define cr_rgb_destroy libtextstyle_cr_rgb_destroy -#define cr_rgb_dump libtextstyle_cr_rgb_dump -#define cr_rgb_is_set_to_inherit libtextstyle_cr_rgb_is_set_to_inherit -#define cr_rgb_is_set_to_transparent libtextstyle_cr_rgb_is_set_to_transparent -#define cr_rgb_new libtextstyle_cr_rgb_new -#define cr_rgb_new_with_vals libtextstyle_cr_rgb_new_with_vals -#define cr_rgb_parse_from_buf libtextstyle_cr_rgb_parse_from_buf -#define cr_rgb_set libtextstyle_cr_rgb_set -#define cr_rgb_set_from_hex_str libtextstyle_cr_rgb_set_from_hex_str -#define cr_rgb_set_from_name libtextstyle_cr_rgb_set_from_name -#define cr_rgb_set_from_rgb libtextstyle_cr_rgb_set_from_rgb -#define cr_rgb_set_from_term libtextstyle_cr_rgb_set_from_term -#define cr_rgb_set_to_inherit libtextstyle_cr_rgb_set_to_inherit -#define cr_rgb_set_to_transparent libtextstyle_cr_rgb_set_to_transparent -#define cr_rgb_to_string libtextstyle_cr_rgb_to_string -#define cr_sel_eng_destroy libtextstyle_cr_sel_eng_destroy -#define cr_sel_eng_get_matched_properties_from_cascade libtextstyle_cr_sel_eng_get_matched_properties_from_cascade -#define cr_sel_eng_get_matched_rulesets libtextstyle_cr_sel_eng_get_matched_rulesets -#define cr_sel_eng_get_matched_style libtextstyle_cr_sel_eng_get_matched_style -#define cr_sel_eng_get_pseudo_class_selector_handler libtextstyle_cr_sel_eng_get_pseudo_class_selector_handler -#define cr_sel_eng_matches_node libtextstyle_cr_sel_eng_matches_node -#define cr_sel_eng_new libtextstyle_cr_sel_eng_new -#define cr_sel_eng_register_pseudo_class_sel_handler libtextstyle_cr_sel_eng_register_pseudo_class_sel_handler -#define cr_sel_eng_unregister_all_pseudo_class_sel_handlers libtextstyle_cr_sel_eng_unregister_all_pseudo_class_sel_handlers -#define cr_sel_eng_unregister_pseudo_class_sel_handler libtextstyle_cr_sel_eng_unregister_pseudo_class_sel_handler -#define cr_selector_append libtextstyle_cr_selector_append -#define cr_selector_append_simple_sel libtextstyle_cr_selector_append_simple_sel -#define cr_selector_destroy libtextstyle_cr_selector_destroy -#define cr_selector_dump libtextstyle_cr_selector_dump -#define cr_selector_new libtextstyle_cr_selector_new -#define cr_selector_parse_from_buf libtextstyle_cr_selector_parse_from_buf -#define cr_selector_prepend libtextstyle_cr_selector_prepend -#define cr_selector_ref libtextstyle_cr_selector_ref -#define cr_selector_to_string libtextstyle_cr_selector_to_string -#define cr_selector_unref libtextstyle_cr_selector_unref -#define cr_simple_sel_append_simple_sel libtextstyle_cr_simple_sel_append_simple_sel -#define cr_simple_sel_compute_specificity libtextstyle_cr_simple_sel_compute_specificity -#define cr_simple_sel_destroy libtextstyle_cr_simple_sel_destroy -#define cr_simple_sel_dump libtextstyle_cr_simple_sel_dump -#define cr_simple_sel_new libtextstyle_cr_simple_sel_new -#define cr_simple_sel_one_to_string libtextstyle_cr_simple_sel_one_to_string -#define cr_simple_sel_prepend_simple_sel libtextstyle_cr_simple_sel_prepend_simple_sel -#define cr_simple_sel_to_string libtextstyle_cr_simple_sel_to_string -#define cr_statement_append libtextstyle_cr_statement_append -#define cr_statement_at_charset_rule_get_charset libtextstyle_cr_statement_at_charset_rule_get_charset -#define cr_statement_at_charset_rule_parse_from_buf libtextstyle_cr_statement_at_charset_rule_parse_from_buf -#define cr_statement_at_charset_rule_set_charset libtextstyle_cr_statement_at_charset_rule_set_charset -#define cr_statement_at_font_face_rule_add_decl libtextstyle_cr_statement_at_font_face_rule_add_decl -#define cr_statement_at_font_face_rule_get_decls libtextstyle_cr_statement_at_font_face_rule_get_decls -#define cr_statement_at_font_face_rule_set_decls libtextstyle_cr_statement_at_font_face_rule_set_decls -#define cr_statement_at_import_rule_get_imported_sheet libtextstyle_cr_statement_at_import_rule_get_imported_sheet -#define cr_statement_at_import_rule_get_url libtextstyle_cr_statement_at_import_rule_get_url -#define cr_statement_at_import_rule_parse_from_buf libtextstyle_cr_statement_at_import_rule_parse_from_buf -#define cr_statement_at_import_rule_set_imported_sheet libtextstyle_cr_statement_at_import_rule_set_imported_sheet -#define cr_statement_at_import_rule_set_url libtextstyle_cr_statement_at_import_rule_set_url -#define cr_statement_at_media_get_from_list libtextstyle_cr_statement_at_media_get_from_list -#define cr_statement_at_media_nr_rules libtextstyle_cr_statement_at_media_nr_rules -#define cr_statement_at_media_rule_parse_from_buf libtextstyle_cr_statement_at_media_rule_parse_from_buf -#define cr_statement_at_page_rule_get_declarations libtextstyle_cr_statement_at_page_rule_get_declarations -#define cr_statement_at_page_rule_parse_from_buf libtextstyle_cr_statement_at_page_rule_parse_from_buf -#define cr_statement_at_page_rule_set_declarations libtextstyle_cr_statement_at_page_rule_set_declarations -#define cr_statement_destroy libtextstyle_cr_statement_destroy -#define cr_statement_does_buf_parses_against_core libtextstyle_cr_statement_does_buf_parses_against_core -#define cr_statement_dump libtextstyle_cr_statement_dump -#define cr_statement_dump_charset libtextstyle_cr_statement_dump_charset -#define cr_statement_dump_font_face_rule libtextstyle_cr_statement_dump_font_face_rule -#define cr_statement_dump_import_rule libtextstyle_cr_statement_dump_import_rule -#define cr_statement_dump_media_rule libtextstyle_cr_statement_dump_media_rule -#define cr_statement_dump_page libtextstyle_cr_statement_dump_page -#define cr_statement_dump_ruleset libtextstyle_cr_statement_dump_ruleset -#define cr_statement_font_face_rule_parse_from_buf libtextstyle_cr_statement_font_face_rule_parse_from_buf -#define cr_statement_get_from_list libtextstyle_cr_statement_get_from_list -#define cr_statement_get_parent_sheet libtextstyle_cr_statement_get_parent_sheet -#define cr_statement_list_to_string libtextstyle_cr_statement_list_to_string -#define cr_statement_new_at_charset_rule libtextstyle_cr_statement_new_at_charset_rule -#define cr_statement_new_at_font_face_rule libtextstyle_cr_statement_new_at_font_face_rule -#define cr_statement_new_at_import_rule libtextstyle_cr_statement_new_at_import_rule -#define cr_statement_new_at_media_rule libtextstyle_cr_statement_new_at_media_rule -#define cr_statement_new_at_page_rule libtextstyle_cr_statement_new_at_page_rule -#define cr_statement_new_ruleset libtextstyle_cr_statement_new_ruleset -#define cr_statement_nr_rules libtextstyle_cr_statement_nr_rules -#define cr_statement_parse_from_buf libtextstyle_cr_statement_parse_from_buf -#define cr_statement_prepend libtextstyle_cr_statement_prepend -#define cr_statement_ruleset_append_decl libtextstyle_cr_statement_ruleset_append_decl -#define cr_statement_ruleset_append_decl2 libtextstyle_cr_statement_ruleset_append_decl2 -#define cr_statement_ruleset_get_declarations libtextstyle_cr_statement_ruleset_get_declarations -#define cr_statement_ruleset_get_sel_list libtextstyle_cr_statement_ruleset_get_sel_list -#define cr_statement_ruleset_parse_from_buf libtextstyle_cr_statement_ruleset_parse_from_buf -#define cr_statement_ruleset_set_decl_list libtextstyle_cr_statement_ruleset_set_decl_list -#define cr_statement_ruleset_set_sel_list libtextstyle_cr_statement_ruleset_set_sel_list -#define cr_statement_set_parent_sheet libtextstyle_cr_statement_set_parent_sheet -#define cr_statement_to_string libtextstyle_cr_statement_to_string -#define cr_statement_unlink libtextstyle_cr_statement_unlink -#define cr_string_destroy libtextstyle_cr_string_destroy -#define cr_string_dup libtextstyle_cr_string_dup -#define cr_string_dup2 libtextstyle_cr_string_dup2 -#define cr_string_new libtextstyle_cr_string_new -#define cr_string_new_from_gstring libtextstyle_cr_string_new_from_gstring -#define cr_string_new_from_string libtextstyle_cr_string_new_from_string -#define cr_string_peek_raw_str libtextstyle_cr_string_peek_raw_str -#define cr_string_peek_raw_str_len libtextstyle_cr_string_peek_raw_str_len -#define cr_style_border_style_to_string libtextstyle_cr_style_border_style_to_string -#define cr_style_copy libtextstyle_cr_style_copy -#define cr_style_destroy libtextstyle_cr_style_destroy -#define cr_style_display_type_to_string libtextstyle_cr_style_display_type_to_string -#define cr_style_dup libtextstyle_cr_style_dup -#define cr_style_float_type_to_string libtextstyle_cr_style_float_type_to_string -#define cr_style_new libtextstyle_cr_style_new -#define cr_style_num_prop_val_to_string libtextstyle_cr_style_num_prop_val_to_string -#define cr_style_position_type_to_string libtextstyle_cr_style_position_type_to_string -#define cr_style_ref libtextstyle_cr_style_ref -#define cr_style_resolve_inherited_properties libtextstyle_cr_style_resolve_inherited_properties -#define cr_style_rgb_prop_val_to_string libtextstyle_cr_style_rgb_prop_val_to_string -#define cr_style_set_props_to_default_values libtextstyle_cr_style_set_props_to_default_values -#define cr_style_set_props_to_initial_values libtextstyle_cr_style_set_props_to_initial_values -#define cr_style_set_style_from_decl libtextstyle_cr_style_set_style_from_decl -#define cr_style_to_string libtextstyle_cr_style_to_string -#define cr_style_unref libtextstyle_cr_style_unref -#define cr_style_white_space_type_to_string libtextstyle_cr_style_white_space_type_to_string -#define cr_stylesheet_destroy libtextstyle_cr_stylesheet_destroy -#define cr_stylesheet_dump libtextstyle_cr_stylesheet_dump -#define cr_stylesheet_new libtextstyle_cr_stylesheet_new -#define cr_stylesheet_nr_rules libtextstyle_cr_stylesheet_nr_rules -#define cr_stylesheet_ref libtextstyle_cr_stylesheet_ref -#define cr_stylesheet_statement_get_from_list libtextstyle_cr_stylesheet_statement_get_from_list -#define cr_stylesheet_to_string libtextstyle_cr_stylesheet_to_string -#define cr_stylesheet_unref libtextstyle_cr_stylesheet_unref -#define cr_term_append_term libtextstyle_cr_term_append_term -#define cr_term_destroy libtextstyle_cr_term_destroy -#define cr_term_dump libtextstyle_cr_term_dump -#define cr_term_get_from_list libtextstyle_cr_term_get_from_list -#define cr_term_new libtextstyle_cr_term_new -#define cr_term_nr_values libtextstyle_cr_term_nr_values -#define cr_term_one_to_string libtextstyle_cr_term_one_to_string -#define cr_term_parse_expression_from_buf libtextstyle_cr_term_parse_expression_from_buf -#define cr_term_prepend_term libtextstyle_cr_term_prepend_term -#define cr_term_ref libtextstyle_cr_term_ref -#define cr_term_set_function libtextstyle_cr_term_set_function -#define cr_term_set_hash libtextstyle_cr_term_set_hash -#define cr_term_set_ident libtextstyle_cr_term_set_ident -#define cr_term_set_number libtextstyle_cr_term_set_number -#define cr_term_set_rgb libtextstyle_cr_term_set_rgb -#define cr_term_set_string libtextstyle_cr_term_set_string -#define cr_term_set_uri libtextstyle_cr_term_set_uri -#define cr_term_to_string libtextstyle_cr_term_to_string -#define cr_term_unref libtextstyle_cr_term_unref -#define cr_tknzr_consume_chars libtextstyle_cr_tknzr_consume_chars -#define cr_tknzr_destroy libtextstyle_cr_tknzr_destroy -#define cr_tknzr_get_cur_byte_addr libtextstyle_cr_tknzr_get_cur_byte_addr -#define cr_tknzr_get_cur_pos libtextstyle_cr_tknzr_get_cur_pos -#define cr_tknzr_get_input libtextstyle_cr_tknzr_get_input -#define cr_tknzr_get_nb_bytes_left libtextstyle_cr_tknzr_get_nb_bytes_left -#define cr_tknzr_get_next_token libtextstyle_cr_tknzr_get_next_token -#define cr_tknzr_get_parsing_location libtextstyle_cr_tknzr_get_parsing_location -#define cr_tknzr_new libtextstyle_cr_tknzr_new -#define cr_tknzr_new_from_buf libtextstyle_cr_tknzr_new_from_buf -#define cr_tknzr_new_from_uri libtextstyle_cr_tknzr_new_from_uri -#define cr_tknzr_parse_token libtextstyle_cr_tknzr_parse_token -#define cr_tknzr_peek_byte libtextstyle_cr_tknzr_peek_byte -#define cr_tknzr_peek_byte2 libtextstyle_cr_tknzr_peek_byte2 -#define cr_tknzr_peek_char libtextstyle_cr_tknzr_peek_char -#define cr_tknzr_read_byte libtextstyle_cr_tknzr_read_byte -#define cr_tknzr_read_char libtextstyle_cr_tknzr_read_char -#define cr_tknzr_ref libtextstyle_cr_tknzr_ref -#define cr_tknzr_seek_index libtextstyle_cr_tknzr_seek_index -#define cr_tknzr_set_cur_pos libtextstyle_cr_tknzr_set_cur_pos -#define cr_tknzr_set_input libtextstyle_cr_tknzr_set_input -#define cr_tknzr_unget_token libtextstyle_cr_tknzr_unget_token -#define cr_tknzr_unref libtextstyle_cr_tknzr_unref -#define cr_token_destroy libtextstyle_cr_token_destroy -#define cr_token_new libtextstyle_cr_token_new -#define cr_token_set_angle libtextstyle_cr_token_set_angle -#define cr_token_set_atkeyword libtextstyle_cr_token_set_atkeyword -#define cr_token_set_bc libtextstyle_cr_token_set_bc -#define cr_token_set_bo libtextstyle_cr_token_set_bo -#define cr_token_set_cbc libtextstyle_cr_token_set_cbc -#define cr_token_set_cbo libtextstyle_cr_token_set_cbo -#define cr_token_set_cdc libtextstyle_cr_token_set_cdc -#define cr_token_set_cdo libtextstyle_cr_token_set_cdo -#define cr_token_set_charset_sym libtextstyle_cr_token_set_charset_sym -#define cr_token_set_comment libtextstyle_cr_token_set_comment -#define cr_token_set_dashmatch libtextstyle_cr_token_set_dashmatch -#define cr_token_set_delim libtextstyle_cr_token_set_delim -#define cr_token_set_dimen libtextstyle_cr_token_set_dimen -#define cr_token_set_ems libtextstyle_cr_token_set_ems -#define cr_token_set_exs libtextstyle_cr_token_set_exs -#define cr_token_set_font_face_sym libtextstyle_cr_token_set_font_face_sym -#define cr_token_set_freq libtextstyle_cr_token_set_freq -#define cr_token_set_function libtextstyle_cr_token_set_function -#define cr_token_set_hash libtextstyle_cr_token_set_hash -#define cr_token_set_ident libtextstyle_cr_token_set_ident -#define cr_token_set_import_sym libtextstyle_cr_token_set_import_sym -#define cr_token_set_important_sym libtextstyle_cr_token_set_important_sym -#define cr_token_set_includes libtextstyle_cr_token_set_includes -#define cr_token_set_length libtextstyle_cr_token_set_length -#define cr_token_set_media_sym libtextstyle_cr_token_set_media_sym -#define cr_token_set_number libtextstyle_cr_token_set_number -#define cr_token_set_page_sym libtextstyle_cr_token_set_page_sym -#define cr_token_set_pc libtextstyle_cr_token_set_pc -#define cr_token_set_percentage libtextstyle_cr_token_set_percentage -#define cr_token_set_po libtextstyle_cr_token_set_po -#define cr_token_set_rgb libtextstyle_cr_token_set_rgb -#define cr_token_set_s libtextstyle_cr_token_set_s -#define cr_token_set_semicolon libtextstyle_cr_token_set_semicolon -#define cr_token_set_string libtextstyle_cr_token_set_string -#define cr_token_set_time libtextstyle_cr_token_set_time -#define cr_token_set_uri libtextstyle_cr_token_set_uri -#define cr_utils_dump_n_chars libtextstyle_cr_utils_dump_n_chars -#define cr_utils_dump_n_chars2 libtextstyle_cr_utils_dump_n_chars2 -#define cr_utils_dup_glist_of_cr_string libtextstyle_cr_utils_dup_glist_of_cr_string -#define cr_utils_dup_glist_of_string libtextstyle_cr_utils_dup_glist_of_string -#define cr_utils_is_hexa_char libtextstyle_cr_utils_is_hexa_char -#define cr_utils_is_newline libtextstyle_cr_utils_is_newline -#define cr_utils_is_nonascii libtextstyle_cr_utils_is_nonascii -#define cr_utils_is_white_space libtextstyle_cr_utils_is_white_space -#define cr_utils_read_char_from_utf8_buf libtextstyle_cr_utils_read_char_from_utf8_buf -#define cr_utils_ucs1_str_len_as_utf8 libtextstyle_cr_utils_ucs1_str_len_as_utf8 -#define cr_utils_ucs1_str_to_utf8 libtextstyle_cr_utils_ucs1_str_to_utf8 -#define cr_utils_ucs1_to_utf8 libtextstyle_cr_utils_ucs1_to_utf8 -#define cr_utils_ucs4_str_len_as_utf8 libtextstyle_cr_utils_ucs4_str_len_as_utf8 -#define cr_utils_ucs4_str_to_utf8 libtextstyle_cr_utils_ucs4_str_to_utf8 -#define cr_utils_ucs4_to_utf8 libtextstyle_cr_utils_ucs4_to_utf8 -#define cr_utils_utf8_str_len_as_ucs1 libtextstyle_cr_utils_utf8_str_len_as_ucs1 -#define cr_utils_utf8_str_len_as_ucs4 libtextstyle_cr_utils_utf8_str_len_as_ucs4 -#define cr_utils_utf8_str_to_ucs1 libtextstyle_cr_utils_utf8_str_to_ucs1 -#define cr_utils_utf8_str_to_ucs4 libtextstyle_cr_utils_utf8_str_to_ucs4 -#define cr_utils_utf8_to_ucs1 libtextstyle_cr_utils_utf8_to_ucs1 -#define cr_utils_utf8_to_ucs4 libtextstyle_cr_utils_utf8_to_ucs4 -#define deactivate_term_non_default_mode libtextstyle_deactivate_term_non_default_mode -#define deactivate_term_style_controller libtextstyle_deactivate_term_style_controller -#define dup_cloexec libtextstyle_dup_cloexec -#define execute_all_close_hooks libtextstyle_execute_all_close_hooks -#define execute_all_ioctl_hooks libtextstyle_execute_all_ioctl_hooks -#define execute_close_hooks libtextstyle_execute_close_hooks -#define execute_ioctl_hooks libtextstyle_execute_ioctl_hooks -#define exit_failure libtextstyle_exit_failure -#define fd_ostream_typeinfo libtextstyle_fd_ostream_typeinfo -#define fd_ostream_vtable libtextstyle_fd_ostream_vtable -#define file_ostream_typeinfo libtextstyle_file_ostream_typeinfo -#define file_ostream_vtable libtextstyle_file_ostream_vtable -#define freea libtextstyle_freea -#define full_write libtextstyle_full_write -#define g_ascii_dtostr libtextstyle_g_ascii_dtostr -#define g_ascii_formatd libtextstyle_g_ascii_formatd -#define g_ascii_strcasecmp libtextstyle_g_ascii_strcasecmp -#define g_ascii_strup libtextstyle_g_ascii_strup -#define g_ascii_table libtextstyle_g_ascii_table -#define g_ascii_toupper libtextstyle_g_ascii_toupper -#define g_hash_table_insert libtextstyle_g_hash_table_insert -#define g_hash_table_lookup libtextstyle_g_hash_table_lookup -#define g_hash_table_new libtextstyle_g_hash_table_new -#define g_hash_table_new_full libtextstyle_g_hash_table_new_full -#define g_list_append libtextstyle_g_list_append -#define g_list_delete_link libtextstyle_g_list_delete_link -#define g_list_free libtextstyle_g_list_free -#define g_list_last libtextstyle_g_list_last -#define g_list_prepend libtextstyle_g_list_prepend -#define g_log libtextstyle_g_log -#define g_printerr libtextstyle_g_printerr -#define g_spaced_primes_closest libtextstyle_g_spaced_primes_closest -#define g_stpcpy libtextstyle_g_stpcpy -#define g_str_equal libtextstyle_g_str_equal -#define g_str_hash libtextstyle_g_str_hash -#define g_strconcat libtextstyle_g_strconcat -#define g_strdup libtextstyle_g_strdup -#define g_strdup_printf libtextstyle_g_strdup_printf -#define g_strdup_vprintf libtextstyle_g_strdup_vprintf -#define g_string_append libtextstyle_g_string_append -#define g_string_append_c libtextstyle_g_string_append_c -#define g_string_append_len libtextstyle_g_string_append_len -#define g_string_append_printf libtextstyle_g_string_append_printf -#define g_string_append_unichar libtextstyle_g_string_append_unichar -#define g_string_free libtextstyle_g_string_free -#define g_string_insert_c libtextstyle_g_string_insert_c -#define g_string_insert_len libtextstyle_g_string_insert_len -#define g_string_insert_unichar libtextstyle_g_string_insert_unichar -#define g_string_new libtextstyle_g_string_new -#define g_string_new_len libtextstyle_g_string_new_len -#define g_string_sized_new libtextstyle_g_string_sized_new -#define g_strndup libtextstyle_g_strndup -#define g_strstr_len libtextstyle_g_strstr_len -#define g_warning libtextstyle_g_warning -#define get_fatal_signal_set libtextstyle_get_fatal_signal_set -#define get_fatal_signals libtextstyle_get_fatal_signals -#define get_ppid_of libtextstyle_get_ppid_of -#define get_progname_of libtextstyle_get_progname_of -#define getprogname libtextstyle_getprogname -#define gl_array_list_implementation libtextstyle_gl_array_list_implementation -#define gl_sockets_cleanup libtextstyle_gl_sockets_cleanup -#define gl_sockets_startup libtextstyle_gl_sockets_startup -#define hash_destroy libtextstyle_hash_destroy -#define hash_find_entry libtextstyle_hash_find_entry -#define hash_init libtextstyle_hash_init -#define hash_insert_entry libtextstyle_hash_insert_entry -#define hash_iterate libtextstyle_hash_iterate -#define hash_iterate_modify libtextstyle_hash_iterate_modify -#define hash_set_value libtextstyle_hash_set_value -#define html_ostream_typeinfo libtextstyle_html_ostream_typeinfo -#define html_ostream_vtable libtextstyle_html_ostream_vtable -#define html_styled_ostream_typeinfo libtextstyle_html_styled_ostream_typeinfo -#define html_styled_ostream_vtable libtextstyle_html_styled_ostream_vtable -#define iconv_ostream_typeinfo libtextstyle_iconv_ostream_typeinfo -#define iconv_ostream_vtable libtextstyle_iconv_ostream_vtable -#define initGenericErrorDefaultFunc libtextstyle_initGenericErrorDefaultFunc -#define inputPop libtextstyle_inputPop -#define inputPush libtextstyle_inputPush -#define isolat1ToUTF8 libtextstyle_isolat1ToUTF8 -#define last_component libtextstyle_last_component -#define libxml_domnode_binary_insertion_sort libtextstyle_libxml_domnode_binary_insertion_sort -#define libxml_domnode_tim_sort libtextstyle_libxml_domnode_tim_sort -#define memory_ostream__contents libtextstyle_memory_ostream__contents -#define memory_ostream_typeinfo libtextstyle_memory_ostream_typeinfo -#define memory_ostream_vtable libtextstyle_memory_ostream_vtable -#define mmalloca libtextstyle_mmalloca -#define namePop libtextstyle_namePop -#define namePush libtextstyle_namePush -#define next_prime libtextstyle_next_prime -#define nodePop libtextstyle_nodePop -#define nodePush libtextstyle_nodePush -#define noop_styled_ostream_typeinfo libtextstyle_noop_styled_ostream_typeinfo -#define noop_styled_ostream_vtable libtextstyle_noop_styled_ostream_vtable -#define oldXMLWDcompatibility libtextstyle_oldXMLWDcompatibility -#define ostream__flush libtextstyle_ostream__flush -#define ostream__free libtextstyle_ostream__free -#define ostream__write_mem libtextstyle_ostream__write_mem -#define ostream_typeinfo libtextstyle_ostream_typeinfo -#define ostream_vtable libtextstyle_ostream_vtable -#define printf_frexp libtextstyle_printf_frexp -#define printf_frexpl libtextstyle_printf_frexpl -#define register_fd_hook libtextstyle_register_fd_hook -#define safe_read libtextstyle_safe_read -#define safe_write libtextstyle_safe_write -#define set_cloexec_flag libtextstyle_set_cloexec_flag -#define styled_ostream__begin_use_class libtextstyle_styled_ostream__begin_use_class -#define styled_ostream__end_use_class libtextstyle_styled_ostream__end_use_class -#define styled_ostream__flush libtextstyle_styled_ostream__flush -#define styled_ostream__flush_to_current_style libtextstyle_styled_ostream__flush_to_current_style -#define styled_ostream__free libtextstyle_styled_ostream__free -#define styled_ostream__get_hyperlink_id libtextstyle_styled_ostream__get_hyperlink_id -#define styled_ostream__get_hyperlink_ref libtextstyle_styled_ostream__get_hyperlink_ref -#define styled_ostream__set_hyperlink libtextstyle_styled_ostream__set_hyperlink -#define styled_ostream__write_mem libtextstyle_styled_ostream__write_mem -#define styled_ostream_typeinfo libtextstyle_styled_ostream_typeinfo -#define styled_ostream_vtable libtextstyle_styled_ostream_vtable -#define term_ostream_typeinfo libtextstyle_term_ostream_typeinfo -#define term_ostream_vtable libtextstyle_term_ostream_vtable -#define term_styled_ostream_typeinfo libtextstyle_term_styled_ostream_typeinfo -#define term_styled_ostream_vtable libtextstyle_term_styled_ostream_vtable -#define u8_mbtouc libtextstyle_u8_mbtouc -#define unblock_fatal_signals libtextstyle_unblock_fatal_signals -#define unregister_fd_hook libtextstyle_unregister_fd_hook -#define x2realloc libtextstyle_x2realloc -#define xalloc_die libtextstyle_xalloc_die -#define xasprintf libtextstyle_xasprintf -#define xcalloc libtextstyle_xcalloc -#define xconcatenated_filename libtextstyle_xconcatenated_filename -#define xgethostname libtextstyle_xgethostname -#define xmalloc libtextstyle_xmalloc -#define xmalloc_exit_failure libtextstyle_xmalloc_exit_failure -#define xmemdup libtextstyle_xmemdup -#define xmlAddAttributeDecl libtextstyle_xmlAddAttributeDecl -#define xmlAddChild libtextstyle_xmlAddChild -#define xmlAddChildList libtextstyle_xmlAddChildList -#define xmlAddDocEntity libtextstyle_xmlAddDocEntity -#define xmlAddDtdEntity libtextstyle_xmlAddDtdEntity -#define xmlAddElementDecl libtextstyle_xmlAddElementDecl -#define xmlAddEncodingAlias libtextstyle_xmlAddEncodingAlias -#define xmlAddID libtextstyle_xmlAddID -#define xmlAddNextSibling libtextstyle_xmlAddNextSibling -#define xmlAddNotationDecl libtextstyle_xmlAddNotationDecl -#define xmlAddPrevSibling libtextstyle_xmlAddPrevSibling -#define xmlAddRef libtextstyle_xmlAddRef -#define xmlAddSibling libtextstyle_xmlAddSibling -#define xmlAllocParserInputBuffer libtextstyle_xmlAllocParserInputBuffer -#define xmlBufAdd libtextstyle_xmlBufAdd -#define xmlBufAddHead libtextstyle_xmlBufAddHead -#define xmlBufAddLen libtextstyle_xmlBufAddLen -#define xmlBufAvail libtextstyle_xmlBufAvail -#define xmlBufBackToBuffer libtextstyle_xmlBufBackToBuffer -#define xmlBufCCat libtextstyle_xmlBufCCat -#define xmlBufCat libtextstyle_xmlBufCat -#define xmlBufContent libtextstyle_xmlBufContent -#define xmlBufCreate libtextstyle_xmlBufCreate -#define xmlBufCreateSize libtextstyle_xmlBufCreateSize -#define xmlBufCreateStatic libtextstyle_xmlBufCreateStatic -#define xmlBufDetach libtextstyle_xmlBufDetach -#define xmlBufDump libtextstyle_xmlBufDump -#define xmlBufEmpty libtextstyle_xmlBufEmpty -#define xmlBufEnd libtextstyle_xmlBufEnd -#define xmlBufErase libtextstyle_xmlBufErase -#define xmlBufFree libtextstyle_xmlBufFree -#define xmlBufFromBuffer libtextstyle_xmlBufFromBuffer -#define xmlBufGetAllocationScheme libtextstyle_xmlBufGetAllocationScheme -#define xmlBufGetInputBase libtextstyle_xmlBufGetInputBase -#define xmlBufGetNodeContent libtextstyle_xmlBufGetNodeContent -#define xmlBufGrow libtextstyle_xmlBufGrow -#define xmlBufInflate libtextstyle_xmlBufInflate -#define xmlBufIsEmpty libtextstyle_xmlBufIsEmpty -#define xmlBufLength libtextstyle_xmlBufLength -#define xmlBufMergeBuffer libtextstyle_xmlBufMergeBuffer -#define xmlBufResetInput libtextstyle_xmlBufResetInput -#define xmlBufResize libtextstyle_xmlBufResize -#define xmlBufSetAllocationScheme libtextstyle_xmlBufSetAllocationScheme -#define xmlBufSetInputBaseCur libtextstyle_xmlBufSetInputBaseCur -#define xmlBufShrink libtextstyle_xmlBufShrink -#define xmlBufUse libtextstyle_xmlBufUse -#define xmlBufWriteCHAR libtextstyle_xmlBufWriteCHAR -#define xmlBufWriteChar libtextstyle_xmlBufWriteChar -#define xmlBufWriteQuotedString libtextstyle_xmlBufWriteQuotedString -#define xmlBufferAdd libtextstyle_xmlBufferAdd -#define xmlBufferAddHead libtextstyle_xmlBufferAddHead -#define xmlBufferAllocScheme libtextstyle_xmlBufferAllocScheme -#define xmlBufferCCat libtextstyle_xmlBufferCCat -#define xmlBufferCat libtextstyle_xmlBufferCat -#define xmlBufferContent libtextstyle_xmlBufferContent -#define xmlBufferCreate libtextstyle_xmlBufferCreate -#define xmlBufferCreateSize libtextstyle_xmlBufferCreateSize -#define xmlBufferCreateStatic libtextstyle_xmlBufferCreateStatic -#define xmlBufferDetach libtextstyle_xmlBufferDetach -#define xmlBufferDump libtextstyle_xmlBufferDump -#define xmlBufferEmpty libtextstyle_xmlBufferEmpty -#define xmlBufferFree libtextstyle_xmlBufferFree -#define xmlBufferGrow libtextstyle_xmlBufferGrow -#define xmlBufferLength libtextstyle_xmlBufferLength -#define xmlBufferResize libtextstyle_xmlBufferResize -#define xmlBufferSetAllocationScheme libtextstyle_xmlBufferSetAllocationScheme -#define xmlBufferShrink libtextstyle_xmlBufferShrink -#define xmlBufferWriteCHAR libtextstyle_xmlBufferWriteCHAR -#define xmlBufferWriteChar libtextstyle_xmlBufferWriteChar -#define xmlBufferWriteQuotedString libtextstyle_xmlBufferWriteQuotedString -#define xmlBuildQName libtextstyle_xmlBuildQName -#define xmlBuildRelativeURI libtextstyle_xmlBuildRelativeURI -#define xmlBuildURI libtextstyle_xmlBuildURI -#define xmlByteConsumed libtextstyle_xmlByteConsumed -#define xmlCanonicPath libtextstyle_xmlCanonicPath -#define xmlCharEncCloseFunc libtextstyle_xmlCharEncCloseFunc -#define xmlCharEncFirstLine libtextstyle_xmlCharEncFirstLine -#define xmlCharEncFirstLineInput libtextstyle_xmlCharEncFirstLineInput -#define xmlCharEncFirstLineInt libtextstyle_xmlCharEncFirstLineInt -#define xmlCharEncInFunc libtextstyle_xmlCharEncInFunc -#define xmlCharEncInput libtextstyle_xmlCharEncInput -#define xmlCharEncOutFunc libtextstyle_xmlCharEncOutFunc -#define xmlCharInRange libtextstyle_xmlCharInRange -#define xmlCharStrdup libtextstyle_xmlCharStrdup -#define xmlCharStrndup libtextstyle_xmlCharStrndup -#define xmlCheckFilename libtextstyle_xmlCheckFilename -#define xmlCheckHTTPInput libtextstyle_xmlCheckHTTPInput -#define xmlCheckLanguageID libtextstyle_xmlCheckLanguageID -#define xmlCheckUTF8 libtextstyle_xmlCheckUTF8 -#define xmlCheckVersion libtextstyle_xmlCheckVersion -#define xmlChildElementCount libtextstyle_xmlChildElementCount -#define xmlCleanupCharEncodingHandlers libtextstyle_xmlCleanupCharEncodingHandlers -#define xmlCleanupEncodingAliases libtextstyle_xmlCleanupEncodingAliases -#define xmlCleanupGlobals libtextstyle_xmlCleanupGlobals -#define xmlCleanupInputCallbacks libtextstyle_xmlCleanupInputCallbacks -#define xmlCleanupMemory libtextstyle_xmlCleanupMemory -#define xmlCleanupParser libtextstyle_xmlCleanupParser -#define xmlCleanupThreads libtextstyle_xmlCleanupThreads -#define xmlClearNodeInfoSeq libtextstyle_xmlClearNodeInfoSeq -#define xmlClearParserCtxt libtextstyle_xmlClearParserCtxt -#define xmlCopyAttributeTable libtextstyle_xmlCopyAttributeTable -#define xmlCopyChar libtextstyle_xmlCopyChar -#define xmlCopyCharMultiByte libtextstyle_xmlCopyCharMultiByte -#define xmlCopyDoc libtextstyle_xmlCopyDoc -#define xmlCopyDocElementContent libtextstyle_xmlCopyDocElementContent -#define xmlCopyDtd libtextstyle_xmlCopyDtd -#define xmlCopyElementContent libtextstyle_xmlCopyElementContent -#define xmlCopyElementTable libtextstyle_xmlCopyElementTable -#define xmlCopyEntitiesTable libtextstyle_xmlCopyEntitiesTable -#define xmlCopyEnumeration libtextstyle_xmlCopyEnumeration -#define xmlCopyError libtextstyle_xmlCopyError -#define xmlCopyNamespace libtextstyle_xmlCopyNamespace -#define xmlCopyNamespaceList libtextstyle_xmlCopyNamespaceList -#define xmlCopyNode libtextstyle_xmlCopyNode -#define xmlCopyNodeList libtextstyle_xmlCopyNodeList -#define xmlCopyNotationTable libtextstyle_xmlCopyNotationTable -#define xmlCopyProp libtextstyle_xmlCopyProp -#define xmlCopyPropList libtextstyle_xmlCopyPropList -#define xmlCreateDocParserCtxt libtextstyle_xmlCreateDocParserCtxt -#define xmlCreateEntitiesTable libtextstyle_xmlCreateEntitiesTable -#define xmlCreateEntityParserCtxt libtextstyle_xmlCreateEntityParserCtxt -#define xmlCreateEnumeration libtextstyle_xmlCreateEnumeration -#define xmlCreateFileParserCtxt libtextstyle_xmlCreateFileParserCtxt -#define xmlCreateIOParserCtxt libtextstyle_xmlCreateIOParserCtxt -#define xmlCreateIntSubset libtextstyle_xmlCreateIntSubset -#define xmlCreateMemoryParserCtxt libtextstyle_xmlCreateMemoryParserCtxt -#define xmlCreateURI libtextstyle_xmlCreateURI -#define xmlCreateURLParserCtxt libtextstyle_xmlCreateURLParserCtxt -#define xmlCtxtGetLastError libtextstyle_xmlCtxtGetLastError -#define xmlCtxtReadDoc libtextstyle_xmlCtxtReadDoc -#define xmlCtxtReadFd libtextstyle_xmlCtxtReadFd -#define xmlCtxtReadFile libtextstyle_xmlCtxtReadFile -#define xmlCtxtReadIO libtextstyle_xmlCtxtReadIO -#define xmlCtxtReadMemory libtextstyle_xmlCtxtReadMemory -#define xmlCtxtReset libtextstyle_xmlCtxtReset -#define xmlCtxtResetLastError libtextstyle_xmlCtxtResetLastError -#define xmlCtxtResetPush libtextstyle_xmlCtxtResetPush -#define xmlCtxtUseOptions libtextstyle_xmlCtxtUseOptions -#define xmlCurrentChar libtextstyle_xmlCurrentChar -#define xmlDOMWrapAdoptNode libtextstyle_xmlDOMWrapAdoptNode -#define xmlDOMWrapCloneNode libtextstyle_xmlDOMWrapCloneNode -#define xmlDOMWrapFreeCtxt libtextstyle_xmlDOMWrapFreeCtxt -#define xmlDOMWrapNewCtxt libtextstyle_xmlDOMWrapNewCtxt -#define xmlDOMWrapReconcileNamespaces libtextstyle_xmlDOMWrapReconcileNamespaces -#define xmlDOMWrapRemoveNode libtextstyle_xmlDOMWrapRemoveNode -#define xmlDefaultBufferSize libtextstyle_xmlDefaultBufferSize -#define xmlDefaultSAXHandlerInit libtextstyle_xmlDefaultSAXHandlerInit -#define xmlDefaultSAXLocator libtextstyle_xmlDefaultSAXLocator -#define xmlDelEncodingAlias libtextstyle_xmlDelEncodingAlias -#define xmlDeregisterNodeDefault libtextstyle_xmlDeregisterNodeDefault -#define xmlDeregisterNodeDefaultValue libtextstyle_xmlDeregisterNodeDefaultValue -#define xmlDetectCharEncoding libtextstyle_xmlDetectCharEncoding -#define xmlDictCleanup libtextstyle_xmlDictCleanup -#define xmlDictCreate libtextstyle_xmlDictCreate -#define xmlDictCreateSub libtextstyle_xmlDictCreateSub -#define xmlDictExists libtextstyle_xmlDictExists -#define xmlDictFree libtextstyle_xmlDictFree -#define xmlDictGetUsage libtextstyle_xmlDictGetUsage -#define xmlDictLookup libtextstyle_xmlDictLookup -#define xmlDictOwns libtextstyle_xmlDictOwns -#define xmlDictQLookup libtextstyle_xmlDictQLookup -#define xmlDictReference libtextstyle_xmlDictReference -#define xmlDictSetLimit libtextstyle_xmlDictSetLimit -#define xmlDictSize libtextstyle_xmlDictSize -#define xmlDoValidityCheckingDefaultValue libtextstyle_xmlDoValidityCheckingDefaultValue -#define xmlDocCopyNode libtextstyle_xmlDocCopyNode -#define xmlDocCopyNodeList libtextstyle_xmlDocCopyNodeList -#define xmlDocGetRootElement libtextstyle_xmlDocGetRootElement -#define xmlDocSetRootElement libtextstyle_xmlDocSetRootElement -#define xmlEncodeAttributeEntities libtextstyle_xmlEncodeAttributeEntities -#define xmlEncodeEntitiesReentrant libtextstyle_xmlEncodeEntitiesReentrant -#define xmlEncodeSpecialChars libtextstyle_xmlEncodeSpecialChars -#define xmlErrMemory libtextstyle_xmlErrMemory -#define xmlEscapeFormatString libtextstyle_xmlEscapeFormatString -#define xmlFileClose libtextstyle_xmlFileClose -#define xmlFileMatch libtextstyle_xmlFileMatch -#define xmlFileOpen libtextstyle_xmlFileOpen -#define xmlFileRead libtextstyle_xmlFileRead -#define xmlFindCharEncodingHandler libtextstyle_xmlFindCharEncodingHandler -#define xmlFirstElementChild libtextstyle_xmlFirstElementChild -#define xmlFree libtextstyle_xmlFree -#define xmlFreeAttributeTable libtextstyle_xmlFreeAttributeTable -#define xmlFreeDoc libtextstyle_xmlFreeDoc -#define xmlFreeDocElementContent libtextstyle_xmlFreeDocElementContent -#define xmlFreeDtd libtextstyle_xmlFreeDtd -#define xmlFreeElementContent libtextstyle_xmlFreeElementContent -#define xmlFreeElementTable libtextstyle_xmlFreeElementTable -#define xmlFreeEntitiesTable libtextstyle_xmlFreeEntitiesTable -#define xmlFreeEnumeration libtextstyle_xmlFreeEnumeration -#define xmlFreeIDTable libtextstyle_xmlFreeIDTable -#define xmlFreeInputStream libtextstyle_xmlFreeInputStream -#define xmlFreeMutex libtextstyle_xmlFreeMutex -#define xmlFreeNode libtextstyle_xmlFreeNode -#define xmlFreeNodeList libtextstyle_xmlFreeNodeList -#define xmlFreeNotationTable libtextstyle_xmlFreeNotationTable -#define xmlFreeNs libtextstyle_xmlFreeNs -#define xmlFreeNsList libtextstyle_xmlFreeNsList -#define xmlFreeParserCtxt libtextstyle_xmlFreeParserCtxt -#define xmlFreeParserInputBuffer libtextstyle_xmlFreeParserInputBuffer -#define xmlFreeProp libtextstyle_xmlFreeProp -#define xmlFreePropList libtextstyle_xmlFreePropList -#define xmlFreeRMutex libtextstyle_xmlFreeRMutex -#define xmlFreeRefTable libtextstyle_xmlFreeRefTable -#define xmlFreeURI libtextstyle_xmlFreeURI -#define xmlGcMemGet libtextstyle_xmlGcMemGet -#define xmlGcMemSetup libtextstyle_xmlGcMemSetup -#define xmlGenericError libtextstyle_xmlGenericError -#define xmlGenericErrorContext libtextstyle_xmlGenericErrorContext -#define xmlGenericErrorDefaultFunc libtextstyle_xmlGenericErrorDefaultFunc -#define xmlGetBufferAllocationScheme libtextstyle_xmlGetBufferAllocationScheme -#define xmlGetCharEncodingHandler libtextstyle_xmlGetCharEncodingHandler -#define xmlGetCharEncodingName libtextstyle_xmlGetCharEncodingName -#define xmlGetCompressMode libtextstyle_xmlGetCompressMode -#define xmlGetDocCompressMode libtextstyle_xmlGetDocCompressMode -#define xmlGetDocEntity libtextstyle_xmlGetDocEntity -#define xmlGetDtdAttrDesc libtextstyle_xmlGetDtdAttrDesc -#define xmlGetDtdElementDesc libtextstyle_xmlGetDtdElementDesc -#define xmlGetDtdEntity libtextstyle_xmlGetDtdEntity -#define xmlGetDtdNotationDesc libtextstyle_xmlGetDtdNotationDesc -#define xmlGetDtdQAttrDesc libtextstyle_xmlGetDtdQAttrDesc -#define xmlGetDtdQElementDesc libtextstyle_xmlGetDtdQElementDesc -#define xmlGetEncodingAlias libtextstyle_xmlGetEncodingAlias -#define xmlGetExternalEntityLoader libtextstyle_xmlGetExternalEntityLoader -#define xmlGetGlobalState libtextstyle_xmlGetGlobalState -#define xmlGetID libtextstyle_xmlGetID -#define xmlGetIntSubset libtextstyle_xmlGetIntSubset -#define xmlGetLastChild libtextstyle_xmlGetLastChild -#define xmlGetLastError libtextstyle_xmlGetLastError -#define xmlGetLineNo libtextstyle_xmlGetLineNo -#define xmlGetNoNsProp libtextstyle_xmlGetNoNsProp -#define xmlGetNodePath libtextstyle_xmlGetNodePath -#define xmlGetNsList libtextstyle_xmlGetNsList -#define xmlGetNsProp libtextstyle_xmlGetNsProp -#define xmlGetParameterEntity libtextstyle_xmlGetParameterEntity -#define xmlGetPredefinedEntity libtextstyle_xmlGetPredefinedEntity -#define xmlGetProp libtextstyle_xmlGetProp -#define xmlGetRefs libtextstyle_xmlGetRefs -#define xmlGetThreadId libtextstyle_xmlGetThreadId -#define xmlGetUTF8Char libtextstyle_xmlGetUTF8Char -#define xmlGetWarningsDefaultValue libtextstyle_xmlGetWarningsDefaultValue -#define xmlHasFeature libtextstyle_xmlHasFeature -#define xmlHasNsProp libtextstyle_xmlHasNsProp -#define xmlHasProp libtextstyle_xmlHasProp -#define xmlHashAddEntry libtextstyle_xmlHashAddEntry -#define xmlHashAddEntry2 libtextstyle_xmlHashAddEntry2 -#define xmlHashAddEntry3 libtextstyle_xmlHashAddEntry3 -#define xmlHashCopy libtextstyle_xmlHashCopy -#define xmlHashCreate libtextstyle_xmlHashCreate -#define xmlHashCreateDict libtextstyle_xmlHashCreateDict -#define xmlHashDefaultDeallocator libtextstyle_xmlHashDefaultDeallocator -#define xmlHashFree libtextstyle_xmlHashFree -#define xmlHashLookup libtextstyle_xmlHashLookup -#define xmlHashLookup2 libtextstyle_xmlHashLookup2 -#define xmlHashLookup3 libtextstyle_xmlHashLookup3 -#define xmlHashQLookup libtextstyle_xmlHashQLookup -#define xmlHashQLookup2 libtextstyle_xmlHashQLookup2 -#define xmlHashQLookup3 libtextstyle_xmlHashQLookup3 -#define xmlHashRemoveEntry libtextstyle_xmlHashRemoveEntry -#define xmlHashRemoveEntry2 libtextstyle_xmlHashRemoveEntry2 -#define xmlHashRemoveEntry3 libtextstyle_xmlHashRemoveEntry3 -#define xmlHashScan libtextstyle_xmlHashScan -#define xmlHashScan3 libtextstyle_xmlHashScan3 -#define xmlHashScanFull libtextstyle_xmlHashScanFull -#define xmlHashScanFull3 libtextstyle_xmlHashScanFull3 -#define xmlHashSize libtextstyle_xmlHashSize -#define xmlHashUpdateEntry libtextstyle_xmlHashUpdateEntry -#define xmlHashUpdateEntry2 libtextstyle_xmlHashUpdateEntry2 -#define xmlHashUpdateEntry3 libtextstyle_xmlHashUpdateEntry3 -#define xmlIndentTreeOutput libtextstyle_xmlIndentTreeOutput -#define xmlInitCharEncodingHandlers libtextstyle_xmlInitCharEncodingHandlers -#define xmlInitGlobals libtextstyle_xmlInitGlobals -#define xmlInitMemory libtextstyle_xmlInitMemory -#define xmlInitNodeInfoSeq libtextstyle_xmlInitNodeInfoSeq -#define xmlInitParser libtextstyle_xmlInitParser -#define xmlInitParserCtxt libtextstyle_xmlInitParserCtxt -#define xmlInitThreads libtextstyle_xmlInitThreads -#define xmlInitializeDict libtextstyle_xmlInitializeDict -#define xmlInitializeGlobalState libtextstyle_xmlInitializeGlobalState -#define xmlInputReadCallbackNop libtextstyle_xmlInputReadCallbackNop -#define xmlIsBaseChar libtextstyle_xmlIsBaseChar -#define xmlIsBaseCharGroup libtextstyle_xmlIsBaseCharGroup -#define xmlIsBlank libtextstyle_xmlIsBlank -#define xmlIsBlankNode libtextstyle_xmlIsBlankNode -#define xmlIsChar libtextstyle_xmlIsChar -#define xmlIsCharGroup libtextstyle_xmlIsCharGroup -#define xmlIsCombining libtextstyle_xmlIsCombining -#define xmlIsCombiningGroup libtextstyle_xmlIsCombiningGroup -#define xmlIsDigit libtextstyle_xmlIsDigit -#define xmlIsDigitGroup libtextstyle_xmlIsDigitGroup -#define xmlIsExtender libtextstyle_xmlIsExtender -#define xmlIsExtenderGroup libtextstyle_xmlIsExtenderGroup -#define xmlIsID libtextstyle_xmlIsID -#define xmlIsIdeographic libtextstyle_xmlIsIdeographic -#define xmlIsIdeographicGroup libtextstyle_xmlIsIdeographicGroup -#define xmlIsLetter libtextstyle_xmlIsLetter -#define xmlIsMainThread libtextstyle_xmlIsMainThread -#define xmlIsMixedElement libtextstyle_xmlIsMixedElement -#define xmlIsPubidChar libtextstyle_xmlIsPubidChar -#define xmlIsPubidChar_tab libtextstyle_xmlIsPubidChar_tab -#define xmlIsRef libtextstyle_xmlIsRef -#define xmlIsXHTML libtextstyle_xmlIsXHTML -#define xmlKeepBlanksDefault libtextstyle_xmlKeepBlanksDefault -#define xmlKeepBlanksDefaultValue libtextstyle_xmlKeepBlanksDefaultValue -#define xmlLastElementChild libtextstyle_xmlLastElementChild -#define xmlLastError libtextstyle_xmlLastError -#define xmlLineNumbersDefault libtextstyle_xmlLineNumbersDefault -#define xmlLineNumbersDefaultValue libtextstyle_xmlLineNumbersDefaultValue -#define xmlLinkGetData libtextstyle_xmlLinkGetData -#define xmlListAppend libtextstyle_xmlListAppend -#define xmlListClear libtextstyle_xmlListClear -#define xmlListCopy libtextstyle_xmlListCopy -#define xmlListCreate libtextstyle_xmlListCreate -#define xmlListDelete libtextstyle_xmlListDelete -#define xmlListDup libtextstyle_xmlListDup -#define xmlListEmpty libtextstyle_xmlListEmpty -#define xmlListEnd libtextstyle_xmlListEnd -#define xmlListFront libtextstyle_xmlListFront -#define xmlListInsert libtextstyle_xmlListInsert -#define xmlListMerge libtextstyle_xmlListMerge -#define xmlListPopBack libtextstyle_xmlListPopBack -#define xmlListPopFront libtextstyle_xmlListPopFront -#define xmlListPushBack libtextstyle_xmlListPushBack -#define xmlListPushFront libtextstyle_xmlListPushFront -#define xmlListRemoveAll libtextstyle_xmlListRemoveAll -#define xmlListRemoveFirst libtextstyle_xmlListRemoveFirst -#define xmlListRemoveLast libtextstyle_xmlListRemoveLast -#define xmlListReverse libtextstyle_xmlListReverse -#define xmlListReverseSearch libtextstyle_xmlListReverseSearch -#define xmlListReverseWalk libtextstyle_xmlListReverseWalk -#define xmlListSearch libtextstyle_xmlListSearch -#define xmlListSize libtextstyle_xmlListSize -#define xmlListSort libtextstyle_xmlListSort -#define xmlListWalk libtextstyle_xmlListWalk -#define xmlLoadExtDtdDefaultValue libtextstyle_xmlLoadExtDtdDefaultValue -#define xmlLoadExternalEntity libtextstyle_xmlLoadExternalEntity -#define xmlLockLibrary libtextstyle_xmlLockLibrary -#define xmlMalloc libtextstyle_xmlMalloc -#define xmlMallocAtomic libtextstyle_xmlMallocAtomic -#define xmlMallocAtomicLoc libtextstyle_xmlMallocAtomicLoc -#define xmlMallocBreakpoint libtextstyle_xmlMallocBreakpoint -#define xmlMallocLoc libtextstyle_xmlMallocLoc -#define xmlMemBlocks libtextstyle_xmlMemBlocks -#define xmlMemDisplay libtextstyle_xmlMemDisplay -#define xmlMemDisplayLast libtextstyle_xmlMemDisplayLast -#define xmlMemFree libtextstyle_xmlMemFree -#define xmlMemGet libtextstyle_xmlMemGet -#define xmlMemMalloc libtextstyle_xmlMemMalloc -#define xmlMemRealloc libtextstyle_xmlMemRealloc -#define xmlMemSetup libtextstyle_xmlMemSetup -#define xmlMemShow libtextstyle_xmlMemShow -#define xmlMemStrdup libtextstyle_xmlMemStrdup -#define xmlMemStrdupLoc libtextstyle_xmlMemStrdupLoc -#define xmlMemUsed libtextstyle_xmlMemUsed -#define xmlMemoryDump libtextstyle_xmlMemoryDump -#define xmlMemoryStrdup libtextstyle_xmlMemoryStrdup -#define xmlMutexLock libtextstyle_xmlMutexLock -#define xmlMutexUnlock libtextstyle_xmlMutexUnlock -#define xmlNewCDataBlock libtextstyle_xmlNewCDataBlock -#define xmlNewCharEncodingHandler libtextstyle_xmlNewCharEncodingHandler -#define xmlNewCharRef libtextstyle_xmlNewCharRef -#define xmlNewChild libtextstyle_xmlNewChild -#define xmlNewComment libtextstyle_xmlNewComment -#define xmlNewDoc libtextstyle_xmlNewDoc -#define xmlNewDocComment libtextstyle_xmlNewDocComment -#define xmlNewDocElementContent libtextstyle_xmlNewDocElementContent -#define xmlNewDocFragment libtextstyle_xmlNewDocFragment -#define xmlNewDocNode libtextstyle_xmlNewDocNode -#define xmlNewDocNodeEatName libtextstyle_xmlNewDocNodeEatName -#define xmlNewDocPI libtextstyle_xmlNewDocPI -#define xmlNewDocProp libtextstyle_xmlNewDocProp -#define xmlNewDocRawNode libtextstyle_xmlNewDocRawNode -#define xmlNewDocText libtextstyle_xmlNewDocText -#define xmlNewDocTextLen libtextstyle_xmlNewDocTextLen -#define xmlNewDtd libtextstyle_xmlNewDtd -#define xmlNewElementContent libtextstyle_xmlNewElementContent -#define xmlNewEntity libtextstyle_xmlNewEntity -#define xmlNewEntityInputStream libtextstyle_xmlNewEntityInputStream -#define xmlNewIOInputStream libtextstyle_xmlNewIOInputStream -#define xmlNewInputFromFile libtextstyle_xmlNewInputFromFile -#define xmlNewInputStream libtextstyle_xmlNewInputStream -#define xmlNewMutex libtextstyle_xmlNewMutex -#define xmlNewNode libtextstyle_xmlNewNode -#define xmlNewNodeEatName libtextstyle_xmlNewNodeEatName -#define xmlNewNs libtextstyle_xmlNewNs -#define xmlNewNsProp libtextstyle_xmlNewNsProp -#define xmlNewNsPropEatName libtextstyle_xmlNewNsPropEatName -#define xmlNewPI libtextstyle_xmlNewPI -#define xmlNewParserCtxt libtextstyle_xmlNewParserCtxt -#define xmlNewProp libtextstyle_xmlNewProp -#define xmlNewRMutex libtextstyle_xmlNewRMutex -#define xmlNewReference libtextstyle_xmlNewReference -#define xmlNewStringInputStream libtextstyle_xmlNewStringInputStream -#define xmlNewText libtextstyle_xmlNewText -#define xmlNewTextChild libtextstyle_xmlNewTextChild -#define xmlNewTextLen libtextstyle_xmlNewTextLen -#define xmlNextChar libtextstyle_xmlNextChar -#define xmlNextElementSibling libtextstyle_xmlNextElementSibling -#define xmlNoNetExternalEntityLoader libtextstyle_xmlNoNetExternalEntityLoader -#define xmlNodeAddContent libtextstyle_xmlNodeAddContent -#define xmlNodeAddContentLen libtextstyle_xmlNodeAddContentLen -#define xmlNodeBufGetContent libtextstyle_xmlNodeBufGetContent -#define xmlNodeGetBase libtextstyle_xmlNodeGetBase -#define xmlNodeGetContent libtextstyle_xmlNodeGetContent -#define xmlNodeGetLang libtextstyle_xmlNodeGetLang -#define xmlNodeGetSpacePreserve libtextstyle_xmlNodeGetSpacePreserve -#define xmlNodeIsText libtextstyle_xmlNodeIsText -#define xmlNodeListGetRawString libtextstyle_xmlNodeListGetRawString -#define xmlNodeListGetString libtextstyle_xmlNodeListGetString -#define xmlNodeSetBase libtextstyle_xmlNodeSetBase -#define xmlNodeSetContent libtextstyle_xmlNodeSetContent -#define xmlNodeSetContentLen libtextstyle_xmlNodeSetContentLen -#define xmlNodeSetLang libtextstyle_xmlNodeSetLang -#define xmlNodeSetName libtextstyle_xmlNodeSetName -#define xmlNodeSetSpacePreserve libtextstyle_xmlNodeSetSpacePreserve -#define xmlNormalizeURIPath libtextstyle_xmlNormalizeURIPath -#define xmlNormalizeWindowsPath libtextstyle_xmlNormalizeWindowsPath -#define xmlOutputBufferCreateFilenameDefault libtextstyle_xmlOutputBufferCreateFilenameDefault -#define xmlOutputBufferCreateFilenameValue libtextstyle_xmlOutputBufferCreateFilenameValue -#define xmlParseAttValue libtextstyle_xmlParseAttValue -#define xmlParseAttributeListDecl libtextstyle_xmlParseAttributeListDecl -#define xmlParseAttributeType libtextstyle_xmlParseAttributeType -#define xmlParseCDSect libtextstyle_xmlParseCDSect -#define xmlParseCharData libtextstyle_xmlParseCharData -#define xmlParseCharEncoding libtextstyle_xmlParseCharEncoding -#define xmlParseCharRef libtextstyle_xmlParseCharRef -#define xmlParseComment libtextstyle_xmlParseComment -#define xmlParseContent libtextstyle_xmlParseContent -#define xmlParseCtxtExternalEntity libtextstyle_xmlParseCtxtExternalEntity -#define xmlParseDefaultDecl libtextstyle_xmlParseDefaultDecl -#define xmlParseDocTypeDecl libtextstyle_xmlParseDocTypeDecl -#define xmlParseDocument libtextstyle_xmlParseDocument -#define xmlParseElement libtextstyle_xmlParseElement -#define xmlParseElementChildrenContentDecl libtextstyle_xmlParseElementChildrenContentDecl -#define xmlParseElementContentDecl libtextstyle_xmlParseElementContentDecl -#define xmlParseElementDecl libtextstyle_xmlParseElementDecl -#define xmlParseElementMixedContentDecl libtextstyle_xmlParseElementMixedContentDecl -#define xmlParseEncName libtextstyle_xmlParseEncName -#define xmlParseEncodingDecl libtextstyle_xmlParseEncodingDecl -#define xmlParseEntityDecl libtextstyle_xmlParseEntityDecl -#define xmlParseEntityRef libtextstyle_xmlParseEntityRef -#define xmlParseEntityValue libtextstyle_xmlParseEntityValue -#define xmlParseEnumeratedType libtextstyle_xmlParseEnumeratedType -#define xmlParseEnumerationType libtextstyle_xmlParseEnumerationType -#define xmlParseExtParsedEnt libtextstyle_xmlParseExtParsedEnt -#define xmlParseExternalID libtextstyle_xmlParseExternalID -#define xmlParseExternalSubset libtextstyle_xmlParseExternalSubset -#define xmlParseInNodeContext libtextstyle_xmlParseInNodeContext -#define xmlParseMarkupDecl libtextstyle_xmlParseMarkupDecl -#define xmlParseMisc libtextstyle_xmlParseMisc -#define xmlParseName libtextstyle_xmlParseName -#define xmlParseNmtoken libtextstyle_xmlParseNmtoken -#define xmlParseNotationDecl libtextstyle_xmlParseNotationDecl -#define xmlParseNotationType libtextstyle_xmlParseNotationType -#define xmlParsePEReference libtextstyle_xmlParsePEReference -#define xmlParsePI libtextstyle_xmlParsePI -#define xmlParsePITarget libtextstyle_xmlParsePITarget -#define xmlParsePubidLiteral libtextstyle_xmlParsePubidLiteral -#define xmlParseReference libtextstyle_xmlParseReference -#define xmlParseSDDecl libtextstyle_xmlParseSDDecl -#define xmlParseSystemLiteral libtextstyle_xmlParseSystemLiteral -#define xmlParseTextDecl libtextstyle_xmlParseTextDecl -#define xmlParseURI libtextstyle_xmlParseURI -#define xmlParseURIRaw libtextstyle_xmlParseURIRaw -#define xmlParseURIReference libtextstyle_xmlParseURIReference -#define xmlParseVersionInfo libtextstyle_xmlParseVersionInfo -#define xmlParseVersionNum libtextstyle_xmlParseVersionNum -#define xmlParseXMLDecl libtextstyle_xmlParseXMLDecl -#define xmlParserAddNodeInfo libtextstyle_xmlParserAddNodeInfo -#define xmlParserDebugEntities libtextstyle_xmlParserDebugEntities -#define xmlParserError libtextstyle_xmlParserError -#define xmlParserFindNodeInfo libtextstyle_xmlParserFindNodeInfo -#define xmlParserFindNodeInfoIndex libtextstyle_xmlParserFindNodeInfoIndex -#define xmlParserGetDirectory libtextstyle_xmlParserGetDirectory -#define xmlParserHandlePEReference libtextstyle_xmlParserHandlePEReference -#define xmlParserInputBufferCreateFd libtextstyle_xmlParserInputBufferCreateFd -#define xmlParserInputBufferCreateFile libtextstyle_xmlParserInputBufferCreateFile -#define xmlParserInputBufferCreateFilename libtextstyle_xmlParserInputBufferCreateFilename -#define xmlParserInputBufferCreateFilenameDefault libtextstyle_xmlParserInputBufferCreateFilenameDefault -#define xmlParserInputBufferCreateFilenameValue libtextstyle_xmlParserInputBufferCreateFilenameValue -#define xmlParserInputBufferCreateIO libtextstyle_xmlParserInputBufferCreateIO -#define xmlParserInputBufferCreateMem libtextstyle_xmlParserInputBufferCreateMem -#define xmlParserInputBufferCreateStatic libtextstyle_xmlParserInputBufferCreateStatic -#define xmlParserInputBufferGrow libtextstyle_xmlParserInputBufferGrow -#define xmlParserInputBufferPush libtextstyle_xmlParserInputBufferPush -#define xmlParserInputBufferRead libtextstyle_xmlParserInputBufferRead -#define xmlParserInputGrow libtextstyle_xmlParserInputGrow -#define xmlParserInputRead libtextstyle_xmlParserInputRead -#define xmlParserInputShrink libtextstyle_xmlParserInputShrink -#define xmlParserMaxDepth libtextstyle_xmlParserMaxDepth -#define xmlParserPrintFileContext libtextstyle_xmlParserPrintFileContext -#define xmlParserPrintFileInfo libtextstyle_xmlParserPrintFileInfo -#define xmlParserValidityError libtextstyle_xmlParserValidityError -#define xmlParserValidityWarning libtextstyle_xmlParserValidityWarning -#define xmlParserVersion libtextstyle_xmlParserVersion -#define xmlParserWarning libtextstyle_xmlParserWarning -#define xmlPathToURI libtextstyle_xmlPathToURI -#define xmlPedanticParserDefault libtextstyle_xmlPedanticParserDefault -#define xmlPedanticParserDefaultValue libtextstyle_xmlPedanticParserDefaultValue -#define xmlPopInput libtextstyle_xmlPopInput -#define xmlPopInputCallbacks libtextstyle_xmlPopInputCallbacks -#define xmlPreviousElementSibling libtextstyle_xmlPreviousElementSibling -#define xmlPrintURI libtextstyle_xmlPrintURI -#define xmlPushInput libtextstyle_xmlPushInput -#define xmlRMutexLock libtextstyle_xmlRMutexLock -#define xmlRMutexUnlock libtextstyle_xmlRMutexUnlock -#define xmlReadDoc libtextstyle_xmlReadDoc -#define xmlReadFd libtextstyle_xmlReadFd -#define xmlReadFile libtextstyle_xmlReadFile -#define xmlReadIO libtextstyle_xmlReadIO -#define xmlReadMemory libtextstyle_xmlReadMemory -#define xmlRealloc libtextstyle_xmlRealloc -#define xmlReallocLoc libtextstyle_xmlReallocLoc -#define xmlReconciliateNs libtextstyle_xmlReconciliateNs -#define xmlRegisterCharEncodingHandler libtextstyle_xmlRegisterCharEncodingHandler -#define xmlRegisterDefaultInputCallbacks libtextstyle_xmlRegisterDefaultInputCallbacks -#define xmlRegisterInputCallbacks libtextstyle_xmlRegisterInputCallbacks -#define xmlRegisterNodeDefault libtextstyle_xmlRegisterNodeDefault -#define xmlRegisterNodeDefaultValue libtextstyle_xmlRegisterNodeDefaultValue -#define xmlRemoveID libtextstyle_xmlRemoveID -#define xmlRemoveProp libtextstyle_xmlRemoveProp -#define xmlRemoveRef libtextstyle_xmlRemoveRef -#define xmlReplaceNode libtextstyle_xmlReplaceNode -#define xmlResetError libtextstyle_xmlResetError -#define xmlResetLastError libtextstyle_xmlResetLastError -#define xmlSAX2AttributeDecl libtextstyle_xmlSAX2AttributeDecl -#define xmlSAX2CDataBlock libtextstyle_xmlSAX2CDataBlock -#define xmlSAX2Characters libtextstyle_xmlSAX2Characters -#define xmlSAX2Comment libtextstyle_xmlSAX2Comment -#define xmlSAX2ElementDecl libtextstyle_xmlSAX2ElementDecl -#define xmlSAX2EndDocument libtextstyle_xmlSAX2EndDocument -#define xmlSAX2EndElementNs libtextstyle_xmlSAX2EndElementNs -#define xmlSAX2EntityDecl libtextstyle_xmlSAX2EntityDecl -#define xmlSAX2ExternalSubset libtextstyle_xmlSAX2ExternalSubset -#define xmlSAX2GetColumnNumber libtextstyle_xmlSAX2GetColumnNumber -#define xmlSAX2GetEntity libtextstyle_xmlSAX2GetEntity -#define xmlSAX2GetLineNumber libtextstyle_xmlSAX2GetLineNumber -#define xmlSAX2GetParameterEntity libtextstyle_xmlSAX2GetParameterEntity -#define xmlSAX2GetPublicId libtextstyle_xmlSAX2GetPublicId -#define xmlSAX2GetSystemId libtextstyle_xmlSAX2GetSystemId -#define xmlSAX2HasExternalSubset libtextstyle_xmlSAX2HasExternalSubset -#define xmlSAX2HasInternalSubset libtextstyle_xmlSAX2HasInternalSubset -#define xmlSAX2IgnorableWhitespace libtextstyle_xmlSAX2IgnorableWhitespace -#define xmlSAX2InitDefaultSAXHandler libtextstyle_xmlSAX2InitDefaultSAXHandler -#define xmlSAX2InternalSubset libtextstyle_xmlSAX2InternalSubset -#define xmlSAX2IsStandalone libtextstyle_xmlSAX2IsStandalone -#define xmlSAX2NotationDecl libtextstyle_xmlSAX2NotationDecl -#define xmlSAX2ProcessingInstruction libtextstyle_xmlSAX2ProcessingInstruction -#define xmlSAX2Reference libtextstyle_xmlSAX2Reference -#define xmlSAX2ResolveEntity libtextstyle_xmlSAX2ResolveEntity -#define xmlSAX2SetDocumentLocator libtextstyle_xmlSAX2SetDocumentLocator -#define xmlSAX2StartDocument libtextstyle_xmlSAX2StartDocument -#define xmlSAX2StartElementNs libtextstyle_xmlSAX2StartElementNs -#define xmlSAX2UnparsedEntityDecl libtextstyle_xmlSAX2UnparsedEntityDecl -#define xmlSAXVersion libtextstyle_xmlSAXVersion -#define xmlSaveNoEmptyTags libtextstyle_xmlSaveNoEmptyTags -#define xmlSaveUri libtextstyle_xmlSaveUri -#define xmlSearchNs libtextstyle_xmlSearchNs -#define xmlSearchNsByHref libtextstyle_xmlSearchNsByHref -#define xmlSetBufferAllocationScheme libtextstyle_xmlSetBufferAllocationScheme -#define xmlSetCompressMode libtextstyle_xmlSetCompressMode -#define xmlSetDocCompressMode libtextstyle_xmlSetDocCompressMode -#define xmlSetExternalEntityLoader libtextstyle_xmlSetExternalEntityLoader -#define xmlSetGenericErrorFunc libtextstyle_xmlSetGenericErrorFunc -#define xmlSetListDoc libtextstyle_xmlSetListDoc -#define xmlSetNs libtextstyle_xmlSetNs -#define xmlSetNsProp libtextstyle_xmlSetNsProp -#define xmlSetProp libtextstyle_xmlSetProp -#define xmlSetStructuredErrorFunc libtextstyle_xmlSetStructuredErrorFunc -#define xmlSetTreeDoc libtextstyle_xmlSetTreeDoc -#define xmlSkipBlankChars libtextstyle_xmlSkipBlankChars -#define xmlSnprintfElementContent libtextstyle_xmlSnprintfElementContent -#define xmlSplitQName libtextstyle_xmlSplitQName -#define xmlSplitQName2 libtextstyle_xmlSplitQName2 -#define xmlSplitQName3 libtextstyle_xmlSplitQName3 -#define xmlStopParser libtextstyle_xmlStopParser -#define xmlStrEqual libtextstyle_xmlStrEqual -#define xmlStrPrintf libtextstyle_xmlStrPrintf -#define xmlStrQEqual libtextstyle_xmlStrQEqual -#define xmlStrVPrintf libtextstyle_xmlStrVPrintf -#define xmlStrcasecmp libtextstyle_xmlStrcasecmp -#define xmlStrcasestr libtextstyle_xmlStrcasestr -#define xmlStrcat libtextstyle_xmlStrcat -#define xmlStrchr libtextstyle_xmlStrchr -#define xmlStrcmp libtextstyle_xmlStrcmp -#define xmlStrdup libtextstyle_xmlStrdup -#define xmlStringComment libtextstyle_xmlStringComment -#define xmlStringCurrentChar libtextstyle_xmlStringCurrentChar -#define xmlStringDecodeEntities libtextstyle_xmlStringDecodeEntities -#define xmlStringGetNodeList libtextstyle_xmlStringGetNodeList -#define xmlStringLenDecodeEntities libtextstyle_xmlStringLenDecodeEntities -#define xmlStringLenGetNodeList libtextstyle_xmlStringLenGetNodeList -#define xmlStringText libtextstyle_xmlStringText -#define xmlStringTextNoenc libtextstyle_xmlStringTextNoenc -#define xmlStrlen libtextstyle_xmlStrlen -#define xmlStrncasecmp libtextstyle_xmlStrncasecmp -#define xmlStrncat libtextstyle_xmlStrncat -#define xmlStrncatNew libtextstyle_xmlStrncatNew -#define xmlStrncmp libtextstyle_xmlStrncmp -#define xmlStrndup libtextstyle_xmlStrndup -#define xmlStrstr libtextstyle_xmlStrstr -#define xmlStrsub libtextstyle_xmlStrsub -#define xmlStructuredError libtextstyle_xmlStructuredError -#define xmlStructuredErrorContext libtextstyle_xmlStructuredErrorContext -#define xmlSubstituteEntitiesDefault libtextstyle_xmlSubstituteEntitiesDefault -#define xmlSubstituteEntitiesDefaultValue libtextstyle_xmlSubstituteEntitiesDefaultValue -#define xmlSwitchEncoding libtextstyle_xmlSwitchEncoding -#define xmlSwitchInputEncoding libtextstyle_xmlSwitchInputEncoding -#define xmlSwitchToEncoding libtextstyle_xmlSwitchToEncoding -#define xmlTextConcat libtextstyle_xmlTextConcat -#define xmlTextMerge libtextstyle_xmlTextMerge -#define xmlThrDefBufferAllocScheme libtextstyle_xmlThrDefBufferAllocScheme -#define xmlThrDefDefaultBufferSize libtextstyle_xmlThrDefDefaultBufferSize -#define xmlThrDefDeregisterNodeDefault libtextstyle_xmlThrDefDeregisterNodeDefault -#define xmlThrDefDoValidityCheckingDefaultValue libtextstyle_xmlThrDefDoValidityCheckingDefaultValue -#define xmlThrDefGetWarningsDefaultValue libtextstyle_xmlThrDefGetWarningsDefaultValue -#define xmlThrDefIndentTreeOutput libtextstyle_xmlThrDefIndentTreeOutput -#define xmlThrDefKeepBlanksDefaultValue libtextstyle_xmlThrDefKeepBlanksDefaultValue -#define xmlThrDefLineNumbersDefaultValue libtextstyle_xmlThrDefLineNumbersDefaultValue -#define xmlThrDefLoadExtDtdDefaultValue libtextstyle_xmlThrDefLoadExtDtdDefaultValue -#define xmlThrDefOutputBufferCreateFilenameDefault libtextstyle_xmlThrDefOutputBufferCreateFilenameDefault -#define xmlThrDefParserDebugEntities libtextstyle_xmlThrDefParserDebugEntities -#define xmlThrDefParserInputBufferCreateFilenameDefault libtextstyle_xmlThrDefParserInputBufferCreateFilenameDefault -#define xmlThrDefPedanticParserDefaultValue libtextstyle_xmlThrDefPedanticParserDefaultValue -#define xmlThrDefRegisterNodeDefault libtextstyle_xmlThrDefRegisterNodeDefault -#define xmlThrDefSaveNoEmptyTags libtextstyle_xmlThrDefSaveNoEmptyTags -#define xmlThrDefSetGenericErrorFunc libtextstyle_xmlThrDefSetGenericErrorFunc -#define xmlThrDefSetStructuredErrorFunc libtextstyle_xmlThrDefSetStructuredErrorFunc -#define xmlThrDefSubstituteEntitiesDefaultValue libtextstyle_xmlThrDefSubstituteEntitiesDefaultValue -#define xmlThrDefTreeIndentString libtextstyle_xmlThrDefTreeIndentString -#define xmlTreeIndentString libtextstyle_xmlTreeIndentString -#define xmlURIEscape libtextstyle_xmlURIEscape -#define xmlURIEscapeStr libtextstyle_xmlURIEscapeStr -#define xmlURIUnescapeString libtextstyle_xmlURIUnescapeString -#define xmlUTF8Charcmp libtextstyle_xmlUTF8Charcmp -#define xmlUTF8Size libtextstyle_xmlUTF8Size -#define xmlUTF8Strlen libtextstyle_xmlUTF8Strlen -#define xmlUTF8Strloc libtextstyle_xmlUTF8Strloc -#define xmlUTF8Strndup libtextstyle_xmlUTF8Strndup -#define xmlUTF8Strpos libtextstyle_xmlUTF8Strpos -#define xmlUTF8Strsize libtextstyle_xmlUTF8Strsize -#define xmlUTF8Strsub libtextstyle_xmlUTF8Strsub -#define xmlUnlinkNode libtextstyle_xmlUnlinkNode -#define xmlUnlockLibrary libtextstyle_xmlUnlockLibrary -#define xmlUnsetNsProp libtextstyle_xmlUnsetNsProp -#define xmlUnsetProp libtextstyle_xmlUnsetProp -#define xmlValidateNCName libtextstyle_xmlValidateNCName -#define xmlValidateNMToken libtextstyle_xmlValidateNMToken -#define xmlValidateName libtextstyle_xmlValidateName -#define xmlValidateQName libtextstyle_xmlValidateQName -#define xnmalloc libtextstyle_xnmalloc -#define xrealloc libtextstyle_xrealloc -#define xstrdup libtextstyle_xstrdup -#define xvasprintf libtextstyle_xvasprintf -#define xzalloc libtextstyle_xzalloc diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/math.h b/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/math.h deleted file mode 100644 index 735b287c5..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/math.h +++ /dev/null @@ -1,3008 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_LTS_MATH_H - -#if __GNUC__ >= 3 - -#endif - - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h" - -#ifndef _GL_LTS_MATH_H -#define _GL_LTS_MATH_H - -/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ -#if defined __VMS && ! defined NAN -# include -#endif - -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif -_GL_INLINE_HEADER_BEGIN -#ifndef _GL_MATH_INLINE -# define _GL_MATH_INLINE _GL_INLINE -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -#ifdef __cplusplus -/* Helper macros to define type-generic function FUNC as overloaded functions, - rather than as macros like in C. POSIX declares these with an argument of - real-floating (that is, one of float, double, or long double). */ -# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ -static inline int \ -_gl_cxx_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -static inline int \ -_gl_cxx_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -static inline int \ -_gl_cxx_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \ -_GL_BEGIN_NAMESPACE \ -inline rettype \ -rpl_func (float f) \ -{ \ - return _gl_cxx_ ## func ## f (f); \ -} \ -inline rettype \ -rpl_func (double d) \ -{ \ - return _gl_cxx_ ## func ## d (d); \ -} \ -inline rettype \ -rpl_func (long double l) \ -{ \ - return _gl_cxx_ ## func ## l (l); \ -} \ -_GL_END_NAMESPACE -#endif - -/* Helper macros to define a portability warning for the - classification macro FUNC called with VALUE. POSIX declares the - classification macros with an argument of real-floating (that is, - one of float, double, or long double). */ -#define _GL_WARN_REAL_FLOATING_DECL(func) \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ - (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ - : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ - : rpl_ ## func ## l (value)) - - -#if 0 -/* Pull in a function that fixes the 'int' to 'long double' conversion - of glibc 2.7. */ -_GL_EXTERN_C void _Qp_itoq (long double *, int); -static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; -#endif - - -/* For clang: Use __has_builtin to determine whether a builtin is available. */ -#ifndef __has_builtin -# define __has_builtin(name) 0 -#endif - - -/* POSIX allows platforms that don't support NAN. But all major - machines in the past 15 years have supported something close to - IEEE NaN, so we define this unconditionally. We also must define - it on platforms like Solaris 10, where NAN is present but defined - as a function pointer rather than a floating point constant. */ -#if !defined NAN || 0 -# if !GNULIB_defined_NAN -# undef NAN - /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler - choke on the expression 0.0 / 0.0. */ -# if defined __DECC || defined _MSC_VER -_GL_MATH_INLINE float -_NaN () -{ - static float zero = 0.0f; - return zero / zero; -} -# define NAN (_NaN()) -# else -# define NAN (0.0f / 0.0f) -# endif -# define GNULIB_defined_NAN 1 -# endif -#endif - -/* Solaris 10 defines HUGE_VAL, but as a function pointer rather - than a floating point constant. */ -#if 0 -# undef HUGE_VALF -# define HUGE_VALF (1.0f / 0.0f) -# undef HUGE_VAL -# define HUGE_VAL (1.0 / 0.0) -# undef HUGE_VALL -# define HUGE_VALL (1.0L / 0.0L) -#endif - -/* HUGE_VALF is a 'float' Infinity. */ -#ifndef HUGE_VALF -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ -# define HUGE_VALF (1e25f * 1e25f) -# else -# define HUGE_VALF (1.0f / 0.0f) -# endif -#endif - -/* HUGE_VAL is a 'double' Infinity. */ -#ifndef HUGE_VAL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ -# define HUGE_VAL (1e250 * 1e250) -# else -# define HUGE_VAL (1.0 / 0.0) -# endif -#endif - -/* HUGE_VALL is a 'long double' Infinity. */ -#ifndef HUGE_VALL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ -# define HUGE_VALL (1e250L * 1e250L) -# else -# define HUGE_VALL (1.0L / 0.0L) -# endif -#endif - - -#if defined FP_ILOGB0 && defined FP_ILOGBNAN - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */ -# if defined __HAIKU__ - /* Haiku: match what ilogb() does */ -# undef FP_ILOGB0 -# undef FP_ILOGBNAN -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#else - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ -# if defined __NetBSD__ || defined __sgi - /* NetBSD, IRIX 6.5: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# elif defined _AIX - /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# elif defined __sun - /* Solaris 9: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# else - /* Gnulib defined values. */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef acosf -# define acosf rpl_acosf -# endif -_GL_FUNCDECL_RPL (acosf, float, (float x)); -_GL_CXXALIAS_RPL (acosf, float, (float x)); -# else -# if !1 -# undef acosf -_GL_FUNCDECL_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIASWARN (acosf); -#elif defined GNULIB_POSIXCHECK -# undef acosf -# if HAVE_RAW_DECL_ACOSF -_GL_WARN_ON_USE (acosf, "acosf is unportable - " - "use gnulib module acosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef acosl -_GL_FUNCDECL_SYS (acosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (acosl, long double, (long double x)); -_GL_CXXALIASWARN (acosl); -#elif defined GNULIB_POSIXCHECK -# undef acosl -# if HAVE_RAW_DECL_ACOSL -_GL_WARN_ON_USE (acosl, "acosl is unportable - " - "use gnulib module acosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef asinf -# define asinf rpl_asinf -# endif -_GL_FUNCDECL_RPL (asinf, float, (float x)); -_GL_CXXALIAS_RPL (asinf, float, (float x)); -# else -# if !1 -# undef asinf -_GL_FUNCDECL_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIASWARN (asinf); -#elif defined GNULIB_POSIXCHECK -# undef asinf -# if HAVE_RAW_DECL_ASINF -_GL_WARN_ON_USE (asinf, "asinf is unportable - " - "use gnulib module asinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef asinl -_GL_FUNCDECL_SYS (asinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (asinl, long double, (long double x)); -_GL_CXXALIASWARN (asinl); -#elif defined GNULIB_POSIXCHECK -# undef asinl -# if HAVE_RAW_DECL_ASINL -_GL_WARN_ON_USE (asinl, "asinl is unportable - " - "use gnulib module asinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atanf -# define atanf rpl_atanf -# endif -_GL_FUNCDECL_RPL (atanf, float, (float x)); -_GL_CXXALIAS_RPL (atanf, float, (float x)); -# else -# if !1 -# undef atanf -_GL_FUNCDECL_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIASWARN (atanf); -#elif defined GNULIB_POSIXCHECK -# undef atanf -# if HAVE_RAW_DECL_ATANF -_GL_WARN_ON_USE (atanf, "atanf is unportable - " - "use gnulib module atanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef atanl -_GL_FUNCDECL_SYS (atanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (atanl, long double, (long double x)); -_GL_CXXALIASWARN (atanl); -#elif defined GNULIB_POSIXCHECK -# undef atanl -# if HAVE_RAW_DECL_ATANL -_GL_WARN_ON_USE (atanl, "atanl is unportable - " - "use gnulib module atanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atan2f -# define atan2f rpl_atan2f -# endif -_GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); -_GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); -# else -# if !1 -# undef atan2f -_GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIASWARN (atan2f); -#elif defined GNULIB_POSIXCHECK -# undef atan2f -# if HAVE_RAW_DECL_ATAN2F -_GL_WARN_ON_USE (atan2f, "atan2f is unportable - " - "use gnulib module atan2f for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtf -# define cbrtf rpl_cbrtf -# endif -_GL_FUNCDECL_RPL (cbrtf, float, (float x)); -_GL_CXXALIAS_RPL (cbrtf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (cbrtf); -#elif defined GNULIB_POSIXCHECK -# undef cbrtf -# if HAVE_RAW_DECL_CBRTF -_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " - "use gnulib module cbrtf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (cbrt, double, (double x)); -# endif -_GL_CXXALIAS_SYS (cbrt, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (cbrt); -# endif -#elif defined GNULIB_POSIXCHECK -# undef cbrt -# if HAVE_RAW_DECL_CBRT -_GL_WARN_ON_USE (cbrt, "cbrt is unportable - " - "use gnulib module cbrt for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtl -# define cbrtl rpl_cbrtl -# endif -_GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (cbrtl); -#elif defined GNULIB_POSIXCHECK -# undef cbrtl -# if HAVE_RAW_DECL_CBRTL -_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " - "use gnulib module cbrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceilf -# define ceilf rpl_ceilf -# endif -_GL_FUNCDECL_RPL (ceilf, float, (float x)); -_GL_CXXALIAS_RPL (ceilf, float, (float x)); -# else -# if !1 -# undef ceilf -_GL_FUNCDECL_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIASWARN (ceilf); -#elif defined GNULIB_POSIXCHECK -# undef ceilf -# if HAVE_RAW_DECL_CEILF -_GL_WARN_ON_USE (ceilf, "ceilf is unportable - " - "use gnulib module ceilf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceil -# define ceil rpl_ceil -# endif -_GL_FUNCDECL_RPL (ceil, double, (double x)); -_GL_CXXALIAS_RPL (ceil, double, (double x)); -# else -_GL_CXXALIAS_SYS (ceil, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ceil); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceill -# define ceill rpl_ceill -# endif -_GL_FUNCDECL_RPL (ceill, long double, (long double x)); -_GL_CXXALIAS_RPL (ceill, long double, (long double x)); -# else -# if !1 -# undef ceill -_GL_FUNCDECL_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIASWARN (ceill); -#elif defined GNULIB_POSIXCHECK -# undef ceill -# if HAVE_RAW_DECL_CEILL -_GL_WARN_ON_USE (ceill, "ceill is unportable - " - "use gnulib module ceill for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef copysignf -_GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); -_GL_CXXALIASWARN (copysignf); -#elif defined GNULIB_POSIXCHECK -# undef copysignf -# if HAVE_RAW_DECL_COPYSIGNF -_GL_WARN_ON_USE (copysignf, "copysignf is unportable - " - "use gnulib module copysignf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysign, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (copysign, double, (double x, double y)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (copysign); -# endif -#elif defined GNULIB_POSIXCHECK -# undef copysign -# if HAVE_RAW_DECL_COPYSIGN -_GL_WARN_ON_USE (copysign, "copysign is unportable - " - "use gnulib module copysign for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); -_GL_CXXALIASWARN (copysignl); -#elif defined GNULIB_POSIXCHECK -# undef copysignl -# if HAVE_RAW_DECL_COPYSIGNL -_GL_WARN_ON_USE (copysign, "copysignl is unportable - " - "use gnulib module copysignl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cosf -# define cosf rpl_cosf -# endif -_GL_FUNCDECL_RPL (cosf, float, (float x)); -_GL_CXXALIAS_RPL (cosf, float, (float x)); -# else -# if !1 -# undef cosf -_GL_FUNCDECL_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIASWARN (cosf); -#elif defined GNULIB_POSIXCHECK -# undef cosf -# if HAVE_RAW_DECL_COSF -_GL_WARN_ON_USE (cosf, "cosf is unportable - " - "use gnulib module cosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef cosl -_GL_FUNCDECL_SYS (cosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cosl, long double, (long double x)); -_GL_CXXALIASWARN (cosl); -#elif defined GNULIB_POSIXCHECK -# undef cosl -# if HAVE_RAW_DECL_COSL -_GL_WARN_ON_USE (cosl, "cosl is unportable - " - "use gnulib module cosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef coshf -# define coshf rpl_coshf -# endif -_GL_FUNCDECL_RPL (coshf, float, (float x)); -_GL_CXXALIAS_RPL (coshf, float, (float x)); -# else -# if !1 -# undef coshf -_GL_FUNCDECL_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIASWARN (coshf); -#elif defined GNULIB_POSIXCHECK -# undef coshf -# if HAVE_RAW_DECL_COSHF -_GL_WARN_ON_USE (coshf, "coshf is unportable - " - "use gnulib module coshf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expf -# define expf rpl_expf -# endif -_GL_FUNCDECL_RPL (expf, float, (float x)); -_GL_CXXALIAS_RPL (expf, float, (float x)); -# else -# if !1 -# undef expf -_GL_FUNCDECL_SYS (expf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expf, float, (float x)); -# endif -_GL_CXXALIASWARN (expf); -#elif defined GNULIB_POSIXCHECK -# undef expf -# if HAVE_RAW_DECL_EXPF -_GL_WARN_ON_USE (expf, "expf is unportable - " - "use gnulib module expf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expl -# define expl rpl_expl -# endif -_GL_FUNCDECL_RPL (expl, long double, (long double x)); -_GL_CXXALIAS_RPL (expl, long double, (long double x)); -# else -# if !1 || !1 -# undef expl -_GL_FUNCDECL_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expl); -#elif defined GNULIB_POSIXCHECK -# undef expl -# if HAVE_RAW_DECL_EXPL -_GL_WARN_ON_USE (expl, "expl is unportable - " - "use gnulib module expl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (exp2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (exp2f, float, (float x)); -_GL_CXXALIASWARN (exp2f); -#elif defined GNULIB_POSIXCHECK -# undef exp2f -# if HAVE_RAW_DECL_EXP2F -_GL_WARN_ON_USE (exp2f, "exp2f is unportable - " - "use gnulib module exp2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2 -# define exp2 rpl_exp2 -# endif -_GL_FUNCDECL_RPL (exp2, double, (double x)); -_GL_CXXALIAS_RPL (exp2, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (exp2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (exp2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (exp2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef exp2 -# if HAVE_RAW_DECL_EXP2 -_GL_WARN_ON_USE (exp2, "exp2 is unportable - " - "use gnulib module exp2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2l -# define exp2l rpl_exp2l -# endif -_GL_FUNCDECL_RPL (exp2l, long double, (long double x)); -_GL_CXXALIAS_RPL (exp2l, long double, (long double x)); -# else -# if !1 -# undef exp2l -_GL_FUNCDECL_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (exp2l); -#elif defined GNULIB_POSIXCHECK -# undef exp2l -# if HAVE_RAW_DECL_EXP2L -_GL_WARN_ON_USE (exp2l, "exp2l is unportable - " - "use gnulib module exp2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1f -# define expm1f rpl_expm1f -# endif -_GL_FUNCDECL_RPL (expm1f, float, (float x)); -_GL_CXXALIAS_RPL (expm1f, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIASWARN (expm1f); -#elif defined GNULIB_POSIXCHECK -# undef expm1f -# if HAVE_RAW_DECL_EXPM1F -_GL_WARN_ON_USE (expm1f, "expm1f is unportable - " - "use gnulib module expm1f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1 -# define expm1 rpl_expm1 -# endif -_GL_FUNCDECL_RPL (expm1, double, (double x)); -_GL_CXXALIAS_RPL (expm1, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1, double, (double x)); -# endif -_GL_CXXALIAS_SYS (expm1, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (expm1); -# endif -#elif defined GNULIB_POSIXCHECK -# undef expm1 -# if HAVE_RAW_DECL_EXPM1 -_GL_WARN_ON_USE (expm1, "expm1 is unportable - " - "use gnulib module expm1 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1l -# define expm1l rpl_expm1l -# endif -_GL_FUNCDECL_RPL (expm1l, long double, (long double x)); -_GL_CXXALIAS_RPL (expm1l, long double, (long double x)); -# else -# if !1 -# undef expm1l -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (expm1l, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (expm1l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expm1l); -#elif defined GNULIB_POSIXCHECK -# undef expm1l -# if HAVE_RAW_DECL_EXPM1L -_GL_WARN_ON_USE (expm1l, "expm1l is unportable - " - "use gnulib module expm1l for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef fabsf -_GL_FUNCDECL_SYS (fabsf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (fabsf, float, (float x)); -_GL_CXXALIASWARN (fabsf); -#elif defined GNULIB_POSIXCHECK -# undef fabsf -# if HAVE_RAW_DECL_FABSF -_GL_WARN_ON_USE (fabsf, "fabsf is unportable - " - "use gnulib module fabsf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fabsl -# define fabsl rpl_fabsl -# endif -_GL_FUNCDECL_RPL (fabsl, long double, (long double x)); -_GL_CXXALIAS_RPL (fabsl, long double, (long double x)); -# else -# if !1 -# undef fabsl -_GL_FUNCDECL_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (fabsl); -#elif defined GNULIB_POSIXCHECK -# undef fabsl -# if HAVE_RAW_DECL_FABSL -_GL_WARN_ON_USE (fabsl, "fabsl is unportable - " - "use gnulib module fabsl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorf -# define floorf rpl_floorf -# endif -_GL_FUNCDECL_RPL (floorf, float, (float x)); -_GL_CXXALIAS_RPL (floorf, float, (float x)); -# else -# if !1 -# undef floorf -_GL_FUNCDECL_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIASWARN (floorf); -#elif defined GNULIB_POSIXCHECK -# undef floorf -# if HAVE_RAW_DECL_FLOORF -_GL_WARN_ON_USE (floorf, "floorf is unportable - " - "use gnulib module floorf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floor -# define floor rpl_floor -# endif -_GL_FUNCDECL_RPL (floor, double, (double x)); -_GL_CXXALIAS_RPL (floor, double, (double x)); -# else -_GL_CXXALIAS_SYS (floor, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (floor); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorl -# define floorl rpl_floorl -# endif -_GL_FUNCDECL_RPL (floorl, long double, (long double x)); -_GL_CXXALIAS_RPL (floorl, long double, (long double x)); -# else -# if !1 -# undef floorl -_GL_FUNCDECL_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (floorl); -#elif defined GNULIB_POSIXCHECK -# undef floorl -# if HAVE_RAW_DECL_FLOORL -_GL_WARN_ON_USE (floorl, "floorl is unportable - " - "use gnulib module floorl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmaf -# define fmaf rpl_fmaf -# endif -_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); -_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); -# else -# if !1 -# undef fmaf -_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIASWARN (fmaf); -#elif defined GNULIB_POSIXCHECK -# undef fmaf -# if HAVE_RAW_DECL_FMAF -_GL_WARN_ON_USE (fmaf, "fmaf is unportable - " - "use gnulib module fmaf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fma -# define fma rpl_fma -# endif -_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); -_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); -# else -# if !1 -# undef fma -_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); -# endif -_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fma); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fma -# if HAVE_RAW_DECL_FMA -_GL_WARN_ON_USE (fma, "fma is unportable - " - "use gnulib module fma for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmal -# define fmal rpl_fmal -# endif -_GL_FUNCDECL_RPL (fmal, long double, - (long double x, long double y, long double z)); -_GL_CXXALIAS_RPL (fmal, long double, - (long double x, long double y, long double z)); -# else -# if !1 -# undef fmal -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -# endif -_GL_CXXALIAS_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -_GL_CXXALIASWARN (fmal); -#elif defined GNULIB_POSIXCHECK -# undef fmal -# if HAVE_RAW_DECL_FMAL -_GL_WARN_ON_USE (fmal, "fmal is unportable - " - "use gnulib module fmal for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodf -# define fmodf rpl_fmodf -# endif -_GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); -_GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); -# else -# if !1 -# undef fmodf -_GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (fmodf); -#elif defined GNULIB_POSIXCHECK -# undef fmodf -# if HAVE_RAW_DECL_FMODF -_GL_WARN_ON_USE (fmodf, "fmodf is unportable - " - "use gnulib module fmodf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmod -# define fmod rpl_fmod -# endif -_GL_FUNCDECL_RPL (fmod, double, (double x, double y)); -_GL_CXXALIAS_RPL (fmod, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (fmod, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fmod); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fmod -# if HAVE_RAW_DECL_FMOD -_GL_WARN_ON_USE (fmod, "fmod has portability problems - " - "use gnulib module fmod for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodl -# define fmodl rpl_fmodl -# endif -_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); -# else -# if !1 -# undef fmodl -_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (fmodl); -#elif defined GNULIB_POSIXCHECK -# undef fmodl -# if HAVE_RAW_DECL_FMODL -_GL_WARN_ON_USE (fmodl, "fmodl is unportable - " - "use gnulib module fmodl for portability"); -# endif -#endif - - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpf -# define frexpf rpl_frexpf -# endif -_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); -# else -# if !1 -# undef frexpf -_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); -# endif -_GL_CXXALIASWARN (frexpf); -#elif defined GNULIB_POSIXCHECK -# undef frexpf -# if HAVE_RAW_DECL_FREXPF -_GL_WARN_ON_USE (frexpf, "frexpf is unportable - " - "use gnulib module frexpf for portability"); -# endif -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexp -# define frexp rpl_frexp -# endif -_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); -# else -_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef frexp -/* Assume frexp is always declared. */ -_GL_WARN_ON_USE (frexp, "frexp is unportable - " - "use gnulib module frexp for portability"); -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 1 && 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpl -# define frexpl rpl_frexpl -# endif -_GL_FUNCDECL_RPL (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); -#else -# if !1 -_GL_FUNCDECL_SYS (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -# if 1 -_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); -# endif -#endif -#if 1 && !(1 && !1) -_GL_CXXALIASWARN (frexpl); -#endif -#if !1 && defined GNULIB_POSIXCHECK -# undef frexpl -# if HAVE_RAW_DECL_FREXPL -_GL_WARN_ON_USE (frexpl, "frexpl is unportable - " - "use gnulib module frexpl for portability"); -# endif -#endif - - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotf -# define hypotf rpl_hypotf -# endif -_GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); -_GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (hypotf); -#elif defined GNULIB_POSIXCHECK -# undef hypotf -# if HAVE_RAW_DECL_HYPOTF -_GL_WARN_ON_USE (hypotf, "hypotf is unportable - " - "use gnulib module hypotf for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypot -# define hypot rpl_hypot -# endif -_GL_FUNCDECL_RPL (hypot, double, (double x, double y)); -_GL_CXXALIAS_RPL (hypot, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (hypot, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (hypot); -# endif -#elif defined GNULIB_POSIXCHECK -# undef hypot -# if HAVE_RAW_DECL_HYPOT -_GL_WARN_ON_USE (hypotf, "hypot has portability problems - " - "use gnulib module hypot for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotl -# define hypotl rpl_hypotl -# endif -_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (hypotl); -#elif defined GNULIB_POSIXCHECK -# undef hypotl -# if HAVE_RAW_DECL_HYPOTL -_GL_WARN_ON_USE (hypotl, "hypotl is unportable - " - "use gnulib module hypotl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbf -# define ilogbf rpl_ilogbf -# endif -_GL_FUNCDECL_RPL (ilogbf, int, (float x)); -_GL_CXXALIAS_RPL (ilogbf, int, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIAS_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIASWARN (ilogbf); -#elif defined GNULIB_POSIXCHECK -# undef ilogbf -# if HAVE_RAW_DECL_ILOGBF -_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " - "use gnulib module ilogbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogb -# define ilogb rpl_ilogb -# endif -_GL_FUNCDECL_RPL (ilogb, int, (double x)); -_GL_CXXALIAS_RPL (ilogb, int, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogb, int, (double x)); -# endif -_GL_CXXALIAS_SYS (ilogb, int, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ilogb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef ilogb -# if HAVE_RAW_DECL_ILOGB -_GL_WARN_ON_USE (ilogb, "ilogb is unportable - " - "use gnulib module ilogb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbl -# define ilogbl rpl_ilogbl -# endif -_GL_FUNCDECL_RPL (ilogbl, int, (long double x)); -_GL_CXXALIAS_RPL (ilogbl, int, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIASWARN (ilogbl); -#elif defined GNULIB_POSIXCHECK -# undef ilogbl -# if HAVE_RAW_DECL_ILOGBL -_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " - "use gnulib module ilogbl for portability"); -# endif -#endif - - -/* Return x * 2^exp. */ -#if 0 -# if !1 -# undef ldexpf -_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); -# endif -_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); -_GL_CXXALIASWARN (ldexpf); -#elif defined GNULIB_POSIXCHECK -# undef ldexpf -# if HAVE_RAW_DECL_LDEXPF -_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " - "use gnulib module ldexpf for portability"); -# endif -#endif - -/* Return x * 2^exp. */ -#if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ldexpl -# define ldexpl rpl_ldexpl -# endif -_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); -_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); -#else -# if !1 -_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); -# endif -# if 0 -_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); -# endif -#endif -#if 0 -_GL_CXXALIASWARN (ldexpl); -#endif -#if !0 && defined GNULIB_POSIXCHECK -# undef ldexpl -# if HAVE_RAW_DECL_LDEXPL -_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " - "use gnulib module ldexpl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logf -# define logf rpl_logf -# endif -_GL_FUNCDECL_RPL (logf, float, (float x)); -_GL_CXXALIAS_RPL (logf, float, (float x)); -# else -# if !1 -# undef logf -_GL_FUNCDECL_SYS (logf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logf, float, (float x)); -# endif -_GL_CXXALIASWARN (logf); -#elif defined GNULIB_POSIXCHECK -# undef logf -# if HAVE_RAW_DECL_LOGF -_GL_WARN_ON_USE (logf, "logf is unportable - " - "use gnulib module logf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log -# define log rpl_log -# endif -_GL_FUNCDECL_RPL (log, double, (double x)); -_GL_CXXALIAS_RPL (log, double, (double x)); -# else -_GL_CXXALIAS_SYS (log, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log -# if HAVE_RAW_DECL_LOG -_GL_WARN_ON_USE (log, "log has portability problems - " - "use gnulib module log for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logl -# define logl rpl_logl -# endif -_GL_FUNCDECL_RPL (logl, long double, (long double x)); -_GL_CXXALIAS_RPL (logl, long double, (long double x)); -# else -# if !1 || !1 -# undef logl -_GL_FUNCDECL_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logl); -#elif defined GNULIB_POSIXCHECK -# undef logl -# if HAVE_RAW_DECL_LOGL -_GL_WARN_ON_USE (logl, "logl is unportable - " - "use gnulib module logl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10f -# define log10f rpl_log10f -# endif -_GL_FUNCDECL_RPL (log10f, float, (float x)); -_GL_CXXALIAS_RPL (log10f, float, (float x)); -# else -# if !1 -# undef log10f -_GL_FUNCDECL_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIASWARN (log10f); -#elif defined GNULIB_POSIXCHECK -# undef log10f -# if HAVE_RAW_DECL_LOG10F -_GL_WARN_ON_USE (log10f, "log10f is unportable - " - "use gnulib module log10f for portability"); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10 -# define log10 rpl_log10 -# endif -_GL_FUNCDECL_RPL (log10, double, (double x)); -_GL_CXXALIAS_RPL (log10, double, (double x)); -# else -_GL_CXXALIAS_SYS (log10, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log10); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log10 -# if HAVE_RAW_DECL_LOG10 -_GL_WARN_ON_USE (log10, "log10 has portability problems - " - "use gnulib module log10 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10l -# define log10l rpl_log10l -# endif -_GL_FUNCDECL_RPL (log10l, long double, (long double x)); -_GL_CXXALIAS_RPL (log10l, long double, (long double x)); -# else -# if !1 || !1 -# undef log10l -_GL_FUNCDECL_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log10l); -#elif defined GNULIB_POSIXCHECK -# undef log10l -# if HAVE_RAW_DECL_LOG10L -_GL_WARN_ON_USE (log10l, "log10l is unportable - " - "use gnulib module log10l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pf -# define log1pf rpl_log1pf -# endif -_GL_FUNCDECL_RPL (log1pf, float, (float x)); -_GL_CXXALIAS_RPL (log1pf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIASWARN (log1pf); -#elif defined GNULIB_POSIXCHECK -# undef log1pf -# if HAVE_RAW_DECL_LOG1PF -_GL_WARN_ON_USE (log1pf, "log1pf is unportable - " - "use gnulib module log1pf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1p -# define log1p rpl_log1p -# endif -_GL_FUNCDECL_RPL (log1p, double, (double x)); -_GL_CXXALIAS_RPL (log1p, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1p, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log1p, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log1p); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log1p -# if HAVE_RAW_DECL_LOG1P -_GL_WARN_ON_USE (log1p, "log1p has portability problems - " - "use gnulib module log1p for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pl -# define log1pl rpl_log1pl -# endif -_GL_FUNCDECL_RPL (log1pl, long double, (long double x)); -_GL_CXXALIAS_RPL (log1pl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log1pl); -#elif defined GNULIB_POSIXCHECK -# undef log1pl -# if HAVE_RAW_DECL_LOG1PL -_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " - "use gnulib module log1pl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2f -# define log2f rpl_log2f -# endif -_GL_FUNCDECL_RPL (log2f, float, (float x)); -_GL_CXXALIAS_RPL (log2f, float, (float x)); -# else -# if !1 -# undef log2f -_GL_FUNCDECL_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIASWARN (log2f); -#elif defined GNULIB_POSIXCHECK -# undef log2f -# if HAVE_RAW_DECL_LOG2F -_GL_WARN_ON_USE (log2f, "log2f is unportable - " - "use gnulib module log2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2 -# define log2 rpl_log2 -# endif -_GL_FUNCDECL_RPL (log2, double, (double x)); -_GL_CXXALIAS_RPL (log2, double, (double x)); -# else -# if !1 -# undef log2 -_GL_FUNCDECL_SYS (log2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log2 -# if HAVE_RAW_DECL_LOG2 -_GL_WARN_ON_USE (log2, "log2 is unportable - " - "use gnulib module log2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2l -# define log2l rpl_log2l -# endif -_GL_FUNCDECL_RPL (log2l, long double, (long double x)); -_GL_CXXALIAS_RPL (log2l, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log2l); -#elif defined GNULIB_POSIXCHECK -# undef log2l -# if HAVE_RAW_DECL_LOG2L -_GL_WARN_ON_USE (log2l, "log2l is unportable - " - "use gnulib module log2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbf -# define logbf rpl_logbf -# endif -_GL_FUNCDECL_RPL (logbf, float, (float x)); -_GL_CXXALIAS_RPL (logbf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIASWARN (logbf); -#elif defined GNULIB_POSIXCHECK -# undef logbf -# if HAVE_RAW_DECL_LOGBF -_GL_WARN_ON_USE (logbf, "logbf is unportable - " - "use gnulib module logbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logb -# define logb rpl_logb -# endif -_GL_FUNCDECL_RPL (logb, double, (double x)); -_GL_CXXALIAS_RPL (logb, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logb, double, (double x)); -# endif -_GL_CXXALIAS_SYS (logb, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (logb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef logb -# if HAVE_RAW_DECL_LOGB -_GL_WARN_ON_USE (logb, "logb is unportable - " - "use gnulib module logb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbl -# define logbl rpl_logbl -# endif -_GL_FUNCDECL_RPL (logbl, long double, (long double x)); -_GL_CXXALIAS_RPL (logbl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logbl); -#elif defined GNULIB_POSIXCHECK -# undef logbl -# if HAVE_RAW_DECL_LOGBL -_GL_WARN_ON_USE (logbl, "logbl is unportable - " - "use gnulib module logbl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modff -# define modff rpl_modff -# endif -_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); -# else -# if !1 -# undef modff -_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); -# endif -_GL_CXXALIASWARN (modff); -#elif defined GNULIB_POSIXCHECK -# undef modff -# if HAVE_RAW_DECL_MODFF -_GL_WARN_ON_USE (modff, "modff is unportable - " - "use gnulib module modff for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modf -# define modf rpl_modf -# endif -_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); -# else -_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (modf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef modf -# if HAVE_RAW_DECL_MODF -_GL_WARN_ON_USE (modf, "modf has portability problems - " - "use gnulib module modf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modfl -# define modfl rpl_modfl -# endif -_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); -# else -# if !1 -# undef modfl -_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); -# endif -_GL_CXXALIASWARN (modfl); -#elif defined GNULIB_POSIXCHECK -# undef modfl -# if HAVE_RAW_DECL_MODFL -_GL_WARN_ON_USE (modfl, "modfl is unportable - " - "use gnulib module modfl for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef powf -_GL_FUNCDECL_SYS (powf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (powf, float, (float x, float y)); -_GL_CXXALIASWARN (powf); -#elif defined GNULIB_POSIXCHECK -# undef powf -# if HAVE_RAW_DECL_POWF -_GL_WARN_ON_USE (powf, "powf is unportable - " - "use gnulib module powf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderf -# define remainderf rpl_remainderf -# endif -_GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); -_GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (remainderf); -#elif defined GNULIB_POSIXCHECK -# undef remainderf -# if HAVE_RAW_DECL_REMAINDERF -_GL_WARN_ON_USE (remainderf, "remainderf is unportable - " - "use gnulib module remainderf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainder -# define remainder rpl_remainder -# endif -_GL_FUNCDECL_RPL (remainder, double, (double x, double y)); -_GL_CXXALIAS_RPL (remainder, double, (double x, double y)); -# else -# if !1 || !1 -_GL_FUNCDECL_SYS (remainder, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (remainder, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remainder); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remainder -# if HAVE_RAW_DECL_REMAINDER -_GL_WARN_ON_USE (remainder, "remainder is unportable - " - "use gnulib module remainder for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderl -# define remainderl rpl_remainderl -# endif -_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); -# else -# if !1 -# undef remainderl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); -# endif -# endif -_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (remainderl); -#elif defined GNULIB_POSIXCHECK -# undef remainderl -# if HAVE_RAW_DECL_REMAINDERL -_GL_WARN_ON_USE (remainderl, "remainderl is unportable - " - "use gnulib module remainderl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rintf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (rintf, float, (float x)); -_GL_CXXALIASWARN (rintf); -#elif defined GNULIB_POSIXCHECK -# undef rintf -# if HAVE_RAW_DECL_RINTF -_GL_WARN_ON_USE (rintf, "rintf is unportable - " - "use gnulib module rintf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rint, double, (double x)); -# endif -_GL_CXXALIAS_SYS (rint, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rint); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rint -# if HAVE_RAW_DECL_RINT -_GL_WARN_ON_USE (rint, "rint is unportable - " - "use gnulib module rint for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rintl -# define rintl rpl_rintl -# endif -_GL_FUNCDECL_RPL (rintl, long double, (long double x)); -_GL_CXXALIAS_RPL (rintl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (rintl); -#elif defined GNULIB_POSIXCHECK -# undef rintl -# if HAVE_RAW_DECL_RINTL -_GL_WARN_ON_USE (rintl, "rintl is unportable - " - "use gnulib module rintl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundf -# define roundf rpl_roundf -# endif -_GL_FUNCDECL_RPL (roundf, float, (float x)); -_GL_CXXALIAS_RPL (roundf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIASWARN (roundf); -#elif defined GNULIB_POSIXCHECK -# undef roundf -# if HAVE_RAW_DECL_ROUNDF -_GL_WARN_ON_USE (roundf, "roundf is unportable - " - "use gnulib module roundf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef round -# define round rpl_round -# endif -_GL_FUNCDECL_RPL (round, double, (double x)); -_GL_CXXALIAS_RPL (round, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (round, double, (double x)); -# endif -_GL_CXXALIAS_SYS (round, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (round); -# endif -#elif defined GNULIB_POSIXCHECK -# undef round -# if HAVE_RAW_DECL_ROUND -_GL_WARN_ON_USE (round, "round is unportable - " - "use gnulib module round for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundl -# define roundl rpl_roundl -# endif -_GL_FUNCDECL_RPL (roundl, long double, (long double x)); -_GL_CXXALIAS_RPL (roundl, long double, (long double x)); -# else -# if !1 -# undef roundl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (roundl, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (roundl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (roundl); -#elif defined GNULIB_POSIXCHECK -# undef roundl -# if HAVE_RAW_DECL_ROUNDL -_GL_WARN_ON_USE (roundl, "roundl is unportable - " - "use gnulib module roundl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinf -# define sinf rpl_sinf -# endif -_GL_FUNCDECL_RPL (sinf, float, (float x)); -_GL_CXXALIAS_RPL (sinf, float, (float x)); -# else -# if !1 - # undef sinf -_GL_FUNCDECL_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinf); -#elif defined GNULIB_POSIXCHECK -# undef sinf -# if HAVE_RAW_DECL_SINF -_GL_WARN_ON_USE (sinf, "sinf is unportable - " - "use gnulib module sinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef sinl -_GL_FUNCDECL_SYS (sinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sinl, long double, (long double x)); -_GL_CXXALIASWARN (sinl); -#elif defined GNULIB_POSIXCHECK -# undef sinl -# if HAVE_RAW_DECL_SINL -_GL_WARN_ON_USE (sinl, "sinl is unportable - " - "use gnulib module sinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinhf -# define sinhf rpl_sinhf -# endif -_GL_FUNCDECL_RPL (sinhf, float, (float x)); -_GL_CXXALIAS_RPL (sinhf, float, (float x)); -# else -# if !1 -# undef sinhf -_GL_FUNCDECL_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinhf); -#elif defined GNULIB_POSIXCHECK -# undef sinhf -# if HAVE_RAW_DECL_SINHF -_GL_WARN_ON_USE (sinhf, "sinhf is unportable - " - "use gnulib module sinhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtf -# define sqrtf rpl_sqrtf -# endif -_GL_FUNCDECL_RPL (sqrtf, float, (float x)); -_GL_CXXALIAS_RPL (sqrtf, float, (float x)); -# else -# if !1 -# undef sqrtf -_GL_FUNCDECL_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (sqrtf); -#elif defined GNULIB_POSIXCHECK -# undef sqrtf -# if HAVE_RAW_DECL_SQRTF -_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " - "use gnulib module sqrtf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtl -# define sqrtl rpl_sqrtl -# endif -_GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); -# else -# if !1 || !1 -# undef sqrtl -_GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (sqrtl); -#elif defined GNULIB_POSIXCHECK -# undef sqrtl -# if HAVE_RAW_DECL_SQRTL -_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " - "use gnulib module sqrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanf -# define tanf rpl_tanf -# endif -_GL_FUNCDECL_RPL (tanf, float, (float x)); -_GL_CXXALIAS_RPL (tanf, float, (float x)); -# else -# if !1 -# undef tanf -_GL_FUNCDECL_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanf); -#elif defined GNULIB_POSIXCHECK -# undef tanf -# if HAVE_RAW_DECL_TANF -_GL_WARN_ON_USE (tanf, "tanf is unportable - " - "use gnulib module tanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef tanl -_GL_FUNCDECL_SYS (tanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (tanl, long double, (long double x)); -_GL_CXXALIASWARN (tanl); -#elif defined GNULIB_POSIXCHECK -# undef tanl -# if HAVE_RAW_DECL_TANL -_GL_WARN_ON_USE (tanl, "tanl is unportable - " - "use gnulib module tanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanhf -# define tanhf rpl_tanhf -# endif -_GL_FUNCDECL_RPL (tanhf, float, (float x)); -_GL_CXXALIAS_RPL (tanhf, float, (float x)); -# else -# if !1 -# undef tanhf -_GL_FUNCDECL_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanhf); -#elif defined GNULIB_POSIXCHECK -# undef tanhf -# if HAVE_RAW_DECL_TANHF -_GL_WARN_ON_USE (tanhf, "tanhf is unportable - " - "use gnulib module tanhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncf -# define truncf rpl_truncf -# endif -_GL_FUNCDECL_RPL (truncf, float, (float x)); -_GL_CXXALIAS_RPL (truncf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIASWARN (truncf); -#elif defined GNULIB_POSIXCHECK -# undef truncf -# if HAVE_RAW_DECL_TRUNCF -_GL_WARN_ON_USE (truncf, "truncf is unportable - " - "use gnulib module truncf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef trunc -# define trunc rpl_trunc -# endif -_GL_FUNCDECL_RPL (trunc, double, (double x)); -_GL_CXXALIAS_RPL (trunc, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (trunc, double, (double x)); -# endif -_GL_CXXALIAS_SYS (trunc, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (trunc); -# endif -#elif defined GNULIB_POSIXCHECK -# undef trunc -# if HAVE_RAW_DECL_TRUNC -_GL_WARN_ON_USE (trunc, "trunc is unportable - " - "use gnulib module trunc for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncl -# define truncl rpl_truncl -# endif -_GL_FUNCDECL_RPL (truncl, long double, (long double x)); -_GL_CXXALIAS_RPL (truncl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (truncl); -#elif defined GNULIB_POSIXCHECK -# undef truncl -# if HAVE_RAW_DECL_TRUNCL -_GL_WARN_ON_USE (truncl, "truncl is unportable - " - "use gnulib module truncl for portability"); -# endif -#endif - - -/* Definitions of function-like macros come here, after the function - declarations. */ - - -#if 0 -# if 0 -_GL_EXTERN_C int gl_isfinitef (float x); -_GL_EXTERN_C int gl_isfinited (double x); -_GL_EXTERN_C int gl_isfinitel (long double x); -# undef isfinite -# define isfinite(x) \ - (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ - sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ - gl_isfinitef (x)) -# endif -# ifdef __cplusplus -# if defined isfinite || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) -# undef isfinite -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines isfinite through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) -# define isfinite rpl_isfinite -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isfinite -_GL_WARN_REAL_FLOATING_DECL (isfinite); -# undef isfinite -# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) -# endif -#endif - - -#if 1 -# if 1 -_GL_EXTERN_C int gl_isinff (float x); -_GL_EXTERN_C int gl_isinfd (double x); -_GL_EXTERN_C int gl_isinfl (long double x); -# undef isinf -# define isinf(x) \ - (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ - sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ - gl_isinff (x)) -# endif -# ifdef __cplusplus -# if defined isinf || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) -# undef isinf -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isinf through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) -# define isinf rpl_isinf -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isinf -_GL_WARN_REAL_FLOATING_DECL (isinf); -# undef isinf -# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) -# endif -#endif - - -#if 1 -/* Test for NaN for 'float' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan macro - or (older) isnanf function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) -# elif defined isnan -# undef isnanf -# define isnanf(x) isnan ((float)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanf -# define isnanf rpl_isnanf -_GL_EXTERN_C int isnanf (float x); -# endif -#endif - -#if 1 -/* Test for NaN for 'double' numbers. - This function is a gnulib extension, unlike isnan() which applied only - to 'double' numbers earlier but now is a type-generic macro. */ -# if 1 -/* The original included above provides a declaration of isnan - macro. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnand -# define isnand(x) __builtin_isnan ((double)(x)) -# else -# undef isnand -# define isnand(x) isnan ((double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnand -# define isnand rpl_isnand -_GL_EXTERN_C int isnand (double x); -# endif -#endif - -#if 1 -/* Test for NaN for 'long double' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan - macro or (older) isnanl function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) -# elif defined isnan -# undef isnanl -# define isnanl(x) isnan ((long double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanl -# define isnanl rpl_isnanl -_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; -# endif -#endif - -/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ -#if 1 -# if 1 -/* We can't just use the isnanf macro (e.g.) as exposed by - isnanf.h (e.g.) here, because those may end up being macros - that recursively expand back to isnan. So use the gnulib - replacements for them directly. */ -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) -# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) -# else -_GL_EXTERN_C int rpl_isnanf (float x); -# define gl_isnan_f(x) rpl_isnanf (x) -# endif -# if 1 && __GNUC__ >= 4 -# define gl_isnan_d(x) __builtin_isnan ((double)(x)) -# else -_GL_EXTERN_C int rpl_isnand (double x); -# define gl_isnan_d(x) rpl_isnand (x) -# endif -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) -# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) -# else -_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; -# define gl_isnan_l(x) rpl_isnanl (x) -# endif -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ - sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ - gl_isnan_f (x)) -# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl))) -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ - sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ - __builtin_isnanf ((float)(x))) -# endif -# ifdef __cplusplus -# if defined isnan || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) -# undef isnan -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isnan through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) -# define isnan rpl_isnan -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) -# endif -# endif -# else -/* Ensure isnan is a macro. */ -# ifndef isnan -# define isnan isnan -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isnan -_GL_WARN_REAL_FLOATING_DECL (isnan); -# undef isnan -# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) -# endif -#endif - - -#if 1 -# if (0 \ - && (!defined __cplusplus || __cplusplus < 201103)) -# undef signbit - /* GCC 4.0 and newer provides three built-ins for signbit. */ -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ - sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ - __builtin_signbitf (x)) -# endif -# if 0 && !GNULIB_defined_signbit -# undef signbit -_GL_EXTERN_C int gl_signbitf (float arg); -_GL_EXTERN_C int gl_signbitd (double arg); -_GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ -# define _GL_NUM_UINT_WORDS(type) \ - ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) -# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf -# define gl_signbitf_OPTIMIZED_MACRO -# define gl_signbitf(arg) \ - ({ union { float _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd -# define gl_signbitd_OPTIMIZED_MACRO -# define gl_signbitd(arg) \ - ({ union { double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl -# define gl_signbitl_OPTIMIZED_MACRO -# define gl_signbitl(arg) \ - ({ union { long double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# endif -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ - sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ - gl_signbitf (x)) -# define GNULIB_defined_signbit 1 -# endif -# ifdef __cplusplus -# if defined signbit || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) -# undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines signbit through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) -# define signbit rpl_signbit -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined signbit -_GL_WARN_REAL_FLOATING_DECL (signbit); -# undef signbit -# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) -# endif -#endif - -_GL_INLINE_HEADER_END - -#endif /* _GL_LTS_MATH_H */ -#endif /* _GL_LTS_MATH_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/stdio.h b/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/stdio.h deleted file mode 100644 index c0777b16a..000000000 --- a/gvsbuild/patches/gettext/msvc/vs12/x64/libtextstyle/lib/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_LTS_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_LTS_STDIO_H -#define _GL_LTS_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 0 && (0 || 0)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 0 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 0 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 1 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if 0 -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 0 && (0 || 0)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ( - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ( - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 0 && (0 || 0) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ( - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 1 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !0 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 0 && (0 || 0)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 0 && (0 || 0)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_LTS_STDIO_H */ -#endif /* _GL_LTS_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-runtime/gnulib-lib/stdio.h b/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-runtime/gnulib-lib/stdio.h deleted file mode 100644 index 28178ac2a..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-runtime/gnulib-lib/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "../ucrt/stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "../ucrt/stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_STDIO_H -#define _GL_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 0 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 0 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 1 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if 0 -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 0 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_STDIO_H */ -#endif /* _GL_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/config.h b/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/config.h deleted file mode 100644 index 99ce045b6..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/config.h +++ /dev/null @@ -1,2872 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - - -/* Default value for alignment of strings in .mo file. */ -#define DEFAULT_OUTPUT_ALIGNMENT 1 - - -/* Define this to an absolute name of . */ -/* #undef ABSOLUTE_LIBXML2_LIBXML_XMLEXPORTS_H */ - -/* Define this to an absolute name of . */ -/* #undef ABSOLUTE_LIBXML2_LIBXML_XMLVERSION_H */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'double'. */ -#define DBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'double'. */ -#define DBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_WORD */ - -/* the name of the file descriptor member of DIR */ -/* #undef DIR_FD_MEMBER_NAME */ - -#ifdef DIR_FD_MEMBER_NAME -# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME) -#else -# define DIR_TO_FD(Dir_p) -1 -#endif - - -/* Define to 1 if // is a file system root distinct from /. */ -#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the file system. */ -#define ENABLE_RELOCATABLE 1 - -/* Define according to the byte order of the target machine: 1 for big endian, - 0 for little endian. */ -#define ENDIANNESS 0 - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like 'struct s { int n; short - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate - the size in bytes of such a struct containing an N-element array. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'float'. */ -#define FLT_EXPBIT0_BIT 23 - -/* Define as the word index where to find the exponent of 'float'. */ -#define FLT_EXPBIT0_WORD 0 - -/* Define as the bit index in the word where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_WORD */ - -/* Define to 1 if fopen() fails to recognize a trailing slash. */ -#define FOPEN_TRAILING_SLASH_BUG 1 - -/* Define to 1 if the system's ftello function has the Solaris bug. */ -/* #undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE */ - -/* Define to 1 if mkdir mistakenly creates a directory given with a trailing - dot component. */ -#define FUNC_MKDIR_DOT_BUG 1 - -/* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */ -/* #undef FUNC_NL_LANGINFO_YESEXPR_WORKS */ - -/* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ -/* #undef FUNC_REALPATH_WORKS */ - -/* Define to 1 if ungetc is broken when used on arbitrary bytes. */ -/* #undef FUNC_UNGETC_BROKEN */ - -/* Define to 1 if futimesat mishandles a NULL file name. */ -/* #undef FUTIMESAT_NULL_BUG */ - -/* Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday. */ -#define GETTIMEOFDAY_TIMEZONE void - -/* Define to 1 if getxattr works with XATTR_NAME_POSIX_ACL_ACCESS and - XATTR_NAME_POSIX_ACL_DEFAULT. */ -/* #undef GETXATTR_WITH_POSIX_ACLS */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize shall be considered present. */ -#define GNULIB_CANONICALIZE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize-lgpl shall be considered present. */ -#define GNULIB_CANONICALIZE_LGPL 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fd-safer-flag shall be considered present. */ -#define GNULIB_FD_SAFER_FLAG 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module filenamecat shall be considered present. */ -#define GNULIB_FILENAMECAT IN_GETTEXT_TOOLS_GNULIB_TESTS - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fopen-gnu shall be considered present. */ -#define GNULIB_FOPEN_GNU 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fwriteerror shall be considered present. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module isblank shall be considered present. */ -#define GNULIB_ISBLANK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module pipe2-safer shall be considered present. */ -#define GNULIB_PIPE2_SAFER 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define when the error facility is replaced by gnulib. */ -#define GNULIB_REPLACE_ERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module sigpipe shall be considered present. */ -#define GNULIB_SIGPIPE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module snprintf shall be considered present. */ -#define GNULIB_SNPRINTF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror_r-posix shall be considered present. */ -#define GNULIB_STRERROR_R_POSIX IN_GETTEXT_TOOLS_GNULIB_TESTS - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module tempname shall be considered present. */ -#define GNULIB_TEMPNAME 1 - -/* Define to 1 when the gnulib module accept should be tested. */ -#define GNULIB_TEST_ACCEPT 1 - -/* Define to 1 when the gnulib module access should be tested. */ -#define GNULIB_TEST_ACCESS 1 - -/* Define to 1 when the gnulib module bind should be tested. */ -#define GNULIB_TEST_BIND 1 - -/* Define to 1 when the gnulib module btowc should be tested. */ -#define GNULIB_TEST_BTOWC 1 - -/* Define to 1 when the gnulib module canonicalize should be tested. */ -#define GNULIB_TEST_CANONICALIZE 1 - -/* Define to 1 when the gnulib module canonicalize_file_name should be tested. - */ -#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module closedir should be tested. */ -#define GNULIB_TEST_CLOSEDIR 1 - -/* Define to 1 when the gnulib module connect should be tested. */ -#define GNULIB_TEST_CONNECT 1 - -/* Define to 1 when the gnulib module copy-file-range should be tested. */ -#define GNULIB_TEST_COPY_FILE_RANGE 1 - -/* Define to 1 when the gnulib module creat should be tested. */ -#define GNULIB_TEST_CREAT 1 - -/* Define to 1 when the gnulib module dirfd should be tested. */ -#define GNULIB_TEST_DIRFD 1 - -/* Define to 1 when the gnulib module dup should be tested. */ -#define GNULIB_TEST_DUP 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module environ should be tested. */ -#define GNULIB_TEST_ENVIRON 1 - -/* Define to 1 when the gnulib module explicit_bzero should be tested. */ -#define GNULIB_TEST_EXPLICIT_BZERO 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module fdopen should be tested. */ -#define GNULIB_TEST_FDOPEN 1 - -/* Define to 1 when the gnulib module fnmatch should be tested. */ -#define GNULIB_TEST_FNMATCH 1 - -/* Define to 1 when the gnulib module fopen should be tested. */ -#define GNULIB_TEST_FOPEN 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module fsync should be tested. */ -#define GNULIB_TEST_FSYNC 1 - -/* Define to 1 when the gnulib module ftell should be tested. */ -#define GNULIB_TEST_FTELL 1 - -/* Define to 1 when the gnulib module ftello should be tested. */ -#define GNULIB_TEST_FTELLO 1 - -/* Define to 1 when the gnulib module ftruncate should be tested. */ -#define GNULIB_TEST_FTRUNCATE 1 - -/* Define to 1 when the gnulib module getcwd should be tested. */ -#define GNULIB_TEST_GETCWD 1 - -/* Define to 1 when the gnulib module getdelim should be tested. */ -#define GNULIB_TEST_GETDELIM 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module getline should be tested. */ -#define GNULIB_TEST_GETLINE 1 - -/* Define to 1 when the gnulib module getopt-posix should be tested. */ -#define GNULIB_TEST_GETOPT_POSIX 1 - -/* Define to 1 when the gnulib module getpagesize should be tested. */ -#define GNULIB_TEST_GETPAGESIZE 1 - -/* Define to 1 when the gnulib module getrandom should be tested. */ -#define GNULIB_TEST_GETRANDOM 1 - -/* Define to 1 when the gnulib module gettimeofday should be tested. */ -#define GNULIB_TEST_GETTIMEOFDAY 1 - -/* Define to 1 when the gnulib module ioctl should be tested. */ -#define GNULIB_TEST_IOCTL 1 - -/* Define to 1 when the gnulib module isinf should be tested. */ -#define GNULIB_TEST_ISINF 1 - -/* Define to 1 when the gnulib module isnan should be tested. */ -#define GNULIB_TEST_ISNAN 1 - -/* Define to 1 when the gnulib module isnand should be tested. */ -#define GNULIB_TEST_ISNAND 1 - -/* Define to 1 when the gnulib module isnanf should be tested. */ -#define GNULIB_TEST_ISNANF 1 - -/* Define to 1 when the gnulib module isnanl should be tested. */ -#define GNULIB_TEST_ISNANL 1 - -/* Define to 1 when the gnulib module iswblank should be tested. */ -#define GNULIB_TEST_ISWBLANK 1 - -/* Define to 1 when the gnulib module iswdigit should be tested. */ -#define GNULIB_TEST_ISWDIGIT 1 - -/* Define to 1 when the gnulib module iswxdigit should be tested. */ -#define GNULIB_TEST_ISWXDIGIT 1 - -/* Define to 1 when the gnulib module listen should be tested. */ -#define GNULIB_TEST_LISTEN 1 - -/* Define to 1 when the gnulib module localeconv should be tested. */ -#define GNULIB_TEST_LOCALECONV 1 - -/* Define to 1 when the gnulib module localename should be tested. */ -#define GNULIB_TEST_LOCALENAME 1 - -/* Define to 1 when the gnulib module localtime should be tested. */ -#define GNULIB_TEST_LOCALTIME 1 - -/* Define to 1 when the gnulib module log10 should be tested. */ -#define GNULIB_TEST_LOG10 1 - -/* Define to 1 when the gnulib module lseek should be tested. */ -#define GNULIB_TEST_LSEEK 1 - -/* Define to 1 when the gnulib module lstat should be tested. */ -#define GNULIB_TEST_LSTAT 1 - -/* Define to 1 when the gnulib module malloc-posix should be tested. */ -#define GNULIB_TEST_MALLOC_POSIX 1 - -/* Define to 1 when the gnulib module mbrlen should be tested. */ -#define GNULIB_TEST_MBRLEN 1 - -/* Define to 1 when the gnulib module mbrtowc should be tested. */ -#define GNULIB_TEST_MBRTOWC 1 - -/* Define to 1 when the gnulib module mbsinit should be tested. */ -#define GNULIB_TEST_MBSINIT 1 - -/* Define to 1 when the gnulib module mbslen should be tested. */ -#define GNULIB_TEST_MBSLEN 1 - -/* Define to 1 when the gnulib module mbsrtowcs should be tested. */ -#define GNULIB_TEST_MBSRTOWCS 1 - -/* Define to 1 when the gnulib module mbsstr should be tested. */ -#define GNULIB_TEST_MBSSTR 1 - -/* Define to 1 when the gnulib module mbtowc should be tested. */ -#define GNULIB_TEST_MBTOWC 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module mempcpy should be tested. */ -#define GNULIB_TEST_MEMPCPY 1 - -/* Define to 1 when the gnulib module mkdtemp should be tested. */ -#define GNULIB_TEST_MKDTEMP 1 - -/* Define to 1 when the gnulib module nanosleep should be tested. */ -#define GNULIB_TEST_NANOSLEEP 1 - -/* Define to 1 when the gnulib module nl_langinfo should be tested. */ -#define GNULIB_TEST_NL_LANGINFO 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module opendir should be tested. */ -#define GNULIB_TEST_OPENDIR 1 - -/* Define to 1 when the gnulib module perror should be tested. */ -#define GNULIB_TEST_PERROR 1 - -/* Define to 1 when the gnulib module pipe should be tested. */ -#define GNULIB_TEST_PIPE 1 - -/* Define to 1 when the gnulib module pipe2 should be tested. */ -#define GNULIB_TEST_PIPE2 1 - -/* Define to 1 when the gnulib module posix_spawnattr_destroy should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1 - -/* Define to 1 when the gnulib module posix_spawnattr_init should be tested. - */ -#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1 - -/* Define to 1 when the gnulib module posix_spawnattr_setflags should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1 - -/* Define to 1 when the gnulib module posix_spawnattr_setsigmask should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1 - -/* Define to 1 when the gnulib module posix_spawnp should be tested. */ -#define GNULIB_TEST_POSIX_SPAWNP 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_addclose should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_adddup2 should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_addopen should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_destroy should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_init should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1 - -/* Define to 1 when the gnulib module pthread_sigmask should be tested. */ -#define GNULIB_TEST_PTHREAD_SIGMASK 1 - -/* Define to 1 when the gnulib module pthread-thread should be tested. */ -#define GNULIB_TEST_PTHREAD_THREAD 1 - -/* Define to 1 when the gnulib module putenv should be tested. */ -#define GNULIB_TEST_PUTENV 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module rawmemchr should be tested. */ -#define GNULIB_TEST_RAWMEMCHR 1 - -/* Define to 1 when the gnulib module read should be tested. */ -#define GNULIB_TEST_READ 1 - -/* Define to 1 when the gnulib module readdir should be tested. */ -#define GNULIB_TEST_READDIR 1 - -/* Define to 1 when the gnulib module readlink should be tested. */ -#define GNULIB_TEST_READLINK 1 - -/* Define to 1 when the gnulib module realloc-posix should be tested. */ -#define GNULIB_TEST_REALLOC_POSIX 1 - -/* Define to 1 when the gnulib module realpath should be tested. */ -#define GNULIB_TEST_REALPATH 1 - -/* Define to 1 when the gnulib module rmdir should be tested. */ -#define GNULIB_TEST_RMDIR 1 - -/* Define to 1 when the gnulib module secure_getenv should be tested. */ -#define GNULIB_TEST_SECURE_GETENV 1 - -/* Define to 1 when the gnulib module select should be tested. */ -#define GNULIB_TEST_SELECT 1 - -/* Define to 1 when the gnulib module setenv should be tested. */ -#define GNULIB_TEST_SETENV 1 - -/* Define to 1 when the gnulib module setlocale should be tested. */ -#define GNULIB_TEST_SETLOCALE 1 - -/* Define to 1 when the gnulib module setlocale_null should be tested. */ -#define GNULIB_TEST_SETLOCALE_NULL 1 - -/* Define to 1 when the gnulib module setsockopt should be tested. */ -#define GNULIB_TEST_SETSOCKOPT 1 - -/* Define to 1 when the gnulib module sigaction should be tested. */ -#define GNULIB_TEST_SIGACTION 1 - -/* Define to 1 when the gnulib module signbit should be tested. */ -#define GNULIB_TEST_SIGNBIT 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module sleep should be tested. */ -#define GNULIB_TEST_SLEEP 1 - -/* Define to 1 when the gnulib module snprintf should be tested. */ -#define GNULIB_TEST_SNPRINTF 1 - -/* Define to 1 when the gnulib module socket should be tested. */ -#define GNULIB_TEST_SOCKET 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module stpcpy should be tested. */ -#define GNULIB_TEST_STPCPY 1 - -/* Define to 1 when the gnulib module stpncpy should be tested. */ -#define GNULIB_TEST_STPNCPY 1 - -/* Define to 1 when the gnulib module strchrnul should be tested. */ -#define GNULIB_TEST_STRCHRNUL 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module strerror_r should be tested. */ -#define GNULIB_TEST_STRERROR_R 1 - -/* Define to 1 when the gnulib module strnlen should be tested. */ -#define GNULIB_TEST_STRNLEN 1 - -/* Define to 1 when the gnulib module strpbrk should be tested. */ -#define GNULIB_TEST_STRPBRK 1 - -/* Define to 1 when the gnulib module strstr should be tested. */ -#define GNULIB_TEST_STRSTR 1 - -/* Define to 1 when the gnulib module symlink should be tested. */ -#define GNULIB_TEST_SYMLINK 1 - -/* Define to 1 when the gnulib module unlink should be tested. */ -#define GNULIB_TEST_UNLINK 1 - -/* Define to 1 when the gnulib module unsetenv should be tested. */ -#define GNULIB_TEST_UNSETENV 1 - -/* Define to 1 when the gnulib module usleep should be tested. */ -#define GNULIB_TEST_USLEEP 1 - -/* Define to 1 when the gnulib module utime should be tested. */ -#define GNULIB_TEST_UTIME 1 - -/* Define to 1 when the gnulib module vasprintf should be tested. */ -#define GNULIB_TEST_VASPRINTF 1 - -/* Define to 1 when the gnulib module vsnprintf should be tested. */ -#define GNULIB_TEST_VSNPRINTF 1 - -/* Define to 1 when the gnulib module waitpid should be tested. */ -#define GNULIB_TEST_WAITPID 1 - -/* Define to 1 when the gnulib module wcrtomb should be tested. */ -#define GNULIB_TEST_WCRTOMB 1 - -/* Define to 1 when the gnulib module wctob should be tested. */ -#define GNULIB_TEST_WCTOB 1 - -/* Define to 1 when the gnulib module wctomb should be tested. */ -#define GNULIB_TEST_WCTOMB 1 - -/* Define to 1 when the gnulib module wcwidth should be tested. */ -#define GNULIB_TEST_WCWIDTH 1 - -/* Define to 1 when the gnulib module wmemchr should be tested. */ -#define GNULIB_TEST_WMEMCHR 1 - -/* Define to 1 when the gnulib module wmempcpy should be tested. */ -#define GNULIB_TEST_WMEMPCPY 1 - -/* Define to 1 when the gnulib module write should be tested. */ -#define GNULIB_TEST_WRITE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u16-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U16_MBTOUC 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUC 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUCR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc-unsafe shall be considered - present. */ -#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-uctomb shall be considered present. */ -#define GNULIB_UNISTR_U8_UCTOMB 1 - -/* Define to 1 if you have the `aclsort' function. */ -/* #undef HAVE_ACLSORT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ACLV_H */ - -/* Define to 1 if you have the `aclx_get' function. */ -/* #undef HAVE_ACLX_GET */ - -/* Define to 1 if you have the `acl_copy_ext_native' function. */ -/* #undef HAVE_ACL_COPY_EXT_NATIVE */ - -/* Define to 1 if you have the `acl_create_entry_np' function. */ -/* #undef HAVE_ACL_CREATE_ENTRY_NP */ - -/* Define to 1 if you have the `acl_delete_def_file' function. */ -/* #undef HAVE_ACL_DELETE_DEF_FILE */ - -/* Define to 1 if you have the `acl_delete_fd_np' function. */ -/* #undef HAVE_ACL_DELETE_FD_NP */ - -/* Define to 1 if you have the `acl_delete_file_np' function. */ -/* #undef HAVE_ACL_DELETE_FILE_NP */ - -/* Define to 1 if you have the `acl_entries' function. */ -/* #undef HAVE_ACL_ENTRIES */ - -/* Define to 1 if you have the `acl_extended_file' function. */ -/* #undef HAVE_ACL_EXTENDED_FILE */ - -/* Define to 1 if the constant ACL_FIRST_ENTRY exists. */ -/* #undef HAVE_ACL_FIRST_ENTRY */ - -/* Define to 1 if you have the `acl_free' function. */ -/* #undef HAVE_ACL_FREE */ - -/* Define to 1 if you have the `acl_free_text' function. */ -/* #undef HAVE_ACL_FREE_TEXT */ - -/* Define to 1 if you have the `acl_from_mode' function. */ -/* #undef HAVE_ACL_FROM_MODE */ - -/* Define to 1 if you have the `acl_from_text' function. */ -/* #undef HAVE_ACL_FROM_TEXT */ - -/* Define to 1 if you have the `acl_get_fd' function. */ -/* #undef HAVE_ACL_GET_FD */ - -/* Define to 1 if you have the `acl_get_file' function. */ -/* #undef HAVE_ACL_GET_FILE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ACL_LIBACL_H */ - -/* Define to 1 if you have the `acl_set_fd' function. */ -/* #undef HAVE_ACL_SET_FD */ - -/* Define to 1 if you have the `acl_set_file' function. */ -/* #undef HAVE_ACL_SET_FILE */ - -/* Define to 1 if you have the `acl_to_short_text' function. */ -/* #undef HAVE_ACL_TO_SHORT_TEXT */ - -/* Define to 1 if you have the `acl_trivial' function. */ -/* #undef HAVE_ACL_TRIVIAL */ - -/* Define to 1 if the ACL type ACL_TYPE_EXTENDED exists. */ -/* #undef HAVE_ACL_TYPE_EXTENDED */ - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_NAMESER_H */ - -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_BCRYPT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if you have the `btowc' function. */ -#define HAVE_BTOWC 1 - -/* Define to 1 if nanosleep mishandles large arguments. */ -/* #undef HAVE_BUG_BIG_NANOSLEEP */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BYTESWAP_H */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the `catgets' function. */ -/* #undef HAVE_CATGETS */ - -/* Define to 1 if you have the Mac OS X function - CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define to 1 if you have the `chown' function. */ -/* #undef HAVE_CHOWN */ - -/* Define to 1 if you have the `chsize' function. */ -#define HAVE_CHSIZE 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -/* #undef HAVE_CLOCK_GETTIME */ - -/* Define to 1 if you have the `clock_settime' function. */ -/* #undef HAVE_CLOCK_SETTIME */ - -/* Define to 1 if you have the `closedir' function. */ -/* #undef HAVE_CLOSEDIR */ - -/* Define to 1 if you have the `confstr' function. */ -/* #undef HAVE_CONFSTR */ - -/* Define if the copysignf function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNF_IN_LIBC */ - -/* Define if the copysignl function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNL_IN_LIBC */ - -/* Define if the copysign function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGN_IN_LIBC */ - -/* Define to 1 if you have the `copy_file_range' function. */ -/* #undef HAVE_COPY_FILE_RANGE */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. - */ -#define HAVE_DECL_ALARM 0 - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `copysign', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGN */ - -/* Define to 1 if you have the declaration of `copysignf', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNF */ - -/* Define to 1 if you have the declaration of `copysignl', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNL */ - -/* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't. - */ -#define HAVE_DECL_DIRFD 0 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't. - */ -#define HAVE_DECL_FTELLO 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getdelim', and to 0 if you - don't. */ -#define HAVE_DECL_GETDELIM 0 - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `getline', and to 0 if you - don't. */ -#define HAVE_DECL_GETLINE 0 - -/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you - don't. */ -#define HAVE_DECL_INET_PTON 1 - -/* Define to 1 if you have the declaration of `isblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISBLANK 1 - -/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. - */ -#define HAVE_DECL_ISINF 1 - -/* Define to 1 if you have the declaration of `iswblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISWBLANK 1 - -/* Define to 1 if you have the declaration of `mbrlen', and to 0 if you don't. - */ -/* #undef HAVE_DECL_MBRLEN */ - -/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBRTOWC */ - -/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you - don't. */ -#define HAVE_DECL_MBSINIT 1 - -/* Define to 1 if you have the declaration of `mbsrtowcs', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBSRTOWCS */ - -/* Define to 1 if you have a declaration of mbswidth() in , and to 0 - otherwise. */ -#define HAVE_DECL_MBSWIDTH_IN_WCHAR_H 0 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. - */ -#define HAVE_DECL_SETENV 0 - -/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't. - */ -#define HAVE_DECL_SLEEP 0 - -/* Define to 1 if you have the declaration of `snprintf', and to 0 if you - don't. */ -#define HAVE_DECL_SNPRINTF 1 - -/* Define to 1 if you have the declaration of `stpncpy', and to 0 if you - don't. */ -#define HAVE_DECL_STPNCPY 0 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 1 - -/* Define to 1 if you have the declaration of `towlower', and to 0 if you - don't. */ -/* #undef HAVE_DECL_TOWLOWER */ - -/* Define to 1 if you have the declaration of `unsetenv', and to 0 if you - don't. */ -#define HAVE_DECL_UNSETENV 0 - -/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VSNPRINTF 1 - -/* Define to 1 if you have the declaration of `wcrtomb', and to 0 if you - don't. */ -/* #undef HAVE_DECL_WCRTOMB */ - -/* Define to 1 if you have the declaration of `wctob', and to 0 if you don't. - */ -/* #undef HAVE_DECL_WCTOB */ - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 0 - -/* Define to 1 if you have the declaration of `_putenv', and to 0 if you - don't. */ -#define HAVE_DECL__PUTENV 1 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DIRENT_H */ - -/* Define to 1 if you have the `dirfd' function. */ -/* #undef HAVE_DIRFD */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DL_H */ - -/* Define to 1 if you have the `duplocale' function. */ -/* #undef HAVE_DUPLOCALE */ - -/* Define if you have the declaration of environ. */ -#define HAVE_ENVIRON_DECL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the `explicit_bzero' function. */ -/* #undef HAVE_EXPLICIT_BZERO */ - -/* Define to 1 if you have the `explicit_memset' function. */ -/* #undef HAVE_EXPLICIT_MEMSET */ - -/* Define to 1 if you have the `facl' function. */ -/* #undef HAVE_FACL */ - -/* Define if the locale_t type contains insufficient information, as on - OpenBSD. */ -/* #undef HAVE_FAKE_LOCALES */ - -/* Define to 1 if you have the `fchmod' function. */ -/* #undef HAVE_FCHMOD */ - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `flockfile' function. */ -/* #undef HAVE_FLOCKFILE */ - -/* Define to 1 if you have the `fnmatch' function. */ -/* #undef HAVE_FNMATCH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FNMATCH_H */ - -/* Define to 1 if you have the `fork' function. */ -/* #undef HAVE_FORK */ - -/* Define to 1 if you have the `freelocale' function. */ -/* #undef HAVE_FREELOCALE */ - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -/* #undef HAVE_FSEEKO */ - -/* Define to 1 if you have the `fsync' function. */ -/* #undef HAVE_FSYNC */ - -/* Define to 1 if you have the `ftruncate' function. */ -/* #undef HAVE_FTRUNCATE */ - -/* Define to 1 if you have the `funlockfile' function. */ -/* #undef HAVE_FUNLOCKFILE */ - -/* Define to 1 if you have the `futimens' function. */ -/* #undef HAVE_FUTIMENS */ - -/* Define to 1 if you have the `futimes' function. */ -/* #undef HAVE_FUTIMES */ - -/* Define to 1 if you have the `futimesat' function. */ -/* #undef HAVE_FUTIMESAT */ - -/* Define to 1 if you have the `getacl' function. */ -/* #undef HAVE_GETACL */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getdelim' function. */ -/* #undef HAVE_GETDELIM */ - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the `gethostbyname' function. */ -/* #undef HAVE_GETHOSTBYNAME */ - -/* Define to 1 if you have the `gethostname' function. */ -/* #undef HAVE_GETHOSTNAME */ - -/* Define to 1 if you have the `getlocalename_l' function. */ -/* #undef HAVE_GETLOCALENAME_L */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getopt_long_only' function. */ -/* #undef HAVE_GETOPT_LONG_ONLY */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define to 1 if you have the `getppriv' function. */ -/* #undef HAVE_GETPPRIV */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define to 1 if you have the `getrandom' function. */ -/* #undef HAVE_GETRANDOM */ - -/* Define to 1 if you have the `getrlimit' function. */ -/* #undef HAVE_GETRLIMIT */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ICONV_H 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -/* #undef HAVE_INET_NTOP */ - -/* Define to 1 if you have the `inet_pton' function. */ -/* #undef HAVE_INET_PTON */ - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the `ioctl' function. */ -/* #undef HAVE_IOCTL */ - -/* Define to 1 if defines AF_INET. */ -#define HAVE_IPV4 1 - -/* Define if defines AF_INET6. */ -#define HAVE_IPV6 1 - -/* Define to 1 if you have the `isascii' function. */ -/* #undef HAVE_ISASCII */ - -/* Define to 1 if you have the `isblank' function. */ -#define HAVE_ISBLANK 1 - -/* Define if the isnan(double) function is available in libc. */ -#define HAVE_ISNAND_IN_LIBC 1 - -/* Define if the isnan(float) function is available in libc. */ -/* #undef HAVE_ISNANF_IN_LIBC */ - -/* Define if the isnan(long double) function is available in libc. */ -/* #undef HAVE_ISNANL_IN_LIBC */ - -/* Define to 1 if you have the `issetugid' function. */ -/* #undef HAVE_ISSETUGID */ - -/* Define to 1 if you have the `iswblank' function. */ -#define HAVE_ISWBLANK 1 - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define to 1 if you have the `iswctype' function. */ -#define HAVE_ISWCTYPE 1 - -/* Define if you have and nl_langinfo(CODESET). */ -/* #undef HAVE_LANGINFO_CODESET */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LANGINFO_H */ - -/* Define if your file defines LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBINTL_H 1 - -/* Define if you have the libtextstyle library. */ -/* #undef HAVE_LIBTEXTSTYLE */ - -/* Define if you have the libunistring library. */ -/* #undef HAVE_LIBUNISTRING */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBXML2_LIBXML_XMLEXPORTS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBXML2_LIBXML_XMLVERSION_H 1 - -/* Define to 1 if the bcrypt library is guaranteed to be present. */ -#define HAVE_LIB_BCRYPT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `localtime' function. */ -#define HAVE_LOCALTIME 1 - -/* Define to 1 if you support file names longer than 14 characters. */ -#define HAVE_LONG_FILE_NAMES 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the `lutimes' function. */ -/* #undef HAVE_LUTIMES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACH_O_DYLD_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define if the 'malloc' function is POSIX compliant. */ -/* #undef HAVE_MALLOC_POSIX */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the `mbrlen' function. */ -#define HAVE_MBRLEN 1 - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the `mbsinit' function. */ -/* #undef HAVE_MBSINIT */ - -/* Define to 1 if you have the `mbslen' function. */ -/* #undef HAVE_MBSLEN */ - -/* Define to 1 if you have the `mbsrtowcs' function. */ -#define HAVE_MBSRTOWCS 1 - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `mbtowc' function. */ -#define HAVE_MBTOWC 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `memset_s' function. */ -/* #undef HAVE_MEMSET_S */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_LIMITS_H */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_SYS_PARAM_H */ - -/* Define to 1 if you have the `mkdtemp' function. */ -/* #undef HAVE_MKDTEMP */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 if you have the `mquery' function. */ -/* #undef HAVE_MQUERY */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define if the locale_t type does not contain the name of each locale - category. */ -/* #undef HAVE_NAMELESS_LOCALES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETDB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_H */ - -/* Define to 1 if you have the `newlocale' function. */ -/* #undef HAVE_NEWLOCALE */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -/* #undef HAVE_NL_LANGINFO */ - -/* Define to 1 if the system has obstacks that work with any size object. */ -/* #undef HAVE_OBSTACK */ - -/* Define to 1 if you have the `opendir' function. */ -/* #undef HAVE_OPENDIR */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OS_H */ - -/* Define to 1 if you have the `pathconf' function. */ -/* #undef HAVE_PATHCONF */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PATHS_H */ - -/* Define to 1 if you have the `pipe' function. */ -/* #undef HAVE_PIPE */ - -/* Define to 1 if you have the `pipe2' function. */ -/* #undef HAVE_PIPE2 */ - -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - -/* Define to 1 if you have the `posix_spawn' function. */ -/* #undef HAVE_POSIX_SPAWN */ - -/* Define to 1 if the system has the type `posix_spawnattr_t'. */ -/* #undef HAVE_POSIX_SPAWNATTR_T */ - -/* Define to 1 if the system has the type `posix_spawn_file_actions_t'. */ -/* #undef HAVE_POSIX_SPAWN_FILE_ACTIONS_T */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PRIV_H */ - -/* Define to 1 if you have the `pstat_getprocvm' function. */ -/* #undef HAVE_PSTAT_GETPROCVM */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define to 1 if you have the `pthread_atfork' function. */ -/* #undef HAVE_PTHREAD_ATFORK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PTHREAD_H */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if the pthread_sigmask function can be used (despite bugs). */ -/* #undef HAVE_PTHREAD_SIGMASK */ - -/* Define to 1 if the system has the type `pthread_spinlock_t'. */ -/* #undef HAVE_PTHREAD_SPINLOCK_T */ - -/* Define to 1 if the system has the type `pthread_t'. */ -/* #undef HAVE_PTHREAD_T */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PWD_H */ - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `rawmemchr' function. */ -/* #undef HAVE_RAWMEMCHR */ - -/* Define to 1 if you have the `readdir' function. */ -/* #undef HAVE_READDIR */ - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the `readlinkat' function. */ -/* #undef HAVE_READLINKAT */ - -/* Define if the 'realloc' function is POSIX compliant. */ -/* #undef HAVE_REALLOC_POSIX */ - -/* Define to 1 if you have the `realpath' function. */ -/* #undef HAVE_REALPATH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RESOLV_H */ - -/* Define to 1 if 'long double' and 'double' have the same representation. */ -#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1 - -/* Define to 1 if the system has the type `sa_family_t'. */ -/* #undef HAVE_SA_FAMILY_T */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SCHED_H */ - -/* Define to 1 if you have the `sched_setparam' function. */ -/* #undef HAVE_SCHED_SETPARAM */ - -/* Define to 1 if you have the `sched_setscheduler' function. */ -/* #undef HAVE_SCHED_SETSCHEDULER */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `secure_getenv' function. */ -/* #undef HAVE_SECURE_GETENV */ - -/* Define to 1 if you have the `select' function. */ -/* #undef HAVE_SELECT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SEMAPHORE_H */ - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `setegid' function. */ -/* #undef HAVE_SETEGID */ - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `seteuid' function. */ -/* #undef HAVE_SETEUID */ - -/* Define to 1 if you have the `setrlimit' function. */ -/* #undef HAVE_SETRLIMIT */ - -/* Define to 1 if you have the `shutdown' function. */ -/* #undef HAVE_SHUTDOWN */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if you have the `sigaltstack' function. */ -/* #undef HAVE_SIGALTSTACK */ - -/* Define to 1 if defines the siginfo_t type, and struct sigaction - has the sa_sigaction member and the SA_SIGINFO flag. */ -/* #undef HAVE_SIGINFO */ - -/* Define to 1 if the system has the type `siginfo_t'. */ -/* #undef HAVE_SIGINFO_T */ - -/* Define to 1 if you have the `siginterrupt' function. */ -/* #undef HAVE_SIGINTERRUPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if the system has the type `sig_atomic_t'. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if you have the `sleep' function. */ -/* #undef HAVE_SLEEP */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the return value of the snprintf function is the number of of - bytes (excluding the terminating NUL) that would have been produced if the - buffer had been large enough. */ -#define HAVE_SNPRINTF_RETVAL_C99 1 - -/* Define if the locale_t type is as on Solaris 11.4. */ -/* #undef HAVE_SOLARIS114_LOCALES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SPAWN_H */ - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if you have the `statacl' function. */ -/* #undef HAVE_STATACL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define if you have the stpncpy() function and it works. */ -/* #undef HAVE_STPNCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strchrnul' function. */ -/* #undef HAVE_STRCHRNUL */ - -/* Define to 1 if you have the `strcspn' function. */ -#define HAVE_STRCSPN 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strpbrk' function. */ -#define HAVE_STRPBRK 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `decimal_point' is a member of `struct lconv'. */ -/* #undef HAVE_STRUCT_LCONV_DECIMAL_POINT */ - -/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ -/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ - -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ACL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CDEFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOCTL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_RANDOM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_WAIT_H */ - -/* Define to 1 if you have the `tcdrain' function. */ -/* #undef HAVE_TCDRAIN */ - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the `towlower' function. */ -/* #undef HAVE_TOWLOWER */ - -/* Define to 1 if you have the `tsearch' function. */ -/* #undef HAVE_TSEARCH */ - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if you have the `unsetenv' function. */ -/* #undef HAVE_UNSETENV */ - -/* Define to 1 if the system has the type `unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define to 1 if you have the `uselocale' function. */ -/* #undef HAVE_USELOCALE */ - -/* Define to 1 if you have the `usleep' function. */ -/* #undef HAVE_USLEEP */ - -/* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 - -/* Define to 1 if you have the `utimensat' function. */ -/* #undef HAVE_UTIMENSAT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UTIME_H */ - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 if you have the `vasnprintf' function. */ -/* #undef HAVE_VASNPRINTF */ - -/* Define to 1 if you have the `vasprintf' function. */ -/* #undef HAVE_VASPRINTF */ - -/* Define to 1 if you have the `vfork' function. */ -/* #undef HAVE_VFORK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VFORK_H */ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if you have the `vsnprintf' function. */ -/* #undef HAVE_VSNPRINTF */ - -/* Define to 1 if you have the `waitid' function. */ -/* #undef HAVE_WAITID */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if you have the `wctob' function. */ -#define HAVE_WCTOB 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -/* #undef HAVE_WCWIDTH */ - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if you have the `wmempcpy' function. */ -/* #undef HAVE_WMEMPCPY */ - -/* Define to 1 if `fork' works. */ -/* #undef HAVE_WORKING_FORK */ - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define if the uselocale function exists any may safely be called. */ -/* #undef HAVE_WORKING_USELOCALE */ - -/* Define if utimes works properly. */ -/* #undef HAVE_WORKING_UTIMES */ - -/* Define to 1 if `vfork' works. */ -/* #undef HAVE_WORKING_VFORK */ - -/* Define to 1 if you have the `wprintf' function. */ -/* #undef HAVE_WPRINTF */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WS2TCPIP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_XLOCALE_H */ - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_ftelli64' function. */ -#define HAVE__FTELLI64 1 - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if the compiler supports __builtin_expect, - and to 2 if does. */ -/* #undef HAVE___BUILTIN_EXPECT */ -#ifndef HAVE___BUILTIN_EXPECT -# define __builtin_expect(e, c) (e) -#elif HAVE___BUILTIN_EXPECT == 2 -# include -#endif - - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define to 1 if the compiler supports the keyword '__inline'. */ -#define HAVE___INLINE 1 - -/* Define to 1 if you have the `__secure_getenv' function. */ -/* #undef HAVE___SECURE_GETENV */ - -/* Define to 1 if you have the `__xpg_strerror_r' function. */ -/* #undef HAVE___XPG_STRERROR_R */ - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -#define INSTALLPREFIX "/cygdrive/c/software.b/gettext-0.21.0" - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'long double'. */ -#define LDBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'long double'. */ -#define LDBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'long - double'. */ -/* #undef LDBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'long double'. */ -/* #undef LDBL_SIGNBIT_WORD */ - -/* Define if libxml is being used as a static library. */ -/* #undef LIBXML_STATIC */ - -/* Define to 1 if lseek does not detect pipes. */ -#define LSEEK_PIPE_BROKEN 1 - -/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing - slash. */ -/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Define if the mbrtowc function does not return (size_t) -2 for empty input. - */ -#define MBRTOWC_EMPTY_INPUT_BUG 1 - -/* Define if the mbrtowc function may signal encoding errors in the C locale. - */ -/* #undef MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ */ - -/* Define if the mbrtowc function has the NULL pwc argument bug. */ -/* #undef MBRTOWC_NULL_ARG1_BUG */ - -/* Define if the mbrtowc function has the NULL string argument bug. */ -/* #undef MBRTOWC_NULL_ARG2_BUG */ - -/* Define if the mbrtowc function does not return 0 for a NUL character. */ -/* #undef MBRTOWC_NUL_RETVAL_BUG */ - -/* Define if the mbrtowc function returns a wrong return value. */ -#define MBRTOWC_RETVAL_BUG 1 - -/* Define if the mbrtowc function stores a wide character when reporting - incomplete input. */ -#define MBRTOWC_STORES_INCOMPLETE_BUG 1 - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define to 1 on musl libc. */ -/* #undef MUSL_LIBC */ - -/* Define to 1 to enable general improvements of setlocale. */ -#define NEED_SETLOCALE_IMPROVED 1 - -/* Define to 1 to enable a multithread-safety fix of setlocale. */ -#define NEED_SETLOCALE_MTSAFE 0 - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "gettext-tools" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "bug-gettext@gnu.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gettext-tools" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-tools 0.21" - -/* Define to the suffix of this package */ -#define PACKAGE_SUFFIX "-0.21" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gettext-tools" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.21" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if pthread_create is an inline function. */ -/* #undef PTHREAD_CREATE_IS_INLINE */ - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to 1 if pthread_sigmask(), when it fails, returns -1 and sets errno. - */ -/* #undef PTHREAD_SIGMASK_FAILS_WITH_ERRNO */ - -/* Define to 1 if pthread_sigmask may return 0 and have no effect. */ -/* #undef PTHREAD_SIGMASK_INEFFECTIVE */ - -/* Define to 1 if pthread_sigmask() unblocks signals incorrectly. */ -/* #undef PTHREAD_SIGMASK_UNBLOCK_BUG */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -/* #undef READLINK_TRAILING_SLASH_BUG */ - -/* Define to 1 if gnulib's dirfd() replacement is used. */ -/* #undef REPLACE_DIRFD */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define if nl_langinfo exists but is overridden by gnulib. */ -/* #undef REPLACE_NL_LANGINFO */ - -/* Define if gnulib uses its own posix_spawn and posix_spawnp functions. */ -#define REPLACE_POSIX_SPAWN 1 - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define if vasnprintf exists but is overridden by gnulib. */ -/* #undef REPLACE_VASNPRINTF */ - -/* Define as const if the declaration of setlocale() needs const. */ -#define SETLOCALE_CONST - -/* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ALL_MTSAFE 1 - -/* Define to 1 if setlocale (category, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ONE_MTSAFE 1 - -/* File name of the Bourne shell. */ -#if defined __CYGWIN__ || defined __ANDROID__ -/* Omit the directory part because - - For 32-bit Cygwin programs in a 64-bit Cygwin environment, the Cygwin - mounts are not visible. - - On Android, /bin/sh does not exist. It's /system/bin/sh instead. */ -# define BOURNE_SHELL "sh" -#else -# define BOURNE_SHELL "/bin/sh" -#endif - -/* Define if lists must be signal-safe. */ -#define SIGNAL_SAFE_LIST 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define to 1 if unlink (dir) cannot possibly succeed. */ -#define UNLINK_CANNOT_UNLINK_DIR 1 - -/* Define to 1 if unlink() on a parent directory may succeed */ -/* #undef UNLINK_PARENT_BUG */ - -/* Define to the prefix of C symbols at the assembler and linker level, either - an underscore or empty. */ -#define USER_LABEL_PREFIX _ - -/* Define to nonzero if you want access control list support. */ -#define USE_ACL 0 - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Define to a working va_copy macro or replacement. */ -#define VA_COPY va_copy - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to 1 if unsetenv returns void instead of int. */ -/* #undef VOID_UNSETENV */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define if the wcrtomb function does not work in the C locale. */ -/* #undef WCRTOMB_C_LOCALE_BUG */ - -/* Define if the wcrtomb function has an incorrect return value. */ -#define WCRTOMB_RETVAL_BUG 1 - -/* Define if WSAStartup is needed. */ -#define WINDOWS_SOCKETS 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define when --enable-shared is used on mingw or Cygwin. */ -#define WOE32DLL 1 - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 to internationalize bison runtime messages. */ -#define YYENABLE_NLS 1 - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -/* #undef _LARGEFILE_SOURCE */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 on Solaris. */ -/* #undef _LCONV_C99 */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 in order to get the POSIX compatible declarations of socket - functions. */ -/* #undef _POSIX_PII_SOCKET */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define if you want to include , so that it consistently - overrides 's RE_DUP_MAX. */ -#define _REGEX_INCLUDE_LIMITS_H 1 - -/* Define if you want regoff_t to be at least as wide POSIX requires. */ -#define _REGEX_LARGE_OFFSETS 1 - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Define as 'access' if you don't have the eaccess() function. */ -#define eaccess access - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b)) - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#ifndef _GL_UNUSED -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -# else -# define _GL_UNUSED -# endif -#endif - -/* The __pure__ attribute was added in gcc 2.96. */ -#ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define _GL_ATTRIBUTE_PURE /* empty */ -# endif -#endif - - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to long or long long if and don't define. */ -/* #undef intmax_t */ - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `long int' if does not define. */ -/* #undef off_t */ - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to rpl_re_comp if the replacement should be used. */ -#define re_comp rpl_re_comp - -/* Define to rpl_re_compile_fastmap if the replacement should be used. */ -#define re_compile_fastmap rpl_re_compile_fastmap - -/* Define to rpl_re_compile_pattern if the replacement should be used. */ -#define re_compile_pattern rpl_re_compile_pattern - -/* Define to rpl_re_exec if the replacement should be used. */ -#define re_exec rpl_re_exec - -/* Define to rpl_re_match if the replacement should be used. */ -#define re_match rpl_re_match - -/* Define to rpl_re_match_2 if the replacement should be used. */ -#define re_match_2 rpl_re_match_2 - -/* Define to rpl_re_search if the replacement should be used. */ -#define re_search rpl_re_search - -/* Define to rpl_re_search_2 if the replacement should be used. */ -#define re_search_2 rpl_re_search_2 - -/* Define to rpl_re_set_registers if the replacement should be used. */ -#define re_set_registers rpl_re_set_registers - -/* Define to rpl_re_set_syntax if the replacement should be used. */ -#define re_set_syntax rpl_re_set_syntax - -/* Define to rpl_re_syntax_options if the replacement should be used. */ -#define re_syntax_options rpl_re_syntax_options - -/* Define to rpl_regcomp if the replacement should be used. */ -#define regcomp rpl_regcomp - -/* Define to rpl_regerror if the replacement should be used. */ -#define regerror rpl_regerror - -/* Define to rpl_regexec if the replacement should be used. */ -#define regexec rpl_regexec - -/* Define to rpl_regfree if the replacement should be used. */ -#define regfree rpl_regfree - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define as an integer type suitable for memory locations that can be - accessed atomically even in the presence of asynchronous signals. */ -/* #undef sig_atomic_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* type to use in place of socklen_t if not defined */ -/* #undef socklen_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - -/* Define to an unsigned 32-bit type if lacks this type. */ -#define useconds_t unsigned int - -/* Define as a macro for copying va_list variables. */ -/* #undef va_copy */ - -/* Define as `fork' if `vfork' does not work. */ -#define vfork fork - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded - - - -#ifndef ENDIANNESS -# if defined __BIG_ENDIAN__ -# define ENDIANNESS 0 -# endif -# if defined __LITTLE_ENDIAN__ -# define ENDIANNESS 0 -# endif -#endif - - - -/* A file name cannot consist of any character possible. INVALID_PATH_CHAR - contains the characters not allowed. */ -#if defined _MSC_VER || defined __MINGW32__ -/* Woe32. This string is valid for Windows NT/2000. On Windows 95/98/ME some - few characters in the range 0x80..0xff are invalid as well, but this doesn't - matter much for our purposes. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\"*/:<>?\\|" -#elif defined MSDOS -/* Something like this for MSDOG. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 \177\\:." -#else -/* Unix. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 \177/" -#endif - -/* This is the page width for the message_print function. It should - not be set to more than 79 characters (Emacs users will appreciate - it). It is used to wrap the msgid and msgstr strings, and also to - wrap the file position (#:) comments. */ -#define PAGE_WIDTH 79 - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if defined WOE32DLL && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#if defined __EMX__ && !defined __KLIBC__ -# include "intl/os2compat.h" -#endif - diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/configmake.h b/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/configmake.h deleted file mode 100644 index 915fdfa82..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/configmake.h +++ /dev/null @@ -1,31 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#if HAVE_WINSOCK2_H -# include /* avoid mingw pollution on DATADIR */ -#endif -#define PREFIX "/cygdrive/c/software.b/gettext-0.21.0" -#define EXEC_PREFIX "/cygdrive/c/software.b/gettext-0.21.0" -#define BINDIR "/cygdrive/c/software.b/gettext-0.21.0/bin" -#define SBINDIR "/cygdrive/c/software.b/gettext-0.21.0/sbin" -#define LIBEXECDIR "/cygdrive/c/software.b/gettext-0.21.0/libexec" -#define DATAROOTDIR "/cygdrive/c/software.b/gettext-0.21.0/share" -#define DATADIR "/cygdrive/c/software.b/gettext-0.21.0/share" -#define SYSCONFDIR "/cygdrive/c/software.b/gettext-0.21.0/etc" -#define SHAREDSTATEDIR "/cygdrive/c/software.b/gettext-0.21.0/com" -#define LOCALSTATEDIR "/cygdrive/c/software.b/gettext-0.21.0/var" -#define RUNSTATEDIR "/cygdrive/c/software.b/gettext-0.21.0/var/run" -#define INCLUDEDIR "/cygdrive/c/software.b/gettext-0.21.0/include" -#define OLDINCLUDEDIR "/usr/include" -#define DOCDIR "/cygdrive/c/software.b/gettext-0.21.0/share/doc/gettext" -#define INFODIR "/cygdrive/c/software.b/gettext-0.21.0/share/info" -#define HTMLDIR "/cygdrive/c/software.b/gettext-0.21.0/share/doc/gettext" -#define DVIDIR "/cygdrive/c/software.b/gettext-0.21.0/share/doc/gettext" -#define PDFDIR "/cygdrive/c/software.b/gettext-0.21.0/share/doc/gettext" -#define PSDIR "/cygdrive/c/software.b/gettext-0.21.0/share/doc/gettext" -#define LIBDIR "/cygdrive/c/software.b/gettext-0.21.0/lib" -#define LISPDIR "/cygdrive/c/software.b/gettext-0.21.0/share/emacs/site-lisp" -#define LOCALEDIR "/cygdrive/c/software.b/gettext-0.21.0/share/locale" -#define MANDIR "/cygdrive/c/software.b/gettext-0.21.0/share/man" -#define PKGDATADIR "/cygdrive/c/software.b/gettext-0.21.0/share/gettext" -#define PKGINCLUDEDIR "/cygdrive/c/software.b/gettext-0.21.0/include/gettext-tools" -#define PKGLIBDIR "/cygdrive/c/software.b/gettext-0.21.0/lib/gettext-tools" -#define PKGLIBEXECDIR "/cygdrive/c/software.b/gettext-0.21.0/libexec/gettext-tools" diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/stdio.h b/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/stdio.h deleted file mode 100644 index b2acff0a2..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/gnulib-lib/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "../ucrt/stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "../ucrt/stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_STDIO_H -#define _GL_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 1 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 1 -# if !1 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 0 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 1 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 1 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 0 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("_" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 1 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !0 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_STDIO_H */ -#endif /* _GL_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/libgettextpo/config.h b/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/libgettextpo/config.h deleted file mode 100644 index 1dd5fe629..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/gettext-tools/libgettextpo/config.h +++ /dev/null @@ -1,387 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#ifndef GTPO_CONFIG_H -#define GTPO_CONFIG_H - -#include "../config.h" -#define DEFAULT_TEXT_DOMAIN "gettext-tools" -#undef DLL_VARIABLE -#define DLL_VARIABLE - -#endif /* GTPO_CONFIG_H */ -#define _gl_convert_FILETIME_to_POSIX libgettextpo__gl_convert_FILETIME_to_POSIX -#define _gl_fstat_by_handle libgettextpo__gl_fstat_by_handle -#define _gl_nothrow_get_osfhandle libgettextpo__gl_nothrow_get_osfhandle -#define _gl_raise_SIGPIPE libgettextpo__gl_raise_SIGPIPE -#define _obstack_allocated_p libgettextpo__obstack_allocated_p -#define _obstack_begin libgettextpo__obstack_begin -#define _obstack_begin_1 libgettextpo__obstack_begin_1 -#define _obstack_free libgettextpo__obstack_free -#define _obstack_memory_used libgettextpo__obstack_memory_used -#define _obstack_newchunk libgettextpo__obstack_newchunk -#define allow_duplicates libgettextpo_allow_duplicates -#define asnprintf libgettextpo_asnprintf -#define asprintf libgettextpo_asprintf -#define base_len libgettextpo_base_len -#define c_strcasecmp libgettextpo_c_strcasecmp -#define c_strncasecmp libgettextpo_c_strncasecmp -#define c_strstr libgettextpo_c_strstr -#define catalog_reader_alloc libgettextpo_catalog_reader_alloc -#define catalog_reader_free libgettextpo_catalog_reader_free -#define catalog_reader_parse libgettextpo_catalog_reader_parse -#define check_message libgettextpo_check_message -#define check_message_list libgettextpo_check_message_list -#define check_msgid_msgstr_format libgettextpo_check_msgid_msgstr_format -#define check_msgid_msgstr_format_i libgettextpo_check_msgid_msgstr_format_i -#define check_plural_eval libgettextpo_check_plural_eval -#define compute_curr_prefix libgettextpo_compute_curr_prefix -#define concatenated_filename libgettextpo_concatenated_filename -#define default_add_message libgettextpo_default_add_message -#define default_catalog_reader_alloc libgettextpo_default_catalog_reader_alloc -#define default_comment libgettextpo_default_comment -#define default_comment_dot libgettextpo_default_comment_dot -#define default_comment_filepos libgettextpo_default_comment_filepos -#define default_comment_special libgettextpo_default_comment_special -#define default_constructor libgettextpo_default_constructor -#define default_destructor libgettextpo_default_destructor -#define default_directive_domain libgettextpo_default_directive_domain -#define default_directive_message libgettextpo_default_directive_message -#define default_parse_brief libgettextpo_default_parse_brief -#define default_parse_debrief libgettextpo_default_parse_debrief -#define default_set_domain libgettextpo_default_set_domain -#define dir_list_append libgettextpo_dir_list_append -#define dir_list_nth libgettextpo_dir_list_nth -#define dir_list_restore libgettextpo_dir_list_restore -#define dir_list_save_reset libgettextpo_dir_list_save_reset -#define dup_cloexec libgettextpo_dup_cloexec -#define error libgettextpo_error -#define error_at_line libgettextpo_error_at_line -#define error_with_progname libgettextpo_error_with_progname -#define execute_all_close_hooks libgettextpo_execute_all_close_hooks -#define execute_all_ioctl_hooks libgettextpo_execute_all_ioctl_hooks -#define execute_close_hooks libgettextpo_execute_close_hooks -#define execute_ioctl_hooks libgettextpo_execute_ioctl_hooks -#define exit_failure libgettextpo_exit_failure -#define extract_plural_expression libgettextpo_extract_plural_expression -#define fcntl libgettextpo_fcntl -#define format_language libgettextpo_format_language -#define format_language_pretty libgettextpo_format_language_pretty -#define formatstring_awk libgettextpo_formatstring_awk -#define formatstring_boost libgettextpo_formatstring_boost -#define formatstring_c libgettextpo_formatstring_c -#define formatstring_csharp libgettextpo_formatstring_csharp -#define formatstring_elisp libgettextpo_formatstring_elisp -#define formatstring_gcc_internal libgettextpo_formatstring_gcc_internal -#define formatstring_gfc_internal libgettextpo_formatstring_gfc_internal -#define formatstring_java libgettextpo_formatstring_java -#define formatstring_java_printf libgettextpo_formatstring_java_printf -#define formatstring_javascript libgettextpo_formatstring_javascript -#define formatstring_kde libgettextpo_formatstring_kde -#define formatstring_kde_kuit libgettextpo_formatstring_kde_kuit -#define formatstring_librep libgettextpo_formatstring_librep -#define formatstring_lisp libgettextpo_formatstring_lisp -#define formatstring_lua libgettextpo_formatstring_lua -#define formatstring_objc libgettextpo_formatstring_objc -#define formatstring_parsers libgettextpo_formatstring_parsers -#define formatstring_pascal libgettextpo_formatstring_pascal -#define formatstring_perl libgettextpo_formatstring_perl -#define formatstring_perl_brace libgettextpo_formatstring_perl_brace -#define formatstring_php libgettextpo_formatstring_php -#define formatstring_python libgettextpo_formatstring_python -#define formatstring_python_brace libgettextpo_formatstring_python_brace -#define formatstring_qt libgettextpo_formatstring_qt -#define formatstring_qt_plural libgettextpo_formatstring_qt_plural -#define formatstring_ruby libgettextpo_formatstring_ruby -#define formatstring_scheme libgettextpo_formatstring_scheme -#define formatstring_sh libgettextpo_formatstring_sh -#define formatstring_smalltalk libgettextpo_formatstring_smalltalk -#define formatstring_tcl libgettextpo_formatstring_tcl -#define formatstring_ycp libgettextpo_formatstring_ycp -#define free_plural_expression libgettextpo_free_plural_expression -#define freea libgettextpo_freea -#define fstrcmp_bounded libgettextpo_fstrcmp_bounded -#define fstrcmp_free_resources libgettextpo_fstrcmp_free_resources -#define fsync libgettextpo_fsync -#define fuzzy_search_goal_function libgettextpo_fuzzy_search_goal_function -#define fwriteerror libgettextpo_fwriteerror -#define fwriteerror_no_ebadf libgettextpo_fwriteerror_no_ebadf -#define gcd libgettextpo_gcd -#define germanic_plural libgettextpo_germanic_plural -#define get_python_format_unnamed_arg_count libgettextpo_get_python_format_unnamed_arg_count -#define get_sysdep_c_format_directives libgettextpo_get_sysdep_c_format_directives -#define getdelim libgettextpo_getdelim -#define getdtablesize libgettextpo_getdtablesize -#define getprogname libgettextpo_getprogname -#define gl_linked_list_implementation libgettextpo_gl_linked_list_implementation -#define gl_msvc_inval_ensure_handler libgettextpo_gl_msvc_inval_ensure_handler -#define glwthread_mutex_destroy libgettextpo_glwthread_mutex_destroy -#define glwthread_mutex_init libgettextpo_glwthread_mutex_init -#define glwthread_mutex_lock libgettextpo_glwthread_mutex_lock -#define glwthread_mutex_trylock libgettextpo_glwthread_mutex_trylock -#define glwthread_mutex_unlock libgettextpo_glwthread_mutex_unlock -#define glwthread_once libgettextpo_glwthread_once -#define glwthread_recmutex_destroy libgettextpo_glwthread_recmutex_destroy -#define glwthread_recmutex_init libgettextpo_glwthread_recmutex_init -#define glwthread_recmutex_lock libgettextpo_glwthread_recmutex_lock -#define glwthread_recmutex_trylock libgettextpo_glwthread_recmutex_trylock -#define glwthread_recmutex_unlock libgettextpo_glwthread_recmutex_unlock -#define glwthread_rwlock_destroy libgettextpo_glwthread_rwlock_destroy -#define glwthread_rwlock_init libgettextpo_glwthread_rwlock_init -#define glwthread_rwlock_rdlock libgettextpo_glwthread_rwlock_rdlock -#define glwthread_rwlock_tryrdlock libgettextpo_glwthread_rwlock_tryrdlock -#define glwthread_rwlock_trywrlock libgettextpo_glwthread_rwlock_trywrlock -#define glwthread_rwlock_unlock libgettextpo_glwthread_rwlock_unlock -#define glwthread_rwlock_wrlock libgettextpo_glwthread_rwlock_wrlock -#define glwthread_tls_get libgettextpo_glwthread_tls_get -#define glwthread_tls_key_create libgettextpo_glwthread_tls_key_create -#define glwthread_tls_key_delete libgettextpo_glwthread_tls_key_delete -#define glwthread_tls_process_destructors libgettextpo_glwthread_tls_process_destructors -#define glwthread_tls_set libgettextpo_glwthread_tls_set -#define gnu_mbswidth libgettextpo_gnu_mbswidth -#define gram_max_allowed_errors libgettextpo_gram_max_allowed_errors -#define gram_pos libgettextpo_gram_pos -#define gram_pos_column libgettextpo_gram_pos_column -#define handle_filepos_comment_option libgettextpo_handle_filepos_comment_option -#define hard_locale libgettextpo_hard_locale -#define hash_destroy libgettextpo_hash_destroy -#define hash_find_entry libgettextpo_hash_find_entry -#define hash_init libgettextpo_hash_init -#define hash_insert_entry libgettextpo_hash_insert_entry -#define hash_iterate libgettextpo_hash_iterate -#define hash_iterate_modify libgettextpo_hash_iterate_modify -#define hash_set_value libgettextpo_hash_set_value -#define iconveh_close libgettextpo_iconveh_close -#define iconveh_open libgettextpo_iconveh_open -#define input_format_po libgettextpo_input_format_po -#define install_sigfpe_handler libgettextpo_install_sigfpe_handler -#define is_ascii_message libgettextpo_is_ascii_message -#define is_ascii_message_list libgettextpo_is_ascii_message_list -#define is_ascii_msgdomain_list libgettextpo_is_ascii_msgdomain_list -#define is_ascii_string libgettextpo_is_ascii_string -#define is_ascii_string_list libgettextpo_is_ascii_string_list -#define last_component libgettextpo_last_component -#define lex_end libgettextpo_lex_end -#define lex_start libgettextpo_lex_start -#define locale_charset libgettextpo_locale_charset -#define make_format_description_string libgettextpo_make_format_description_string -#define make_range_description_string libgettextpo_make_range_description_string -#define markup_parse_context_end_parse libgettextpo_markup_parse_context_end_parse -#define markup_parse_context_free libgettextpo_markup_parse_context_free -#define markup_parse_context_get_error libgettextpo_markup_parse_context_get_error -#define markup_parse_context_new libgettextpo_markup_parse_context_new -#define markup_parse_context_parse libgettextpo_markup_parse_context_parse -#define maybe_print_progname libgettextpo_maybe_print_progname -#define mbsnwidth libgettextpo_mbsnwidth -#define mem_cd_iconv libgettextpo_mem_cd_iconv -#define mem_cd_iconveh libgettextpo_mem_cd_iconveh -#define mem_iconveh libgettextpo_mem_iconveh -#define mem_iconveha libgettextpo_mem_iconveha -#define message_alloc libgettextpo_message_alloc -#define message_comment_append libgettextpo_message_comment_append -#define message_comment_dot_append libgettextpo_message_comment_dot_append -#define message_comment_filepos libgettextpo_message_comment_filepos -#define message_copy libgettextpo_message_copy -#define message_free libgettextpo_message_free -#define message_list_alloc libgettextpo_message_list_alloc -#define message_list_append libgettextpo_message_list_append -#define message_list_copy libgettextpo_message_list_copy -#define message_list_free libgettextpo_message_list_free -#define message_list_insert_at libgettextpo_message_list_insert_at -#define message_list_list_alloc libgettextpo_message_list_list_alloc -#define message_list_list_append libgettextpo_message_list_list_append -#define message_list_list_append_list libgettextpo_message_list_list_append_list -#define message_list_list_free libgettextpo_message_list_list_free -#define message_list_list_search libgettextpo_message_list_list_search -#define message_list_msgids_changed libgettextpo_message_list_msgids_changed -#define message_list_prepend libgettextpo_message_list_prepend -#define message_list_remove_if_not libgettextpo_message_list_remove_if_not -#define message_list_search libgettextpo_message_list_search -#define message_list_search_fuzzy libgettextpo_message_list_search_fuzzy -#define message_page_width_ignore libgettextpo_message_page_width_ignore -#define message_page_width_set libgettextpo_message_page_width_set -#define message_print_comment libgettextpo_message_print_comment -#define message_print_comment_dot libgettextpo_message_print_comment_dot -#define message_print_comment_filepos libgettextpo_message_print_comment_filepos -#define message_print_comment_flags libgettextpo_message_print_comment_flags -#define message_print_style_comment libgettextpo_message_print_style_comment -#define message_print_style_escape libgettextpo_message_print_style_escape -#define message_print_style_filepos libgettextpo_message_print_style_filepos -#define message_print_style_indent libgettextpo_message_print_style_indent -#define message_print_style_uniforum libgettextpo_message_print_style_uniforum -#define mmalloca libgettextpo_mmalloca -#define msgdomain_alloc libgettextpo_msgdomain_alloc -#define msgdomain_free libgettextpo_msgdomain_free -#define msgdomain_list_alloc libgettextpo_msgdomain_list_alloc -#define msgdomain_list_append libgettextpo_msgdomain_list_append -#define msgdomain_list_copy libgettextpo_msgdomain_list_copy -#define msgdomain_list_free libgettextpo_msgdomain_list_free -#define msgdomain_list_print libgettextpo_msgdomain_list_print -#define msgdomain_list_sort_by_filepos libgettextpo_msgdomain_list_sort_by_filepos -#define msgdomain_list_sort_by_msgid libgettextpo_msgdomain_list_sort_by_msgid -#define msgdomain_list_sublist libgettextpo_msgdomain_list_sublist -#define multiline_error libgettextpo_multiline_error -#define multiline_warning libgettextpo_multiline_warning -#define next_prime libgettextpo_next_prime -#define obstack_alloc_failed_handler libgettextpo_obstack_alloc_failed_handler -#define open_catalog_file libgettextpo_open_catalog_file -#define output_format_po libgettextpo_output_format_po -#define parse_plural_expression libgettextpo_parse_plural_expression -#define pass_obsolete_entries libgettextpo_pass_obsolete_entries -#define plural_eval libgettextpo_plural_eval -#define plural_table libgettextpo_plural_table -#define plural_table_size libgettextpo_plural_table_size -#define po_callback_comment libgettextpo_po_callback_comment -#define po_callback_comment_dispatcher libgettextpo_po_callback_comment_dispatcher -#define po_callback_comment_dot libgettextpo_po_callback_comment_dot -#define po_callback_comment_filepos libgettextpo_po_callback_comment_filepos -#define po_callback_comment_special libgettextpo_po_callback_comment_special -#define po_callback_domain libgettextpo_po_callback_domain -#define po_callback_message libgettextpo_po_callback_message -#define po_charset_ascii libgettextpo_po_charset_ascii -#define po_charset_ascii_compatible libgettextpo_po_charset_ascii_compatible -#define po_charset_canonicalize libgettextpo_po_charset_canonicalize -#define po_charset_character_iterator libgettextpo_po_charset_character_iterator -#define po_charset_utf8 libgettextpo_po_charset_utf8 -#define po_error libgettextpo_po_error -#define po_error_at_line libgettextpo_po_error_at_line -#define po_gram_char libgettextpo_po_gram_char -#define po_gram_error libgettextpo_po_gram_error -#define po_gram_error_at_line libgettextpo_po_gram_error_at_line -#define po_gram_lex libgettextpo_po_gram_lex -#define po_gram_lval libgettextpo_po_gram_lval -#define po_gram_nerrs libgettextpo_po_gram_nerrs -#define po_gram_parse libgettextpo_po_gram_parse -#define po_is_charset_weird libgettextpo_po_is_charset_weird -#define po_is_charset_weird_cjk libgettextpo_po_is_charset_weird_cjk -#define po_lex_charset libgettextpo_po_lex_charset -#define po_lex_charset_close libgettextpo_po_lex_charset_close -#define po_lex_charset_init libgettextpo_po_lex_charset_init -#define po_lex_charset_set libgettextpo_po_lex_charset_set -#define po_lex_iconv libgettextpo_po_lex_iconv -#define po_lex_pass_comments libgettextpo_po_lex_pass_comments -#define po_lex_pass_obsolete_entries libgettextpo_po_lex_pass_obsolete_entries -#define po_lex_weird_cjk libgettextpo_po_lex_weird_cjk -#define po_multiline_error libgettextpo_po_multiline_error -#define po_multiline_warning libgettextpo_po_multiline_warning -#define po_parse_comment_special libgettextpo_po_parse_comment_special -#define po_xerror libgettextpo_po_xerror -#define po_xerror2 libgettextpo_po_xerror2 -#define possible_format_p libgettextpo_possible_format_p -#define printf_fetchargs libgettextpo_printf_fetchargs -#define printf_parse libgettextpo_printf_parse -#define rawmemchr libgettextpo_rawmemchr -#define read_catalog_file libgettextpo_read_catalog_file -#define read_catalog_stream libgettextpo_read_catalog_stream -#define register_fd_hook libgettextpo_register_fd_hook -#define relocate libgettextpo_relocate -#define relocate2 libgettextpo_relocate2 -#define rpl_close libgettextpo_rpl_close -#define rpl_dup2 libgettextpo_rpl_dup2 -#define rpl_error_message_count libgettextpo_rpl_error_message_count -#define rpl_error_one_per_line libgettextpo_rpl_error_one_per_line -#define rpl_error_print_progname libgettextpo_rpl_error_print_progname -#define rpl_fdopen libgettextpo_rpl_fdopen -#define rpl_fopen libgettextpo_rpl_fopen -#define rpl_fprintf libgettextpo_rpl_fprintf -#define rpl_fputc libgettextpo_rpl_fputc -#define rpl_fputs libgettextpo_rpl_fputs -#define rpl_fstat libgettextpo_rpl_fstat -#define rpl_fwrite libgettextpo_rpl_fwrite -#define rpl_getline libgettextpo_rpl_getline -#define rpl_malloc libgettextpo_rpl_malloc -#define rpl_mbrtowc libgettextpo_rpl_mbrtowc -#define rpl_mbsinit libgettextpo_rpl_mbsinit -#define rpl_open libgettextpo_rpl_open -#define rpl_printf libgettextpo_rpl_printf -#define rpl_putchar libgettextpo_rpl_putchar -#define rpl_puts libgettextpo_rpl_puts -#define rpl_raise libgettextpo_rpl_raise -#define rpl_realloc libgettextpo_rpl_realloc -#define rpl_signal libgettextpo_rpl_signal -#define rpl_stat libgettextpo_rpl_stat -#define rpl_strerror libgettextpo_rpl_strerror -#define rpl_strstr libgettextpo_rpl_strstr -#define rpl_vfprintf libgettextpo_rpl_vfprintf -#define rpl_vprintf libgettextpo_rpl_vprintf -#define sentence_end libgettextpo_sentence_end -#define sentence_end_required_spaces libgettextpo_sentence_end_required_spaces -#define set_cloexec_flag libgettextpo_set_cloexec_flag -#define set_relocation_prefix libgettextpo_set_relocation_prefix -#define setlocale_null libgettextpo_setlocale_null -#define setlocale_null_r libgettextpo_setlocale_null_r -#define sigaddset libgettextpo_sigaddset -#define sigdelset libgettextpo_sigdelset -#define sigemptyset libgettextpo_sigemptyset -#define sigfillset libgettextpo_sigfillset -#define sigfpe_exit libgettextpo_sigfpe_exit -#define sigismember libgettextpo_sigismember -#define significant_format_p libgettextpo_significant_format_p -#define sigpending libgettextpo_sigpending -#define sigprocmask libgettextpo_sigprocmask -#define stpcpy libgettextpo_stpcpy -#define stpncpy libgettextpo_stpncpy -#define str_cd_iconv libgettextpo_str_cd_iconv -#define str_cd_iconveh libgettextpo_str_cd_iconveh -#define str_iconv libgettextpo_str_iconv -#define str_iconveh libgettextpo_str_iconveh -#define str_iconveha libgettextpo_str_iconveha -#define strchrnul libgettextpo_strchrnul -#define strerror_override libgettextpo_strerror_override -#define string_list_alloc libgettextpo_string_list_alloc -#define string_list_append libgettextpo_string_list_append -#define string_list_append_unique libgettextpo_string_list_append_unique -#define string_list_concat libgettextpo_string_list_concat -#define string_list_concat_destroy libgettextpo_string_list_concat_destroy -#define string_list_destroy libgettextpo_string_list_destroy -#define string_list_free libgettextpo_string_list_free -#define string_list_init libgettextpo_string_list_init -#define string_list_join libgettextpo_string_list_join -#define string_list_member libgettextpo_string_list_member -#define string_list_remove libgettextpo_string_list_remove -#define syntax_check_message_list libgettextpo_syntax_check_message_list -#define syntax_check_name libgettextpo_syntax_check_name -#define textmode_xerror libgettextpo_textmode_xerror -#define textmode_xerror2 libgettextpo_textmode_xerror2 -#define u16_mbtouc_aux libgettextpo_u16_mbtouc_aux -#define u8_check libgettextpo_u8_check -#define u8_conv_from_encoding libgettextpo_u8_conv_from_encoding -#define u8_mblen libgettextpo_u8_mblen -#define u8_mbtouc_aux libgettextpo_u8_mbtouc_aux -#define u8_mbtouc_unsafe_aux libgettextpo_u8_mbtouc_unsafe_aux -#define u8_mbtoucr libgettextpo_u8_mbtoucr -#define u8_next libgettextpo_u8_next -#define u8_possible_linebreaks libgettextpo_u8_possible_linebreaks -#define u8_prev libgettextpo_u8_prev -#define u8_strmbtouc libgettextpo_u8_strmbtouc -#define u8_uctomb_aux libgettextpo_u8_uctomb_aux -#define u8_width_linebreaks libgettextpo_u8_width_linebreaks -#define uc_is_alpha libgettextpo_uc_is_alpha -#define uc_is_space libgettextpo_uc_is_space -#define uc_width libgettextpo_uc_width -#define ulc_width_linebreaks libgettextpo_ulc_width_linebreaks -#define uniconv_register_autodetect libgettextpo_uniconv_register_autodetect -#define unilbrk_is_all_ascii libgettextpo_unilbrk_is_all_ascii -#define unilbrk_is_utf8_encoding libgettextpo_unilbrk_is_utf8_encoding -#define unilbrk_table libgettextpo_unilbrk_table -#define unilbrkprop libgettextpo_unilbrkprop -#define uninstall_sigfpe_handler libgettextpo_uninstall_sigfpe_handler -#define unregister_fd_hook libgettextpo_unregister_fd_hook -#define vasnprintf libgettextpo_vasnprintf -#define vasprintf libgettextpo_vasprintf -#define wcwidth libgettextpo_wcwidth -#define x2realloc libgettextpo_x2realloc -#define xalloc_die libgettextpo_xalloc_die -#define xasprintf libgettextpo_xasprintf -#define xcalloc libgettextpo_xcalloc -#define xconcatenated_filename libgettextpo_xconcatenated_filename -#define xmalloc libgettextpo_xmalloc -#define xmalloc_exit_failure libgettextpo_xmalloc_exit_failure -#define xmem_cd_iconv libgettextpo_xmem_cd_iconv -#define xmemdup libgettextpo_xmemdup -#define xmmalloca libgettextpo_xmmalloca -#define xnmalloc libgettextpo_xnmalloc -#define xrealloc libgettextpo_xrealloc -#define xstr_cd_iconv libgettextpo_xstr_cd_iconv -#define xstr_iconv libgettextpo_xstr_iconv -#define xstrdup libgettextpo_xstrdup -#define xvasprintf libgettextpo_xvasprintf -#define xzalloc libgettextpo_xzalloc diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/config.h b/gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/config.h deleted file mode 100644 index 3d67e667b..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/config.h +++ /dev/null @@ -1,1456 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if you wish *printf() functions that have a safe handling of - non-IEEE-754 'long double' values. */ -#define CHECK_PRINTF_SAFE 1 - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'double'. */ -#define DBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'double'. */ -#define DBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_WORD */ - -/* Define to 1 if // is a file system root distinct from /. */ -#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'float'. */ -#define FLT_EXPBIT0_BIT 23 - -/* Define as the word index where to find the exponent of 'float'. */ -#define FLT_EXPBIT0_WORD 0 - -/* Define as the bit index in the word where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_WORD */ - -/* Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday. */ -#define GETTIMEOFDAY_TIMEZONE void - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module snprintf shall be considered present. */ -#define GNULIB_SNPRINTF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module frexp should be tested. */ -#define GNULIB_TEST_FREXP 1 - -/* Define to 1 when the gnulib module frexpl should be tested. */ -#define GNULIB_TEST_FREXPL 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module fsync should be tested. */ -#define GNULIB_TEST_FSYNC 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module gethostname should be tested. */ -#define GNULIB_TEST_GETHOSTNAME 1 - -/* Define to 1 when the gnulib module gettimeofday should be tested. */ -#define GNULIB_TEST_GETTIMEOFDAY 1 - -/* Define to 1 when the gnulib module isatty should be tested. */ -#define GNULIB_TEST_ISATTY 1 - -/* Define to 1 when the gnulib module isinf should be tested. */ -#define GNULIB_TEST_ISINF 1 - -/* Define to 1 when the gnulib module isnan should be tested. */ -#define GNULIB_TEST_ISNAN 1 - -/* Define to 1 when the gnulib module isnand should be tested. */ -#define GNULIB_TEST_ISNAND 1 - -/* Define to 1 when the gnulib module isnanf should be tested. */ -#define GNULIB_TEST_ISNANF 1 - -/* Define to 1 when the gnulib module isnanl should be tested. */ -#define GNULIB_TEST_ISNANL 1 - -/* Define to 1 when the gnulib module log10 should be tested. */ -#define GNULIB_TEST_LOG10 1 - -/* Define to 1 when the gnulib module malloc-posix should be tested. */ -#define GNULIB_TEST_MALLOC_POSIX 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module read should be tested. */ -#define GNULIB_TEST_READ 1 - -/* Define to 1 when the gnulib module sigaction should be tested. */ -#define GNULIB_TEST_SIGACTION 1 - -/* Define to 1 when the gnulib module signbit should be tested. */ -#define GNULIB_TEST_SIGNBIT 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module snprintf should be tested. */ -#define GNULIB_TEST_SNPRINTF 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module stpcpy should be tested. */ -#define GNULIB_TEST_STPCPY 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module vasprintf should be tested. */ -#define GNULIB_TEST_VASPRINTF 1 - -/* Define to 1 when the gnulib module vsnprintf should be tested. */ -#define GNULIB_TEST_VSNPRINTF 1 - -/* Define to 1 when the gnulib module write should be tested. */ -#define GNULIB_TEST_WRITE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUC 1 - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_NAMESER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define if the copysignf function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNF_IN_LIBC */ - -/* Define if the copysignl function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNL_IN_LIBC */ - -/* Define if the copysign function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGN_IN_LIBC */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. - */ -#define HAVE_DECL_ALARM 0 - -/* Define to 1 if you have the declaration of `copysign', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGN */ - -/* Define to 1 if you have the declaration of `copysignf', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNF */ - -/* Define to 1 if you have the declaration of `copysignl', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNL */ - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. - */ -#define HAVE_DECL_ISINF 1 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `snprintf', and to 0 if you - don't. */ -#define HAVE_DECL_SNPRINTF 1 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VSNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define if the frexpl function is available in libc. */ -/* #undef HAVE_FREXPL_IN_LIBC */ - -/* Define if the frexp function is available in libc. */ -#define HAVE_FREXP_IN_LIBC 1 - -/* Define to 1 if you have the `fsync' function. */ -/* #undef HAVE_FSYNC */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `gethostname' function. */ -/* #undef HAVE_GETHOSTNAME */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define to 1 if you have the `getsid' function. */ -/* #undef HAVE_GETSID */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define if the isnan(double) function is available in libc. */ -#define HAVE_ISNAND_IN_LIBC 1 - -/* Define if the isnan(float) function is available in libc. */ -/* #undef HAVE_ISNANF_IN_LIBC */ - -/* Define if the isnan(long double) function is available in libc. */ -/* #undef HAVE_ISNANL_IN_LIBC */ - -/* Define if the ldexpl function is available in libc. */ -#define HAVE_LDEXPL_IN_LIBC 1 - -/* Define if the ldexp function is available in libc. */ -#define HAVE_LDEXP_IN_LIBC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `localtime' function. */ -#define HAVE_LOCALTIME 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define if the 'malloc' function is POSIX compliant. */ -/* #undef HAVE_MALLOC_POSIX */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_LIMITS_H */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_SYS_PARAM_H */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETDB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_H */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -/* #undef HAVE_NL_LANGINFO */ - -/* Define to 1 if the system has obstacks that work with any size object. */ -/* #undef HAVE_OBSTACK */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RESOLV_H */ - -/* Define to 1 if 'long double' and 'double' have the same representation. */ -#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1 - -/* Define to 1 if the system has the type `sa_family_t'. */ -/* #undef HAVE_SA_FAMILY_T */ - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `shutdown' function. */ -/* #undef HAVE_SHUTDOWN */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if you have the `sigaltstack' function. */ -/* #undef HAVE_SIGALTSTACK */ - -/* Define to 1 if the system has the type `siginfo_t'. */ -/* #undef HAVE_SIGINFO_T */ - -/* Define to 1 if you have the `siginterrupt' function. */ -/* #undef HAVE_SIGINTERRUPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if the system has the type `sig_atomic_t'. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the return value of the snprintf function is the number of of - bytes (excluding the terminating NUL) that would have been produced if the - buffer had been large enough. */ -#define HAVE_SNPRINTF_RETVAL_C99 1 - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ -/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ - -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UIO_H */ - -/* Define to 1 if you have the `tcdrain' function. */ -/* #undef HAVE_TCDRAIN */ - -/* Define to 1 if you have the `tcgetattr' function. */ -/* #undef HAVE_TCGETATTR */ - -/* Define if tgetent(), tgetnum(), tgetstr(), tgetflag() are among the termcap - library functions. */ -/* #undef HAVE_TERMCAP */ - -/* Define if setupterm(), tigetnum(), tigetstr(), tigetflag() are among the - termcap library functions. */ -/* #undef HAVE_TERMINFO */ - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define if tparam() is among the termcap library functions. */ -/* #undef HAVE_TPARAM */ - -/* Define to 1 if you have the `uname' function. */ -/* #undef HAVE_UNAME */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if the system has the type 'unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 if you have the `vasnprintf' function. */ -/* #undef HAVE_VASNPRINTF */ - -/* Define to 1 if you have the `vasprintf' function. */ -/* #undef HAVE_VASPRINTF */ - -/* Define to 1 if you have the `vsnprintf' function. */ -/* #undef HAVE_VSNPRINTF */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_WS2TCPIP_H 1 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define HOST_NAME_MAX when does not define it. */ -#define HOST_NAME_MAX 256 - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to 1 if the C compiler is actually a C++ compiler. */ -/* #undef IS_CPLUSPLUS */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'long double'. */ -#define LDBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'long double'. */ -#define LDBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'long - double'. */ -/* #undef LDBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'long double'. */ -/* #undef LDBL_SIGNBIT_WORD */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define if the vasnprintf implementation needs special code for the 'a' and - 'A' directives. */ -#define NEED_PRINTF_DIRECTIVE_A 1 - -/* Define if the vasnprintf implementation needs special code for the 'F' - directive. */ -/* #undef NEED_PRINTF_DIRECTIVE_F */ - -/* Define if the vasnprintf implementation needs special code for the 'ls' - directive. */ -/* #undef NEED_PRINTF_DIRECTIVE_LS */ - -/* Define if the vasnprintf implementation needs special code for 'double' - arguments. */ -#define NEED_PRINTF_DOUBLE 1 - -/* Define if the vasnprintf implementation needs special code for surviving - out-of-memory conditions. */ -#define NEED_PRINTF_ENOMEM 1 - -/* Define if the vasnprintf implementation needs special code for the ' flag. - */ -#define NEED_PRINTF_FLAG_GROUPING 1 - -/* Define if the vasnprintf implementation needs special code for the '-' - flag. */ -/* #undef NEED_PRINTF_FLAG_LEFTADJUST */ - -/* Define if the vasnprintf implementation needs special code for the 0 flag. - */ -/* #undef NEED_PRINTF_FLAG_ZERO */ - -/* Define if the vasnprintf implementation needs special code for infinite - 'double' arguments. */ -/* #undef NEED_PRINTF_INFINITE_DOUBLE */ - -/* Define if the vasnprintf implementation needs special code for infinite - 'long double' arguments. */ -/* #undef NEED_PRINTF_INFINITE_LONG_DOUBLE */ - -/* Define if the vasnprintf implementation needs special code for 'long - double' arguments. */ -#define NEED_PRINTF_LONG_DOUBLE 1 - -/* Define if the vasnprintf implementation needs special code for supporting - large precisions without arbitrary bounds. */ -/* #undef NEED_PRINTF_UNBOUNDED_PRECISION */ - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "libtextstyle" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define if vasnprintf exists but is overridden by gnulib. */ -/* #undef REPLACE_VASNPRINTF */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Define to a working va_copy macro or replacement. */ -#define VA_COPY va_copy - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define if WSAStartup is needed. */ -#define WINDOWS_SOCKETS 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 in order to get the POSIX compatible declarations of socket - functions. */ -/* #undef _POSIX_PII_SOCKET */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b)) - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to long or long long if and don't define. */ -/* #undef intmax_t */ - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define as an integer type suitable for memory locations that can be - accessed atomically even in the presence of asynchronous signals. */ -/* #undef sig_atomic_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* type to use in place of socklen_t if not defined */ -/* #undef socklen_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define as a macro for copying va_list variables. */ -/* #undef va_copy */ - - -/* In order to define all the symbols declared by textstyle.h, do not use - 'inline' functions, even when the compiler would support them. */ -#include "notinline.h" - -/* Ignore DLL_VARIABLE markup that is meant for gettext. */ -#define DLL_VARIABLE - -/* Get LIBTEXTSTYLE_DLL_VARIABLE. */ -#include "textstyle/woe32dll.h" - diff --git a/gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/lib/math.h b/gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/lib/math.h deleted file mode 100644 index caaa8f6ff..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/Win32/libtextstyle/lib/math.h +++ /dev/null @@ -1,3008 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_LTS_MATH_H - -#if __GNUC__ >= 3 - -#endif - - -/* The include_next requires a split double-inclusion guard. */ -#include "../ucrt/math.h" - -#ifndef _GL_LTS_MATH_H -#define _GL_LTS_MATH_H - -/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ -#if defined __VMS && ! defined NAN -# include -#endif - -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif -_GL_INLINE_HEADER_BEGIN -#ifndef _GL_MATH_INLINE -# define _GL_MATH_INLINE _GL_INLINE -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -#ifdef __cplusplus -/* Helper macros to define type-generic function FUNC as overloaded functions, - rather than as macros like in C. POSIX declares these with an argument of - real-floating (that is, one of float, double, or long double). */ -# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ -static inline int \ -_gl_cxx_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -static inline int \ -_gl_cxx_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -static inline int \ -_gl_cxx_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \ -_GL_BEGIN_NAMESPACE \ -inline rettype \ -rpl_func (float f) \ -{ \ - return _gl_cxx_ ## func ## f (f); \ -} \ -inline rettype \ -rpl_func (double d) \ -{ \ - return _gl_cxx_ ## func ## d (d); \ -} \ -inline rettype \ -rpl_func (long double l) \ -{ \ - return _gl_cxx_ ## func ## l (l); \ -} \ -_GL_END_NAMESPACE -#endif - -/* Helper macros to define a portability warning for the - classification macro FUNC called with VALUE. POSIX declares the - classification macros with an argument of real-floating (that is, - one of float, double, or long double). */ -#define _GL_WARN_REAL_FLOATING_DECL(func) \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ - (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ - : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ - : rpl_ ## func ## l (value)) - - -#if 0 -/* Pull in a function that fixes the 'int' to 'long double' conversion - of glibc 2.7. */ -_GL_EXTERN_C void _Qp_itoq (long double *, int); -static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; -#endif - - -/* For clang: Use __has_builtin to determine whether a builtin is available. */ -#ifndef __has_builtin -# define __has_builtin(name) 0 -#endif - - -/* POSIX allows platforms that don't support NAN. But all major - machines in the past 15 years have supported something close to - IEEE NaN, so we define this unconditionally. We also must define - it on platforms like Solaris 10, where NAN is present but defined - as a function pointer rather than a floating point constant. */ -#if !defined NAN || 0 -# if !GNULIB_defined_NAN -# undef NAN - /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler - choke on the expression 0.0 / 0.0. */ -# if defined __DECC || defined _MSC_VER -_GL_MATH_INLINE float -_NaN () -{ - static float zero = 0.0f; - return zero / zero; -} -# define NAN (_NaN()) -# else -# define NAN (0.0f / 0.0f) -# endif -# define GNULIB_defined_NAN 1 -# endif -#endif - -/* Solaris 10 defines HUGE_VAL, but as a function pointer rather - than a floating point constant. */ -#if 0 -# undef HUGE_VALF -# define HUGE_VALF (1.0f / 0.0f) -# undef HUGE_VAL -# define HUGE_VAL (1.0 / 0.0) -# undef HUGE_VALL -# define HUGE_VALL (1.0L / 0.0L) -#endif - -/* HUGE_VALF is a 'float' Infinity. */ -#ifndef HUGE_VALF -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ -# define HUGE_VALF (1e25f * 1e25f) -# else -# define HUGE_VALF (1.0f / 0.0f) -# endif -#endif - -/* HUGE_VAL is a 'double' Infinity. */ -#ifndef HUGE_VAL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ -# define HUGE_VAL (1e250 * 1e250) -# else -# define HUGE_VAL (1.0 / 0.0) -# endif -#endif - -/* HUGE_VALL is a 'long double' Infinity. */ -#ifndef HUGE_VALL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ -# define HUGE_VALL (1e250L * 1e250L) -# else -# define HUGE_VALL (1.0L / 0.0L) -# endif -#endif - - -#if defined FP_ILOGB0 && defined FP_ILOGBNAN - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */ -# if defined __HAIKU__ - /* Haiku: match what ilogb() does */ -# undef FP_ILOGB0 -# undef FP_ILOGBNAN -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#else - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ -# if defined __NetBSD__ || defined __sgi - /* NetBSD, IRIX 6.5: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# elif defined _AIX - /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# elif defined __sun - /* Solaris 9: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# else - /* Gnulib defined values. */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef acosf -# define acosf rpl_acosf -# endif -_GL_FUNCDECL_RPL (acosf, float, (float x)); -_GL_CXXALIAS_RPL (acosf, float, (float x)); -# else -# if !1 -# undef acosf -_GL_FUNCDECL_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIASWARN (acosf); -#elif defined GNULIB_POSIXCHECK -# undef acosf -# if HAVE_RAW_DECL_ACOSF -_GL_WARN_ON_USE (acosf, "acosf is unportable - " - "use gnulib module acosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef acosl -_GL_FUNCDECL_SYS (acosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (acosl, long double, (long double x)); -_GL_CXXALIASWARN (acosl); -#elif defined GNULIB_POSIXCHECK -# undef acosl -# if HAVE_RAW_DECL_ACOSL -_GL_WARN_ON_USE (acosl, "acosl is unportable - " - "use gnulib module acosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef asinf -# define asinf rpl_asinf -# endif -_GL_FUNCDECL_RPL (asinf, float, (float x)); -_GL_CXXALIAS_RPL (asinf, float, (float x)); -# else -# if !1 -# undef asinf -_GL_FUNCDECL_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIASWARN (asinf); -#elif defined GNULIB_POSIXCHECK -# undef asinf -# if HAVE_RAW_DECL_ASINF -_GL_WARN_ON_USE (asinf, "asinf is unportable - " - "use gnulib module asinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef asinl -_GL_FUNCDECL_SYS (asinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (asinl, long double, (long double x)); -_GL_CXXALIASWARN (asinl); -#elif defined GNULIB_POSIXCHECK -# undef asinl -# if HAVE_RAW_DECL_ASINL -_GL_WARN_ON_USE (asinl, "asinl is unportable - " - "use gnulib module asinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atanf -# define atanf rpl_atanf -# endif -_GL_FUNCDECL_RPL (atanf, float, (float x)); -_GL_CXXALIAS_RPL (atanf, float, (float x)); -# else -# if !1 -# undef atanf -_GL_FUNCDECL_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIASWARN (atanf); -#elif defined GNULIB_POSIXCHECK -# undef atanf -# if HAVE_RAW_DECL_ATANF -_GL_WARN_ON_USE (atanf, "atanf is unportable - " - "use gnulib module atanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef atanl -_GL_FUNCDECL_SYS (atanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (atanl, long double, (long double x)); -_GL_CXXALIASWARN (atanl); -#elif defined GNULIB_POSIXCHECK -# undef atanl -# if HAVE_RAW_DECL_ATANL -_GL_WARN_ON_USE (atanl, "atanl is unportable - " - "use gnulib module atanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atan2f -# define atan2f rpl_atan2f -# endif -_GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); -_GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); -# else -# if !1 -# undef atan2f -_GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIASWARN (atan2f); -#elif defined GNULIB_POSIXCHECK -# undef atan2f -# if HAVE_RAW_DECL_ATAN2F -_GL_WARN_ON_USE (atan2f, "atan2f is unportable - " - "use gnulib module atan2f for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtf -# define cbrtf rpl_cbrtf -# endif -_GL_FUNCDECL_RPL (cbrtf, float, (float x)); -_GL_CXXALIAS_RPL (cbrtf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (cbrtf); -#elif defined GNULIB_POSIXCHECK -# undef cbrtf -# if HAVE_RAW_DECL_CBRTF -_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " - "use gnulib module cbrtf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (cbrt, double, (double x)); -# endif -_GL_CXXALIAS_SYS (cbrt, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (cbrt); -# endif -#elif defined GNULIB_POSIXCHECK -# undef cbrt -# if HAVE_RAW_DECL_CBRT -_GL_WARN_ON_USE (cbrt, "cbrt is unportable - " - "use gnulib module cbrt for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtl -# define cbrtl rpl_cbrtl -# endif -_GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (cbrtl); -#elif defined GNULIB_POSIXCHECK -# undef cbrtl -# if HAVE_RAW_DECL_CBRTL -_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " - "use gnulib module cbrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceilf -# define ceilf rpl_ceilf -# endif -_GL_FUNCDECL_RPL (ceilf, float, (float x)); -_GL_CXXALIAS_RPL (ceilf, float, (float x)); -# else -# if !1 -# undef ceilf -_GL_FUNCDECL_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIASWARN (ceilf); -#elif defined GNULIB_POSIXCHECK -# undef ceilf -# if HAVE_RAW_DECL_CEILF -_GL_WARN_ON_USE (ceilf, "ceilf is unportable - " - "use gnulib module ceilf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceil -# define ceil rpl_ceil -# endif -_GL_FUNCDECL_RPL (ceil, double, (double x)); -_GL_CXXALIAS_RPL (ceil, double, (double x)); -# else -_GL_CXXALIAS_SYS (ceil, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ceil); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceill -# define ceill rpl_ceill -# endif -_GL_FUNCDECL_RPL (ceill, long double, (long double x)); -_GL_CXXALIAS_RPL (ceill, long double, (long double x)); -# else -# if !1 -# undef ceill -_GL_FUNCDECL_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIASWARN (ceill); -#elif defined GNULIB_POSIXCHECK -# undef ceill -# if HAVE_RAW_DECL_CEILL -_GL_WARN_ON_USE (ceill, "ceill is unportable - " - "use gnulib module ceill for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef copysignf -_GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); -_GL_CXXALIASWARN (copysignf); -#elif defined GNULIB_POSIXCHECK -# undef copysignf -# if HAVE_RAW_DECL_COPYSIGNF -_GL_WARN_ON_USE (copysignf, "copysignf is unportable - " - "use gnulib module copysignf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysign, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (copysign, double, (double x, double y)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (copysign); -# endif -#elif defined GNULIB_POSIXCHECK -# undef copysign -# if HAVE_RAW_DECL_COPYSIGN -_GL_WARN_ON_USE (copysign, "copysign is unportable - " - "use gnulib module copysign for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); -_GL_CXXALIASWARN (copysignl); -#elif defined GNULIB_POSIXCHECK -# undef copysignl -# if HAVE_RAW_DECL_COPYSIGNL -_GL_WARN_ON_USE (copysign, "copysignl is unportable - " - "use gnulib module copysignl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cosf -# define cosf rpl_cosf -# endif -_GL_FUNCDECL_RPL (cosf, float, (float x)); -_GL_CXXALIAS_RPL (cosf, float, (float x)); -# else -# if !1 -# undef cosf -_GL_FUNCDECL_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIASWARN (cosf); -#elif defined GNULIB_POSIXCHECK -# undef cosf -# if HAVE_RAW_DECL_COSF -_GL_WARN_ON_USE (cosf, "cosf is unportable - " - "use gnulib module cosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef cosl -_GL_FUNCDECL_SYS (cosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cosl, long double, (long double x)); -_GL_CXXALIASWARN (cosl); -#elif defined GNULIB_POSIXCHECK -# undef cosl -# if HAVE_RAW_DECL_COSL -_GL_WARN_ON_USE (cosl, "cosl is unportable - " - "use gnulib module cosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef coshf -# define coshf rpl_coshf -# endif -_GL_FUNCDECL_RPL (coshf, float, (float x)); -_GL_CXXALIAS_RPL (coshf, float, (float x)); -# else -# if !1 -# undef coshf -_GL_FUNCDECL_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIASWARN (coshf); -#elif defined GNULIB_POSIXCHECK -# undef coshf -# if HAVE_RAW_DECL_COSHF -_GL_WARN_ON_USE (coshf, "coshf is unportable - " - "use gnulib module coshf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expf -# define expf rpl_expf -# endif -_GL_FUNCDECL_RPL (expf, float, (float x)); -_GL_CXXALIAS_RPL (expf, float, (float x)); -# else -# if !1 -# undef expf -_GL_FUNCDECL_SYS (expf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expf, float, (float x)); -# endif -_GL_CXXALIASWARN (expf); -#elif defined GNULIB_POSIXCHECK -# undef expf -# if HAVE_RAW_DECL_EXPF -_GL_WARN_ON_USE (expf, "expf is unportable - " - "use gnulib module expf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expl -# define expl rpl_expl -# endif -_GL_FUNCDECL_RPL (expl, long double, (long double x)); -_GL_CXXALIAS_RPL (expl, long double, (long double x)); -# else -# if !1 || !1 -# undef expl -_GL_FUNCDECL_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expl); -#elif defined GNULIB_POSIXCHECK -# undef expl -# if HAVE_RAW_DECL_EXPL -_GL_WARN_ON_USE (expl, "expl is unportable - " - "use gnulib module expl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (exp2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (exp2f, float, (float x)); -_GL_CXXALIASWARN (exp2f); -#elif defined GNULIB_POSIXCHECK -# undef exp2f -# if HAVE_RAW_DECL_EXP2F -_GL_WARN_ON_USE (exp2f, "exp2f is unportable - " - "use gnulib module exp2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2 -# define exp2 rpl_exp2 -# endif -_GL_FUNCDECL_RPL (exp2, double, (double x)); -_GL_CXXALIAS_RPL (exp2, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (exp2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (exp2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (exp2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef exp2 -# if HAVE_RAW_DECL_EXP2 -_GL_WARN_ON_USE (exp2, "exp2 is unportable - " - "use gnulib module exp2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2l -# define exp2l rpl_exp2l -# endif -_GL_FUNCDECL_RPL (exp2l, long double, (long double x)); -_GL_CXXALIAS_RPL (exp2l, long double, (long double x)); -# else -# if !1 -# undef exp2l -_GL_FUNCDECL_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (exp2l); -#elif defined GNULIB_POSIXCHECK -# undef exp2l -# if HAVE_RAW_DECL_EXP2L -_GL_WARN_ON_USE (exp2l, "exp2l is unportable - " - "use gnulib module exp2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1f -# define expm1f rpl_expm1f -# endif -_GL_FUNCDECL_RPL (expm1f, float, (float x)); -_GL_CXXALIAS_RPL (expm1f, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIASWARN (expm1f); -#elif defined GNULIB_POSIXCHECK -# undef expm1f -# if HAVE_RAW_DECL_EXPM1F -_GL_WARN_ON_USE (expm1f, "expm1f is unportable - " - "use gnulib module expm1f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1 -# define expm1 rpl_expm1 -# endif -_GL_FUNCDECL_RPL (expm1, double, (double x)); -_GL_CXXALIAS_RPL (expm1, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1, double, (double x)); -# endif -_GL_CXXALIAS_SYS (expm1, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (expm1); -# endif -#elif defined GNULIB_POSIXCHECK -# undef expm1 -# if HAVE_RAW_DECL_EXPM1 -_GL_WARN_ON_USE (expm1, "expm1 is unportable - " - "use gnulib module expm1 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1l -# define expm1l rpl_expm1l -# endif -_GL_FUNCDECL_RPL (expm1l, long double, (long double x)); -_GL_CXXALIAS_RPL (expm1l, long double, (long double x)); -# else -# if !1 -# undef expm1l -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (expm1l, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (expm1l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expm1l); -#elif defined GNULIB_POSIXCHECK -# undef expm1l -# if HAVE_RAW_DECL_EXPM1L -_GL_WARN_ON_USE (expm1l, "expm1l is unportable - " - "use gnulib module expm1l for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef fabsf -_GL_FUNCDECL_SYS (fabsf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (fabsf, float, (float x)); -_GL_CXXALIASWARN (fabsf); -#elif defined GNULIB_POSIXCHECK -# undef fabsf -# if HAVE_RAW_DECL_FABSF -_GL_WARN_ON_USE (fabsf, "fabsf is unportable - " - "use gnulib module fabsf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fabsl -# define fabsl rpl_fabsl -# endif -_GL_FUNCDECL_RPL (fabsl, long double, (long double x)); -_GL_CXXALIAS_RPL (fabsl, long double, (long double x)); -# else -# if !1 -# undef fabsl -_GL_FUNCDECL_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (fabsl); -#elif defined GNULIB_POSIXCHECK -# undef fabsl -# if HAVE_RAW_DECL_FABSL -_GL_WARN_ON_USE (fabsl, "fabsl is unportable - " - "use gnulib module fabsl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorf -# define floorf rpl_floorf -# endif -_GL_FUNCDECL_RPL (floorf, float, (float x)); -_GL_CXXALIAS_RPL (floorf, float, (float x)); -# else -# if !1 -# undef floorf -_GL_FUNCDECL_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIASWARN (floorf); -#elif defined GNULIB_POSIXCHECK -# undef floorf -# if HAVE_RAW_DECL_FLOORF -_GL_WARN_ON_USE (floorf, "floorf is unportable - " - "use gnulib module floorf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floor -# define floor rpl_floor -# endif -_GL_FUNCDECL_RPL (floor, double, (double x)); -_GL_CXXALIAS_RPL (floor, double, (double x)); -# else -_GL_CXXALIAS_SYS (floor, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (floor); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorl -# define floorl rpl_floorl -# endif -_GL_FUNCDECL_RPL (floorl, long double, (long double x)); -_GL_CXXALIAS_RPL (floorl, long double, (long double x)); -# else -# if !1 -# undef floorl -_GL_FUNCDECL_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (floorl); -#elif defined GNULIB_POSIXCHECK -# undef floorl -# if HAVE_RAW_DECL_FLOORL -_GL_WARN_ON_USE (floorl, "floorl is unportable - " - "use gnulib module floorl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmaf -# define fmaf rpl_fmaf -# endif -_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); -_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); -# else -# if !1 -# undef fmaf -_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIASWARN (fmaf); -#elif defined GNULIB_POSIXCHECK -# undef fmaf -# if HAVE_RAW_DECL_FMAF -_GL_WARN_ON_USE (fmaf, "fmaf is unportable - " - "use gnulib module fmaf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fma -# define fma rpl_fma -# endif -_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); -_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); -# else -# if !1 -# undef fma -_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); -# endif -_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fma); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fma -# if HAVE_RAW_DECL_FMA -_GL_WARN_ON_USE (fma, "fma is unportable - " - "use gnulib module fma for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmal -# define fmal rpl_fmal -# endif -_GL_FUNCDECL_RPL (fmal, long double, - (long double x, long double y, long double z)); -_GL_CXXALIAS_RPL (fmal, long double, - (long double x, long double y, long double z)); -# else -# if !1 -# undef fmal -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -# endif -_GL_CXXALIAS_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -_GL_CXXALIASWARN (fmal); -#elif defined GNULIB_POSIXCHECK -# undef fmal -# if HAVE_RAW_DECL_FMAL -_GL_WARN_ON_USE (fmal, "fmal is unportable - " - "use gnulib module fmal for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodf -# define fmodf rpl_fmodf -# endif -_GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); -_GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); -# else -# if !1 -# undef fmodf -_GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (fmodf); -#elif defined GNULIB_POSIXCHECK -# undef fmodf -# if HAVE_RAW_DECL_FMODF -_GL_WARN_ON_USE (fmodf, "fmodf is unportable - " - "use gnulib module fmodf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmod -# define fmod rpl_fmod -# endif -_GL_FUNCDECL_RPL (fmod, double, (double x, double y)); -_GL_CXXALIAS_RPL (fmod, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (fmod, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fmod); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fmod -# if HAVE_RAW_DECL_FMOD -_GL_WARN_ON_USE (fmod, "fmod has portability problems - " - "use gnulib module fmod for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodl -# define fmodl rpl_fmodl -# endif -_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); -# else -# if !1 -# undef fmodl -_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (fmodl); -#elif defined GNULIB_POSIXCHECK -# undef fmodl -# if HAVE_RAW_DECL_FMODL -_GL_WARN_ON_USE (fmodl, "fmodl is unportable - " - "use gnulib module fmodl for portability"); -# endif -#endif - - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpf -# define frexpf rpl_frexpf -# endif -_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); -# else -# if !1 -# undef frexpf -_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); -# endif -_GL_CXXALIASWARN (frexpf); -#elif defined GNULIB_POSIXCHECK -# undef frexpf -# if HAVE_RAW_DECL_FREXPF -_GL_WARN_ON_USE (frexpf, "frexpf is unportable - " - "use gnulib module frexpf for portability"); -# endif -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexp -# define frexp rpl_frexp -# endif -_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); -# else -_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef frexp -/* Assume frexp is always declared. */ -_GL_WARN_ON_USE (frexp, "frexp is unportable - " - "use gnulib module frexp for portability"); -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 1 && 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpl -# define frexpl rpl_frexpl -# endif -_GL_FUNCDECL_RPL (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); -#else -# if !1 -_GL_FUNCDECL_SYS (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -# if 1 -_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); -# endif -#endif -#if 1 && !(1 && !1) -_GL_CXXALIASWARN (frexpl); -#endif -#if !1 && defined GNULIB_POSIXCHECK -# undef frexpl -# if HAVE_RAW_DECL_FREXPL -_GL_WARN_ON_USE (frexpl, "frexpl is unportable - " - "use gnulib module frexpl for portability"); -# endif -#endif - - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotf -# define hypotf rpl_hypotf -# endif -_GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); -_GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (hypotf); -#elif defined GNULIB_POSIXCHECK -# undef hypotf -# if HAVE_RAW_DECL_HYPOTF -_GL_WARN_ON_USE (hypotf, "hypotf is unportable - " - "use gnulib module hypotf for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypot -# define hypot rpl_hypot -# endif -_GL_FUNCDECL_RPL (hypot, double, (double x, double y)); -_GL_CXXALIAS_RPL (hypot, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (hypot, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (hypot); -# endif -#elif defined GNULIB_POSIXCHECK -# undef hypot -# if HAVE_RAW_DECL_HYPOT -_GL_WARN_ON_USE (hypotf, "hypot has portability problems - " - "use gnulib module hypot for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotl -# define hypotl rpl_hypotl -# endif -_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (hypotl); -#elif defined GNULIB_POSIXCHECK -# undef hypotl -# if HAVE_RAW_DECL_HYPOTL -_GL_WARN_ON_USE (hypotl, "hypotl is unportable - " - "use gnulib module hypotl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbf -# define ilogbf rpl_ilogbf -# endif -_GL_FUNCDECL_RPL (ilogbf, int, (float x)); -_GL_CXXALIAS_RPL (ilogbf, int, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIAS_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIASWARN (ilogbf); -#elif defined GNULIB_POSIXCHECK -# undef ilogbf -# if HAVE_RAW_DECL_ILOGBF -_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " - "use gnulib module ilogbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogb -# define ilogb rpl_ilogb -# endif -_GL_FUNCDECL_RPL (ilogb, int, (double x)); -_GL_CXXALIAS_RPL (ilogb, int, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogb, int, (double x)); -# endif -_GL_CXXALIAS_SYS (ilogb, int, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ilogb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef ilogb -# if HAVE_RAW_DECL_ILOGB -_GL_WARN_ON_USE (ilogb, "ilogb is unportable - " - "use gnulib module ilogb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbl -# define ilogbl rpl_ilogbl -# endif -_GL_FUNCDECL_RPL (ilogbl, int, (long double x)); -_GL_CXXALIAS_RPL (ilogbl, int, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIASWARN (ilogbl); -#elif defined GNULIB_POSIXCHECK -# undef ilogbl -# if HAVE_RAW_DECL_ILOGBL -_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " - "use gnulib module ilogbl for portability"); -# endif -#endif - - -/* Return x * 2^exp. */ -#if 0 -# if !1 -# undef ldexpf -_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); -# endif -_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); -_GL_CXXALIASWARN (ldexpf); -#elif defined GNULIB_POSIXCHECK -# undef ldexpf -# if HAVE_RAW_DECL_LDEXPF -_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " - "use gnulib module ldexpf for portability"); -# endif -#endif - -/* Return x * 2^exp. */ -#if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ldexpl -# define ldexpl rpl_ldexpl -# endif -_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); -_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); -#else -# if !1 -_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); -# endif -# if 0 -_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); -# endif -#endif -#if 0 -_GL_CXXALIASWARN (ldexpl); -#endif -#if !0 && defined GNULIB_POSIXCHECK -# undef ldexpl -# if HAVE_RAW_DECL_LDEXPL -_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " - "use gnulib module ldexpl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logf -# define logf rpl_logf -# endif -_GL_FUNCDECL_RPL (logf, float, (float x)); -_GL_CXXALIAS_RPL (logf, float, (float x)); -# else -# if !1 -# undef logf -_GL_FUNCDECL_SYS (logf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logf, float, (float x)); -# endif -_GL_CXXALIASWARN (logf); -#elif defined GNULIB_POSIXCHECK -# undef logf -# if HAVE_RAW_DECL_LOGF -_GL_WARN_ON_USE (logf, "logf is unportable - " - "use gnulib module logf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log -# define log rpl_log -# endif -_GL_FUNCDECL_RPL (log, double, (double x)); -_GL_CXXALIAS_RPL (log, double, (double x)); -# else -_GL_CXXALIAS_SYS (log, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log -# if HAVE_RAW_DECL_LOG -_GL_WARN_ON_USE (log, "log has portability problems - " - "use gnulib module log for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logl -# define logl rpl_logl -# endif -_GL_FUNCDECL_RPL (logl, long double, (long double x)); -_GL_CXXALIAS_RPL (logl, long double, (long double x)); -# else -# if !1 || !1 -# undef logl -_GL_FUNCDECL_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logl); -#elif defined GNULIB_POSIXCHECK -# undef logl -# if HAVE_RAW_DECL_LOGL -_GL_WARN_ON_USE (logl, "logl is unportable - " - "use gnulib module logl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10f -# define log10f rpl_log10f -# endif -_GL_FUNCDECL_RPL (log10f, float, (float x)); -_GL_CXXALIAS_RPL (log10f, float, (float x)); -# else -# if !1 -# undef log10f -_GL_FUNCDECL_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIASWARN (log10f); -#elif defined GNULIB_POSIXCHECK -# undef log10f -# if HAVE_RAW_DECL_LOG10F -_GL_WARN_ON_USE (log10f, "log10f is unportable - " - "use gnulib module log10f for portability"); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10 -# define log10 rpl_log10 -# endif -_GL_FUNCDECL_RPL (log10, double, (double x)); -_GL_CXXALIAS_RPL (log10, double, (double x)); -# else -_GL_CXXALIAS_SYS (log10, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log10); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log10 -# if HAVE_RAW_DECL_LOG10 -_GL_WARN_ON_USE (log10, "log10 has portability problems - " - "use gnulib module log10 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10l -# define log10l rpl_log10l -# endif -_GL_FUNCDECL_RPL (log10l, long double, (long double x)); -_GL_CXXALIAS_RPL (log10l, long double, (long double x)); -# else -# if !1 || !1 -# undef log10l -_GL_FUNCDECL_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log10l); -#elif defined GNULIB_POSIXCHECK -# undef log10l -# if HAVE_RAW_DECL_LOG10L -_GL_WARN_ON_USE (log10l, "log10l is unportable - " - "use gnulib module log10l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pf -# define log1pf rpl_log1pf -# endif -_GL_FUNCDECL_RPL (log1pf, float, (float x)); -_GL_CXXALIAS_RPL (log1pf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIASWARN (log1pf); -#elif defined GNULIB_POSIXCHECK -# undef log1pf -# if HAVE_RAW_DECL_LOG1PF -_GL_WARN_ON_USE (log1pf, "log1pf is unportable - " - "use gnulib module log1pf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1p -# define log1p rpl_log1p -# endif -_GL_FUNCDECL_RPL (log1p, double, (double x)); -_GL_CXXALIAS_RPL (log1p, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1p, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log1p, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log1p); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log1p -# if HAVE_RAW_DECL_LOG1P -_GL_WARN_ON_USE (log1p, "log1p has portability problems - " - "use gnulib module log1p for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pl -# define log1pl rpl_log1pl -# endif -_GL_FUNCDECL_RPL (log1pl, long double, (long double x)); -_GL_CXXALIAS_RPL (log1pl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log1pl); -#elif defined GNULIB_POSIXCHECK -# undef log1pl -# if HAVE_RAW_DECL_LOG1PL -_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " - "use gnulib module log1pl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2f -# define log2f rpl_log2f -# endif -_GL_FUNCDECL_RPL (log2f, float, (float x)); -_GL_CXXALIAS_RPL (log2f, float, (float x)); -# else -# if !1 -# undef log2f -_GL_FUNCDECL_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIASWARN (log2f); -#elif defined GNULIB_POSIXCHECK -# undef log2f -# if HAVE_RAW_DECL_LOG2F -_GL_WARN_ON_USE (log2f, "log2f is unportable - " - "use gnulib module log2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2 -# define log2 rpl_log2 -# endif -_GL_FUNCDECL_RPL (log2, double, (double x)); -_GL_CXXALIAS_RPL (log2, double, (double x)); -# else -# if !1 -# undef log2 -_GL_FUNCDECL_SYS (log2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log2 -# if HAVE_RAW_DECL_LOG2 -_GL_WARN_ON_USE (log2, "log2 is unportable - " - "use gnulib module log2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2l -# define log2l rpl_log2l -# endif -_GL_FUNCDECL_RPL (log2l, long double, (long double x)); -_GL_CXXALIAS_RPL (log2l, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log2l); -#elif defined GNULIB_POSIXCHECK -# undef log2l -# if HAVE_RAW_DECL_LOG2L -_GL_WARN_ON_USE (log2l, "log2l is unportable - " - "use gnulib module log2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbf -# define logbf rpl_logbf -# endif -_GL_FUNCDECL_RPL (logbf, float, (float x)); -_GL_CXXALIAS_RPL (logbf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIASWARN (logbf); -#elif defined GNULIB_POSIXCHECK -# undef logbf -# if HAVE_RAW_DECL_LOGBF -_GL_WARN_ON_USE (logbf, "logbf is unportable - " - "use gnulib module logbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logb -# define logb rpl_logb -# endif -_GL_FUNCDECL_RPL (logb, double, (double x)); -_GL_CXXALIAS_RPL (logb, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logb, double, (double x)); -# endif -_GL_CXXALIAS_SYS (logb, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (logb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef logb -# if HAVE_RAW_DECL_LOGB -_GL_WARN_ON_USE (logb, "logb is unportable - " - "use gnulib module logb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbl -# define logbl rpl_logbl -# endif -_GL_FUNCDECL_RPL (logbl, long double, (long double x)); -_GL_CXXALIAS_RPL (logbl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logbl); -#elif defined GNULIB_POSIXCHECK -# undef logbl -# if HAVE_RAW_DECL_LOGBL -_GL_WARN_ON_USE (logbl, "logbl is unportable - " - "use gnulib module logbl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modff -# define modff rpl_modff -# endif -_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); -# else -# if !1 -# undef modff -_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); -# endif -_GL_CXXALIASWARN (modff); -#elif defined GNULIB_POSIXCHECK -# undef modff -# if HAVE_RAW_DECL_MODFF -_GL_WARN_ON_USE (modff, "modff is unportable - " - "use gnulib module modff for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modf -# define modf rpl_modf -# endif -_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); -# else -_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (modf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef modf -# if HAVE_RAW_DECL_MODF -_GL_WARN_ON_USE (modf, "modf has portability problems - " - "use gnulib module modf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modfl -# define modfl rpl_modfl -# endif -_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); -# else -# if !1 -# undef modfl -_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); -# endif -_GL_CXXALIASWARN (modfl); -#elif defined GNULIB_POSIXCHECK -# undef modfl -# if HAVE_RAW_DECL_MODFL -_GL_WARN_ON_USE (modfl, "modfl is unportable - " - "use gnulib module modfl for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef powf -_GL_FUNCDECL_SYS (powf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (powf, float, (float x, float y)); -_GL_CXXALIASWARN (powf); -#elif defined GNULIB_POSIXCHECK -# undef powf -# if HAVE_RAW_DECL_POWF -_GL_WARN_ON_USE (powf, "powf is unportable - " - "use gnulib module powf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderf -# define remainderf rpl_remainderf -# endif -_GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); -_GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (remainderf); -#elif defined GNULIB_POSIXCHECK -# undef remainderf -# if HAVE_RAW_DECL_REMAINDERF -_GL_WARN_ON_USE (remainderf, "remainderf is unportable - " - "use gnulib module remainderf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainder -# define remainder rpl_remainder -# endif -_GL_FUNCDECL_RPL (remainder, double, (double x, double y)); -_GL_CXXALIAS_RPL (remainder, double, (double x, double y)); -# else -# if !1 || !1 -_GL_FUNCDECL_SYS (remainder, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (remainder, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remainder); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remainder -# if HAVE_RAW_DECL_REMAINDER -_GL_WARN_ON_USE (remainder, "remainder is unportable - " - "use gnulib module remainder for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderl -# define remainderl rpl_remainderl -# endif -_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); -# else -# if !1 -# undef remainderl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); -# endif -# endif -_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (remainderl); -#elif defined GNULIB_POSIXCHECK -# undef remainderl -# if HAVE_RAW_DECL_REMAINDERL -_GL_WARN_ON_USE (remainderl, "remainderl is unportable - " - "use gnulib module remainderl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rintf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (rintf, float, (float x)); -_GL_CXXALIASWARN (rintf); -#elif defined GNULIB_POSIXCHECK -# undef rintf -# if HAVE_RAW_DECL_RINTF -_GL_WARN_ON_USE (rintf, "rintf is unportable - " - "use gnulib module rintf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rint, double, (double x)); -# endif -_GL_CXXALIAS_SYS (rint, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rint); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rint -# if HAVE_RAW_DECL_RINT -_GL_WARN_ON_USE (rint, "rint is unportable - " - "use gnulib module rint for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rintl -# define rintl rpl_rintl -# endif -_GL_FUNCDECL_RPL (rintl, long double, (long double x)); -_GL_CXXALIAS_RPL (rintl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (rintl); -#elif defined GNULIB_POSIXCHECK -# undef rintl -# if HAVE_RAW_DECL_RINTL -_GL_WARN_ON_USE (rintl, "rintl is unportable - " - "use gnulib module rintl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundf -# define roundf rpl_roundf -# endif -_GL_FUNCDECL_RPL (roundf, float, (float x)); -_GL_CXXALIAS_RPL (roundf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIASWARN (roundf); -#elif defined GNULIB_POSIXCHECK -# undef roundf -# if HAVE_RAW_DECL_ROUNDF -_GL_WARN_ON_USE (roundf, "roundf is unportable - " - "use gnulib module roundf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef round -# define round rpl_round -# endif -_GL_FUNCDECL_RPL (round, double, (double x)); -_GL_CXXALIAS_RPL (round, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (round, double, (double x)); -# endif -_GL_CXXALIAS_SYS (round, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (round); -# endif -#elif defined GNULIB_POSIXCHECK -# undef round -# if HAVE_RAW_DECL_ROUND -_GL_WARN_ON_USE (round, "round is unportable - " - "use gnulib module round for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundl -# define roundl rpl_roundl -# endif -_GL_FUNCDECL_RPL (roundl, long double, (long double x)); -_GL_CXXALIAS_RPL (roundl, long double, (long double x)); -# else -# if !1 -# undef roundl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (roundl, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (roundl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (roundl); -#elif defined GNULIB_POSIXCHECK -# undef roundl -# if HAVE_RAW_DECL_ROUNDL -_GL_WARN_ON_USE (roundl, "roundl is unportable - " - "use gnulib module roundl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinf -# define sinf rpl_sinf -# endif -_GL_FUNCDECL_RPL (sinf, float, (float x)); -_GL_CXXALIAS_RPL (sinf, float, (float x)); -# else -# if !1 - # undef sinf -_GL_FUNCDECL_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinf); -#elif defined GNULIB_POSIXCHECK -# undef sinf -# if HAVE_RAW_DECL_SINF -_GL_WARN_ON_USE (sinf, "sinf is unportable - " - "use gnulib module sinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef sinl -_GL_FUNCDECL_SYS (sinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sinl, long double, (long double x)); -_GL_CXXALIASWARN (sinl); -#elif defined GNULIB_POSIXCHECK -# undef sinl -# if HAVE_RAW_DECL_SINL -_GL_WARN_ON_USE (sinl, "sinl is unportable - " - "use gnulib module sinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinhf -# define sinhf rpl_sinhf -# endif -_GL_FUNCDECL_RPL (sinhf, float, (float x)); -_GL_CXXALIAS_RPL (sinhf, float, (float x)); -# else -# if !1 -# undef sinhf -_GL_FUNCDECL_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinhf); -#elif defined GNULIB_POSIXCHECK -# undef sinhf -# if HAVE_RAW_DECL_SINHF -_GL_WARN_ON_USE (sinhf, "sinhf is unportable - " - "use gnulib module sinhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtf -# define sqrtf rpl_sqrtf -# endif -_GL_FUNCDECL_RPL (sqrtf, float, (float x)); -_GL_CXXALIAS_RPL (sqrtf, float, (float x)); -# else -# if !1 -# undef sqrtf -_GL_FUNCDECL_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (sqrtf); -#elif defined GNULIB_POSIXCHECK -# undef sqrtf -# if HAVE_RAW_DECL_SQRTF -_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " - "use gnulib module sqrtf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtl -# define sqrtl rpl_sqrtl -# endif -_GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); -# else -# if !1 || !1 -# undef sqrtl -_GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (sqrtl); -#elif defined GNULIB_POSIXCHECK -# undef sqrtl -# if HAVE_RAW_DECL_SQRTL -_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " - "use gnulib module sqrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanf -# define tanf rpl_tanf -# endif -_GL_FUNCDECL_RPL (tanf, float, (float x)); -_GL_CXXALIAS_RPL (tanf, float, (float x)); -# else -# if !1 -# undef tanf -_GL_FUNCDECL_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanf); -#elif defined GNULIB_POSIXCHECK -# undef tanf -# if HAVE_RAW_DECL_TANF -_GL_WARN_ON_USE (tanf, "tanf is unportable - " - "use gnulib module tanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef tanl -_GL_FUNCDECL_SYS (tanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (tanl, long double, (long double x)); -_GL_CXXALIASWARN (tanl); -#elif defined GNULIB_POSIXCHECK -# undef tanl -# if HAVE_RAW_DECL_TANL -_GL_WARN_ON_USE (tanl, "tanl is unportable - " - "use gnulib module tanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanhf -# define tanhf rpl_tanhf -# endif -_GL_FUNCDECL_RPL (tanhf, float, (float x)); -_GL_CXXALIAS_RPL (tanhf, float, (float x)); -# else -# if !1 -# undef tanhf -_GL_FUNCDECL_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanhf); -#elif defined GNULIB_POSIXCHECK -# undef tanhf -# if HAVE_RAW_DECL_TANHF -_GL_WARN_ON_USE (tanhf, "tanhf is unportable - " - "use gnulib module tanhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncf -# define truncf rpl_truncf -# endif -_GL_FUNCDECL_RPL (truncf, float, (float x)); -_GL_CXXALIAS_RPL (truncf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIASWARN (truncf); -#elif defined GNULIB_POSIXCHECK -# undef truncf -# if HAVE_RAW_DECL_TRUNCF -_GL_WARN_ON_USE (truncf, "truncf is unportable - " - "use gnulib module truncf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef trunc -# define trunc rpl_trunc -# endif -_GL_FUNCDECL_RPL (trunc, double, (double x)); -_GL_CXXALIAS_RPL (trunc, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (trunc, double, (double x)); -# endif -_GL_CXXALIAS_SYS (trunc, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (trunc); -# endif -#elif defined GNULIB_POSIXCHECK -# undef trunc -# if HAVE_RAW_DECL_TRUNC -_GL_WARN_ON_USE (trunc, "trunc is unportable - " - "use gnulib module trunc for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncl -# define truncl rpl_truncl -# endif -_GL_FUNCDECL_RPL (truncl, long double, (long double x)); -_GL_CXXALIAS_RPL (truncl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (truncl); -#elif defined GNULIB_POSIXCHECK -# undef truncl -# if HAVE_RAW_DECL_TRUNCL -_GL_WARN_ON_USE (truncl, "truncl is unportable - " - "use gnulib module truncl for portability"); -# endif -#endif - - -/* Definitions of function-like macros come here, after the function - declarations. */ - - -#if 0 -# if 0 -_GL_EXTERN_C int gl_isfinitef (float x); -_GL_EXTERN_C int gl_isfinited (double x); -_GL_EXTERN_C int gl_isfinitel (long double x); -# undef isfinite -# define isfinite(x) \ - (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ - sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ - gl_isfinitef (x)) -# endif -# ifdef __cplusplus -# if defined isfinite || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) -# undef isfinite -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines isfinite through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) -# define isfinite rpl_isfinite -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isfinite -_GL_WARN_REAL_FLOATING_DECL (isfinite); -# undef isfinite -# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) -# endif -#endif - - -#if 1 -# if 1 -_GL_EXTERN_C int gl_isinff (float x); -_GL_EXTERN_C int gl_isinfd (double x); -_GL_EXTERN_C int gl_isinfl (long double x); -# undef isinf -# define isinf(x) \ - (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ - sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ - gl_isinff (x)) -# endif -# ifdef __cplusplus -# if defined isinf || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) -# undef isinf -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isinf through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) -# define isinf rpl_isinf -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isinf -_GL_WARN_REAL_FLOATING_DECL (isinf); -# undef isinf -# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) -# endif -#endif - - -#if 1 -/* Test for NaN for 'float' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan macro - or (older) isnanf function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) -# elif defined isnan -# undef isnanf -# define isnanf(x) isnan ((float)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanf -# define isnanf rpl_isnanf -_GL_EXTERN_C int isnanf (float x); -# endif -#endif - -#if 1 -/* Test for NaN for 'double' numbers. - This function is a gnulib extension, unlike isnan() which applied only - to 'double' numbers earlier but now is a type-generic macro. */ -# if 1 -/* The original included above provides a declaration of isnan - macro. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnand -# define isnand(x) __builtin_isnan ((double)(x)) -# else -# undef isnand -# define isnand(x) isnan ((double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnand -# define isnand rpl_isnand -_GL_EXTERN_C int isnand (double x); -# endif -#endif - -#if 1 -/* Test for NaN for 'long double' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan - macro or (older) isnanl function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) -# elif defined isnan -# undef isnanl -# define isnanl(x) isnan ((long double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanl -# define isnanl rpl_isnanl -_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; -# endif -#endif - -/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ -#if 1 -# if 1 -/* We can't just use the isnanf macro (e.g.) as exposed by - isnanf.h (e.g.) here, because those may end up being macros - that recursively expand back to isnan. So use the gnulib - replacements for them directly. */ -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) -# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) -# else -_GL_EXTERN_C int rpl_isnanf (float x); -# define gl_isnan_f(x) rpl_isnanf (x) -# endif -# if 1 && __GNUC__ >= 4 -# define gl_isnan_d(x) __builtin_isnan ((double)(x)) -# else -_GL_EXTERN_C int rpl_isnand (double x); -# define gl_isnan_d(x) rpl_isnand (x) -# endif -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) -# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) -# else -_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; -# define gl_isnan_l(x) rpl_isnanl (x) -# endif -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ - sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ - gl_isnan_f (x)) -# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl))) -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ - sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ - __builtin_isnanf ((float)(x))) -# endif -# ifdef __cplusplus -# if defined isnan || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) -# undef isnan -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isnan through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) -# define isnan rpl_isnan -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) -# endif -# endif -# else -/* Ensure isnan is a macro. */ -# ifndef isnan -# define isnan isnan -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isnan -_GL_WARN_REAL_FLOATING_DECL (isnan); -# undef isnan -# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) -# endif -#endif - - -#if 1 -# if (0 \ - && (!defined __cplusplus || __cplusplus < 201103)) -# undef signbit - /* GCC 4.0 and newer provides three built-ins for signbit. */ -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ - sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ - __builtin_signbitf (x)) -# endif -# if 0 && !GNULIB_defined_signbit -# undef signbit -_GL_EXTERN_C int gl_signbitf (float arg); -_GL_EXTERN_C int gl_signbitd (double arg); -_GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ -# define _GL_NUM_UINT_WORDS(type) \ - ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) -# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf -# define gl_signbitf_OPTIMIZED_MACRO -# define gl_signbitf(arg) \ - ({ union { float _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd -# define gl_signbitd_OPTIMIZED_MACRO -# define gl_signbitd(arg) \ - ({ union { double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl -# define gl_signbitl_OPTIMIZED_MACRO -# define gl_signbitl(arg) \ - ({ union { long double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# endif -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ - sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ - gl_signbitf (x)) -# define GNULIB_defined_signbit 1 -# endif -# ifdef __cplusplus -# if defined signbit || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) -# undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines signbit through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) -# define signbit rpl_signbit -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined signbit -_GL_WARN_REAL_FLOATING_DECL (signbit); -# undef signbit -# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) -# endif -#endif - -_GL_INLINE_HEADER_END - -#endif /* _GL_LTS_MATH_H */ -#endif /* _GL_LTS_MATH_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-runtime/config.h b/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-runtime/config.h deleted file mode 100644 index c7ac24d36..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-runtime/config.h +++ /dev/null @@ -1,1542 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if // is a file system root distinct from /. */ -/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the file system. */ -#define ENABLE_RELOCATABLE 1 - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like 'struct s { int n; short - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate - the size in bytes of such a struct containing an N-element array. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ -/* #undef FUNC_REALPATH_WORKS */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize-lgpl shall be considered present. */ -#define GNULIB_CANONICALIZE_LGPL 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fwriteerror shall be considered present. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module sigpipe shall be considered present. */ -#define GNULIB_SIGPIPE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to 1 when the gnulib module canonicalize_file_name should be tested. - */ -#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module environ should be tested. */ -#define GNULIB_TEST_ENVIRON 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module getopt-posix should be tested. */ -#define GNULIB_TEST_GETOPT_POSIX 1 - -/* Define to 1 when the gnulib module iswblank should be tested. */ -#define GNULIB_TEST_ISWBLANK 1 - -/* Define to 1 when the gnulib module iswdigit should be tested. */ -#define GNULIB_TEST_ISWDIGIT 1 - -/* Define to 1 when the gnulib module iswxdigit should be tested. */ -#define GNULIB_TEST_ISWXDIGIT 1 - -/* Define to 1 when the gnulib module localename should be tested. */ -#define GNULIB_TEST_LOCALENAME 1 - -/* Define to 1 when the gnulib module lstat should be tested. */ -#define GNULIB_TEST_LSTAT 1 - -/* Define to 1 when the gnulib module mbrtowc should be tested. */ -#define GNULIB_TEST_MBRTOWC 1 - -/* Define to 1 when the gnulib module mbsinit should be tested. */ -#define GNULIB_TEST_MBSINIT 1 - -/* Define to 1 when the gnulib module mbslen should be tested. */ -#define GNULIB_TEST_MBSLEN 1 - -/* Define to 1 when the gnulib module mbsstr should be tested. */ -#define GNULIB_TEST_MBSSTR 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module readlink should be tested. */ -#define GNULIB_TEST_READLINK 1 - -/* Define to 1 when the gnulib module realpath should be tested. */ -#define GNULIB_TEST_REALPATH 1 - -/* Define to 1 when the gnulib module setlocale should be tested. */ -#define GNULIB_TEST_SETLOCALE 1 - -/* Define to 1 when the gnulib module setlocale_null should be tested. */ -#define GNULIB_TEST_SETLOCALE_NULL 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module strnlen should be tested. */ -#define GNULIB_TEST_STRNLEN 1 - -/* Define to 1 when the gnulib module wcwidth should be tested. */ -#define GNULIB_TEST_WCWIDTH 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUCR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-uctomb shall be considered present. */ -#define GNULIB_UNISTR_U8_UCTOMB 1 - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the Mac OS X function - CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define to 1 if you have the `copy_file_range' function. */ -/* #undef HAVE_COPY_FILE_RANGE */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `iswblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISWBLANK 1 - -/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBRTOWC */ - -/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you - don't. */ -#define HAVE_DECL_MBSINIT 1 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. - */ -#define HAVE_DECL_SETENV 0 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 1 - -/* Define to 1 if you have the declaration of `towlower', and to 0 if you - don't. */ -/* #undef HAVE_DECL_TOWLOWER */ - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 0 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the `duplocale' function. */ -/* #undef HAVE_DUPLOCALE */ - -/* Define if you have the declaration of environ. */ -#define HAVE_ENVIRON_DECL 1 - -/* Define if the locale_t type contains insufficient information, as on - OpenBSD. */ -/* #undef HAVE_FAKE_LOCALES */ - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the `freelocale' function. */ -/* #undef HAVE_FREELOCALE */ - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the `getlocalename_l' function. */ -/* #undef HAVE_GETLOCALENAME_L */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getopt_long_only' function. */ -/* #undef HAVE_GETOPT_LONG_ONLY */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ICONV_H 1 - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the `iswblank' function. */ -#define HAVE_ISWBLANK 1 - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define if you have and nl_langinfo(CODESET). */ -/* #undef HAVE_LANGINFO_CODESET */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LANGINFO_H */ - -/* Define if your file defines LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACH_O_DYLD_H */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the `mbsinit' function. */ -/* #undef HAVE_MBSINIT */ - -/* Define to 1 if you have the `mbslen' function. */ -/* #undef HAVE_MBSLEN */ - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define if the locale_t type does not contain the name of each locale - category. */ -/* #undef HAVE_NAMELESS_LOCALES */ - -/* Define to 1 if you have the `newlocale' function. */ -/* #undef HAVE_NEWLOCALE */ - -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the `readlinkat' function. */ -/* #undef HAVE_READLINKAT */ - -/* Define to 1 if you have the `realpath' function. */ -/* #undef HAVE_REALPATH */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the locale_t type is as on Solaris 11.4. */ -/* #undef HAVE_SOLARIS114_LOCALES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CDEFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the `towlower' function. */ -/* #undef HAVE_TOWLOWER */ - -/* Define to 1 if you have the `tsearch' function. */ -/* #undef HAVE_TSEARCH */ - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if the system has the type 'unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define to 1 if you have the `uselocale' function. */ -/* #undef HAVE_USELOCALE */ - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -/* #undef HAVE_WCWIDTH */ - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define if the uselocale function exists any may safely be called. */ -/* #undef HAVE_WORKING_USELOCALE */ - -/* Define to 1 if you have the `wprintf' function. */ -/* #undef HAVE_WPRINTF */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_XLOCALE_H */ - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -#define INSTALLPREFIX "/cygdrive/c/software.b/gettext-0.21" - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing - slash. */ -/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 0 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Define if the mbrtowc function does not return (size_t) -2 for empty input. - */ -/* #undef MBRTOWC_EMPTY_INPUT_BUG */ - -/* Define if the mbrtowc function may signal encoding errors in the C locale. - */ -/* #undef MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ */ - -/* Define if the mbrtowc function has the NULL pwc argument bug. */ -/* #undef MBRTOWC_NULL_ARG1_BUG */ - -/* Define if the mbrtowc function has the NULL string argument bug. */ -/* #undef MBRTOWC_NULL_ARG2_BUG */ - -/* Define if the mbrtowc function does not return 0 for a NUL character. */ -/* #undef MBRTOWC_NUL_RETVAL_BUG */ - -/* Define if the mbrtowc function returns a wrong return value. */ -#define MBRTOWC_RETVAL_BUG 1 - -/* Define if the mbrtowc function stores a wide character when reporting - incomplete input. */ -#define MBRTOWC_STORES_INCOMPLETE_BUG 1 - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define to 1 to enable general improvements of setlocale. */ -#define NEED_SETLOCALE_IMPROVED 1 - -/* Define to 1 to enable a multithread-safety fix of setlocale. */ -#define NEED_SETLOCALE_MTSAFE 0 - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "gettext-runtime" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "bug-gettext@gnu.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gettext-runtime" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-runtime 0.21" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gettext-runtime" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.21" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -/* #undef READLINK_TRAILING_SLASH_BUG */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ALL_MTSAFE 1 - -/* Define to 1 if setlocale (category, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ONE_MTSAFE 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define to the prefix of C symbols at the assembler and linker level, either - an underscore or empty. */ -#define USER_LABEL_PREFIX - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define when --enable-shared is used on mingw or Cygwin. */ -#define WOE32DLL 1 - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 on Solaris. */ -/* #undef _LCONV_C99 */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#ifndef _GL_UNUSED -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -# else -# define _GL_UNUSED -# endif -#endif - -/* The __pure__ attribute was added in gcc 2.96. */ -#ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define _GL_ATTRIBUTE_PURE /* empty */ -# endif -#endif - - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded - - - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#if defined __EMX__ && !defined __KLIBC__ -# include "intl/os2compat.h" -#endif - diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-runtime/gnulib-lib/stdio.h b/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-runtime/gnulib-lib/stdio.h deleted file mode 100644 index 91dc7a8cc..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-runtime/gnulib-lib/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "../ucrt/stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "../ucrt/stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_STDIO_H -#define _GL_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 0 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 0 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 1 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if 0 -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 0 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_STDIO_H */ -#endif /* _GL_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/configmake.h b/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/configmake.h deleted file mode 100644 index 3521af1a1..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/configmake.h +++ /dev/null @@ -1,31 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#if HAVE_WINSOCK2_H -# include /* avoid mingw pollution on DATADIR */ -#endif -#define PREFIX "/cygdrive/c/software.b/gettext-0.21" -#define EXEC_PREFIX "/cygdrive/c/software.b/gettext-0.21" -#define BINDIR "/cygdrive/c/software.b/gettext-0.21/bin" -#define SBINDIR "/cygdrive/c/software.b/gettext-0.21/sbin" -#define LIBEXECDIR "/cygdrive/c/software.b/gettext-0.21/libexec" -#define DATAROOTDIR "/cygdrive/c/software.b/gettext-0.21/share" -#define DATADIR "/cygdrive/c/software.b/gettext-0.21/share" -#define SYSCONFDIR "/cygdrive/c/software.b/gettext-0.21/etc" -#define SHAREDSTATEDIR "/cygdrive/c/software.b/gettext-0.21/com" -#define LOCALSTATEDIR "/cygdrive/c/software.b/gettext-0.21/var" -#define RUNSTATEDIR "/cygdrive/c/software.b/gettext-0.21/var/run" -#define INCLUDEDIR "/cygdrive/c/software.b/gettext-0.21/include" -#define OLDINCLUDEDIR "/usr/include" -#define DOCDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define INFODIR "/cygdrive/c/software.b/gettext-0.21/share/info" -#define HTMLDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define DVIDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define PDFDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define PSDIR "/cygdrive/c/software.b/gettext-0.21/share/doc/gettext" -#define LIBDIR "/cygdrive/c/software.b/gettext-0.21/lib" -#define LISPDIR "/cygdrive/c/software.b/gettext-0.21/share/emacs/site-lisp" -#define LOCALEDIR "/cygdrive/c/software.b/gettext-0.21/share/locale" -#define MANDIR "/cygdrive/c/software.b/gettext-0.21/share/man" -#define PKGDATADIR "/cygdrive/c/software.b/gettext-0.21/share/gettext" -#define PKGINCLUDEDIR "/cygdrive/c/software.b/gettext-0.21/include/gettext-tools" -#define PKGLIBDIR "/cygdrive/c/software.b/gettext-0.21/lib/gettext-tools" -#define PKGLIBEXECDIR "/cygdrive/c/software.b/gettext-0.21/libexec/gettext-tools" diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/math.h b/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/math.h deleted file mode 100644 index 91bc1bdf7..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/math.h +++ /dev/null @@ -1,3008 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_MATH_H - -#if __GNUC__ >= 3 - -#endif - - -/* The include_next requires a split double-inclusion guard. */ -#include "../ucrt/math.h" - -#ifndef _GL_MATH_H -#define _GL_MATH_H - -/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ -#if defined __VMS && ! defined NAN -# include -#endif - -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif -_GL_INLINE_HEADER_BEGIN -#ifndef _GL_MATH_INLINE -# define _GL_MATH_INLINE _GL_INLINE -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -#ifdef __cplusplus -/* Helper macros to define type-generic function FUNC as overloaded functions, - rather than as macros like in C. POSIX declares these with an argument of - real-floating (that is, one of float, double, or long double). */ -# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ -static inline int \ -_gl_cxx_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -static inline int \ -_gl_cxx_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -static inline int \ -_gl_cxx_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \ -_GL_BEGIN_NAMESPACE \ -inline rettype \ -rpl_func (float f) \ -{ \ - return _gl_cxx_ ## func ## f (f); \ -} \ -inline rettype \ -rpl_func (double d) \ -{ \ - return _gl_cxx_ ## func ## d (d); \ -} \ -inline rettype \ -rpl_func (long double l) \ -{ \ - return _gl_cxx_ ## func ## l (l); \ -} \ -_GL_END_NAMESPACE -#endif - -/* Helper macros to define a portability warning for the - classification macro FUNC called with VALUE. POSIX declares the - classification macros with an argument of real-floating (that is, - one of float, double, or long double). */ -#define _GL_WARN_REAL_FLOATING_DECL(func) \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ - (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ - : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ - : rpl_ ## func ## l (value)) - - -#if 0 -/* Pull in a function that fixes the 'int' to 'long double' conversion - of glibc 2.7. */ -_GL_EXTERN_C void _Qp_itoq (long double *, int); -static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; -#endif - - -/* For clang: Use __has_builtin to determine whether a builtin is available. */ -#ifndef __has_builtin -# define __has_builtin(name) 0 -#endif - - -/* POSIX allows platforms that don't support NAN. But all major - machines in the past 15 years have supported something close to - IEEE NaN, so we define this unconditionally. We also must define - it on platforms like Solaris 10, where NAN is present but defined - as a function pointer rather than a floating point constant. */ -#if !defined NAN || 0 -# if !GNULIB_defined_NAN -# undef NAN - /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler - choke on the expression 0.0 / 0.0. */ -# if defined __DECC || defined _MSC_VER -_GL_MATH_INLINE float -_NaN () -{ - static float zero = 0.0f; - return zero / zero; -} -# define NAN (_NaN()) -# else -# define NAN (0.0f / 0.0f) -# endif -# define GNULIB_defined_NAN 1 -# endif -#endif - -/* Solaris 10 defines HUGE_VAL, but as a function pointer rather - than a floating point constant. */ -#if 0 -# undef HUGE_VALF -# define HUGE_VALF (1.0f / 0.0f) -# undef HUGE_VAL -# define HUGE_VAL (1.0 / 0.0) -# undef HUGE_VALL -# define HUGE_VALL (1.0L / 0.0L) -#endif - -/* HUGE_VALF is a 'float' Infinity. */ -#ifndef HUGE_VALF -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ -# define HUGE_VALF (1e25f * 1e25f) -# else -# define HUGE_VALF (1.0f / 0.0f) -# endif -#endif - -/* HUGE_VAL is a 'double' Infinity. */ -#ifndef HUGE_VAL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ -# define HUGE_VAL (1e250 * 1e250) -# else -# define HUGE_VAL (1.0 / 0.0) -# endif -#endif - -/* HUGE_VALL is a 'long double' Infinity. */ -#ifndef HUGE_VALL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ -# define HUGE_VALL (1e250L * 1e250L) -# else -# define HUGE_VALL (1.0L / 0.0L) -# endif -#endif - - -#if defined FP_ILOGB0 && defined FP_ILOGBNAN - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */ -# if defined __HAIKU__ - /* Haiku: match what ilogb() does */ -# undef FP_ILOGB0 -# undef FP_ILOGBNAN -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#else - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ -# if defined __NetBSD__ || defined __sgi - /* NetBSD, IRIX 6.5: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# elif defined _AIX - /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# elif defined __sun - /* Solaris 9: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# else - /* Gnulib defined values. */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef acosf -# define acosf rpl_acosf -# endif -_GL_FUNCDECL_RPL (acosf, float, (float x)); -_GL_CXXALIAS_RPL (acosf, float, (float x)); -# else -# if !1 -# undef acosf -_GL_FUNCDECL_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIASWARN (acosf); -#elif defined GNULIB_POSIXCHECK -# undef acosf -# if HAVE_RAW_DECL_ACOSF -_GL_WARN_ON_USE (acosf, "acosf is unportable - " - "use gnulib module acosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef acosl -_GL_FUNCDECL_SYS (acosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (acosl, long double, (long double x)); -_GL_CXXALIASWARN (acosl); -#elif defined GNULIB_POSIXCHECK -# undef acosl -# if HAVE_RAW_DECL_ACOSL -_GL_WARN_ON_USE (acosl, "acosl is unportable - " - "use gnulib module acosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef asinf -# define asinf rpl_asinf -# endif -_GL_FUNCDECL_RPL (asinf, float, (float x)); -_GL_CXXALIAS_RPL (asinf, float, (float x)); -# else -# if !1 -# undef asinf -_GL_FUNCDECL_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIASWARN (asinf); -#elif defined GNULIB_POSIXCHECK -# undef asinf -# if HAVE_RAW_DECL_ASINF -_GL_WARN_ON_USE (asinf, "asinf is unportable - " - "use gnulib module asinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef asinl -_GL_FUNCDECL_SYS (asinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (asinl, long double, (long double x)); -_GL_CXXALIASWARN (asinl); -#elif defined GNULIB_POSIXCHECK -# undef asinl -# if HAVE_RAW_DECL_ASINL -_GL_WARN_ON_USE (asinl, "asinl is unportable - " - "use gnulib module asinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atanf -# define atanf rpl_atanf -# endif -_GL_FUNCDECL_RPL (atanf, float, (float x)); -_GL_CXXALIAS_RPL (atanf, float, (float x)); -# else -# if !1 -# undef atanf -_GL_FUNCDECL_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIASWARN (atanf); -#elif defined GNULIB_POSIXCHECK -# undef atanf -# if HAVE_RAW_DECL_ATANF -_GL_WARN_ON_USE (atanf, "atanf is unportable - " - "use gnulib module atanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef atanl -_GL_FUNCDECL_SYS (atanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (atanl, long double, (long double x)); -_GL_CXXALIASWARN (atanl); -#elif defined GNULIB_POSIXCHECK -# undef atanl -# if HAVE_RAW_DECL_ATANL -_GL_WARN_ON_USE (atanl, "atanl is unportable - " - "use gnulib module atanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atan2f -# define atan2f rpl_atan2f -# endif -_GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); -_GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); -# else -# if !1 -# undef atan2f -_GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIASWARN (atan2f); -#elif defined GNULIB_POSIXCHECK -# undef atan2f -# if HAVE_RAW_DECL_ATAN2F -_GL_WARN_ON_USE (atan2f, "atan2f is unportable - " - "use gnulib module atan2f for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtf -# define cbrtf rpl_cbrtf -# endif -_GL_FUNCDECL_RPL (cbrtf, float, (float x)); -_GL_CXXALIAS_RPL (cbrtf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (cbrtf); -#elif defined GNULIB_POSIXCHECK -# undef cbrtf -# if HAVE_RAW_DECL_CBRTF -_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " - "use gnulib module cbrtf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (cbrt, double, (double x)); -# endif -_GL_CXXALIAS_SYS (cbrt, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (cbrt); -# endif -#elif defined GNULIB_POSIXCHECK -# undef cbrt -# if HAVE_RAW_DECL_CBRT -_GL_WARN_ON_USE (cbrt, "cbrt is unportable - " - "use gnulib module cbrt for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtl -# define cbrtl rpl_cbrtl -# endif -_GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (cbrtl); -#elif defined GNULIB_POSIXCHECK -# undef cbrtl -# if HAVE_RAW_DECL_CBRTL -_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " - "use gnulib module cbrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceilf -# define ceilf rpl_ceilf -# endif -_GL_FUNCDECL_RPL (ceilf, float, (float x)); -_GL_CXXALIAS_RPL (ceilf, float, (float x)); -# else -# if !1 -# undef ceilf -_GL_FUNCDECL_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIASWARN (ceilf); -#elif defined GNULIB_POSIXCHECK -# undef ceilf -# if HAVE_RAW_DECL_CEILF -_GL_WARN_ON_USE (ceilf, "ceilf is unportable - " - "use gnulib module ceilf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceil -# define ceil rpl_ceil -# endif -_GL_FUNCDECL_RPL (ceil, double, (double x)); -_GL_CXXALIAS_RPL (ceil, double, (double x)); -# else -_GL_CXXALIAS_SYS (ceil, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ceil); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceill -# define ceill rpl_ceill -# endif -_GL_FUNCDECL_RPL (ceill, long double, (long double x)); -_GL_CXXALIAS_RPL (ceill, long double, (long double x)); -# else -# if !1 -# undef ceill -_GL_FUNCDECL_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIASWARN (ceill); -#elif defined GNULIB_POSIXCHECK -# undef ceill -# if HAVE_RAW_DECL_CEILL -_GL_WARN_ON_USE (ceill, "ceill is unportable - " - "use gnulib module ceill for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef copysignf -_GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); -_GL_CXXALIASWARN (copysignf); -#elif defined GNULIB_POSIXCHECK -# undef copysignf -# if HAVE_RAW_DECL_COPYSIGNF -_GL_WARN_ON_USE (copysignf, "copysignf is unportable - " - "use gnulib module copysignf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysign, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (copysign, double, (double x, double y)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (copysign); -# endif -#elif defined GNULIB_POSIXCHECK -# undef copysign -# if HAVE_RAW_DECL_COPYSIGN -_GL_WARN_ON_USE (copysign, "copysign is unportable - " - "use gnulib module copysign for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); -_GL_CXXALIASWARN (copysignl); -#elif defined GNULIB_POSIXCHECK -# undef copysignl -# if HAVE_RAW_DECL_COPYSIGNL -_GL_WARN_ON_USE (copysign, "copysignl is unportable - " - "use gnulib module copysignl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cosf -# define cosf rpl_cosf -# endif -_GL_FUNCDECL_RPL (cosf, float, (float x)); -_GL_CXXALIAS_RPL (cosf, float, (float x)); -# else -# if !1 -# undef cosf -_GL_FUNCDECL_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIASWARN (cosf); -#elif defined GNULIB_POSIXCHECK -# undef cosf -# if HAVE_RAW_DECL_COSF -_GL_WARN_ON_USE (cosf, "cosf is unportable - " - "use gnulib module cosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef cosl -_GL_FUNCDECL_SYS (cosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cosl, long double, (long double x)); -_GL_CXXALIASWARN (cosl); -#elif defined GNULIB_POSIXCHECK -# undef cosl -# if HAVE_RAW_DECL_COSL -_GL_WARN_ON_USE (cosl, "cosl is unportable - " - "use gnulib module cosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef coshf -# define coshf rpl_coshf -# endif -_GL_FUNCDECL_RPL (coshf, float, (float x)); -_GL_CXXALIAS_RPL (coshf, float, (float x)); -# else -# if !1 -# undef coshf -_GL_FUNCDECL_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIASWARN (coshf); -#elif defined GNULIB_POSIXCHECK -# undef coshf -# if HAVE_RAW_DECL_COSHF -_GL_WARN_ON_USE (coshf, "coshf is unportable - " - "use gnulib module coshf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expf -# define expf rpl_expf -# endif -_GL_FUNCDECL_RPL (expf, float, (float x)); -_GL_CXXALIAS_RPL (expf, float, (float x)); -# else -# if !1 -# undef expf -_GL_FUNCDECL_SYS (expf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expf, float, (float x)); -# endif -_GL_CXXALIASWARN (expf); -#elif defined GNULIB_POSIXCHECK -# undef expf -# if HAVE_RAW_DECL_EXPF -_GL_WARN_ON_USE (expf, "expf is unportable - " - "use gnulib module expf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expl -# define expl rpl_expl -# endif -_GL_FUNCDECL_RPL (expl, long double, (long double x)); -_GL_CXXALIAS_RPL (expl, long double, (long double x)); -# else -# if !1 || !1 -# undef expl -_GL_FUNCDECL_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expl); -#elif defined GNULIB_POSIXCHECK -# undef expl -# if HAVE_RAW_DECL_EXPL -_GL_WARN_ON_USE (expl, "expl is unportable - " - "use gnulib module expl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (exp2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (exp2f, float, (float x)); -_GL_CXXALIASWARN (exp2f); -#elif defined GNULIB_POSIXCHECK -# undef exp2f -# if HAVE_RAW_DECL_EXP2F -_GL_WARN_ON_USE (exp2f, "exp2f is unportable - " - "use gnulib module exp2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2 -# define exp2 rpl_exp2 -# endif -_GL_FUNCDECL_RPL (exp2, double, (double x)); -_GL_CXXALIAS_RPL (exp2, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (exp2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (exp2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (exp2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef exp2 -# if HAVE_RAW_DECL_EXP2 -_GL_WARN_ON_USE (exp2, "exp2 is unportable - " - "use gnulib module exp2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2l -# define exp2l rpl_exp2l -# endif -_GL_FUNCDECL_RPL (exp2l, long double, (long double x)); -_GL_CXXALIAS_RPL (exp2l, long double, (long double x)); -# else -# if !1 -# undef exp2l -_GL_FUNCDECL_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (exp2l); -#elif defined GNULIB_POSIXCHECK -# undef exp2l -# if HAVE_RAW_DECL_EXP2L -_GL_WARN_ON_USE (exp2l, "exp2l is unportable - " - "use gnulib module exp2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1f -# define expm1f rpl_expm1f -# endif -_GL_FUNCDECL_RPL (expm1f, float, (float x)); -_GL_CXXALIAS_RPL (expm1f, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIASWARN (expm1f); -#elif defined GNULIB_POSIXCHECK -# undef expm1f -# if HAVE_RAW_DECL_EXPM1F -_GL_WARN_ON_USE (expm1f, "expm1f is unportable - " - "use gnulib module expm1f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1 -# define expm1 rpl_expm1 -# endif -_GL_FUNCDECL_RPL (expm1, double, (double x)); -_GL_CXXALIAS_RPL (expm1, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1, double, (double x)); -# endif -_GL_CXXALIAS_SYS (expm1, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (expm1); -# endif -#elif defined GNULIB_POSIXCHECK -# undef expm1 -# if HAVE_RAW_DECL_EXPM1 -_GL_WARN_ON_USE (expm1, "expm1 is unportable - " - "use gnulib module expm1 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1l -# define expm1l rpl_expm1l -# endif -_GL_FUNCDECL_RPL (expm1l, long double, (long double x)); -_GL_CXXALIAS_RPL (expm1l, long double, (long double x)); -# else -# if !1 -# undef expm1l -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (expm1l, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (expm1l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expm1l); -#elif defined GNULIB_POSIXCHECK -# undef expm1l -# if HAVE_RAW_DECL_EXPM1L -_GL_WARN_ON_USE (expm1l, "expm1l is unportable - " - "use gnulib module expm1l for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef fabsf -_GL_FUNCDECL_SYS (fabsf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (fabsf, float, (float x)); -_GL_CXXALIASWARN (fabsf); -#elif defined GNULIB_POSIXCHECK -# undef fabsf -# if HAVE_RAW_DECL_FABSF -_GL_WARN_ON_USE (fabsf, "fabsf is unportable - " - "use gnulib module fabsf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fabsl -# define fabsl rpl_fabsl -# endif -_GL_FUNCDECL_RPL (fabsl, long double, (long double x)); -_GL_CXXALIAS_RPL (fabsl, long double, (long double x)); -# else -# if !1 -# undef fabsl -_GL_FUNCDECL_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (fabsl); -#elif defined GNULIB_POSIXCHECK -# undef fabsl -# if HAVE_RAW_DECL_FABSL -_GL_WARN_ON_USE (fabsl, "fabsl is unportable - " - "use gnulib module fabsl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorf -# define floorf rpl_floorf -# endif -_GL_FUNCDECL_RPL (floorf, float, (float x)); -_GL_CXXALIAS_RPL (floorf, float, (float x)); -# else -# if !1 -# undef floorf -_GL_FUNCDECL_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIASWARN (floorf); -#elif defined GNULIB_POSIXCHECK -# undef floorf -# if HAVE_RAW_DECL_FLOORF -_GL_WARN_ON_USE (floorf, "floorf is unportable - " - "use gnulib module floorf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floor -# define floor rpl_floor -# endif -_GL_FUNCDECL_RPL (floor, double, (double x)); -_GL_CXXALIAS_RPL (floor, double, (double x)); -# else -_GL_CXXALIAS_SYS (floor, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (floor); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorl -# define floorl rpl_floorl -# endif -_GL_FUNCDECL_RPL (floorl, long double, (long double x)); -_GL_CXXALIAS_RPL (floorl, long double, (long double x)); -# else -# if !1 -# undef floorl -_GL_FUNCDECL_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (floorl); -#elif defined GNULIB_POSIXCHECK -# undef floorl -# if HAVE_RAW_DECL_FLOORL -_GL_WARN_ON_USE (floorl, "floorl is unportable - " - "use gnulib module floorl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmaf -# define fmaf rpl_fmaf -# endif -_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); -_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); -# else -# if !1 -# undef fmaf -_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIASWARN (fmaf); -#elif defined GNULIB_POSIXCHECK -# undef fmaf -# if HAVE_RAW_DECL_FMAF -_GL_WARN_ON_USE (fmaf, "fmaf is unportable - " - "use gnulib module fmaf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fma -# define fma rpl_fma -# endif -_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); -_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); -# else -# if !1 -# undef fma -_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); -# endif -_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fma); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fma -# if HAVE_RAW_DECL_FMA -_GL_WARN_ON_USE (fma, "fma is unportable - " - "use gnulib module fma for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmal -# define fmal rpl_fmal -# endif -_GL_FUNCDECL_RPL (fmal, long double, - (long double x, long double y, long double z)); -_GL_CXXALIAS_RPL (fmal, long double, - (long double x, long double y, long double z)); -# else -# if !1 -# undef fmal -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -# endif -_GL_CXXALIAS_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -_GL_CXXALIASWARN (fmal); -#elif defined GNULIB_POSIXCHECK -# undef fmal -# if HAVE_RAW_DECL_FMAL -_GL_WARN_ON_USE (fmal, "fmal is unportable - " - "use gnulib module fmal for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodf -# define fmodf rpl_fmodf -# endif -_GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); -_GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); -# else -# if !1 -# undef fmodf -_GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (fmodf); -#elif defined GNULIB_POSIXCHECK -# undef fmodf -# if HAVE_RAW_DECL_FMODF -_GL_WARN_ON_USE (fmodf, "fmodf is unportable - " - "use gnulib module fmodf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmod -# define fmod rpl_fmod -# endif -_GL_FUNCDECL_RPL (fmod, double, (double x, double y)); -_GL_CXXALIAS_RPL (fmod, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (fmod, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fmod); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fmod -# if HAVE_RAW_DECL_FMOD -_GL_WARN_ON_USE (fmod, "fmod has portability problems - " - "use gnulib module fmod for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodl -# define fmodl rpl_fmodl -# endif -_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); -# else -# if !1 -# undef fmodl -_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (fmodl); -#elif defined GNULIB_POSIXCHECK -# undef fmodl -# if HAVE_RAW_DECL_FMODL -_GL_WARN_ON_USE (fmodl, "fmodl is unportable - " - "use gnulib module fmodl for portability"); -# endif -#endif - - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpf -# define frexpf rpl_frexpf -# endif -_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); -# else -# if !1 -# undef frexpf -_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); -# endif -_GL_CXXALIASWARN (frexpf); -#elif defined GNULIB_POSIXCHECK -# undef frexpf -# if HAVE_RAW_DECL_FREXPF -_GL_WARN_ON_USE (frexpf, "frexpf is unportable - " - "use gnulib module frexpf for portability"); -# endif -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexp -# define frexp rpl_frexp -# endif -_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); -# else -_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef frexp -/* Assume frexp is always declared. */ -_GL_WARN_ON_USE (frexp, "frexp is unportable - " - "use gnulib module frexp for portability"); -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpl -# define frexpl rpl_frexpl -# endif -_GL_FUNCDECL_RPL (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); -#else -# if !1 -_GL_FUNCDECL_SYS (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -# if 0 -_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); -# endif -#endif -#if 0 && !(0 && !1) -_GL_CXXALIASWARN (frexpl); -#endif -#if !0 && defined GNULIB_POSIXCHECK -# undef frexpl -# if HAVE_RAW_DECL_FREXPL -_GL_WARN_ON_USE (frexpl, "frexpl is unportable - " - "use gnulib module frexpl for portability"); -# endif -#endif - - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotf -# define hypotf rpl_hypotf -# endif -_GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); -_GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (hypotf); -#elif defined GNULIB_POSIXCHECK -# undef hypotf -# if HAVE_RAW_DECL_HYPOTF -_GL_WARN_ON_USE (hypotf, "hypotf is unportable - " - "use gnulib module hypotf for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypot -# define hypot rpl_hypot -# endif -_GL_FUNCDECL_RPL (hypot, double, (double x, double y)); -_GL_CXXALIAS_RPL (hypot, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (hypot, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (hypot); -# endif -#elif defined GNULIB_POSIXCHECK -# undef hypot -# if HAVE_RAW_DECL_HYPOT -_GL_WARN_ON_USE (hypotf, "hypot has portability problems - " - "use gnulib module hypot for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotl -# define hypotl rpl_hypotl -# endif -_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (hypotl); -#elif defined GNULIB_POSIXCHECK -# undef hypotl -# if HAVE_RAW_DECL_HYPOTL -_GL_WARN_ON_USE (hypotl, "hypotl is unportable - " - "use gnulib module hypotl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbf -# define ilogbf rpl_ilogbf -# endif -_GL_FUNCDECL_RPL (ilogbf, int, (float x)); -_GL_CXXALIAS_RPL (ilogbf, int, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIAS_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIASWARN (ilogbf); -#elif defined GNULIB_POSIXCHECK -# undef ilogbf -# if HAVE_RAW_DECL_ILOGBF -_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " - "use gnulib module ilogbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogb -# define ilogb rpl_ilogb -# endif -_GL_FUNCDECL_RPL (ilogb, int, (double x)); -_GL_CXXALIAS_RPL (ilogb, int, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogb, int, (double x)); -# endif -_GL_CXXALIAS_SYS (ilogb, int, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ilogb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef ilogb -# if HAVE_RAW_DECL_ILOGB -_GL_WARN_ON_USE (ilogb, "ilogb is unportable - " - "use gnulib module ilogb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbl -# define ilogbl rpl_ilogbl -# endif -_GL_FUNCDECL_RPL (ilogbl, int, (long double x)); -_GL_CXXALIAS_RPL (ilogbl, int, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIASWARN (ilogbl); -#elif defined GNULIB_POSIXCHECK -# undef ilogbl -# if HAVE_RAW_DECL_ILOGBL -_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " - "use gnulib module ilogbl for portability"); -# endif -#endif - - -/* Return x * 2^exp. */ -#if 0 -# if !1 -# undef ldexpf -_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); -# endif -_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); -_GL_CXXALIASWARN (ldexpf); -#elif defined GNULIB_POSIXCHECK -# undef ldexpf -# if HAVE_RAW_DECL_LDEXPF -_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " - "use gnulib module ldexpf for portability"); -# endif -#endif - -/* Return x * 2^exp. */ -#if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ldexpl -# define ldexpl rpl_ldexpl -# endif -_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); -_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); -#else -# if !1 -_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); -# endif -# if 0 -_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); -# endif -#endif -#if 0 -_GL_CXXALIASWARN (ldexpl); -#endif -#if !0 && defined GNULIB_POSIXCHECK -# undef ldexpl -# if HAVE_RAW_DECL_LDEXPL -_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " - "use gnulib module ldexpl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logf -# define logf rpl_logf -# endif -_GL_FUNCDECL_RPL (logf, float, (float x)); -_GL_CXXALIAS_RPL (logf, float, (float x)); -# else -# if !1 -# undef logf -_GL_FUNCDECL_SYS (logf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logf, float, (float x)); -# endif -_GL_CXXALIASWARN (logf); -#elif defined GNULIB_POSIXCHECK -# undef logf -# if HAVE_RAW_DECL_LOGF -_GL_WARN_ON_USE (logf, "logf is unportable - " - "use gnulib module logf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log -# define log rpl_log -# endif -_GL_FUNCDECL_RPL (log, double, (double x)); -_GL_CXXALIAS_RPL (log, double, (double x)); -# else -_GL_CXXALIAS_SYS (log, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log -# if HAVE_RAW_DECL_LOG -_GL_WARN_ON_USE (log, "log has portability problems - " - "use gnulib module log for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logl -# define logl rpl_logl -# endif -_GL_FUNCDECL_RPL (logl, long double, (long double x)); -_GL_CXXALIAS_RPL (logl, long double, (long double x)); -# else -# if !1 || !1 -# undef logl -_GL_FUNCDECL_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logl); -#elif defined GNULIB_POSIXCHECK -# undef logl -# if HAVE_RAW_DECL_LOGL -_GL_WARN_ON_USE (logl, "logl is unportable - " - "use gnulib module logl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10f -# define log10f rpl_log10f -# endif -_GL_FUNCDECL_RPL (log10f, float, (float x)); -_GL_CXXALIAS_RPL (log10f, float, (float x)); -# else -# if !1 -# undef log10f -_GL_FUNCDECL_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIASWARN (log10f); -#elif defined GNULIB_POSIXCHECK -# undef log10f -# if HAVE_RAW_DECL_LOG10F -_GL_WARN_ON_USE (log10f, "log10f is unportable - " - "use gnulib module log10f for portability"); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10 -# define log10 rpl_log10 -# endif -_GL_FUNCDECL_RPL (log10, double, (double x)); -_GL_CXXALIAS_RPL (log10, double, (double x)); -# else -_GL_CXXALIAS_SYS (log10, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log10); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log10 -# if HAVE_RAW_DECL_LOG10 -_GL_WARN_ON_USE (log10, "log10 has portability problems - " - "use gnulib module log10 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10l -# define log10l rpl_log10l -# endif -_GL_FUNCDECL_RPL (log10l, long double, (long double x)); -_GL_CXXALIAS_RPL (log10l, long double, (long double x)); -# else -# if !1 || !1 -# undef log10l -_GL_FUNCDECL_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log10l); -#elif defined GNULIB_POSIXCHECK -# undef log10l -# if HAVE_RAW_DECL_LOG10L -_GL_WARN_ON_USE (log10l, "log10l is unportable - " - "use gnulib module log10l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pf -# define log1pf rpl_log1pf -# endif -_GL_FUNCDECL_RPL (log1pf, float, (float x)); -_GL_CXXALIAS_RPL (log1pf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIASWARN (log1pf); -#elif defined GNULIB_POSIXCHECK -# undef log1pf -# if HAVE_RAW_DECL_LOG1PF -_GL_WARN_ON_USE (log1pf, "log1pf is unportable - " - "use gnulib module log1pf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1p -# define log1p rpl_log1p -# endif -_GL_FUNCDECL_RPL (log1p, double, (double x)); -_GL_CXXALIAS_RPL (log1p, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1p, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log1p, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log1p); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log1p -# if HAVE_RAW_DECL_LOG1P -_GL_WARN_ON_USE (log1p, "log1p has portability problems - " - "use gnulib module log1p for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pl -# define log1pl rpl_log1pl -# endif -_GL_FUNCDECL_RPL (log1pl, long double, (long double x)); -_GL_CXXALIAS_RPL (log1pl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log1pl); -#elif defined GNULIB_POSIXCHECK -# undef log1pl -# if HAVE_RAW_DECL_LOG1PL -_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " - "use gnulib module log1pl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2f -# define log2f rpl_log2f -# endif -_GL_FUNCDECL_RPL (log2f, float, (float x)); -_GL_CXXALIAS_RPL (log2f, float, (float x)); -# else -# if !1 -# undef log2f -_GL_FUNCDECL_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIASWARN (log2f); -#elif defined GNULIB_POSIXCHECK -# undef log2f -# if HAVE_RAW_DECL_LOG2F -_GL_WARN_ON_USE (log2f, "log2f is unportable - " - "use gnulib module log2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2 -# define log2 rpl_log2 -# endif -_GL_FUNCDECL_RPL (log2, double, (double x)); -_GL_CXXALIAS_RPL (log2, double, (double x)); -# else -# if !1 -# undef log2 -_GL_FUNCDECL_SYS (log2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log2 -# if HAVE_RAW_DECL_LOG2 -_GL_WARN_ON_USE (log2, "log2 is unportable - " - "use gnulib module log2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2l -# define log2l rpl_log2l -# endif -_GL_FUNCDECL_RPL (log2l, long double, (long double x)); -_GL_CXXALIAS_RPL (log2l, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log2l); -#elif defined GNULIB_POSIXCHECK -# undef log2l -# if HAVE_RAW_DECL_LOG2L -_GL_WARN_ON_USE (log2l, "log2l is unportable - " - "use gnulib module log2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbf -# define logbf rpl_logbf -# endif -_GL_FUNCDECL_RPL (logbf, float, (float x)); -_GL_CXXALIAS_RPL (logbf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIASWARN (logbf); -#elif defined GNULIB_POSIXCHECK -# undef logbf -# if HAVE_RAW_DECL_LOGBF -_GL_WARN_ON_USE (logbf, "logbf is unportable - " - "use gnulib module logbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logb -# define logb rpl_logb -# endif -_GL_FUNCDECL_RPL (logb, double, (double x)); -_GL_CXXALIAS_RPL (logb, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logb, double, (double x)); -# endif -_GL_CXXALIAS_SYS (logb, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (logb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef logb -# if HAVE_RAW_DECL_LOGB -_GL_WARN_ON_USE (logb, "logb is unportable - " - "use gnulib module logb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbl -# define logbl rpl_logbl -# endif -_GL_FUNCDECL_RPL (logbl, long double, (long double x)); -_GL_CXXALIAS_RPL (logbl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logbl); -#elif defined GNULIB_POSIXCHECK -# undef logbl -# if HAVE_RAW_DECL_LOGBL -_GL_WARN_ON_USE (logbl, "logbl is unportable - " - "use gnulib module logbl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modff -# define modff rpl_modff -# endif -_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); -# else -# if !1 -# undef modff -_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); -# endif -_GL_CXXALIASWARN (modff); -#elif defined GNULIB_POSIXCHECK -# undef modff -# if HAVE_RAW_DECL_MODFF -_GL_WARN_ON_USE (modff, "modff is unportable - " - "use gnulib module modff for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modf -# define modf rpl_modf -# endif -_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); -# else -_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (modf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef modf -# if HAVE_RAW_DECL_MODF -_GL_WARN_ON_USE (modf, "modf has portability problems - " - "use gnulib module modf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modfl -# define modfl rpl_modfl -# endif -_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); -# else -# if !1 -# undef modfl -_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); -# endif -_GL_CXXALIASWARN (modfl); -#elif defined GNULIB_POSIXCHECK -# undef modfl -# if HAVE_RAW_DECL_MODFL -_GL_WARN_ON_USE (modfl, "modfl is unportable - " - "use gnulib module modfl for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef powf -_GL_FUNCDECL_SYS (powf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (powf, float, (float x, float y)); -_GL_CXXALIASWARN (powf); -#elif defined GNULIB_POSIXCHECK -# undef powf -# if HAVE_RAW_DECL_POWF -_GL_WARN_ON_USE (powf, "powf is unportable - " - "use gnulib module powf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderf -# define remainderf rpl_remainderf -# endif -_GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); -_GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (remainderf); -#elif defined GNULIB_POSIXCHECK -# undef remainderf -# if HAVE_RAW_DECL_REMAINDERF -_GL_WARN_ON_USE (remainderf, "remainderf is unportable - " - "use gnulib module remainderf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainder -# define remainder rpl_remainder -# endif -_GL_FUNCDECL_RPL (remainder, double, (double x, double y)); -_GL_CXXALIAS_RPL (remainder, double, (double x, double y)); -# else -# if !1 || !1 -_GL_FUNCDECL_SYS (remainder, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (remainder, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remainder); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remainder -# if HAVE_RAW_DECL_REMAINDER -_GL_WARN_ON_USE (remainder, "remainder is unportable - " - "use gnulib module remainder for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderl -# define remainderl rpl_remainderl -# endif -_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); -# else -# if !1 -# undef remainderl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); -# endif -# endif -_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (remainderl); -#elif defined GNULIB_POSIXCHECK -# undef remainderl -# if HAVE_RAW_DECL_REMAINDERL -_GL_WARN_ON_USE (remainderl, "remainderl is unportable - " - "use gnulib module remainderl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rintf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (rintf, float, (float x)); -_GL_CXXALIASWARN (rintf); -#elif defined GNULIB_POSIXCHECK -# undef rintf -# if HAVE_RAW_DECL_RINTF -_GL_WARN_ON_USE (rintf, "rintf is unportable - " - "use gnulib module rintf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rint, double, (double x)); -# endif -_GL_CXXALIAS_SYS (rint, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rint); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rint -# if HAVE_RAW_DECL_RINT -_GL_WARN_ON_USE (rint, "rint is unportable - " - "use gnulib module rint for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rintl -# define rintl rpl_rintl -# endif -_GL_FUNCDECL_RPL (rintl, long double, (long double x)); -_GL_CXXALIAS_RPL (rintl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (rintl); -#elif defined GNULIB_POSIXCHECK -# undef rintl -# if HAVE_RAW_DECL_RINTL -_GL_WARN_ON_USE (rintl, "rintl is unportable - " - "use gnulib module rintl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundf -# define roundf rpl_roundf -# endif -_GL_FUNCDECL_RPL (roundf, float, (float x)); -_GL_CXXALIAS_RPL (roundf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIASWARN (roundf); -#elif defined GNULIB_POSIXCHECK -# undef roundf -# if HAVE_RAW_DECL_ROUNDF -_GL_WARN_ON_USE (roundf, "roundf is unportable - " - "use gnulib module roundf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef round -# define round rpl_round -# endif -_GL_FUNCDECL_RPL (round, double, (double x)); -_GL_CXXALIAS_RPL (round, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (round, double, (double x)); -# endif -_GL_CXXALIAS_SYS (round, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (round); -# endif -#elif defined GNULIB_POSIXCHECK -# undef round -# if HAVE_RAW_DECL_ROUND -_GL_WARN_ON_USE (round, "round is unportable - " - "use gnulib module round for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundl -# define roundl rpl_roundl -# endif -_GL_FUNCDECL_RPL (roundl, long double, (long double x)); -_GL_CXXALIAS_RPL (roundl, long double, (long double x)); -# else -# if !1 -# undef roundl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (roundl, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (roundl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (roundl); -#elif defined GNULIB_POSIXCHECK -# undef roundl -# if HAVE_RAW_DECL_ROUNDL -_GL_WARN_ON_USE (roundl, "roundl is unportable - " - "use gnulib module roundl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinf -# define sinf rpl_sinf -# endif -_GL_FUNCDECL_RPL (sinf, float, (float x)); -_GL_CXXALIAS_RPL (sinf, float, (float x)); -# else -# if !1 - # undef sinf -_GL_FUNCDECL_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinf); -#elif defined GNULIB_POSIXCHECK -# undef sinf -# if HAVE_RAW_DECL_SINF -_GL_WARN_ON_USE (sinf, "sinf is unportable - " - "use gnulib module sinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef sinl -_GL_FUNCDECL_SYS (sinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sinl, long double, (long double x)); -_GL_CXXALIASWARN (sinl); -#elif defined GNULIB_POSIXCHECK -# undef sinl -# if HAVE_RAW_DECL_SINL -_GL_WARN_ON_USE (sinl, "sinl is unportable - " - "use gnulib module sinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinhf -# define sinhf rpl_sinhf -# endif -_GL_FUNCDECL_RPL (sinhf, float, (float x)); -_GL_CXXALIAS_RPL (sinhf, float, (float x)); -# else -# if !1 -# undef sinhf -_GL_FUNCDECL_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinhf); -#elif defined GNULIB_POSIXCHECK -# undef sinhf -# if HAVE_RAW_DECL_SINHF -_GL_WARN_ON_USE (sinhf, "sinhf is unportable - " - "use gnulib module sinhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtf -# define sqrtf rpl_sqrtf -# endif -_GL_FUNCDECL_RPL (sqrtf, float, (float x)); -_GL_CXXALIAS_RPL (sqrtf, float, (float x)); -# else -# if !1 -# undef sqrtf -_GL_FUNCDECL_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (sqrtf); -#elif defined GNULIB_POSIXCHECK -# undef sqrtf -# if HAVE_RAW_DECL_SQRTF -_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " - "use gnulib module sqrtf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtl -# define sqrtl rpl_sqrtl -# endif -_GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); -# else -# if !1 || !1 -# undef sqrtl -_GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (sqrtl); -#elif defined GNULIB_POSIXCHECK -# undef sqrtl -# if HAVE_RAW_DECL_SQRTL -_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " - "use gnulib module sqrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanf -# define tanf rpl_tanf -# endif -_GL_FUNCDECL_RPL (tanf, float, (float x)); -_GL_CXXALIAS_RPL (tanf, float, (float x)); -# else -# if !1 -# undef tanf -_GL_FUNCDECL_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanf); -#elif defined GNULIB_POSIXCHECK -# undef tanf -# if HAVE_RAW_DECL_TANF -_GL_WARN_ON_USE (tanf, "tanf is unportable - " - "use gnulib module tanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef tanl -_GL_FUNCDECL_SYS (tanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (tanl, long double, (long double x)); -_GL_CXXALIASWARN (tanl); -#elif defined GNULIB_POSIXCHECK -# undef tanl -# if HAVE_RAW_DECL_TANL -_GL_WARN_ON_USE (tanl, "tanl is unportable - " - "use gnulib module tanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanhf -# define tanhf rpl_tanhf -# endif -_GL_FUNCDECL_RPL (tanhf, float, (float x)); -_GL_CXXALIAS_RPL (tanhf, float, (float x)); -# else -# if !1 -# undef tanhf -_GL_FUNCDECL_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanhf); -#elif defined GNULIB_POSIXCHECK -# undef tanhf -# if HAVE_RAW_DECL_TANHF -_GL_WARN_ON_USE (tanhf, "tanhf is unportable - " - "use gnulib module tanhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncf -# define truncf rpl_truncf -# endif -_GL_FUNCDECL_RPL (truncf, float, (float x)); -_GL_CXXALIAS_RPL (truncf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIASWARN (truncf); -#elif defined GNULIB_POSIXCHECK -# undef truncf -# if HAVE_RAW_DECL_TRUNCF -_GL_WARN_ON_USE (truncf, "truncf is unportable - " - "use gnulib module truncf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef trunc -# define trunc rpl_trunc -# endif -_GL_FUNCDECL_RPL (trunc, double, (double x)); -_GL_CXXALIAS_RPL (trunc, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (trunc, double, (double x)); -# endif -_GL_CXXALIAS_SYS (trunc, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (trunc); -# endif -#elif defined GNULIB_POSIXCHECK -# undef trunc -# if HAVE_RAW_DECL_TRUNC -_GL_WARN_ON_USE (trunc, "trunc is unportable - " - "use gnulib module trunc for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncl -# define truncl rpl_truncl -# endif -_GL_FUNCDECL_RPL (truncl, long double, (long double x)); -_GL_CXXALIAS_RPL (truncl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (truncl); -#elif defined GNULIB_POSIXCHECK -# undef truncl -# if HAVE_RAW_DECL_TRUNCL -_GL_WARN_ON_USE (truncl, "truncl is unportable - " - "use gnulib module truncl for portability"); -# endif -#endif - - -/* Definitions of function-like macros come here, after the function - declarations. */ - - -#if 0 -# if 0 -_GL_EXTERN_C int gl_isfinitef (float x); -_GL_EXTERN_C int gl_isfinited (double x); -_GL_EXTERN_C int gl_isfinitel (long double x); -# undef isfinite -# define isfinite(x) \ - (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ - sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ - gl_isfinitef (x)) -# endif -# ifdef __cplusplus -# if defined isfinite || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) -# undef isfinite -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines isfinite through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) -# define isfinite rpl_isfinite -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isfinite -_GL_WARN_REAL_FLOATING_DECL (isfinite); -# undef isfinite -# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) -# endif -#endif - - -#if 1 -# if 1 -_GL_EXTERN_C int gl_isinff (float x); -_GL_EXTERN_C int gl_isinfd (double x); -_GL_EXTERN_C int gl_isinfl (long double x); -# undef isinf -# define isinf(x) \ - (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ - sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ - gl_isinff (x)) -# endif -# ifdef __cplusplus -# if defined isinf || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) -# undef isinf -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isinf through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) -# define isinf rpl_isinf -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isinf -_GL_WARN_REAL_FLOATING_DECL (isinf); -# undef isinf -# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) -# endif -#endif - - -#if 1 -/* Test for NaN for 'float' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan macro - or (older) isnanf function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) -# elif defined isnan -# undef isnanf -# define isnanf(x) isnan ((float)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanf -# define isnanf rpl_isnanf -_GL_EXTERN_C int isnanf (float x); -# endif -#endif - -#if 1 -/* Test for NaN for 'double' numbers. - This function is a gnulib extension, unlike isnan() which applied only - to 'double' numbers earlier but now is a type-generic macro. */ -# if 1 -/* The original included above provides a declaration of isnan - macro. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnand -# define isnand(x) __builtin_isnan ((double)(x)) -# else -# undef isnand -# define isnand(x) isnan ((double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnand -# define isnand rpl_isnand -_GL_EXTERN_C int isnand (double x); -# endif -#endif - -#if 1 -/* Test for NaN for 'long double' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan - macro or (older) isnanl function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) -# elif defined isnan -# undef isnanl -# define isnanl(x) isnan ((long double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanl -# define isnanl rpl_isnanl -_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; -# endif -#endif - -/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ -#if 1 -# if 1 -/* We can't just use the isnanf macro (e.g.) as exposed by - isnanf.h (e.g.) here, because those may end up being macros - that recursively expand back to isnan. So use the gnulib - replacements for them directly. */ -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) -# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) -# else -_GL_EXTERN_C int rpl_isnanf (float x); -# define gl_isnan_f(x) rpl_isnanf (x) -# endif -# if 1 && __GNUC__ >= 4 -# define gl_isnan_d(x) __builtin_isnan ((double)(x)) -# else -_GL_EXTERN_C int rpl_isnand (double x); -# define gl_isnan_d(x) rpl_isnand (x) -# endif -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) -# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) -# else -_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; -# define gl_isnan_l(x) rpl_isnanl (x) -# endif -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ - sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ - gl_isnan_f (x)) -# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl))) -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ - sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ - __builtin_isnanf ((float)(x))) -# endif -# ifdef __cplusplus -# if defined isnan || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) -# undef isnan -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isnan through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) -# define isnan rpl_isnan -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) -# endif -# endif -# else -/* Ensure isnan is a macro. */ -# ifndef isnan -# define isnan isnan -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isnan -_GL_WARN_REAL_FLOATING_DECL (isnan); -# undef isnan -# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) -# endif -#endif - - -#if 1 -# if (0 \ - && (!defined __cplusplus || __cplusplus < 201103)) -# undef signbit - /* GCC 4.0 and newer provides three built-ins for signbit. */ -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ - sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ - __builtin_signbitf (x)) -# endif -# if 0 && !GNULIB_defined_signbit -# undef signbit -_GL_EXTERN_C int gl_signbitf (float arg); -_GL_EXTERN_C int gl_signbitd (double arg); -_GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ -# define _GL_NUM_UINT_WORDS(type) \ - ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) -# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf -# define gl_signbitf_OPTIMIZED_MACRO -# define gl_signbitf(arg) \ - ({ union { float _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd -# define gl_signbitd_OPTIMIZED_MACRO -# define gl_signbitd(arg) \ - ({ union { double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl -# define gl_signbitl_OPTIMIZED_MACRO -# define gl_signbitl(arg) \ - ({ union { long double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# endif -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ - sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ - gl_signbitf (x)) -# define GNULIB_defined_signbit 1 -# endif -# ifdef __cplusplus -# if defined signbit || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) -# undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines signbit through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) -# define signbit rpl_signbit -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined signbit -_GL_WARN_REAL_FLOATING_DECL (signbit); -# undef signbit -# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) -# endif -#endif - -_GL_INLINE_HEADER_END - -#endif /* _GL_MATH_H */ -#endif /* _GL_MATH_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/stdio.h b/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/stdio.h deleted file mode 100644 index 825e60c9c..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/gnulib-lib/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "../ucrt/stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "../ucrt/stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_STDIO_H -#define _GL_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 1 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 1 -# if !1 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 0 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 1 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 1 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 0 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 1 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !0 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_STDIO_H */ -#endif /* _GL_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/libgettextpo/config.h b/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/libgettextpo/config.h deleted file mode 100644 index 6c214fc40..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/libgettextpo/config.h +++ /dev/null @@ -1,383 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#ifndef GTPO_CONFIG_H -#define GTPO_CONFIG_H - -#include "../config.h" -#define DEFAULT_TEXT_DOMAIN "gettext-tools" -#undef DLL_VARIABLE -#define DLL_VARIABLE - -#endif /* GTPO_CONFIG_H */ -#define _gl_convert_FILETIME_to_POSIX libgettextpo__gl_convert_FILETIME_to_POSIX -#define _gl_fstat_by_handle libgettextpo__gl_fstat_by_handle -#define _gl_nothrow_get_osfhandle libgettextpo__gl_nothrow_get_osfhandle -#define _gl_raise_SIGPIPE libgettextpo__gl_raise_SIGPIPE -#define _obstack_allocated_p libgettextpo__obstack_allocated_p -#define _obstack_begin libgettextpo__obstack_begin -#define _obstack_begin_1 libgettextpo__obstack_begin_1 -#define _obstack_free libgettextpo__obstack_free -#define _obstack_memory_used libgettextpo__obstack_memory_used -#define _obstack_newchunk libgettextpo__obstack_newchunk -#define allow_duplicates libgettextpo_allow_duplicates -#define asnprintf libgettextpo_asnprintf -#define asprintf libgettextpo_asprintf -#define base_len libgettextpo_base_len -#define c_strcasecmp libgettextpo_c_strcasecmp -#define c_strncasecmp libgettextpo_c_strncasecmp -#define c_strstr libgettextpo_c_strstr -#define catalog_reader_alloc libgettextpo_catalog_reader_alloc -#define catalog_reader_free libgettextpo_catalog_reader_free -#define catalog_reader_parse libgettextpo_catalog_reader_parse -#define check_message libgettextpo_check_message -#define check_message_list libgettextpo_check_message_list -#define check_msgid_msgstr_format libgettextpo_check_msgid_msgstr_format -#define check_msgid_msgstr_format_i libgettextpo_check_msgid_msgstr_format_i -#define check_plural_eval libgettextpo_check_plural_eval -#define concatenated_filename libgettextpo_concatenated_filename -#define default_add_message libgettextpo_default_add_message -#define default_catalog_reader_alloc libgettextpo_default_catalog_reader_alloc -#define default_comment libgettextpo_default_comment -#define default_comment_dot libgettextpo_default_comment_dot -#define default_comment_filepos libgettextpo_default_comment_filepos -#define default_comment_special libgettextpo_default_comment_special -#define default_constructor libgettextpo_default_constructor -#define default_destructor libgettextpo_default_destructor -#define default_directive_domain libgettextpo_default_directive_domain -#define default_directive_message libgettextpo_default_directive_message -#define default_parse_brief libgettextpo_default_parse_brief -#define default_parse_debrief libgettextpo_default_parse_debrief -#define default_set_domain libgettextpo_default_set_domain -#define dir_list_append libgettextpo_dir_list_append -#define dir_list_nth libgettextpo_dir_list_nth -#define dir_list_restore libgettextpo_dir_list_restore -#define dir_list_save_reset libgettextpo_dir_list_save_reset -#define dup_cloexec libgettextpo_dup_cloexec -#define error libgettextpo_error -#define error_at_line libgettextpo_error_at_line -#define error_with_progname libgettextpo_error_with_progname -#define execute_all_close_hooks libgettextpo_execute_all_close_hooks -#define execute_all_ioctl_hooks libgettextpo_execute_all_ioctl_hooks -#define execute_close_hooks libgettextpo_execute_close_hooks -#define execute_ioctl_hooks libgettextpo_execute_ioctl_hooks -#define exit_failure libgettextpo_exit_failure -#define extract_plural_expression libgettextpo_extract_plural_expression -#define fcntl libgettextpo_fcntl -#define format_language libgettextpo_format_language -#define format_language_pretty libgettextpo_format_language_pretty -#define formatstring_awk libgettextpo_formatstring_awk -#define formatstring_boost libgettextpo_formatstring_boost -#define formatstring_c libgettextpo_formatstring_c -#define formatstring_csharp libgettextpo_formatstring_csharp -#define formatstring_elisp libgettextpo_formatstring_elisp -#define formatstring_gcc_internal libgettextpo_formatstring_gcc_internal -#define formatstring_gfc_internal libgettextpo_formatstring_gfc_internal -#define formatstring_java libgettextpo_formatstring_java -#define formatstring_java_printf libgettextpo_formatstring_java_printf -#define formatstring_javascript libgettextpo_formatstring_javascript -#define formatstring_kde libgettextpo_formatstring_kde -#define formatstring_kde_kuit libgettextpo_formatstring_kde_kuit -#define formatstring_librep libgettextpo_formatstring_librep -#define formatstring_lisp libgettextpo_formatstring_lisp -#define formatstring_lua libgettextpo_formatstring_lua -#define formatstring_objc libgettextpo_formatstring_objc -#define formatstring_parsers libgettextpo_formatstring_parsers -#define formatstring_pascal libgettextpo_formatstring_pascal -#define formatstring_perl libgettextpo_formatstring_perl -#define formatstring_perl_brace libgettextpo_formatstring_perl_brace -#define formatstring_php libgettextpo_formatstring_php -#define formatstring_python libgettextpo_formatstring_python -#define formatstring_python_brace libgettextpo_formatstring_python_brace -#define formatstring_qt libgettextpo_formatstring_qt -#define formatstring_qt_plural libgettextpo_formatstring_qt_plural -#define formatstring_ruby libgettextpo_formatstring_ruby -#define formatstring_scheme libgettextpo_formatstring_scheme -#define formatstring_sh libgettextpo_formatstring_sh -#define formatstring_smalltalk libgettextpo_formatstring_smalltalk -#define formatstring_tcl libgettextpo_formatstring_tcl -#define formatstring_ycp libgettextpo_formatstring_ycp -#define free_plural_expression libgettextpo_free_plural_expression -#define freea libgettextpo_freea -#define fstrcmp_bounded libgettextpo_fstrcmp_bounded -#define fstrcmp_free_resources libgettextpo_fstrcmp_free_resources -#define fsync libgettextpo_fsync -#define fuzzy_search_goal_function libgettextpo_fuzzy_search_goal_function -#define fwriteerror libgettextpo_fwriteerror -#define fwriteerror_no_ebadf libgettextpo_fwriteerror_no_ebadf -#define gcd libgettextpo_gcd -#define germanic_plural libgettextpo_germanic_plural -#define get_python_format_unnamed_arg_count libgettextpo_get_python_format_unnamed_arg_count -#define get_sysdep_c_format_directives libgettextpo_get_sysdep_c_format_directives -#define getdelim libgettextpo_getdelim -#define getdtablesize libgettextpo_getdtablesize -#define getprogname libgettextpo_getprogname -#define gl_linked_list_implementation libgettextpo_gl_linked_list_implementation -#define gl_msvc_inval_ensure_handler libgettextpo_gl_msvc_inval_ensure_handler -#define glwthread_mutex_destroy libgettextpo_glwthread_mutex_destroy -#define glwthread_mutex_init libgettextpo_glwthread_mutex_init -#define glwthread_mutex_lock libgettextpo_glwthread_mutex_lock -#define glwthread_mutex_trylock libgettextpo_glwthread_mutex_trylock -#define glwthread_mutex_unlock libgettextpo_glwthread_mutex_unlock -#define glwthread_once libgettextpo_glwthread_once -#define glwthread_recmutex_destroy libgettextpo_glwthread_recmutex_destroy -#define glwthread_recmutex_init libgettextpo_glwthread_recmutex_init -#define glwthread_recmutex_lock libgettextpo_glwthread_recmutex_lock -#define glwthread_recmutex_trylock libgettextpo_glwthread_recmutex_trylock -#define glwthread_recmutex_unlock libgettextpo_glwthread_recmutex_unlock -#define glwthread_rwlock_destroy libgettextpo_glwthread_rwlock_destroy -#define glwthread_rwlock_init libgettextpo_glwthread_rwlock_init -#define glwthread_rwlock_rdlock libgettextpo_glwthread_rwlock_rdlock -#define glwthread_rwlock_tryrdlock libgettextpo_glwthread_rwlock_tryrdlock -#define glwthread_rwlock_trywrlock libgettextpo_glwthread_rwlock_trywrlock -#define glwthread_rwlock_unlock libgettextpo_glwthread_rwlock_unlock -#define glwthread_rwlock_wrlock libgettextpo_glwthread_rwlock_wrlock -#define glwthread_tls_get libgettextpo_glwthread_tls_get -#define glwthread_tls_key_create libgettextpo_glwthread_tls_key_create -#define glwthread_tls_key_delete libgettextpo_glwthread_tls_key_delete -#define glwthread_tls_process_destructors libgettextpo_glwthread_tls_process_destructors -#define glwthread_tls_set libgettextpo_glwthread_tls_set -#define gnu_mbswidth libgettextpo_gnu_mbswidth -#define gram_max_allowed_errors libgettextpo_gram_max_allowed_errors -#define gram_pos libgettextpo_gram_pos -#define gram_pos_column libgettextpo_gram_pos_column -#define handle_filepos_comment_option libgettextpo_handle_filepos_comment_option -#define hard_locale libgettextpo_hard_locale -#define hash_destroy libgettextpo_hash_destroy -#define hash_find_entry libgettextpo_hash_find_entry -#define hash_init libgettextpo_hash_init -#define hash_insert_entry libgettextpo_hash_insert_entry -#define hash_iterate libgettextpo_hash_iterate -#define hash_iterate_modify libgettextpo_hash_iterate_modify -#define hash_set_value libgettextpo_hash_set_value -#define iconveh_close libgettextpo_iconveh_close -#define iconveh_open libgettextpo_iconveh_open -#define input_format_po libgettextpo_input_format_po -#define install_sigfpe_handler libgettextpo_install_sigfpe_handler -#define is_ascii_message libgettextpo_is_ascii_message -#define is_ascii_message_list libgettextpo_is_ascii_message_list -#define is_ascii_msgdomain_list libgettextpo_is_ascii_msgdomain_list -#define is_ascii_string libgettextpo_is_ascii_string -#define is_ascii_string_list libgettextpo_is_ascii_string_list -#define last_component libgettextpo_last_component -#define lex_end libgettextpo_lex_end -#define lex_start libgettextpo_lex_start -#define locale_charset libgettextpo_locale_charset -#define make_format_description_string libgettextpo_make_format_description_string -#define make_range_description_string libgettextpo_make_range_description_string -#define markup_parse_context_end_parse libgettextpo_markup_parse_context_end_parse -#define markup_parse_context_free libgettextpo_markup_parse_context_free -#define markup_parse_context_get_error libgettextpo_markup_parse_context_get_error -#define markup_parse_context_new libgettextpo_markup_parse_context_new -#define markup_parse_context_parse libgettextpo_markup_parse_context_parse -#define maybe_print_progname libgettextpo_maybe_print_progname -#define mbsnwidth libgettextpo_mbsnwidth -#define mem_cd_iconv libgettextpo_mem_cd_iconv -#define mem_cd_iconveh libgettextpo_mem_cd_iconveh -#define mem_iconveh libgettextpo_mem_iconveh -#define mem_iconveha libgettextpo_mem_iconveha -#define message_alloc libgettextpo_message_alloc -#define message_comment_append libgettextpo_message_comment_append -#define message_comment_dot_append libgettextpo_message_comment_dot_append -#define message_comment_filepos libgettextpo_message_comment_filepos -#define message_copy libgettextpo_message_copy -#define message_free libgettextpo_message_free -#define message_list_alloc libgettextpo_message_list_alloc -#define message_list_append libgettextpo_message_list_append -#define message_list_copy libgettextpo_message_list_copy -#define message_list_free libgettextpo_message_list_free -#define message_list_insert_at libgettextpo_message_list_insert_at -#define message_list_list_alloc libgettextpo_message_list_list_alloc -#define message_list_list_append libgettextpo_message_list_list_append -#define message_list_list_append_list libgettextpo_message_list_list_append_list -#define message_list_list_free libgettextpo_message_list_list_free -#define message_list_list_search libgettextpo_message_list_list_search -#define message_list_msgids_changed libgettextpo_message_list_msgids_changed -#define message_list_prepend libgettextpo_message_list_prepend -#define message_list_remove_if_not libgettextpo_message_list_remove_if_not -#define message_list_search libgettextpo_message_list_search -#define message_list_search_fuzzy libgettextpo_message_list_search_fuzzy -#define message_page_width_ignore libgettextpo_message_page_width_ignore -#define message_page_width_set libgettextpo_message_page_width_set -#define message_print_comment libgettextpo_message_print_comment -#define message_print_comment_dot libgettextpo_message_print_comment_dot -#define message_print_comment_filepos libgettextpo_message_print_comment_filepos -#define message_print_comment_flags libgettextpo_message_print_comment_flags -#define message_print_style_comment libgettextpo_message_print_style_comment -#define message_print_style_escape libgettextpo_message_print_style_escape -#define message_print_style_filepos libgettextpo_message_print_style_filepos -#define message_print_style_indent libgettextpo_message_print_style_indent -#define message_print_style_uniforum libgettextpo_message_print_style_uniforum -#define mmalloca libgettextpo_mmalloca -#define msgdomain_alloc libgettextpo_msgdomain_alloc -#define msgdomain_free libgettextpo_msgdomain_free -#define msgdomain_list_alloc libgettextpo_msgdomain_list_alloc -#define msgdomain_list_append libgettextpo_msgdomain_list_append -#define msgdomain_list_copy libgettextpo_msgdomain_list_copy -#define msgdomain_list_free libgettextpo_msgdomain_list_free -#define msgdomain_list_print libgettextpo_msgdomain_list_print -#define msgdomain_list_sort_by_filepos libgettextpo_msgdomain_list_sort_by_filepos -#define msgdomain_list_sort_by_msgid libgettextpo_msgdomain_list_sort_by_msgid -#define msgdomain_list_sublist libgettextpo_msgdomain_list_sublist -#define multiline_error libgettextpo_multiline_error -#define multiline_warning libgettextpo_multiline_warning -#define next_prime libgettextpo_next_prime -#define obstack_alloc_failed_handler libgettextpo_obstack_alloc_failed_handler -#define open_catalog_file libgettextpo_open_catalog_file -#define output_format_po libgettextpo_output_format_po -#define parse_plural_expression libgettextpo_parse_plural_expression -#define pass_obsolete_entries libgettextpo_pass_obsolete_entries -#define plural_eval libgettextpo_plural_eval -#define plural_table libgettextpo_plural_table -#define plural_table_size libgettextpo_plural_table_size -#define po_callback_comment libgettextpo_po_callback_comment -#define po_callback_comment_dispatcher libgettextpo_po_callback_comment_dispatcher -#define po_callback_comment_dot libgettextpo_po_callback_comment_dot -#define po_callback_comment_filepos libgettextpo_po_callback_comment_filepos -#define po_callback_comment_special libgettextpo_po_callback_comment_special -#define po_callback_domain libgettextpo_po_callback_domain -#define po_callback_message libgettextpo_po_callback_message -#define po_charset_ascii libgettextpo_po_charset_ascii -#define po_charset_ascii_compatible libgettextpo_po_charset_ascii_compatible -#define po_charset_canonicalize libgettextpo_po_charset_canonicalize -#define po_charset_character_iterator libgettextpo_po_charset_character_iterator -#define po_charset_utf8 libgettextpo_po_charset_utf8 -#define po_error libgettextpo_po_error -#define po_error_at_line libgettextpo_po_error_at_line -#define po_gram_char libgettextpo_po_gram_char -#define po_gram_error libgettextpo_po_gram_error -#define po_gram_error_at_line libgettextpo_po_gram_error_at_line -#define po_gram_lex libgettextpo_po_gram_lex -#define po_gram_lval libgettextpo_po_gram_lval -#define po_gram_nerrs libgettextpo_po_gram_nerrs -#define po_gram_parse libgettextpo_po_gram_parse -#define po_is_charset_weird libgettextpo_po_is_charset_weird -#define po_is_charset_weird_cjk libgettextpo_po_is_charset_weird_cjk -#define po_lex_charset libgettextpo_po_lex_charset -#define po_lex_charset_close libgettextpo_po_lex_charset_close -#define po_lex_charset_init libgettextpo_po_lex_charset_init -#define po_lex_charset_set libgettextpo_po_lex_charset_set -#define po_lex_iconv libgettextpo_po_lex_iconv -#define po_lex_pass_comments libgettextpo_po_lex_pass_comments -#define po_lex_pass_obsolete_entries libgettextpo_po_lex_pass_obsolete_entries -#define po_lex_weird_cjk libgettextpo_po_lex_weird_cjk -#define po_multiline_error libgettextpo_po_multiline_error -#define po_multiline_warning libgettextpo_po_multiline_warning -#define po_parse_comment_special libgettextpo_po_parse_comment_special -#define po_xerror libgettextpo_po_xerror -#define po_xerror2 libgettextpo_po_xerror2 -#define possible_format_p libgettextpo_possible_format_p -#define printf_fetchargs libgettextpo_printf_fetchargs -#define printf_parse libgettextpo_printf_parse -#define rawmemchr libgettextpo_rawmemchr -#define read_catalog_file libgettextpo_read_catalog_file -#define read_catalog_stream libgettextpo_read_catalog_stream -#define register_fd_hook libgettextpo_register_fd_hook -#define rpl_close libgettextpo_rpl_close -#define rpl_dup2 libgettextpo_rpl_dup2 -#define rpl_error_message_count libgettextpo_rpl_error_message_count -#define rpl_error_one_per_line libgettextpo_rpl_error_one_per_line -#define rpl_error_print_progname libgettextpo_rpl_error_print_progname -#define rpl_fdopen libgettextpo_rpl_fdopen -#define rpl_fopen libgettextpo_rpl_fopen -#define rpl_fprintf libgettextpo_rpl_fprintf -#define rpl_fputc libgettextpo_rpl_fputc -#define rpl_fputs libgettextpo_rpl_fputs -#define rpl_fstat libgettextpo_rpl_fstat -#define rpl_fwrite libgettextpo_rpl_fwrite -#define rpl_getline libgettextpo_rpl_getline -#define rpl_malloc libgettextpo_rpl_malloc -#define rpl_mbrtowc libgettextpo_rpl_mbrtowc -#define rpl_mbsinit libgettextpo_rpl_mbsinit -#define rpl_open libgettextpo_rpl_open -#define rpl_printf libgettextpo_rpl_printf -#define rpl_putchar libgettextpo_rpl_putchar -#define rpl_puts libgettextpo_rpl_puts -#define rpl_raise libgettextpo_rpl_raise -#define rpl_realloc libgettextpo_rpl_realloc -#define rpl_signal libgettextpo_rpl_signal -#define rpl_stat libgettextpo_rpl_stat -#define rpl_strerror libgettextpo_rpl_strerror -#define rpl_strstr libgettextpo_rpl_strstr -#define rpl_vfprintf libgettextpo_rpl_vfprintf -#define rpl_vprintf libgettextpo_rpl_vprintf -#define sentence_end libgettextpo_sentence_end -#define sentence_end_required_spaces libgettextpo_sentence_end_required_spaces -#define set_cloexec_flag libgettextpo_set_cloexec_flag -#define setlocale_null libgettextpo_setlocale_null -#define setlocale_null_r libgettextpo_setlocale_null_r -#define sigaddset libgettextpo_sigaddset -#define sigdelset libgettextpo_sigdelset -#define sigemptyset libgettextpo_sigemptyset -#define sigfillset libgettextpo_sigfillset -#define sigfpe_exit libgettextpo_sigfpe_exit -#define sigismember libgettextpo_sigismember -#define significant_format_p libgettextpo_significant_format_p -#define sigpending libgettextpo_sigpending -#define sigprocmask libgettextpo_sigprocmask -#define stpcpy libgettextpo_stpcpy -#define stpncpy libgettextpo_stpncpy -#define str_cd_iconv libgettextpo_str_cd_iconv -#define str_cd_iconveh libgettextpo_str_cd_iconveh -#define str_iconv libgettextpo_str_iconv -#define str_iconveh libgettextpo_str_iconveh -#define str_iconveha libgettextpo_str_iconveha -#define strchrnul libgettextpo_strchrnul -#define strerror_override libgettextpo_strerror_override -#define string_list_alloc libgettextpo_string_list_alloc -#define string_list_append libgettextpo_string_list_append -#define string_list_append_unique libgettextpo_string_list_append_unique -#define string_list_concat libgettextpo_string_list_concat -#define string_list_concat_destroy libgettextpo_string_list_concat_destroy -#define string_list_destroy libgettextpo_string_list_destroy -#define string_list_free libgettextpo_string_list_free -#define string_list_init libgettextpo_string_list_init -#define string_list_join libgettextpo_string_list_join -#define string_list_member libgettextpo_string_list_member -#define string_list_remove libgettextpo_string_list_remove -#define syntax_check_message_list libgettextpo_syntax_check_message_list -#define syntax_check_name libgettextpo_syntax_check_name -#define textmode_xerror libgettextpo_textmode_xerror -#define textmode_xerror2 libgettextpo_textmode_xerror2 -#define u16_mbtouc_aux libgettextpo_u16_mbtouc_aux -#define u8_check libgettextpo_u8_check -#define u8_conv_from_encoding libgettextpo_u8_conv_from_encoding -#define u8_mblen libgettextpo_u8_mblen -#define u8_mbtouc_aux libgettextpo_u8_mbtouc_aux -#define u8_mbtouc_unsafe_aux libgettextpo_u8_mbtouc_unsafe_aux -#define u8_mbtoucr libgettextpo_u8_mbtoucr -#define u8_next libgettextpo_u8_next -#define u8_possible_linebreaks libgettextpo_u8_possible_linebreaks -#define u8_prev libgettextpo_u8_prev -#define u8_strmbtouc libgettextpo_u8_strmbtouc -#define u8_uctomb_aux libgettextpo_u8_uctomb_aux -#define u8_width_linebreaks libgettextpo_u8_width_linebreaks -#define uc_is_alpha libgettextpo_uc_is_alpha -#define uc_is_space libgettextpo_uc_is_space -#define uc_width libgettextpo_uc_width -#define ulc_width_linebreaks libgettextpo_ulc_width_linebreaks -#define uniconv_register_autodetect libgettextpo_uniconv_register_autodetect -#define unilbrk_is_all_ascii libgettextpo_unilbrk_is_all_ascii -#define unilbrk_is_utf8_encoding libgettextpo_unilbrk_is_utf8_encoding -#define unilbrk_table libgettextpo_unilbrk_table -#define unilbrkprop libgettextpo_unilbrkprop -#define uninstall_sigfpe_handler libgettextpo_uninstall_sigfpe_handler -#define unregister_fd_hook libgettextpo_unregister_fd_hook -#define vasnprintf libgettextpo_vasnprintf -#define vasprintf libgettextpo_vasprintf -#define wcwidth libgettextpo_wcwidth -#define x2realloc libgettextpo_x2realloc -#define xalloc_die libgettextpo_xalloc_die -#define xasprintf libgettextpo_xasprintf -#define xcalloc libgettextpo_xcalloc -#define xconcatenated_filename libgettextpo_xconcatenated_filename -#define xmalloc libgettextpo_xmalloc -#define xmalloc_exit_failure libgettextpo_xmalloc_exit_failure -#define xmem_cd_iconv libgettextpo_xmem_cd_iconv -#define xmemdup libgettextpo_xmemdup -#define xmmalloca libgettextpo_xmmalloca -#define xnmalloc libgettextpo_xnmalloc -#define xrealloc libgettextpo_xrealloc -#define xstr_cd_iconv libgettextpo_xstr_cd_iconv -#define xstr_iconv libgettextpo_xstr_iconv -#define xstrdup libgettextpo_xstrdup -#define xvasprintf libgettextpo_xvasprintf -#define xzalloc libgettextpo_xzalloc diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/libgettextpo/stdio.h b/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/libgettextpo/stdio.h deleted file mode 100644 index 928fd41b4..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/gettext-tools/libgettextpo/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "../ucrt/stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_GTPO_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "../ucrt/stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_GTPO_STDIO_H -#define _GL_GTPO_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 1 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 1 -# if !1 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 0 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 1 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 1 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 0 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 1 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !0 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_GTPO_STDIO_H */ -#endif /* _GL_GTPO_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/config.h b/gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/config.h deleted file mode 100644 index 0452cf89c..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/config.h +++ /dev/null @@ -1,1456 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if you wish *printf() functions that have a safe handling of - non-IEEE-754 'long double' values. */ -#define CHECK_PRINTF_SAFE 1 - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'double'. */ -#define DBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'double'. */ -#define DBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_WORD */ - -/* Define to 1 if // is a file system root distinct from /. */ -/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'float'. */ -#define FLT_EXPBIT0_BIT 23 - -/* Define as the word index where to find the exponent of 'float'. */ -#define FLT_EXPBIT0_WORD 0 - -/* Define as the bit index in the word where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_WORD */ - -/* Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday. */ -#define GETTIMEOFDAY_TIMEZONE void - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module snprintf shall be considered present. */ -#define GNULIB_SNPRINTF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module frexp should be tested. */ -#define GNULIB_TEST_FREXP 1 - -/* Define to 1 when the gnulib module frexpl should be tested. */ -#define GNULIB_TEST_FREXPL 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module fsync should be tested. */ -#define GNULIB_TEST_FSYNC 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module gethostname should be tested. */ -#define GNULIB_TEST_GETHOSTNAME 1 - -/* Define to 1 when the gnulib module gettimeofday should be tested. */ -#define GNULIB_TEST_GETTIMEOFDAY 1 - -/* Define to 1 when the gnulib module isatty should be tested. */ -#define GNULIB_TEST_ISATTY 1 - -/* Define to 1 when the gnulib module isinf should be tested. */ -#define GNULIB_TEST_ISINF 1 - -/* Define to 1 when the gnulib module isnan should be tested. */ -#define GNULIB_TEST_ISNAN 1 - -/* Define to 1 when the gnulib module isnand should be tested. */ -#define GNULIB_TEST_ISNAND 1 - -/* Define to 1 when the gnulib module isnanf should be tested. */ -#define GNULIB_TEST_ISNANF 1 - -/* Define to 1 when the gnulib module isnanl should be tested. */ -#define GNULIB_TEST_ISNANL 1 - -/* Define to 1 when the gnulib module log10 should be tested. */ -#define GNULIB_TEST_LOG10 1 - -/* Define to 1 when the gnulib module malloc-posix should be tested. */ -#define GNULIB_TEST_MALLOC_POSIX 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module read should be tested. */ -#define GNULIB_TEST_READ 1 - -/* Define to 1 when the gnulib module sigaction should be tested. */ -#define GNULIB_TEST_SIGACTION 1 - -/* Define to 1 when the gnulib module signbit should be tested. */ -#define GNULIB_TEST_SIGNBIT 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module snprintf should be tested. */ -#define GNULIB_TEST_SNPRINTF 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module stpcpy should be tested. */ -#define GNULIB_TEST_STPCPY 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module vasprintf should be tested. */ -#define GNULIB_TEST_VASPRINTF 1 - -/* Define to 1 when the gnulib module vsnprintf should be tested. */ -#define GNULIB_TEST_VSNPRINTF 1 - -/* Define to 1 when the gnulib module write should be tested. */ -#define GNULIB_TEST_WRITE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUC 1 - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_NAMESER_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define if the copysignf function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNF_IN_LIBC */ - -/* Define if the copysignl function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNL_IN_LIBC */ - -/* Define if the copysign function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGN_IN_LIBC */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. - */ -#define HAVE_DECL_ALARM 0 - -/* Define to 1 if you have the declaration of `copysign', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGN */ - -/* Define to 1 if you have the declaration of `copysignf', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNF */ - -/* Define to 1 if you have the declaration of `copysignl', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNL */ - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. - */ -#define HAVE_DECL_ISINF 1 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `snprintf', and to 0 if you - don't. */ -#define HAVE_DECL_SNPRINTF 1 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VSNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define if the frexpl function is available in libc. */ -/* #undef HAVE_FREXPL_IN_LIBC */ - -/* Define if the frexp function is available in libc. */ -#define HAVE_FREXP_IN_LIBC 1 - -/* Define to 1 if you have the `fsync' function. */ -/* #undef HAVE_FSYNC */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `gethostname' function. */ -/* #undef HAVE_GETHOSTNAME */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define to 1 if you have the `getsid' function. */ -/* #undef HAVE_GETSID */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define if the isnan(double) function is available in libc. */ -#define HAVE_ISNAND_IN_LIBC 1 - -/* Define if the isnan(float) function is available in libc. */ -/* #undef HAVE_ISNANF_IN_LIBC */ - -/* Define if the isnan(long double) function is available in libc. */ -/* #undef HAVE_ISNANL_IN_LIBC */ - -/* Define if the ldexpl function is available in libc. */ -#define HAVE_LDEXPL_IN_LIBC 1 - -/* Define if the ldexp function is available in libc. */ -#define HAVE_LDEXP_IN_LIBC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `localtime' function. */ -#define HAVE_LOCALTIME 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define if the 'malloc' function is POSIX compliant. */ -/* #undef HAVE_MALLOC_POSIX */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_LIMITS_H */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_SYS_PARAM_H */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETDB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_H */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -/* #undef HAVE_NL_LANGINFO */ - -/* Define to 1 if the system has obstacks that work with any size object. */ -/* #undef HAVE_OBSTACK */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RESOLV_H */ - -/* Define to 1 if 'long double' and 'double' have the same representation. */ -#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1 - -/* Define to 1 if the system has the type `sa_family_t'. */ -/* #undef HAVE_SA_FAMILY_T */ - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `shutdown' function. */ -/* #undef HAVE_SHUTDOWN */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if you have the `sigaltstack' function. */ -/* #undef HAVE_SIGALTSTACK */ - -/* Define to 1 if the system has the type `siginfo_t'. */ -/* #undef HAVE_SIGINFO_T */ - -/* Define to 1 if you have the `siginterrupt' function. */ -/* #undef HAVE_SIGINTERRUPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if the system has the type `sig_atomic_t'. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the return value of the snprintf function is the number of of - bytes (excluding the terminating NUL) that would have been produced if the - buffer had been large enough. */ -#define HAVE_SNPRINTF_RETVAL_C99 1 - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ -/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ - -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UIO_H */ - -/* Define to 1 if you have the `tcdrain' function. */ -/* #undef HAVE_TCDRAIN */ - -/* Define to 1 if you have the `tcgetattr' function. */ -/* #undef HAVE_TCGETATTR */ - -/* Define if tgetent(), tgetnum(), tgetstr(), tgetflag() are among the termcap - library functions. */ -/* #undef HAVE_TERMCAP */ - -/* Define if setupterm(), tigetnum(), tigetstr(), tigetflag() are among the - termcap library functions. */ -/* #undef HAVE_TERMINFO */ - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define if tparam() is among the termcap library functions. */ -/* #undef HAVE_TPARAM */ - -/* Define to 1 if you have the `uname' function. */ -/* #undef HAVE_UNAME */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if the system has the type 'unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 if you have the `vasnprintf' function. */ -/* #undef HAVE_VASNPRINTF */ - -/* Define to 1 if you have the `vasprintf' function. */ -/* #undef HAVE_VASPRINTF */ - -/* Define to 1 if you have the `vsnprintf' function. */ -/* #undef HAVE_VSNPRINTF */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_WS2TCPIP_H 1 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define HOST_NAME_MAX when does not define it. */ -#define HOST_NAME_MAX 256 - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to 1 if the C compiler is actually a C++ compiler. */ -/* #undef IS_CPLUSPLUS */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'long double'. */ -#define LDBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'long double'. */ -#define LDBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'long - double'. */ -/* #undef LDBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'long double'. */ -/* #undef LDBL_SIGNBIT_WORD */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define if the vasnprintf implementation needs special code for the 'a' and - 'A' directives. */ -#define NEED_PRINTF_DIRECTIVE_A 1 - -/* Define if the vasnprintf implementation needs special code for the 'F' - directive. */ -/* #undef NEED_PRINTF_DIRECTIVE_F */ - -/* Define if the vasnprintf implementation needs special code for the 'ls' - directive. */ -/* #undef NEED_PRINTF_DIRECTIVE_LS */ - -/* Define if the vasnprintf implementation needs special code for 'double' - arguments. */ -#define NEED_PRINTF_DOUBLE 1 - -/* Define if the vasnprintf implementation needs special code for surviving - out-of-memory conditions. */ -#define NEED_PRINTF_ENOMEM 1 - -/* Define if the vasnprintf implementation needs special code for the ' flag. - */ -#define NEED_PRINTF_FLAG_GROUPING 1 - -/* Define if the vasnprintf implementation needs special code for the '-' - flag. */ -/* #undef NEED_PRINTF_FLAG_LEFTADJUST */ - -/* Define if the vasnprintf implementation needs special code for the 0 flag. - */ -#define NEED_PRINTF_FLAG_ZERO 1 - -/* Define if the vasnprintf implementation needs special code for infinite - 'double' arguments. */ -/* #undef NEED_PRINTF_INFINITE_DOUBLE */ - -/* Define if the vasnprintf implementation needs special code for infinite - 'long double' arguments. */ -/* #undef NEED_PRINTF_INFINITE_LONG_DOUBLE */ - -/* Define if the vasnprintf implementation needs special code for 'long - double' arguments. */ -#define NEED_PRINTF_LONG_DOUBLE 1 - -/* Define if the vasnprintf implementation needs special code for supporting - large precisions without arbitrary bounds. */ -#define NEED_PRINTF_UNBOUNDED_PRECISION 1 - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "libtextstyle" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define if vasnprintf exists but is overridden by gnulib. */ -/* #undef REPLACE_VASNPRINTF */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Define to a working va_copy macro or replacement. */ -#define VA_COPY va_copy - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define if WSAStartup is needed. */ -#define WINDOWS_SOCKETS 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 in order to get the POSIX compatible declarations of socket - functions. */ -/* #undef _POSIX_PII_SOCKET */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b)) - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to long or long long if and don't define. */ -/* #undef intmax_t */ - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define as an integer type suitable for memory locations that can be - accessed atomically even in the presence of asynchronous signals. */ -/* #undef sig_atomic_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* type to use in place of socklen_t if not defined */ -/* #undef socklen_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define as a macro for copying va_list variables. */ -/* #undef va_copy */ - - -/* In order to define all the symbols declared by textstyle.h, do not use - 'inline' functions, even when the compiler would support them. */ -#include "notinline.h" - -/* Ignore DLL_VARIABLE markup that is meant for gettext. */ -#define DLL_VARIABLE - -/* Get LIBTEXTSTYLE_DLL_VARIABLE. */ -#include "textstyle/woe32dll.h" - diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/lib/config.h b/gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/lib/config.h deleted file mode 100644 index bd5668611..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/lib/config.h +++ /dev/null @@ -1,1250 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#ifndef LIBTEXTSTYLE_CONFIG_H -#define LIBTEXTSTYLE_CONFIG_H - -#include "../config.h" - -#endif /* LIBTEXTSTYLE_CONFIG_H */ -#define isatty libtextstyle_isatty -#define __oldXMLWDcompatibility libtextstyle___oldXMLWDcompatibility -#define __xmlBufferAllocScheme libtextstyle___xmlBufferAllocScheme -#define __xmlDefaultBufferSize libtextstyle___xmlDefaultBufferSize -#define __xmlDefaultSAXLocator libtextstyle___xmlDefaultSAXLocator -#define __xmlDeregisterNodeDefaultValue libtextstyle___xmlDeregisterNodeDefaultValue -#define __xmlDoValidityCheckingDefaultValue libtextstyle___xmlDoValidityCheckingDefaultValue -#define __xmlErrEncoding libtextstyle___xmlErrEncoding -#define __xmlGenericError libtextstyle___xmlGenericError -#define __xmlGenericErrorContext libtextstyle___xmlGenericErrorContext -#define __xmlGetWarningsDefaultValue libtextstyle___xmlGetWarningsDefaultValue -#define __xmlGlobalInitMutexDestroy libtextstyle___xmlGlobalInitMutexDestroy -#define __xmlGlobalInitMutexLock libtextstyle___xmlGlobalInitMutexLock -#define __xmlGlobalInitMutexUnlock libtextstyle___xmlGlobalInitMutexUnlock -#define __xmlIOErr libtextstyle___xmlIOErr -#define __xmlIndentTreeOutput libtextstyle___xmlIndentTreeOutput -#define __xmlInitializeDict libtextstyle___xmlInitializeDict -#define __xmlKeepBlanksDefaultValue libtextstyle___xmlKeepBlanksDefaultValue -#define __xmlLastError libtextstyle___xmlLastError -#define __xmlLineNumbersDefaultValue libtextstyle___xmlLineNumbersDefaultValue -#define __xmlLoadExtDtdDefaultValue libtextstyle___xmlLoadExtDtdDefaultValue -#define __xmlLoaderErr libtextstyle___xmlLoaderErr -#define __xmlOutputBufferCreateFilenameValue libtextstyle___xmlOutputBufferCreateFilenameValue -#define __xmlParserDebugEntities libtextstyle___xmlParserDebugEntities -#define __xmlParserInputBufferCreateFilename libtextstyle___xmlParserInputBufferCreateFilename -#define __xmlParserInputBufferCreateFilenameValue libtextstyle___xmlParserInputBufferCreateFilenameValue -#define __xmlParserVersion libtextstyle___xmlParserVersion -#define __xmlPedanticParserDefaultValue libtextstyle___xmlPedanticParserDefaultValue -#define __xmlRaiseError libtextstyle___xmlRaiseError -#define __xmlRegisterCallbacks libtextstyle___xmlRegisterCallbacks -#define __xmlRegisterNodeDefaultValue libtextstyle___xmlRegisterNodeDefaultValue -#define __xmlSaveNoEmptyTags libtextstyle___xmlSaveNoEmptyTags -#define __xmlSimpleError libtextstyle___xmlSimpleError -#define __xmlStructuredError libtextstyle___xmlStructuredError -#define __xmlStructuredErrorContext libtextstyle___xmlStructuredErrorContext -#define __xmlSubstituteEntitiesDefaultValue libtextstyle___xmlSubstituteEntitiesDefaultValue -#define __xmlTreeIndentString libtextstyle___xmlTreeIndentString -#define activate_term_non_default_mode libtextstyle_activate_term_non_default_mode -#define activate_term_style_controller libtextstyle_activate_term_style_controller -#define at_fatal_signal libtextstyle_at_fatal_signal -#define base_len libtextstyle_base_len -#define block_fatal_signals libtextstyle_block_fatal_signals -#define c_strcasecmp libtextstyle_c_strcasecmp -#define c_strncasecmp libtextstyle_c_strncasecmp -#define concatenated_filename libtextstyle_concatenated_filename -#define cr_additional_sel_append libtextstyle_cr_additional_sel_append -#define cr_additional_sel_destroy libtextstyle_cr_additional_sel_destroy -#define cr_additional_sel_dump libtextstyle_cr_additional_sel_dump -#define cr_additional_sel_new libtextstyle_cr_additional_sel_new -#define cr_additional_sel_new_with_type libtextstyle_cr_additional_sel_new_with_type -#define cr_additional_sel_one_to_string libtextstyle_cr_additional_sel_one_to_string -#define cr_additional_sel_prepend libtextstyle_cr_additional_sel_prepend -#define cr_additional_sel_set_attr_sel libtextstyle_cr_additional_sel_set_attr_sel -#define cr_additional_sel_set_class_name libtextstyle_cr_additional_sel_set_class_name -#define cr_additional_sel_set_id_name libtextstyle_cr_additional_sel_set_id_name -#define cr_additional_sel_set_pseudo libtextstyle_cr_additional_sel_set_pseudo -#define cr_additional_sel_to_string libtextstyle_cr_additional_sel_to_string -#define cr_attr_sel_append_attr_sel libtextstyle_cr_attr_sel_append_attr_sel -#define cr_attr_sel_destroy libtextstyle_cr_attr_sel_destroy -#define cr_attr_sel_dump libtextstyle_cr_attr_sel_dump -#define cr_attr_sel_new libtextstyle_cr_attr_sel_new -#define cr_attr_sel_prepend_attr_sel libtextstyle_cr_attr_sel_prepend_attr_sel -#define cr_attr_sel_to_string libtextstyle_cr_attr_sel_to_string -#define cr_cascade_destroy libtextstyle_cr_cascade_destroy -#define cr_cascade_get_sheet libtextstyle_cr_cascade_get_sheet -#define cr_cascade_new libtextstyle_cr_cascade_new -#define cr_cascade_ref libtextstyle_cr_cascade_ref -#define cr_cascade_set_sheet libtextstyle_cr_cascade_set_sheet -#define cr_cascade_unref libtextstyle_cr_cascade_unref -#define cr_declaration_append libtextstyle_cr_declaration_append -#define cr_declaration_append2 libtextstyle_cr_declaration_append2 -#define cr_declaration_destroy libtextstyle_cr_declaration_destroy -#define cr_declaration_dump libtextstyle_cr_declaration_dump -#define cr_declaration_dump_one libtextstyle_cr_declaration_dump_one -#define cr_declaration_get_by_prop_name libtextstyle_cr_declaration_get_by_prop_name -#define cr_declaration_get_from_list libtextstyle_cr_declaration_get_from_list -#define cr_declaration_list_to_string libtextstyle_cr_declaration_list_to_string -#define cr_declaration_list_to_string2 libtextstyle_cr_declaration_list_to_string2 -#define cr_declaration_new libtextstyle_cr_declaration_new -#define cr_declaration_nr_props libtextstyle_cr_declaration_nr_props -#define cr_declaration_parse_from_buf libtextstyle_cr_declaration_parse_from_buf -#define cr_declaration_parse_list_from_buf libtextstyle_cr_declaration_parse_list_from_buf -#define cr_declaration_prepend libtextstyle_cr_declaration_prepend -#define cr_declaration_ref libtextstyle_cr_declaration_ref -#define cr_declaration_to_string libtextstyle_cr_declaration_to_string -#define cr_declaration_unlink libtextstyle_cr_declaration_unlink -#define cr_declaration_unref libtextstyle_cr_declaration_unref -#define cr_doc_handler_associate_a_parser libtextstyle_cr_doc_handler_associate_a_parser -#define cr_doc_handler_destroy libtextstyle_cr_doc_handler_destroy -#define cr_doc_handler_get_ctxt libtextstyle_cr_doc_handler_get_ctxt -#define cr_doc_handler_get_result libtextstyle_cr_doc_handler_get_result -#define cr_doc_handler_new libtextstyle_cr_doc_handler_new -#define cr_doc_handler_ref libtextstyle_cr_doc_handler_ref -#define cr_doc_handler_set_ctxt libtextstyle_cr_doc_handler_set_ctxt -#define cr_doc_handler_set_default_sac_handler libtextstyle_cr_doc_handler_set_default_sac_handler -#define cr_doc_handler_set_result libtextstyle_cr_doc_handler_set_result -#define cr_doc_handler_unref libtextstyle_cr_doc_handler_unref -#define cr_enc_handler_convert_input libtextstyle_cr_enc_handler_convert_input -#define cr_enc_handler_get_instance libtextstyle_cr_enc_handler_get_instance -#define cr_enc_handler_resolve_enc_alias libtextstyle_cr_enc_handler_resolve_enc_alias -#define cr_font_family_append libtextstyle_cr_font_family_append -#define cr_font_family_destroy libtextstyle_cr_font_family_destroy -#define cr_font_family_new libtextstyle_cr_font_family_new -#define cr_font_family_prepend libtextstyle_cr_font_family_prepend -#define cr_font_family_set_name libtextstyle_cr_font_family_set_name -#define cr_font_family_to_string libtextstyle_cr_font_family_to_string -#define cr_font_size_adjust_destroy libtextstyle_cr_font_size_adjust_destroy -#define cr_font_size_adjust_new libtextstyle_cr_font_size_adjust_new -#define cr_font_size_adjust_to_string libtextstyle_cr_font_size_adjust_to_string -#define cr_font_size_clear libtextstyle_cr_font_size_clear -#define cr_font_size_copy libtextstyle_cr_font_size_copy -#define cr_font_size_destroy libtextstyle_cr_font_size_destroy -#define cr_font_size_get_larger_predefined_font_size libtextstyle_cr_font_size_get_larger_predefined_font_size -#define cr_font_size_get_smaller_predefined_font_size libtextstyle_cr_font_size_get_smaller_predefined_font_size -#define cr_font_size_is_predefined_absolute_font_size libtextstyle_cr_font_size_is_predefined_absolute_font_size -#define cr_font_size_is_set_to_inherit libtextstyle_cr_font_size_is_set_to_inherit -#define cr_font_size_new libtextstyle_cr_font_size_new -#define cr_font_size_set_absolute_font_size libtextstyle_cr_font_size_set_absolute_font_size -#define cr_font_size_set_predefined_absolute_font_size libtextstyle_cr_font_size_set_predefined_absolute_font_size -#define cr_font_size_set_relative_font_size libtextstyle_cr_font_size_set_relative_font_size -#define cr_font_size_set_to_inherit libtextstyle_cr_font_size_set_to_inherit -#define cr_font_size_to_string libtextstyle_cr_font_size_to_string -#define cr_font_stretch_to_string libtextstyle_cr_font_stretch_to_string -#define cr_font_style_to_string libtextstyle_cr_font_style_to_string -#define cr_font_variant_to_string libtextstyle_cr_font_variant_to_string -#define cr_font_weight_get_bolder libtextstyle_cr_font_weight_get_bolder -#define cr_font_weight_to_string libtextstyle_cr_font_weight_to_string -#define cr_input_consume_char libtextstyle_cr_input_consume_char -#define cr_input_consume_chars libtextstyle_cr_input_consume_chars -#define cr_input_consume_white_spaces libtextstyle_cr_input_consume_white_spaces -#define cr_input_destroy libtextstyle_cr_input_destroy -#define cr_input_end_of_input libtextstyle_cr_input_end_of_input -#define cr_input_get_byte_addr libtextstyle_cr_input_get_byte_addr -#define cr_input_get_column_num libtextstyle_cr_input_get_column_num -#define cr_input_get_cur_byte_addr libtextstyle_cr_input_get_cur_byte_addr -#define cr_input_get_cur_index libtextstyle_cr_input_get_cur_index -#define cr_input_get_cur_pos libtextstyle_cr_input_get_cur_pos -#define cr_input_get_end_of_file libtextstyle_cr_input_get_end_of_file -#define cr_input_get_end_of_line libtextstyle_cr_input_get_end_of_line -#define cr_input_get_line_num libtextstyle_cr_input_get_line_num -#define cr_input_get_nb_bytes_left libtextstyle_cr_input_get_nb_bytes_left -#define cr_input_get_parsing_location libtextstyle_cr_input_get_parsing_location -#define cr_input_increment_col_num libtextstyle_cr_input_increment_col_num -#define cr_input_increment_line_num libtextstyle_cr_input_increment_line_num -#define cr_input_new_from_buf libtextstyle_cr_input_new_from_buf -#define cr_input_new_from_uri libtextstyle_cr_input_new_from_uri -#define cr_input_peek_byte libtextstyle_cr_input_peek_byte -#define cr_input_peek_byte2 libtextstyle_cr_input_peek_byte2 -#define cr_input_peek_char libtextstyle_cr_input_peek_char -#define cr_input_read_byte libtextstyle_cr_input_read_byte -#define cr_input_read_char libtextstyle_cr_input_read_char -#define cr_input_ref libtextstyle_cr_input_ref -#define cr_input_seek_index libtextstyle_cr_input_seek_index -#define cr_input_set_column_num libtextstyle_cr_input_set_column_num -#define cr_input_set_cur_index libtextstyle_cr_input_set_cur_index -#define cr_input_set_cur_pos libtextstyle_cr_input_set_cur_pos -#define cr_input_set_end_of_file libtextstyle_cr_input_set_end_of_file -#define cr_input_set_end_of_line libtextstyle_cr_input_set_end_of_line -#define cr_input_set_line_num libtextstyle_cr_input_set_line_num -#define cr_input_unref libtextstyle_cr_input_unref -#define cr_num_copy libtextstyle_cr_num_copy -#define cr_num_destroy libtextstyle_cr_num_destroy -#define cr_num_dup libtextstyle_cr_num_dup -#define cr_num_is_fixed_length libtextstyle_cr_num_is_fixed_length -#define cr_num_new libtextstyle_cr_num_new -#define cr_num_new_with_val libtextstyle_cr_num_new_with_val -#define cr_num_set libtextstyle_cr_num_set -#define cr_num_to_string libtextstyle_cr_num_to_string -#define cr_om_parser_destroy libtextstyle_cr_om_parser_destroy -#define cr_om_parser_new libtextstyle_cr_om_parser_new -#define cr_om_parser_parse_buf libtextstyle_cr_om_parser_parse_buf -#define cr_om_parser_parse_file libtextstyle_cr_om_parser_parse_file -#define cr_om_parser_parse_paths_to_cascade libtextstyle_cr_om_parser_parse_paths_to_cascade -#define cr_om_parser_simply_parse_buf libtextstyle_cr_om_parser_simply_parse_buf -#define cr_om_parser_simply_parse_file libtextstyle_cr_om_parser_simply_parse_file -#define cr_om_parser_simply_parse_paths_to_cascade libtextstyle_cr_om_parser_simply_parse_paths_to_cascade -#define cr_parser_destroy libtextstyle_cr_parser_destroy -#define cr_parser_get_parsing_location libtextstyle_cr_parser_get_parsing_location -#define cr_parser_get_sac_handler libtextstyle_cr_parser_get_sac_handler -#define cr_parser_get_tknzr libtextstyle_cr_parser_get_tknzr -#define cr_parser_get_use_core_grammar libtextstyle_cr_parser_get_use_core_grammar -#define cr_parser_new libtextstyle_cr_parser_new -#define cr_parser_new_from_buf libtextstyle_cr_parser_new_from_buf -#define cr_parser_new_from_file libtextstyle_cr_parser_new_from_file -#define cr_parser_new_from_input libtextstyle_cr_parser_new_from_input -#define cr_parser_parse libtextstyle_cr_parser_parse -#define cr_parser_parse_buf libtextstyle_cr_parser_parse_buf -#define cr_parser_parse_charset libtextstyle_cr_parser_parse_charset -#define cr_parser_parse_declaration libtextstyle_cr_parser_parse_declaration -#define cr_parser_parse_expr libtextstyle_cr_parser_parse_expr -#define cr_parser_parse_file libtextstyle_cr_parser_parse_file -#define cr_parser_parse_font_face libtextstyle_cr_parser_parse_font_face -#define cr_parser_parse_import libtextstyle_cr_parser_parse_import -#define cr_parser_parse_media libtextstyle_cr_parser_parse_media -#define cr_parser_parse_page libtextstyle_cr_parser_parse_page -#define cr_parser_parse_prio libtextstyle_cr_parser_parse_prio -#define cr_parser_parse_ruleset libtextstyle_cr_parser_parse_ruleset -#define cr_parser_parse_statement_core libtextstyle_cr_parser_parse_statement_core -#define cr_parser_parse_term libtextstyle_cr_parser_parse_term -#define cr_parser_set_default_sac_handler libtextstyle_cr_parser_set_default_sac_handler -#define cr_parser_set_sac_handler libtextstyle_cr_parser_set_sac_handler -#define cr_parser_set_tknzr libtextstyle_cr_parser_set_tknzr -#define cr_parser_set_use_core_grammar libtextstyle_cr_parser_set_use_core_grammar -#define cr_parser_try_to_skip_spaces_and_comments libtextstyle_cr_parser_try_to_skip_spaces_and_comments -#define cr_parsing_location_copy libtextstyle_cr_parsing_location_copy -#define cr_parsing_location_destroy libtextstyle_cr_parsing_location_destroy -#define cr_parsing_location_dump libtextstyle_cr_parsing_location_dump -#define cr_parsing_location_init libtextstyle_cr_parsing_location_init -#define cr_parsing_location_new libtextstyle_cr_parsing_location_new -#define cr_parsing_location_to_string libtextstyle_cr_parsing_location_to_string -#define cr_prop_list_append libtextstyle_cr_prop_list_append -#define cr_prop_list_append2 libtextstyle_cr_prop_list_append2 -#define cr_prop_list_destroy libtextstyle_cr_prop_list_destroy -#define cr_prop_list_get_decl libtextstyle_cr_prop_list_get_decl -#define cr_prop_list_get_next libtextstyle_cr_prop_list_get_next -#define cr_prop_list_get_prev libtextstyle_cr_prop_list_get_prev -#define cr_prop_list_get_prop libtextstyle_cr_prop_list_get_prop -#define cr_prop_list_lookup_prop libtextstyle_cr_prop_list_lookup_prop -#define cr_prop_list_prepend libtextstyle_cr_prop_list_prepend -#define cr_prop_list_prepend2 libtextstyle_cr_prop_list_prepend2 -#define cr_prop_list_set_decl libtextstyle_cr_prop_list_set_decl -#define cr_prop_list_set_prop libtextstyle_cr_prop_list_set_prop -#define cr_prop_list_unlink libtextstyle_cr_prop_list_unlink -#define cr_pseudo_destroy libtextstyle_cr_pseudo_destroy -#define cr_pseudo_dump libtextstyle_cr_pseudo_dump -#define cr_pseudo_new libtextstyle_cr_pseudo_new -#define cr_pseudo_to_string libtextstyle_cr_pseudo_to_string -#define cr_rgb_compute_from_percentage libtextstyle_cr_rgb_compute_from_percentage -#define cr_rgb_copy libtextstyle_cr_rgb_copy -#define cr_rgb_destroy libtextstyle_cr_rgb_destroy -#define cr_rgb_dump libtextstyle_cr_rgb_dump -#define cr_rgb_is_set_to_inherit libtextstyle_cr_rgb_is_set_to_inherit -#define cr_rgb_is_set_to_transparent libtextstyle_cr_rgb_is_set_to_transparent -#define cr_rgb_new libtextstyle_cr_rgb_new -#define cr_rgb_new_with_vals libtextstyle_cr_rgb_new_with_vals -#define cr_rgb_parse_from_buf libtextstyle_cr_rgb_parse_from_buf -#define cr_rgb_set libtextstyle_cr_rgb_set -#define cr_rgb_set_from_hex_str libtextstyle_cr_rgb_set_from_hex_str -#define cr_rgb_set_from_name libtextstyle_cr_rgb_set_from_name -#define cr_rgb_set_from_rgb libtextstyle_cr_rgb_set_from_rgb -#define cr_rgb_set_from_term libtextstyle_cr_rgb_set_from_term -#define cr_rgb_set_to_inherit libtextstyle_cr_rgb_set_to_inherit -#define cr_rgb_set_to_transparent libtextstyle_cr_rgb_set_to_transparent -#define cr_rgb_to_string libtextstyle_cr_rgb_to_string -#define cr_sel_eng_destroy libtextstyle_cr_sel_eng_destroy -#define cr_sel_eng_get_matched_properties_from_cascade libtextstyle_cr_sel_eng_get_matched_properties_from_cascade -#define cr_sel_eng_get_matched_rulesets libtextstyle_cr_sel_eng_get_matched_rulesets -#define cr_sel_eng_get_matched_style libtextstyle_cr_sel_eng_get_matched_style -#define cr_sel_eng_get_pseudo_class_selector_handler libtextstyle_cr_sel_eng_get_pseudo_class_selector_handler -#define cr_sel_eng_matches_node libtextstyle_cr_sel_eng_matches_node -#define cr_sel_eng_new libtextstyle_cr_sel_eng_new -#define cr_sel_eng_register_pseudo_class_sel_handler libtextstyle_cr_sel_eng_register_pseudo_class_sel_handler -#define cr_sel_eng_unregister_all_pseudo_class_sel_handlers libtextstyle_cr_sel_eng_unregister_all_pseudo_class_sel_handlers -#define cr_sel_eng_unregister_pseudo_class_sel_handler libtextstyle_cr_sel_eng_unregister_pseudo_class_sel_handler -#define cr_selector_append libtextstyle_cr_selector_append -#define cr_selector_append_simple_sel libtextstyle_cr_selector_append_simple_sel -#define cr_selector_destroy libtextstyle_cr_selector_destroy -#define cr_selector_dump libtextstyle_cr_selector_dump -#define cr_selector_new libtextstyle_cr_selector_new -#define cr_selector_parse_from_buf libtextstyle_cr_selector_parse_from_buf -#define cr_selector_prepend libtextstyle_cr_selector_prepend -#define cr_selector_ref libtextstyle_cr_selector_ref -#define cr_selector_to_string libtextstyle_cr_selector_to_string -#define cr_selector_unref libtextstyle_cr_selector_unref -#define cr_simple_sel_append_simple_sel libtextstyle_cr_simple_sel_append_simple_sel -#define cr_simple_sel_compute_specificity libtextstyle_cr_simple_sel_compute_specificity -#define cr_simple_sel_destroy libtextstyle_cr_simple_sel_destroy -#define cr_simple_sel_dump libtextstyle_cr_simple_sel_dump -#define cr_simple_sel_new libtextstyle_cr_simple_sel_new -#define cr_simple_sel_one_to_string libtextstyle_cr_simple_sel_one_to_string -#define cr_simple_sel_prepend_simple_sel libtextstyle_cr_simple_sel_prepend_simple_sel -#define cr_simple_sel_to_string libtextstyle_cr_simple_sel_to_string -#define cr_statement_append libtextstyle_cr_statement_append -#define cr_statement_at_charset_rule_get_charset libtextstyle_cr_statement_at_charset_rule_get_charset -#define cr_statement_at_charset_rule_parse_from_buf libtextstyle_cr_statement_at_charset_rule_parse_from_buf -#define cr_statement_at_charset_rule_set_charset libtextstyle_cr_statement_at_charset_rule_set_charset -#define cr_statement_at_font_face_rule_add_decl libtextstyle_cr_statement_at_font_face_rule_add_decl -#define cr_statement_at_font_face_rule_get_decls libtextstyle_cr_statement_at_font_face_rule_get_decls -#define cr_statement_at_font_face_rule_set_decls libtextstyle_cr_statement_at_font_face_rule_set_decls -#define cr_statement_at_import_rule_get_imported_sheet libtextstyle_cr_statement_at_import_rule_get_imported_sheet -#define cr_statement_at_import_rule_get_url libtextstyle_cr_statement_at_import_rule_get_url -#define cr_statement_at_import_rule_parse_from_buf libtextstyle_cr_statement_at_import_rule_parse_from_buf -#define cr_statement_at_import_rule_set_imported_sheet libtextstyle_cr_statement_at_import_rule_set_imported_sheet -#define cr_statement_at_import_rule_set_url libtextstyle_cr_statement_at_import_rule_set_url -#define cr_statement_at_media_get_from_list libtextstyle_cr_statement_at_media_get_from_list -#define cr_statement_at_media_nr_rules libtextstyle_cr_statement_at_media_nr_rules -#define cr_statement_at_media_rule_parse_from_buf libtextstyle_cr_statement_at_media_rule_parse_from_buf -#define cr_statement_at_page_rule_get_declarations libtextstyle_cr_statement_at_page_rule_get_declarations -#define cr_statement_at_page_rule_parse_from_buf libtextstyle_cr_statement_at_page_rule_parse_from_buf -#define cr_statement_at_page_rule_set_declarations libtextstyle_cr_statement_at_page_rule_set_declarations -#define cr_statement_destroy libtextstyle_cr_statement_destroy -#define cr_statement_does_buf_parses_against_core libtextstyle_cr_statement_does_buf_parses_against_core -#define cr_statement_dump libtextstyle_cr_statement_dump -#define cr_statement_dump_charset libtextstyle_cr_statement_dump_charset -#define cr_statement_dump_font_face_rule libtextstyle_cr_statement_dump_font_face_rule -#define cr_statement_dump_import_rule libtextstyle_cr_statement_dump_import_rule -#define cr_statement_dump_media_rule libtextstyle_cr_statement_dump_media_rule -#define cr_statement_dump_page libtextstyle_cr_statement_dump_page -#define cr_statement_dump_ruleset libtextstyle_cr_statement_dump_ruleset -#define cr_statement_font_face_rule_parse_from_buf libtextstyle_cr_statement_font_face_rule_parse_from_buf -#define cr_statement_get_from_list libtextstyle_cr_statement_get_from_list -#define cr_statement_get_parent_sheet libtextstyle_cr_statement_get_parent_sheet -#define cr_statement_list_to_string libtextstyle_cr_statement_list_to_string -#define cr_statement_new_at_charset_rule libtextstyle_cr_statement_new_at_charset_rule -#define cr_statement_new_at_font_face_rule libtextstyle_cr_statement_new_at_font_face_rule -#define cr_statement_new_at_import_rule libtextstyle_cr_statement_new_at_import_rule -#define cr_statement_new_at_media_rule libtextstyle_cr_statement_new_at_media_rule -#define cr_statement_new_at_page_rule libtextstyle_cr_statement_new_at_page_rule -#define cr_statement_new_ruleset libtextstyle_cr_statement_new_ruleset -#define cr_statement_nr_rules libtextstyle_cr_statement_nr_rules -#define cr_statement_parse_from_buf libtextstyle_cr_statement_parse_from_buf -#define cr_statement_prepend libtextstyle_cr_statement_prepend -#define cr_statement_ruleset_append_decl libtextstyle_cr_statement_ruleset_append_decl -#define cr_statement_ruleset_append_decl2 libtextstyle_cr_statement_ruleset_append_decl2 -#define cr_statement_ruleset_get_declarations libtextstyle_cr_statement_ruleset_get_declarations -#define cr_statement_ruleset_get_sel_list libtextstyle_cr_statement_ruleset_get_sel_list -#define cr_statement_ruleset_parse_from_buf libtextstyle_cr_statement_ruleset_parse_from_buf -#define cr_statement_ruleset_set_decl_list libtextstyle_cr_statement_ruleset_set_decl_list -#define cr_statement_ruleset_set_sel_list libtextstyle_cr_statement_ruleset_set_sel_list -#define cr_statement_set_parent_sheet libtextstyle_cr_statement_set_parent_sheet -#define cr_statement_to_string libtextstyle_cr_statement_to_string -#define cr_statement_unlink libtextstyle_cr_statement_unlink -#define cr_string_destroy libtextstyle_cr_string_destroy -#define cr_string_dup libtextstyle_cr_string_dup -#define cr_string_dup2 libtextstyle_cr_string_dup2 -#define cr_string_new libtextstyle_cr_string_new -#define cr_string_new_from_gstring libtextstyle_cr_string_new_from_gstring -#define cr_string_new_from_string libtextstyle_cr_string_new_from_string -#define cr_string_peek_raw_str libtextstyle_cr_string_peek_raw_str -#define cr_string_peek_raw_str_len libtextstyle_cr_string_peek_raw_str_len -#define cr_style_border_style_to_string libtextstyle_cr_style_border_style_to_string -#define cr_style_copy libtextstyle_cr_style_copy -#define cr_style_destroy libtextstyle_cr_style_destroy -#define cr_style_display_type_to_string libtextstyle_cr_style_display_type_to_string -#define cr_style_dup libtextstyle_cr_style_dup -#define cr_style_float_type_to_string libtextstyle_cr_style_float_type_to_string -#define cr_style_new libtextstyle_cr_style_new -#define cr_style_num_prop_val_to_string libtextstyle_cr_style_num_prop_val_to_string -#define cr_style_position_type_to_string libtextstyle_cr_style_position_type_to_string -#define cr_style_ref libtextstyle_cr_style_ref -#define cr_style_resolve_inherited_properties libtextstyle_cr_style_resolve_inherited_properties -#define cr_style_rgb_prop_val_to_string libtextstyle_cr_style_rgb_prop_val_to_string -#define cr_style_set_props_to_default_values libtextstyle_cr_style_set_props_to_default_values -#define cr_style_set_props_to_initial_values libtextstyle_cr_style_set_props_to_initial_values -#define cr_style_set_style_from_decl libtextstyle_cr_style_set_style_from_decl -#define cr_style_to_string libtextstyle_cr_style_to_string -#define cr_style_unref libtextstyle_cr_style_unref -#define cr_style_white_space_type_to_string libtextstyle_cr_style_white_space_type_to_string -#define cr_stylesheet_destroy libtextstyle_cr_stylesheet_destroy -#define cr_stylesheet_dump libtextstyle_cr_stylesheet_dump -#define cr_stylesheet_new libtextstyle_cr_stylesheet_new -#define cr_stylesheet_nr_rules libtextstyle_cr_stylesheet_nr_rules -#define cr_stylesheet_ref libtextstyle_cr_stylesheet_ref -#define cr_stylesheet_statement_get_from_list libtextstyle_cr_stylesheet_statement_get_from_list -#define cr_stylesheet_to_string libtextstyle_cr_stylesheet_to_string -#define cr_stylesheet_unref libtextstyle_cr_stylesheet_unref -#define cr_term_append_term libtextstyle_cr_term_append_term -#define cr_term_destroy libtextstyle_cr_term_destroy -#define cr_term_dump libtextstyle_cr_term_dump -#define cr_term_get_from_list libtextstyle_cr_term_get_from_list -#define cr_term_new libtextstyle_cr_term_new -#define cr_term_nr_values libtextstyle_cr_term_nr_values -#define cr_term_one_to_string libtextstyle_cr_term_one_to_string -#define cr_term_parse_expression_from_buf libtextstyle_cr_term_parse_expression_from_buf -#define cr_term_prepend_term libtextstyle_cr_term_prepend_term -#define cr_term_ref libtextstyle_cr_term_ref -#define cr_term_set_function libtextstyle_cr_term_set_function -#define cr_term_set_hash libtextstyle_cr_term_set_hash -#define cr_term_set_ident libtextstyle_cr_term_set_ident -#define cr_term_set_number libtextstyle_cr_term_set_number -#define cr_term_set_rgb libtextstyle_cr_term_set_rgb -#define cr_term_set_string libtextstyle_cr_term_set_string -#define cr_term_set_uri libtextstyle_cr_term_set_uri -#define cr_term_to_string libtextstyle_cr_term_to_string -#define cr_term_unref libtextstyle_cr_term_unref -#define cr_tknzr_consume_chars libtextstyle_cr_tknzr_consume_chars -#define cr_tknzr_destroy libtextstyle_cr_tknzr_destroy -#define cr_tknzr_get_cur_byte_addr libtextstyle_cr_tknzr_get_cur_byte_addr -#define cr_tknzr_get_cur_pos libtextstyle_cr_tknzr_get_cur_pos -#define cr_tknzr_get_input libtextstyle_cr_tknzr_get_input -#define cr_tknzr_get_nb_bytes_left libtextstyle_cr_tknzr_get_nb_bytes_left -#define cr_tknzr_get_next_token libtextstyle_cr_tknzr_get_next_token -#define cr_tknzr_get_parsing_location libtextstyle_cr_tknzr_get_parsing_location -#define cr_tknzr_new libtextstyle_cr_tknzr_new -#define cr_tknzr_new_from_buf libtextstyle_cr_tknzr_new_from_buf -#define cr_tknzr_new_from_uri libtextstyle_cr_tknzr_new_from_uri -#define cr_tknzr_parse_token libtextstyle_cr_tknzr_parse_token -#define cr_tknzr_peek_byte libtextstyle_cr_tknzr_peek_byte -#define cr_tknzr_peek_byte2 libtextstyle_cr_tknzr_peek_byte2 -#define cr_tknzr_peek_char libtextstyle_cr_tknzr_peek_char -#define cr_tknzr_read_byte libtextstyle_cr_tknzr_read_byte -#define cr_tknzr_read_char libtextstyle_cr_tknzr_read_char -#define cr_tknzr_ref libtextstyle_cr_tknzr_ref -#define cr_tknzr_seek_index libtextstyle_cr_tknzr_seek_index -#define cr_tknzr_set_cur_pos libtextstyle_cr_tknzr_set_cur_pos -#define cr_tknzr_set_input libtextstyle_cr_tknzr_set_input -#define cr_tknzr_unget_token libtextstyle_cr_tknzr_unget_token -#define cr_tknzr_unref libtextstyle_cr_tknzr_unref -#define cr_token_destroy libtextstyle_cr_token_destroy -#define cr_token_new libtextstyle_cr_token_new -#define cr_token_set_angle libtextstyle_cr_token_set_angle -#define cr_token_set_atkeyword libtextstyle_cr_token_set_atkeyword -#define cr_token_set_bc libtextstyle_cr_token_set_bc -#define cr_token_set_bo libtextstyle_cr_token_set_bo -#define cr_token_set_cbc libtextstyle_cr_token_set_cbc -#define cr_token_set_cbo libtextstyle_cr_token_set_cbo -#define cr_token_set_cdc libtextstyle_cr_token_set_cdc -#define cr_token_set_cdo libtextstyle_cr_token_set_cdo -#define cr_token_set_charset_sym libtextstyle_cr_token_set_charset_sym -#define cr_token_set_comment libtextstyle_cr_token_set_comment -#define cr_token_set_dashmatch libtextstyle_cr_token_set_dashmatch -#define cr_token_set_delim libtextstyle_cr_token_set_delim -#define cr_token_set_dimen libtextstyle_cr_token_set_dimen -#define cr_token_set_ems libtextstyle_cr_token_set_ems -#define cr_token_set_exs libtextstyle_cr_token_set_exs -#define cr_token_set_font_face_sym libtextstyle_cr_token_set_font_face_sym -#define cr_token_set_freq libtextstyle_cr_token_set_freq -#define cr_token_set_function libtextstyle_cr_token_set_function -#define cr_token_set_hash libtextstyle_cr_token_set_hash -#define cr_token_set_ident libtextstyle_cr_token_set_ident -#define cr_token_set_import_sym libtextstyle_cr_token_set_import_sym -#define cr_token_set_important_sym libtextstyle_cr_token_set_important_sym -#define cr_token_set_includes libtextstyle_cr_token_set_includes -#define cr_token_set_length libtextstyle_cr_token_set_length -#define cr_token_set_media_sym libtextstyle_cr_token_set_media_sym -#define cr_token_set_number libtextstyle_cr_token_set_number -#define cr_token_set_page_sym libtextstyle_cr_token_set_page_sym -#define cr_token_set_pc libtextstyle_cr_token_set_pc -#define cr_token_set_percentage libtextstyle_cr_token_set_percentage -#define cr_token_set_po libtextstyle_cr_token_set_po -#define cr_token_set_rgb libtextstyle_cr_token_set_rgb -#define cr_token_set_s libtextstyle_cr_token_set_s -#define cr_token_set_semicolon libtextstyle_cr_token_set_semicolon -#define cr_token_set_string libtextstyle_cr_token_set_string -#define cr_token_set_time libtextstyle_cr_token_set_time -#define cr_token_set_uri libtextstyle_cr_token_set_uri -#define cr_utils_dump_n_chars libtextstyle_cr_utils_dump_n_chars -#define cr_utils_dump_n_chars2 libtextstyle_cr_utils_dump_n_chars2 -#define cr_utils_dup_glist_of_cr_string libtextstyle_cr_utils_dup_glist_of_cr_string -#define cr_utils_dup_glist_of_string libtextstyle_cr_utils_dup_glist_of_string -#define cr_utils_is_hexa_char libtextstyle_cr_utils_is_hexa_char -#define cr_utils_is_newline libtextstyle_cr_utils_is_newline -#define cr_utils_is_nonascii libtextstyle_cr_utils_is_nonascii -#define cr_utils_is_white_space libtextstyle_cr_utils_is_white_space -#define cr_utils_read_char_from_utf8_buf libtextstyle_cr_utils_read_char_from_utf8_buf -#define cr_utils_ucs1_str_len_as_utf8 libtextstyle_cr_utils_ucs1_str_len_as_utf8 -#define cr_utils_ucs1_str_to_utf8 libtextstyle_cr_utils_ucs1_str_to_utf8 -#define cr_utils_ucs1_to_utf8 libtextstyle_cr_utils_ucs1_to_utf8 -#define cr_utils_ucs4_str_len_as_utf8 libtextstyle_cr_utils_ucs4_str_len_as_utf8 -#define cr_utils_ucs4_str_to_utf8 libtextstyle_cr_utils_ucs4_str_to_utf8 -#define cr_utils_ucs4_to_utf8 libtextstyle_cr_utils_ucs4_to_utf8 -#define cr_utils_utf8_str_len_as_ucs1 libtextstyle_cr_utils_utf8_str_len_as_ucs1 -#define cr_utils_utf8_str_len_as_ucs4 libtextstyle_cr_utils_utf8_str_len_as_ucs4 -#define cr_utils_utf8_str_to_ucs1 libtextstyle_cr_utils_utf8_str_to_ucs1 -#define cr_utils_utf8_str_to_ucs4 libtextstyle_cr_utils_utf8_str_to_ucs4 -#define cr_utils_utf8_to_ucs1 libtextstyle_cr_utils_utf8_to_ucs1 -#define cr_utils_utf8_to_ucs4 libtextstyle_cr_utils_utf8_to_ucs4 -#define deactivate_term_non_default_mode libtextstyle_deactivate_term_non_default_mode -#define deactivate_term_style_controller libtextstyle_deactivate_term_style_controller -#define dup_cloexec libtextstyle_dup_cloexec -#define execute_all_close_hooks libtextstyle_execute_all_close_hooks -#define execute_all_ioctl_hooks libtextstyle_execute_all_ioctl_hooks -#define execute_close_hooks libtextstyle_execute_close_hooks -#define execute_ioctl_hooks libtextstyle_execute_ioctl_hooks -#define exit_failure libtextstyle_exit_failure -#define fd_ostream_typeinfo libtextstyle_fd_ostream_typeinfo -#define fd_ostream_vtable libtextstyle_fd_ostream_vtable -#define file_ostream_typeinfo libtextstyle_file_ostream_typeinfo -#define file_ostream_vtable libtextstyle_file_ostream_vtable -#define freea libtextstyle_freea -#define full_write libtextstyle_full_write -#define g_ascii_dtostr libtextstyle_g_ascii_dtostr -#define g_ascii_formatd libtextstyle_g_ascii_formatd -#define g_ascii_strcasecmp libtextstyle_g_ascii_strcasecmp -#define g_ascii_strup libtextstyle_g_ascii_strup -#define g_ascii_table libtextstyle_g_ascii_table -#define g_ascii_toupper libtextstyle_g_ascii_toupper -#define g_hash_table_insert libtextstyle_g_hash_table_insert -#define g_hash_table_lookup libtextstyle_g_hash_table_lookup -#define g_hash_table_new libtextstyle_g_hash_table_new -#define g_hash_table_new_full libtextstyle_g_hash_table_new_full -#define g_list_append libtextstyle_g_list_append -#define g_list_delete_link libtextstyle_g_list_delete_link -#define g_list_free libtextstyle_g_list_free -#define g_list_last libtextstyle_g_list_last -#define g_list_prepend libtextstyle_g_list_prepend -#define g_log libtextstyle_g_log -#define g_printerr libtextstyle_g_printerr -#define g_spaced_primes_closest libtextstyle_g_spaced_primes_closest -#define g_stpcpy libtextstyle_g_stpcpy -#define g_str_equal libtextstyle_g_str_equal -#define g_str_hash libtextstyle_g_str_hash -#define g_strconcat libtextstyle_g_strconcat -#define g_strdup libtextstyle_g_strdup -#define g_strdup_printf libtextstyle_g_strdup_printf -#define g_strdup_vprintf libtextstyle_g_strdup_vprintf -#define g_string_append libtextstyle_g_string_append -#define g_string_append_c libtextstyle_g_string_append_c -#define g_string_append_len libtextstyle_g_string_append_len -#define g_string_append_printf libtextstyle_g_string_append_printf -#define g_string_append_unichar libtextstyle_g_string_append_unichar -#define g_string_free libtextstyle_g_string_free -#define g_string_insert_c libtextstyle_g_string_insert_c -#define g_string_insert_len libtextstyle_g_string_insert_len -#define g_string_insert_unichar libtextstyle_g_string_insert_unichar -#define g_string_new libtextstyle_g_string_new -#define g_string_new_len libtextstyle_g_string_new_len -#define g_string_sized_new libtextstyle_g_string_sized_new -#define g_strndup libtextstyle_g_strndup -#define g_strstr_len libtextstyle_g_strstr_len -#define g_warning libtextstyle_g_warning -#define get_fatal_signal_set libtextstyle_get_fatal_signal_set -#define get_fatal_signals libtextstyle_get_fatal_signals -#define get_ppid_of libtextstyle_get_ppid_of -#define get_progname_of libtextstyle_get_progname_of -#define getprogname libtextstyle_getprogname -#define gl_array_list_implementation libtextstyle_gl_array_list_implementation -#define gl_sockets_cleanup libtextstyle_gl_sockets_cleanup -#define gl_sockets_startup libtextstyle_gl_sockets_startup -#define hash_destroy libtextstyle_hash_destroy -#define hash_find_entry libtextstyle_hash_find_entry -#define hash_init libtextstyle_hash_init -#define hash_insert_entry libtextstyle_hash_insert_entry -#define hash_iterate libtextstyle_hash_iterate -#define hash_iterate_modify libtextstyle_hash_iterate_modify -#define hash_set_value libtextstyle_hash_set_value -#define html_ostream_typeinfo libtextstyle_html_ostream_typeinfo -#define html_ostream_vtable libtextstyle_html_ostream_vtable -#define html_styled_ostream_typeinfo libtextstyle_html_styled_ostream_typeinfo -#define html_styled_ostream_vtable libtextstyle_html_styled_ostream_vtable -#define iconv_ostream_typeinfo libtextstyle_iconv_ostream_typeinfo -#define iconv_ostream_vtable libtextstyle_iconv_ostream_vtable -#define initGenericErrorDefaultFunc libtextstyle_initGenericErrorDefaultFunc -#define inputPop libtextstyle_inputPop -#define inputPush libtextstyle_inputPush -#define isolat1ToUTF8 libtextstyle_isolat1ToUTF8 -#define last_component libtextstyle_last_component -#define libxml_domnode_binary_insertion_sort libtextstyle_libxml_domnode_binary_insertion_sort -#define libxml_domnode_tim_sort libtextstyle_libxml_domnode_tim_sort -#define memory_ostream__contents libtextstyle_memory_ostream__contents -#define memory_ostream_typeinfo libtextstyle_memory_ostream_typeinfo -#define memory_ostream_vtable libtextstyle_memory_ostream_vtable -#define mmalloca libtextstyle_mmalloca -#define namePop libtextstyle_namePop -#define namePush libtextstyle_namePush -#define next_prime libtextstyle_next_prime -#define nodePop libtextstyle_nodePop -#define nodePush libtextstyle_nodePush -#define noop_styled_ostream_typeinfo libtextstyle_noop_styled_ostream_typeinfo -#define noop_styled_ostream_vtable libtextstyle_noop_styled_ostream_vtable -#define oldXMLWDcompatibility libtextstyle_oldXMLWDcompatibility -#define ostream__flush libtextstyle_ostream__flush -#define ostream__free libtextstyle_ostream__free -#define ostream__write_mem libtextstyle_ostream__write_mem -#define ostream_typeinfo libtextstyle_ostream_typeinfo -#define ostream_vtable libtextstyle_ostream_vtable -#define printf_frexp libtextstyle_printf_frexp -#define printf_frexpl libtextstyle_printf_frexpl -#define register_fd_hook libtextstyle_register_fd_hook -#define safe_read libtextstyle_safe_read -#define safe_write libtextstyle_safe_write -#define set_cloexec_flag libtextstyle_set_cloexec_flag -#define styled_ostream__begin_use_class libtextstyle_styled_ostream__begin_use_class -#define styled_ostream__end_use_class libtextstyle_styled_ostream__end_use_class -#define styled_ostream__flush libtextstyle_styled_ostream__flush -#define styled_ostream__flush_to_current_style libtextstyle_styled_ostream__flush_to_current_style -#define styled_ostream__free libtextstyle_styled_ostream__free -#define styled_ostream__get_hyperlink_id libtextstyle_styled_ostream__get_hyperlink_id -#define styled_ostream__get_hyperlink_ref libtextstyle_styled_ostream__get_hyperlink_ref -#define styled_ostream__set_hyperlink libtextstyle_styled_ostream__set_hyperlink -#define styled_ostream__write_mem libtextstyle_styled_ostream__write_mem -#define styled_ostream_typeinfo libtextstyle_styled_ostream_typeinfo -#define styled_ostream_vtable libtextstyle_styled_ostream_vtable -#define term_ostream_typeinfo libtextstyle_term_ostream_typeinfo -#define term_ostream_vtable libtextstyle_term_ostream_vtable -#define term_styled_ostream_typeinfo libtextstyle_term_styled_ostream_typeinfo -#define term_styled_ostream_vtable libtextstyle_term_styled_ostream_vtable -#define u8_mbtouc libtextstyle_u8_mbtouc -#define unblock_fatal_signals libtextstyle_unblock_fatal_signals -#define unregister_fd_hook libtextstyle_unregister_fd_hook -#define x2realloc libtextstyle_x2realloc -#define xalloc_die libtextstyle_xalloc_die -#define xasprintf libtextstyle_xasprintf -#define xcalloc libtextstyle_xcalloc -#define xconcatenated_filename libtextstyle_xconcatenated_filename -#define xgethostname libtextstyle_xgethostname -#define xmalloc libtextstyle_xmalloc -#define xmalloc_exit_failure libtextstyle_xmalloc_exit_failure -#define xmemdup libtextstyle_xmemdup -#define xmlAddAttributeDecl libtextstyle_xmlAddAttributeDecl -#define xmlAddChild libtextstyle_xmlAddChild -#define xmlAddChildList libtextstyle_xmlAddChildList -#define xmlAddDocEntity libtextstyle_xmlAddDocEntity -#define xmlAddDtdEntity libtextstyle_xmlAddDtdEntity -#define xmlAddElementDecl libtextstyle_xmlAddElementDecl -#define xmlAddEncodingAlias libtextstyle_xmlAddEncodingAlias -#define xmlAddID libtextstyle_xmlAddID -#define xmlAddNextSibling libtextstyle_xmlAddNextSibling -#define xmlAddNotationDecl libtextstyle_xmlAddNotationDecl -#define xmlAddPrevSibling libtextstyle_xmlAddPrevSibling -#define xmlAddRef libtextstyle_xmlAddRef -#define xmlAddSibling libtextstyle_xmlAddSibling -#define xmlAllocParserInputBuffer libtextstyle_xmlAllocParserInputBuffer -#define xmlBufAdd libtextstyle_xmlBufAdd -#define xmlBufAddHead libtextstyle_xmlBufAddHead -#define xmlBufAddLen libtextstyle_xmlBufAddLen -#define xmlBufAvail libtextstyle_xmlBufAvail -#define xmlBufBackToBuffer libtextstyle_xmlBufBackToBuffer -#define xmlBufCCat libtextstyle_xmlBufCCat -#define xmlBufCat libtextstyle_xmlBufCat -#define xmlBufContent libtextstyle_xmlBufContent -#define xmlBufCreate libtextstyle_xmlBufCreate -#define xmlBufCreateSize libtextstyle_xmlBufCreateSize -#define xmlBufCreateStatic libtextstyle_xmlBufCreateStatic -#define xmlBufDetach libtextstyle_xmlBufDetach -#define xmlBufDump libtextstyle_xmlBufDump -#define xmlBufEmpty libtextstyle_xmlBufEmpty -#define xmlBufEnd libtextstyle_xmlBufEnd -#define xmlBufErase libtextstyle_xmlBufErase -#define xmlBufFree libtextstyle_xmlBufFree -#define xmlBufFromBuffer libtextstyle_xmlBufFromBuffer -#define xmlBufGetAllocationScheme libtextstyle_xmlBufGetAllocationScheme -#define xmlBufGetInputBase libtextstyle_xmlBufGetInputBase -#define xmlBufGetNodeContent libtextstyle_xmlBufGetNodeContent -#define xmlBufGrow libtextstyle_xmlBufGrow -#define xmlBufInflate libtextstyle_xmlBufInflate -#define xmlBufIsEmpty libtextstyle_xmlBufIsEmpty -#define xmlBufLength libtextstyle_xmlBufLength -#define xmlBufMergeBuffer libtextstyle_xmlBufMergeBuffer -#define xmlBufResetInput libtextstyle_xmlBufResetInput -#define xmlBufResize libtextstyle_xmlBufResize -#define xmlBufSetAllocationScheme libtextstyle_xmlBufSetAllocationScheme -#define xmlBufSetInputBaseCur libtextstyle_xmlBufSetInputBaseCur -#define xmlBufShrink libtextstyle_xmlBufShrink -#define xmlBufUse libtextstyle_xmlBufUse -#define xmlBufWriteCHAR libtextstyle_xmlBufWriteCHAR -#define xmlBufWriteChar libtextstyle_xmlBufWriteChar -#define xmlBufWriteQuotedString libtextstyle_xmlBufWriteQuotedString -#define xmlBufferAdd libtextstyle_xmlBufferAdd -#define xmlBufferAddHead libtextstyle_xmlBufferAddHead -#define xmlBufferAllocScheme libtextstyle_xmlBufferAllocScheme -#define xmlBufferCCat libtextstyle_xmlBufferCCat -#define xmlBufferCat libtextstyle_xmlBufferCat -#define xmlBufferContent libtextstyle_xmlBufferContent -#define xmlBufferCreate libtextstyle_xmlBufferCreate -#define xmlBufferCreateSize libtextstyle_xmlBufferCreateSize -#define xmlBufferCreateStatic libtextstyle_xmlBufferCreateStatic -#define xmlBufferDetach libtextstyle_xmlBufferDetach -#define xmlBufferDump libtextstyle_xmlBufferDump -#define xmlBufferEmpty libtextstyle_xmlBufferEmpty -#define xmlBufferFree libtextstyle_xmlBufferFree -#define xmlBufferGrow libtextstyle_xmlBufferGrow -#define xmlBufferLength libtextstyle_xmlBufferLength -#define xmlBufferResize libtextstyle_xmlBufferResize -#define xmlBufferSetAllocationScheme libtextstyle_xmlBufferSetAllocationScheme -#define xmlBufferShrink libtextstyle_xmlBufferShrink -#define xmlBufferWriteCHAR libtextstyle_xmlBufferWriteCHAR -#define xmlBufferWriteChar libtextstyle_xmlBufferWriteChar -#define xmlBufferWriteQuotedString libtextstyle_xmlBufferWriteQuotedString -#define xmlBuildQName libtextstyle_xmlBuildQName -#define xmlBuildRelativeURI libtextstyle_xmlBuildRelativeURI -#define xmlBuildURI libtextstyle_xmlBuildURI -#define xmlByteConsumed libtextstyle_xmlByteConsumed -#define xmlCanonicPath libtextstyle_xmlCanonicPath -#define xmlCharEncCloseFunc libtextstyle_xmlCharEncCloseFunc -#define xmlCharEncFirstLine libtextstyle_xmlCharEncFirstLine -#define xmlCharEncFirstLineInput libtextstyle_xmlCharEncFirstLineInput -#define xmlCharEncFirstLineInt libtextstyle_xmlCharEncFirstLineInt -#define xmlCharEncInFunc libtextstyle_xmlCharEncInFunc -#define xmlCharEncInput libtextstyle_xmlCharEncInput -#define xmlCharEncOutFunc libtextstyle_xmlCharEncOutFunc -#define xmlCharInRange libtextstyle_xmlCharInRange -#define xmlCharStrdup libtextstyle_xmlCharStrdup -#define xmlCharStrndup libtextstyle_xmlCharStrndup -#define xmlCheckFilename libtextstyle_xmlCheckFilename -#define xmlCheckHTTPInput libtextstyle_xmlCheckHTTPInput -#define xmlCheckLanguageID libtextstyle_xmlCheckLanguageID -#define xmlCheckUTF8 libtextstyle_xmlCheckUTF8 -#define xmlCheckVersion libtextstyle_xmlCheckVersion -#define xmlChildElementCount libtextstyle_xmlChildElementCount -#define xmlCleanupCharEncodingHandlers libtextstyle_xmlCleanupCharEncodingHandlers -#define xmlCleanupEncodingAliases libtextstyle_xmlCleanupEncodingAliases -#define xmlCleanupGlobals libtextstyle_xmlCleanupGlobals -#define xmlCleanupInputCallbacks libtextstyle_xmlCleanupInputCallbacks -#define xmlCleanupMemory libtextstyle_xmlCleanupMemory -#define xmlCleanupParser libtextstyle_xmlCleanupParser -#define xmlCleanupThreads libtextstyle_xmlCleanupThreads -#define xmlClearNodeInfoSeq libtextstyle_xmlClearNodeInfoSeq -#define xmlClearParserCtxt libtextstyle_xmlClearParserCtxt -#define xmlCopyAttributeTable libtextstyle_xmlCopyAttributeTable -#define xmlCopyChar libtextstyle_xmlCopyChar -#define xmlCopyCharMultiByte libtextstyle_xmlCopyCharMultiByte -#define xmlCopyDoc libtextstyle_xmlCopyDoc -#define xmlCopyDocElementContent libtextstyle_xmlCopyDocElementContent -#define xmlCopyDtd libtextstyle_xmlCopyDtd -#define xmlCopyElementContent libtextstyle_xmlCopyElementContent -#define xmlCopyElementTable libtextstyle_xmlCopyElementTable -#define xmlCopyEntitiesTable libtextstyle_xmlCopyEntitiesTable -#define xmlCopyEnumeration libtextstyle_xmlCopyEnumeration -#define xmlCopyError libtextstyle_xmlCopyError -#define xmlCopyNamespace libtextstyle_xmlCopyNamespace -#define xmlCopyNamespaceList libtextstyle_xmlCopyNamespaceList -#define xmlCopyNode libtextstyle_xmlCopyNode -#define xmlCopyNodeList libtextstyle_xmlCopyNodeList -#define xmlCopyNotationTable libtextstyle_xmlCopyNotationTable -#define xmlCopyProp libtextstyle_xmlCopyProp -#define xmlCopyPropList libtextstyle_xmlCopyPropList -#define xmlCreateDocParserCtxt libtextstyle_xmlCreateDocParserCtxt -#define xmlCreateEntitiesTable libtextstyle_xmlCreateEntitiesTable -#define xmlCreateEntityParserCtxt libtextstyle_xmlCreateEntityParserCtxt -#define xmlCreateEnumeration libtextstyle_xmlCreateEnumeration -#define xmlCreateFileParserCtxt libtextstyle_xmlCreateFileParserCtxt -#define xmlCreateIOParserCtxt libtextstyle_xmlCreateIOParserCtxt -#define xmlCreateIntSubset libtextstyle_xmlCreateIntSubset -#define xmlCreateMemoryParserCtxt libtextstyle_xmlCreateMemoryParserCtxt -#define xmlCreateURI libtextstyle_xmlCreateURI -#define xmlCreateURLParserCtxt libtextstyle_xmlCreateURLParserCtxt -#define xmlCtxtGetLastError libtextstyle_xmlCtxtGetLastError -#define xmlCtxtReadDoc libtextstyle_xmlCtxtReadDoc -#define xmlCtxtReadFd libtextstyle_xmlCtxtReadFd -#define xmlCtxtReadFile libtextstyle_xmlCtxtReadFile -#define xmlCtxtReadIO libtextstyle_xmlCtxtReadIO -#define xmlCtxtReadMemory libtextstyle_xmlCtxtReadMemory -#define xmlCtxtReset libtextstyle_xmlCtxtReset -#define xmlCtxtResetLastError libtextstyle_xmlCtxtResetLastError -#define xmlCtxtResetPush libtextstyle_xmlCtxtResetPush -#define xmlCtxtUseOptions libtextstyle_xmlCtxtUseOptions -#define xmlCurrentChar libtextstyle_xmlCurrentChar -#define xmlDOMWrapAdoptNode libtextstyle_xmlDOMWrapAdoptNode -#define xmlDOMWrapCloneNode libtextstyle_xmlDOMWrapCloneNode -#define xmlDOMWrapFreeCtxt libtextstyle_xmlDOMWrapFreeCtxt -#define xmlDOMWrapNewCtxt libtextstyle_xmlDOMWrapNewCtxt -#define xmlDOMWrapReconcileNamespaces libtextstyle_xmlDOMWrapReconcileNamespaces -#define xmlDOMWrapRemoveNode libtextstyle_xmlDOMWrapRemoveNode -#define xmlDefaultBufferSize libtextstyle_xmlDefaultBufferSize -#define xmlDefaultSAXHandlerInit libtextstyle_xmlDefaultSAXHandlerInit -#define xmlDefaultSAXLocator libtextstyle_xmlDefaultSAXLocator -#define xmlDelEncodingAlias libtextstyle_xmlDelEncodingAlias -#define xmlDeregisterNodeDefault libtextstyle_xmlDeregisterNodeDefault -#define xmlDeregisterNodeDefaultValue libtextstyle_xmlDeregisterNodeDefaultValue -#define xmlDetectCharEncoding libtextstyle_xmlDetectCharEncoding -#define xmlDictCleanup libtextstyle_xmlDictCleanup -#define xmlDictCreate libtextstyle_xmlDictCreate -#define xmlDictCreateSub libtextstyle_xmlDictCreateSub -#define xmlDictExists libtextstyle_xmlDictExists -#define xmlDictFree libtextstyle_xmlDictFree -#define xmlDictGetUsage libtextstyle_xmlDictGetUsage -#define xmlDictLookup libtextstyle_xmlDictLookup -#define xmlDictOwns libtextstyle_xmlDictOwns -#define xmlDictQLookup libtextstyle_xmlDictQLookup -#define xmlDictReference libtextstyle_xmlDictReference -#define xmlDictSetLimit libtextstyle_xmlDictSetLimit -#define xmlDictSize libtextstyle_xmlDictSize -#define xmlDoValidityCheckingDefaultValue libtextstyle_xmlDoValidityCheckingDefaultValue -#define xmlDocCopyNode libtextstyle_xmlDocCopyNode -#define xmlDocCopyNodeList libtextstyle_xmlDocCopyNodeList -#define xmlDocGetRootElement libtextstyle_xmlDocGetRootElement -#define xmlDocSetRootElement libtextstyle_xmlDocSetRootElement -#define xmlEncodeAttributeEntities libtextstyle_xmlEncodeAttributeEntities -#define xmlEncodeEntitiesReentrant libtextstyle_xmlEncodeEntitiesReentrant -#define xmlEncodeSpecialChars libtextstyle_xmlEncodeSpecialChars -#define xmlErrMemory libtextstyle_xmlErrMemory -#define xmlEscapeFormatString libtextstyle_xmlEscapeFormatString -#define xmlFileClose libtextstyle_xmlFileClose -#define xmlFileMatch libtextstyle_xmlFileMatch -#define xmlFileOpen libtextstyle_xmlFileOpen -#define xmlFileRead libtextstyle_xmlFileRead -#define xmlFindCharEncodingHandler libtextstyle_xmlFindCharEncodingHandler -#define xmlFirstElementChild libtextstyle_xmlFirstElementChild -#define xmlFree libtextstyle_xmlFree -#define xmlFreeAttributeTable libtextstyle_xmlFreeAttributeTable -#define xmlFreeDoc libtextstyle_xmlFreeDoc -#define xmlFreeDocElementContent libtextstyle_xmlFreeDocElementContent -#define xmlFreeDtd libtextstyle_xmlFreeDtd -#define xmlFreeElementContent libtextstyle_xmlFreeElementContent -#define xmlFreeElementTable libtextstyle_xmlFreeElementTable -#define xmlFreeEntitiesTable libtextstyle_xmlFreeEntitiesTable -#define xmlFreeEnumeration libtextstyle_xmlFreeEnumeration -#define xmlFreeIDTable libtextstyle_xmlFreeIDTable -#define xmlFreeInputStream libtextstyle_xmlFreeInputStream -#define xmlFreeMutex libtextstyle_xmlFreeMutex -#define xmlFreeNode libtextstyle_xmlFreeNode -#define xmlFreeNodeList libtextstyle_xmlFreeNodeList -#define xmlFreeNotationTable libtextstyle_xmlFreeNotationTable -#define xmlFreeNs libtextstyle_xmlFreeNs -#define xmlFreeNsList libtextstyle_xmlFreeNsList -#define xmlFreeParserCtxt libtextstyle_xmlFreeParserCtxt -#define xmlFreeParserInputBuffer libtextstyle_xmlFreeParserInputBuffer -#define xmlFreeProp libtextstyle_xmlFreeProp -#define xmlFreePropList libtextstyle_xmlFreePropList -#define xmlFreeRMutex libtextstyle_xmlFreeRMutex -#define xmlFreeRefTable libtextstyle_xmlFreeRefTable -#define xmlFreeURI libtextstyle_xmlFreeURI -#define xmlGcMemGet libtextstyle_xmlGcMemGet -#define xmlGcMemSetup libtextstyle_xmlGcMemSetup -#define xmlGenericError libtextstyle_xmlGenericError -#define xmlGenericErrorContext libtextstyle_xmlGenericErrorContext -#define xmlGenericErrorDefaultFunc libtextstyle_xmlGenericErrorDefaultFunc -#define xmlGetBufferAllocationScheme libtextstyle_xmlGetBufferAllocationScheme -#define xmlGetCharEncodingHandler libtextstyle_xmlGetCharEncodingHandler -#define xmlGetCharEncodingName libtextstyle_xmlGetCharEncodingName -#define xmlGetCompressMode libtextstyle_xmlGetCompressMode -#define xmlGetDocCompressMode libtextstyle_xmlGetDocCompressMode -#define xmlGetDocEntity libtextstyle_xmlGetDocEntity -#define xmlGetDtdAttrDesc libtextstyle_xmlGetDtdAttrDesc -#define xmlGetDtdElementDesc libtextstyle_xmlGetDtdElementDesc -#define xmlGetDtdEntity libtextstyle_xmlGetDtdEntity -#define xmlGetDtdNotationDesc libtextstyle_xmlGetDtdNotationDesc -#define xmlGetDtdQAttrDesc libtextstyle_xmlGetDtdQAttrDesc -#define xmlGetDtdQElementDesc libtextstyle_xmlGetDtdQElementDesc -#define xmlGetEncodingAlias libtextstyle_xmlGetEncodingAlias -#define xmlGetExternalEntityLoader libtextstyle_xmlGetExternalEntityLoader -#define xmlGetGlobalState libtextstyle_xmlGetGlobalState -#define xmlGetID libtextstyle_xmlGetID -#define xmlGetIntSubset libtextstyle_xmlGetIntSubset -#define xmlGetLastChild libtextstyle_xmlGetLastChild -#define xmlGetLastError libtextstyle_xmlGetLastError -#define xmlGetLineNo libtextstyle_xmlGetLineNo -#define xmlGetNoNsProp libtextstyle_xmlGetNoNsProp -#define xmlGetNodePath libtextstyle_xmlGetNodePath -#define xmlGetNsList libtextstyle_xmlGetNsList -#define xmlGetNsProp libtextstyle_xmlGetNsProp -#define xmlGetParameterEntity libtextstyle_xmlGetParameterEntity -#define xmlGetPredefinedEntity libtextstyle_xmlGetPredefinedEntity -#define xmlGetProp libtextstyle_xmlGetProp -#define xmlGetRefs libtextstyle_xmlGetRefs -#define xmlGetThreadId libtextstyle_xmlGetThreadId -#define xmlGetUTF8Char libtextstyle_xmlGetUTF8Char -#define xmlGetWarningsDefaultValue libtextstyle_xmlGetWarningsDefaultValue -#define xmlHasFeature libtextstyle_xmlHasFeature -#define xmlHasNsProp libtextstyle_xmlHasNsProp -#define xmlHasProp libtextstyle_xmlHasProp -#define xmlHashAddEntry libtextstyle_xmlHashAddEntry -#define xmlHashAddEntry2 libtextstyle_xmlHashAddEntry2 -#define xmlHashAddEntry3 libtextstyle_xmlHashAddEntry3 -#define xmlHashCopy libtextstyle_xmlHashCopy -#define xmlHashCreate libtextstyle_xmlHashCreate -#define xmlHashCreateDict libtextstyle_xmlHashCreateDict -#define xmlHashDefaultDeallocator libtextstyle_xmlHashDefaultDeallocator -#define xmlHashFree libtextstyle_xmlHashFree -#define xmlHashLookup libtextstyle_xmlHashLookup -#define xmlHashLookup2 libtextstyle_xmlHashLookup2 -#define xmlHashLookup3 libtextstyle_xmlHashLookup3 -#define xmlHashQLookup libtextstyle_xmlHashQLookup -#define xmlHashQLookup2 libtextstyle_xmlHashQLookup2 -#define xmlHashQLookup3 libtextstyle_xmlHashQLookup3 -#define xmlHashRemoveEntry libtextstyle_xmlHashRemoveEntry -#define xmlHashRemoveEntry2 libtextstyle_xmlHashRemoveEntry2 -#define xmlHashRemoveEntry3 libtextstyle_xmlHashRemoveEntry3 -#define xmlHashScan libtextstyle_xmlHashScan -#define xmlHashScan3 libtextstyle_xmlHashScan3 -#define xmlHashScanFull libtextstyle_xmlHashScanFull -#define xmlHashScanFull3 libtextstyle_xmlHashScanFull3 -#define xmlHashSize libtextstyle_xmlHashSize -#define xmlHashUpdateEntry libtextstyle_xmlHashUpdateEntry -#define xmlHashUpdateEntry2 libtextstyle_xmlHashUpdateEntry2 -#define xmlHashUpdateEntry3 libtextstyle_xmlHashUpdateEntry3 -#define xmlIndentTreeOutput libtextstyle_xmlIndentTreeOutput -#define xmlInitCharEncodingHandlers libtextstyle_xmlInitCharEncodingHandlers -#define xmlInitGlobals libtextstyle_xmlInitGlobals -#define xmlInitMemory libtextstyle_xmlInitMemory -#define xmlInitNodeInfoSeq libtextstyle_xmlInitNodeInfoSeq -#define xmlInitParser libtextstyle_xmlInitParser -#define xmlInitParserCtxt libtextstyle_xmlInitParserCtxt -#define xmlInitThreads libtextstyle_xmlInitThreads -#define xmlInitializeDict libtextstyle_xmlInitializeDict -#define xmlInitializeGlobalState libtextstyle_xmlInitializeGlobalState -#define xmlInputReadCallbackNop libtextstyle_xmlInputReadCallbackNop -#define xmlIsBaseChar libtextstyle_xmlIsBaseChar -#define xmlIsBaseCharGroup libtextstyle_xmlIsBaseCharGroup -#define xmlIsBlank libtextstyle_xmlIsBlank -#define xmlIsBlankNode libtextstyle_xmlIsBlankNode -#define xmlIsChar libtextstyle_xmlIsChar -#define xmlIsCharGroup libtextstyle_xmlIsCharGroup -#define xmlIsCombining libtextstyle_xmlIsCombining -#define xmlIsCombiningGroup libtextstyle_xmlIsCombiningGroup -#define xmlIsDigit libtextstyle_xmlIsDigit -#define xmlIsDigitGroup libtextstyle_xmlIsDigitGroup -#define xmlIsExtender libtextstyle_xmlIsExtender -#define xmlIsExtenderGroup libtextstyle_xmlIsExtenderGroup -#define xmlIsID libtextstyle_xmlIsID -#define xmlIsIdeographic libtextstyle_xmlIsIdeographic -#define xmlIsIdeographicGroup libtextstyle_xmlIsIdeographicGroup -#define xmlIsLetter libtextstyle_xmlIsLetter -#define xmlIsMainThread libtextstyle_xmlIsMainThread -#define xmlIsMixedElement libtextstyle_xmlIsMixedElement -#define xmlIsPubidChar libtextstyle_xmlIsPubidChar -#define xmlIsPubidChar_tab libtextstyle_xmlIsPubidChar_tab -#define xmlIsRef libtextstyle_xmlIsRef -#define xmlIsXHTML libtextstyle_xmlIsXHTML -#define xmlKeepBlanksDefault libtextstyle_xmlKeepBlanksDefault -#define xmlKeepBlanksDefaultValue libtextstyle_xmlKeepBlanksDefaultValue -#define xmlLastElementChild libtextstyle_xmlLastElementChild -#define xmlLastError libtextstyle_xmlLastError -#define xmlLineNumbersDefault libtextstyle_xmlLineNumbersDefault -#define xmlLineNumbersDefaultValue libtextstyle_xmlLineNumbersDefaultValue -#define xmlLinkGetData libtextstyle_xmlLinkGetData -#define xmlListAppend libtextstyle_xmlListAppend -#define xmlListClear libtextstyle_xmlListClear -#define xmlListCopy libtextstyle_xmlListCopy -#define xmlListCreate libtextstyle_xmlListCreate -#define xmlListDelete libtextstyle_xmlListDelete -#define xmlListDup libtextstyle_xmlListDup -#define xmlListEmpty libtextstyle_xmlListEmpty -#define xmlListEnd libtextstyle_xmlListEnd -#define xmlListFront libtextstyle_xmlListFront -#define xmlListInsert libtextstyle_xmlListInsert -#define xmlListMerge libtextstyle_xmlListMerge -#define xmlListPopBack libtextstyle_xmlListPopBack -#define xmlListPopFront libtextstyle_xmlListPopFront -#define xmlListPushBack libtextstyle_xmlListPushBack -#define xmlListPushFront libtextstyle_xmlListPushFront -#define xmlListRemoveAll libtextstyle_xmlListRemoveAll -#define xmlListRemoveFirst libtextstyle_xmlListRemoveFirst -#define xmlListRemoveLast libtextstyle_xmlListRemoveLast -#define xmlListReverse libtextstyle_xmlListReverse -#define xmlListReverseSearch libtextstyle_xmlListReverseSearch -#define xmlListReverseWalk libtextstyle_xmlListReverseWalk -#define xmlListSearch libtextstyle_xmlListSearch -#define xmlListSize libtextstyle_xmlListSize -#define xmlListSort libtextstyle_xmlListSort -#define xmlListWalk libtextstyle_xmlListWalk -#define xmlLoadExtDtdDefaultValue libtextstyle_xmlLoadExtDtdDefaultValue -#define xmlLoadExternalEntity libtextstyle_xmlLoadExternalEntity -#define xmlLockLibrary libtextstyle_xmlLockLibrary -#define xmlMalloc libtextstyle_xmlMalloc -#define xmlMallocAtomic libtextstyle_xmlMallocAtomic -#define xmlMallocAtomicLoc libtextstyle_xmlMallocAtomicLoc -#define xmlMallocBreakpoint libtextstyle_xmlMallocBreakpoint -#define xmlMallocLoc libtextstyle_xmlMallocLoc -#define xmlMemBlocks libtextstyle_xmlMemBlocks -#define xmlMemDisplay libtextstyle_xmlMemDisplay -#define xmlMemDisplayLast libtextstyle_xmlMemDisplayLast -#define xmlMemFree libtextstyle_xmlMemFree -#define xmlMemGet libtextstyle_xmlMemGet -#define xmlMemMalloc libtextstyle_xmlMemMalloc -#define xmlMemRealloc libtextstyle_xmlMemRealloc -#define xmlMemSetup libtextstyle_xmlMemSetup -#define xmlMemShow libtextstyle_xmlMemShow -#define xmlMemStrdup libtextstyle_xmlMemStrdup -#define xmlMemStrdupLoc libtextstyle_xmlMemStrdupLoc -#define xmlMemUsed libtextstyle_xmlMemUsed -#define xmlMemoryDump libtextstyle_xmlMemoryDump -#define xmlMemoryStrdup libtextstyle_xmlMemoryStrdup -#define xmlMutexLock libtextstyle_xmlMutexLock -#define xmlMutexUnlock libtextstyle_xmlMutexUnlock -#define xmlNewCDataBlock libtextstyle_xmlNewCDataBlock -#define xmlNewCharEncodingHandler libtextstyle_xmlNewCharEncodingHandler -#define xmlNewCharRef libtextstyle_xmlNewCharRef -#define xmlNewChild libtextstyle_xmlNewChild -#define xmlNewComment libtextstyle_xmlNewComment -#define xmlNewDoc libtextstyle_xmlNewDoc -#define xmlNewDocComment libtextstyle_xmlNewDocComment -#define xmlNewDocElementContent libtextstyle_xmlNewDocElementContent -#define xmlNewDocFragment libtextstyle_xmlNewDocFragment -#define xmlNewDocNode libtextstyle_xmlNewDocNode -#define xmlNewDocNodeEatName libtextstyle_xmlNewDocNodeEatName -#define xmlNewDocPI libtextstyle_xmlNewDocPI -#define xmlNewDocProp libtextstyle_xmlNewDocProp -#define xmlNewDocRawNode libtextstyle_xmlNewDocRawNode -#define xmlNewDocText libtextstyle_xmlNewDocText -#define xmlNewDocTextLen libtextstyle_xmlNewDocTextLen -#define xmlNewDtd libtextstyle_xmlNewDtd -#define xmlNewElementContent libtextstyle_xmlNewElementContent -#define xmlNewEntity libtextstyle_xmlNewEntity -#define xmlNewEntityInputStream libtextstyle_xmlNewEntityInputStream -#define xmlNewIOInputStream libtextstyle_xmlNewIOInputStream -#define xmlNewInputFromFile libtextstyle_xmlNewInputFromFile -#define xmlNewInputStream libtextstyle_xmlNewInputStream -#define xmlNewMutex libtextstyle_xmlNewMutex -#define xmlNewNode libtextstyle_xmlNewNode -#define xmlNewNodeEatName libtextstyle_xmlNewNodeEatName -#define xmlNewNs libtextstyle_xmlNewNs -#define xmlNewNsProp libtextstyle_xmlNewNsProp -#define xmlNewNsPropEatName libtextstyle_xmlNewNsPropEatName -#define xmlNewPI libtextstyle_xmlNewPI -#define xmlNewParserCtxt libtextstyle_xmlNewParserCtxt -#define xmlNewProp libtextstyle_xmlNewProp -#define xmlNewRMutex libtextstyle_xmlNewRMutex -#define xmlNewReference libtextstyle_xmlNewReference -#define xmlNewStringInputStream libtextstyle_xmlNewStringInputStream -#define xmlNewText libtextstyle_xmlNewText -#define xmlNewTextChild libtextstyle_xmlNewTextChild -#define xmlNewTextLen libtextstyle_xmlNewTextLen -#define xmlNextChar libtextstyle_xmlNextChar -#define xmlNextElementSibling libtextstyle_xmlNextElementSibling -#define xmlNoNetExternalEntityLoader libtextstyle_xmlNoNetExternalEntityLoader -#define xmlNodeAddContent libtextstyle_xmlNodeAddContent -#define xmlNodeAddContentLen libtextstyle_xmlNodeAddContentLen -#define xmlNodeBufGetContent libtextstyle_xmlNodeBufGetContent -#define xmlNodeGetBase libtextstyle_xmlNodeGetBase -#define xmlNodeGetContent libtextstyle_xmlNodeGetContent -#define xmlNodeGetLang libtextstyle_xmlNodeGetLang -#define xmlNodeGetSpacePreserve libtextstyle_xmlNodeGetSpacePreserve -#define xmlNodeIsText libtextstyle_xmlNodeIsText -#define xmlNodeListGetRawString libtextstyle_xmlNodeListGetRawString -#define xmlNodeListGetString libtextstyle_xmlNodeListGetString -#define xmlNodeSetBase libtextstyle_xmlNodeSetBase -#define xmlNodeSetContent libtextstyle_xmlNodeSetContent -#define xmlNodeSetContentLen libtextstyle_xmlNodeSetContentLen -#define xmlNodeSetLang libtextstyle_xmlNodeSetLang -#define xmlNodeSetName libtextstyle_xmlNodeSetName -#define xmlNodeSetSpacePreserve libtextstyle_xmlNodeSetSpacePreserve -#define xmlNormalizeURIPath libtextstyle_xmlNormalizeURIPath -#define xmlNormalizeWindowsPath libtextstyle_xmlNormalizeWindowsPath -#define xmlOutputBufferCreateFilenameDefault libtextstyle_xmlOutputBufferCreateFilenameDefault -#define xmlOutputBufferCreateFilenameValue libtextstyle_xmlOutputBufferCreateFilenameValue -#define xmlParseAttValue libtextstyle_xmlParseAttValue -#define xmlParseAttributeListDecl libtextstyle_xmlParseAttributeListDecl -#define xmlParseAttributeType libtextstyle_xmlParseAttributeType -#define xmlParseCDSect libtextstyle_xmlParseCDSect -#define xmlParseCharData libtextstyle_xmlParseCharData -#define xmlParseCharEncoding libtextstyle_xmlParseCharEncoding -#define xmlParseCharRef libtextstyle_xmlParseCharRef -#define xmlParseComment libtextstyle_xmlParseComment -#define xmlParseContent libtextstyle_xmlParseContent -#define xmlParseCtxtExternalEntity libtextstyle_xmlParseCtxtExternalEntity -#define xmlParseDefaultDecl libtextstyle_xmlParseDefaultDecl -#define xmlParseDocTypeDecl libtextstyle_xmlParseDocTypeDecl -#define xmlParseDocument libtextstyle_xmlParseDocument -#define xmlParseElement libtextstyle_xmlParseElement -#define xmlParseElementChildrenContentDecl libtextstyle_xmlParseElementChildrenContentDecl -#define xmlParseElementContentDecl libtextstyle_xmlParseElementContentDecl -#define xmlParseElementDecl libtextstyle_xmlParseElementDecl -#define xmlParseElementMixedContentDecl libtextstyle_xmlParseElementMixedContentDecl -#define xmlParseEncName libtextstyle_xmlParseEncName -#define xmlParseEncodingDecl libtextstyle_xmlParseEncodingDecl -#define xmlParseEntityDecl libtextstyle_xmlParseEntityDecl -#define xmlParseEntityRef libtextstyle_xmlParseEntityRef -#define xmlParseEntityValue libtextstyle_xmlParseEntityValue -#define xmlParseEnumeratedType libtextstyle_xmlParseEnumeratedType -#define xmlParseEnumerationType libtextstyle_xmlParseEnumerationType -#define xmlParseExtParsedEnt libtextstyle_xmlParseExtParsedEnt -#define xmlParseExternalID libtextstyle_xmlParseExternalID -#define xmlParseExternalSubset libtextstyle_xmlParseExternalSubset -#define xmlParseInNodeContext libtextstyle_xmlParseInNodeContext -#define xmlParseMarkupDecl libtextstyle_xmlParseMarkupDecl -#define xmlParseMisc libtextstyle_xmlParseMisc -#define xmlParseName libtextstyle_xmlParseName -#define xmlParseNmtoken libtextstyle_xmlParseNmtoken -#define xmlParseNotationDecl libtextstyle_xmlParseNotationDecl -#define xmlParseNotationType libtextstyle_xmlParseNotationType -#define xmlParsePEReference libtextstyle_xmlParsePEReference -#define xmlParsePI libtextstyle_xmlParsePI -#define xmlParsePITarget libtextstyle_xmlParsePITarget -#define xmlParsePubidLiteral libtextstyle_xmlParsePubidLiteral -#define xmlParseReference libtextstyle_xmlParseReference -#define xmlParseSDDecl libtextstyle_xmlParseSDDecl -#define xmlParseSystemLiteral libtextstyle_xmlParseSystemLiteral -#define xmlParseTextDecl libtextstyle_xmlParseTextDecl -#define xmlParseURI libtextstyle_xmlParseURI -#define xmlParseURIRaw libtextstyle_xmlParseURIRaw -#define xmlParseURIReference libtextstyle_xmlParseURIReference -#define xmlParseVersionInfo libtextstyle_xmlParseVersionInfo -#define xmlParseVersionNum libtextstyle_xmlParseVersionNum -#define xmlParseXMLDecl libtextstyle_xmlParseXMLDecl -#define xmlParserAddNodeInfo libtextstyle_xmlParserAddNodeInfo -#define xmlParserDebugEntities libtextstyle_xmlParserDebugEntities -#define xmlParserError libtextstyle_xmlParserError -#define xmlParserFindNodeInfo libtextstyle_xmlParserFindNodeInfo -#define xmlParserFindNodeInfoIndex libtextstyle_xmlParserFindNodeInfoIndex -#define xmlParserGetDirectory libtextstyle_xmlParserGetDirectory -#define xmlParserHandlePEReference libtextstyle_xmlParserHandlePEReference -#define xmlParserInputBufferCreateFd libtextstyle_xmlParserInputBufferCreateFd -#define xmlParserInputBufferCreateFile libtextstyle_xmlParserInputBufferCreateFile -#define xmlParserInputBufferCreateFilename libtextstyle_xmlParserInputBufferCreateFilename -#define xmlParserInputBufferCreateFilenameDefault libtextstyle_xmlParserInputBufferCreateFilenameDefault -#define xmlParserInputBufferCreateFilenameValue libtextstyle_xmlParserInputBufferCreateFilenameValue -#define xmlParserInputBufferCreateIO libtextstyle_xmlParserInputBufferCreateIO -#define xmlParserInputBufferCreateMem libtextstyle_xmlParserInputBufferCreateMem -#define xmlParserInputBufferCreateStatic libtextstyle_xmlParserInputBufferCreateStatic -#define xmlParserInputBufferGrow libtextstyle_xmlParserInputBufferGrow -#define xmlParserInputBufferPush libtextstyle_xmlParserInputBufferPush -#define xmlParserInputBufferRead libtextstyle_xmlParserInputBufferRead -#define xmlParserInputGrow libtextstyle_xmlParserInputGrow -#define xmlParserInputRead libtextstyle_xmlParserInputRead -#define xmlParserInputShrink libtextstyle_xmlParserInputShrink -#define xmlParserMaxDepth libtextstyle_xmlParserMaxDepth -#define xmlParserPrintFileContext libtextstyle_xmlParserPrintFileContext -#define xmlParserPrintFileInfo libtextstyle_xmlParserPrintFileInfo -#define xmlParserValidityError libtextstyle_xmlParserValidityError -#define xmlParserValidityWarning libtextstyle_xmlParserValidityWarning -#define xmlParserVersion libtextstyle_xmlParserVersion -#define xmlParserWarning libtextstyle_xmlParserWarning -#define xmlPathToURI libtextstyle_xmlPathToURI -#define xmlPedanticParserDefault libtextstyle_xmlPedanticParserDefault -#define xmlPedanticParserDefaultValue libtextstyle_xmlPedanticParserDefaultValue -#define xmlPopInput libtextstyle_xmlPopInput -#define xmlPopInputCallbacks libtextstyle_xmlPopInputCallbacks -#define xmlPreviousElementSibling libtextstyle_xmlPreviousElementSibling -#define xmlPrintURI libtextstyle_xmlPrintURI -#define xmlPushInput libtextstyle_xmlPushInput -#define xmlRMutexLock libtextstyle_xmlRMutexLock -#define xmlRMutexUnlock libtextstyle_xmlRMutexUnlock -#define xmlReadDoc libtextstyle_xmlReadDoc -#define xmlReadFd libtextstyle_xmlReadFd -#define xmlReadFile libtextstyle_xmlReadFile -#define xmlReadIO libtextstyle_xmlReadIO -#define xmlReadMemory libtextstyle_xmlReadMemory -#define xmlRealloc libtextstyle_xmlRealloc -#define xmlReallocLoc libtextstyle_xmlReallocLoc -#define xmlReconciliateNs libtextstyle_xmlReconciliateNs -#define xmlRegisterCharEncodingHandler libtextstyle_xmlRegisterCharEncodingHandler -#define xmlRegisterDefaultInputCallbacks libtextstyle_xmlRegisterDefaultInputCallbacks -#define xmlRegisterInputCallbacks libtextstyle_xmlRegisterInputCallbacks -#define xmlRegisterNodeDefault libtextstyle_xmlRegisterNodeDefault -#define xmlRegisterNodeDefaultValue libtextstyle_xmlRegisterNodeDefaultValue -#define xmlRemoveID libtextstyle_xmlRemoveID -#define xmlRemoveProp libtextstyle_xmlRemoveProp -#define xmlRemoveRef libtextstyle_xmlRemoveRef -#define xmlReplaceNode libtextstyle_xmlReplaceNode -#define xmlResetError libtextstyle_xmlResetError -#define xmlResetLastError libtextstyle_xmlResetLastError -#define xmlSAX2AttributeDecl libtextstyle_xmlSAX2AttributeDecl -#define xmlSAX2CDataBlock libtextstyle_xmlSAX2CDataBlock -#define xmlSAX2Characters libtextstyle_xmlSAX2Characters -#define xmlSAX2Comment libtextstyle_xmlSAX2Comment -#define xmlSAX2ElementDecl libtextstyle_xmlSAX2ElementDecl -#define xmlSAX2EndDocument libtextstyle_xmlSAX2EndDocument -#define xmlSAX2EndElementNs libtextstyle_xmlSAX2EndElementNs -#define xmlSAX2EntityDecl libtextstyle_xmlSAX2EntityDecl -#define xmlSAX2ExternalSubset libtextstyle_xmlSAX2ExternalSubset -#define xmlSAX2GetColumnNumber libtextstyle_xmlSAX2GetColumnNumber -#define xmlSAX2GetEntity libtextstyle_xmlSAX2GetEntity -#define xmlSAX2GetLineNumber libtextstyle_xmlSAX2GetLineNumber -#define xmlSAX2GetParameterEntity libtextstyle_xmlSAX2GetParameterEntity -#define xmlSAX2GetPublicId libtextstyle_xmlSAX2GetPublicId -#define xmlSAX2GetSystemId libtextstyle_xmlSAX2GetSystemId -#define xmlSAX2HasExternalSubset libtextstyle_xmlSAX2HasExternalSubset -#define xmlSAX2HasInternalSubset libtextstyle_xmlSAX2HasInternalSubset -#define xmlSAX2IgnorableWhitespace libtextstyle_xmlSAX2IgnorableWhitespace -#define xmlSAX2InitDefaultSAXHandler libtextstyle_xmlSAX2InitDefaultSAXHandler -#define xmlSAX2InternalSubset libtextstyle_xmlSAX2InternalSubset -#define xmlSAX2IsStandalone libtextstyle_xmlSAX2IsStandalone -#define xmlSAX2NotationDecl libtextstyle_xmlSAX2NotationDecl -#define xmlSAX2ProcessingInstruction libtextstyle_xmlSAX2ProcessingInstruction -#define xmlSAX2Reference libtextstyle_xmlSAX2Reference -#define xmlSAX2ResolveEntity libtextstyle_xmlSAX2ResolveEntity -#define xmlSAX2SetDocumentLocator libtextstyle_xmlSAX2SetDocumentLocator -#define xmlSAX2StartDocument libtextstyle_xmlSAX2StartDocument -#define xmlSAX2StartElementNs libtextstyle_xmlSAX2StartElementNs -#define xmlSAX2UnparsedEntityDecl libtextstyle_xmlSAX2UnparsedEntityDecl -#define xmlSAXVersion libtextstyle_xmlSAXVersion -#define xmlSaveNoEmptyTags libtextstyle_xmlSaveNoEmptyTags -#define xmlSaveUri libtextstyle_xmlSaveUri -#define xmlSearchNs libtextstyle_xmlSearchNs -#define xmlSearchNsByHref libtextstyle_xmlSearchNsByHref -#define xmlSetBufferAllocationScheme libtextstyle_xmlSetBufferAllocationScheme -#define xmlSetCompressMode libtextstyle_xmlSetCompressMode -#define xmlSetDocCompressMode libtextstyle_xmlSetDocCompressMode -#define xmlSetExternalEntityLoader libtextstyle_xmlSetExternalEntityLoader -#define xmlSetGenericErrorFunc libtextstyle_xmlSetGenericErrorFunc -#define xmlSetListDoc libtextstyle_xmlSetListDoc -#define xmlSetNs libtextstyle_xmlSetNs -#define xmlSetNsProp libtextstyle_xmlSetNsProp -#define xmlSetProp libtextstyle_xmlSetProp -#define xmlSetStructuredErrorFunc libtextstyle_xmlSetStructuredErrorFunc -#define xmlSetTreeDoc libtextstyle_xmlSetTreeDoc -#define xmlSkipBlankChars libtextstyle_xmlSkipBlankChars -#define xmlSnprintfElementContent libtextstyle_xmlSnprintfElementContent -#define xmlSplitQName libtextstyle_xmlSplitQName -#define xmlSplitQName2 libtextstyle_xmlSplitQName2 -#define xmlSplitQName3 libtextstyle_xmlSplitQName3 -#define xmlStopParser libtextstyle_xmlStopParser -#define xmlStrEqual libtextstyle_xmlStrEqual -#define xmlStrPrintf libtextstyle_xmlStrPrintf -#define xmlStrQEqual libtextstyle_xmlStrQEqual -#define xmlStrVPrintf libtextstyle_xmlStrVPrintf -#define xmlStrcasecmp libtextstyle_xmlStrcasecmp -#define xmlStrcasestr libtextstyle_xmlStrcasestr -#define xmlStrcat libtextstyle_xmlStrcat -#define xmlStrchr libtextstyle_xmlStrchr -#define xmlStrcmp libtextstyle_xmlStrcmp -#define xmlStrdup libtextstyle_xmlStrdup -#define xmlStringComment libtextstyle_xmlStringComment -#define xmlStringCurrentChar libtextstyle_xmlStringCurrentChar -#define xmlStringDecodeEntities libtextstyle_xmlStringDecodeEntities -#define xmlStringGetNodeList libtextstyle_xmlStringGetNodeList -#define xmlStringLenDecodeEntities libtextstyle_xmlStringLenDecodeEntities -#define xmlStringLenGetNodeList libtextstyle_xmlStringLenGetNodeList -#define xmlStringText libtextstyle_xmlStringText -#define xmlStringTextNoenc libtextstyle_xmlStringTextNoenc -#define xmlStrlen libtextstyle_xmlStrlen -#define xmlStrncasecmp libtextstyle_xmlStrncasecmp -#define xmlStrncat libtextstyle_xmlStrncat -#define xmlStrncatNew libtextstyle_xmlStrncatNew -#define xmlStrncmp libtextstyle_xmlStrncmp -#define xmlStrndup libtextstyle_xmlStrndup -#define xmlStrstr libtextstyle_xmlStrstr -#define xmlStrsub libtextstyle_xmlStrsub -#define xmlStructuredError libtextstyle_xmlStructuredError -#define xmlStructuredErrorContext libtextstyle_xmlStructuredErrorContext -#define xmlSubstituteEntitiesDefault libtextstyle_xmlSubstituteEntitiesDefault -#define xmlSubstituteEntitiesDefaultValue libtextstyle_xmlSubstituteEntitiesDefaultValue -#define xmlSwitchEncoding libtextstyle_xmlSwitchEncoding -#define xmlSwitchInputEncoding libtextstyle_xmlSwitchInputEncoding -#define xmlSwitchToEncoding libtextstyle_xmlSwitchToEncoding -#define xmlTextConcat libtextstyle_xmlTextConcat -#define xmlTextMerge libtextstyle_xmlTextMerge -#define xmlThrDefBufferAllocScheme libtextstyle_xmlThrDefBufferAllocScheme -#define xmlThrDefDefaultBufferSize libtextstyle_xmlThrDefDefaultBufferSize -#define xmlThrDefDeregisterNodeDefault libtextstyle_xmlThrDefDeregisterNodeDefault -#define xmlThrDefDoValidityCheckingDefaultValue libtextstyle_xmlThrDefDoValidityCheckingDefaultValue -#define xmlThrDefGetWarningsDefaultValue libtextstyle_xmlThrDefGetWarningsDefaultValue -#define xmlThrDefIndentTreeOutput libtextstyle_xmlThrDefIndentTreeOutput -#define xmlThrDefKeepBlanksDefaultValue libtextstyle_xmlThrDefKeepBlanksDefaultValue -#define xmlThrDefLineNumbersDefaultValue libtextstyle_xmlThrDefLineNumbersDefaultValue -#define xmlThrDefLoadExtDtdDefaultValue libtextstyle_xmlThrDefLoadExtDtdDefaultValue -#define xmlThrDefOutputBufferCreateFilenameDefault libtextstyle_xmlThrDefOutputBufferCreateFilenameDefault -#define xmlThrDefParserDebugEntities libtextstyle_xmlThrDefParserDebugEntities -#define xmlThrDefParserInputBufferCreateFilenameDefault libtextstyle_xmlThrDefParserInputBufferCreateFilenameDefault -#define xmlThrDefPedanticParserDefaultValue libtextstyle_xmlThrDefPedanticParserDefaultValue -#define xmlThrDefRegisterNodeDefault libtextstyle_xmlThrDefRegisterNodeDefault -#define xmlThrDefSaveNoEmptyTags libtextstyle_xmlThrDefSaveNoEmptyTags -#define xmlThrDefSetGenericErrorFunc libtextstyle_xmlThrDefSetGenericErrorFunc -#define xmlThrDefSetStructuredErrorFunc libtextstyle_xmlThrDefSetStructuredErrorFunc -#define xmlThrDefSubstituteEntitiesDefaultValue libtextstyle_xmlThrDefSubstituteEntitiesDefaultValue -#define xmlThrDefTreeIndentString libtextstyle_xmlThrDefTreeIndentString -#define xmlTreeIndentString libtextstyle_xmlTreeIndentString -#define xmlURIEscape libtextstyle_xmlURIEscape -#define xmlURIEscapeStr libtextstyle_xmlURIEscapeStr -#define xmlURIUnescapeString libtextstyle_xmlURIUnescapeString -#define xmlUTF8Charcmp libtextstyle_xmlUTF8Charcmp -#define xmlUTF8Size libtextstyle_xmlUTF8Size -#define xmlUTF8Strlen libtextstyle_xmlUTF8Strlen -#define xmlUTF8Strloc libtextstyle_xmlUTF8Strloc -#define xmlUTF8Strndup libtextstyle_xmlUTF8Strndup -#define xmlUTF8Strpos libtextstyle_xmlUTF8Strpos -#define xmlUTF8Strsize libtextstyle_xmlUTF8Strsize -#define xmlUTF8Strsub libtextstyle_xmlUTF8Strsub -#define xmlUnlinkNode libtextstyle_xmlUnlinkNode -#define xmlUnlockLibrary libtextstyle_xmlUnlockLibrary -#define xmlUnsetNsProp libtextstyle_xmlUnsetNsProp -#define xmlUnsetProp libtextstyle_xmlUnsetProp -#define xmlValidateNCName libtextstyle_xmlValidateNCName -#define xmlValidateNMToken libtextstyle_xmlValidateNMToken -#define xmlValidateName libtextstyle_xmlValidateName -#define xmlValidateQName libtextstyle_xmlValidateQName -#define xnmalloc libtextstyle_xnmalloc -#define xrealloc libtextstyle_xrealloc -#define xstrdup libtextstyle_xstrdup -#define xvasprintf libtextstyle_xvasprintf -#define xzalloc libtextstyle_xzalloc diff --git a/gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/lib/math.h b/gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/lib/math.h deleted file mode 100644 index caaa8f6ff..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/arm64/libtextstyle/lib/math.h +++ /dev/null @@ -1,3008 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_LTS_MATH_H - -#if __GNUC__ >= 3 - -#endif - - -/* The include_next requires a split double-inclusion guard. */ -#include "../ucrt/math.h" - -#ifndef _GL_LTS_MATH_H -#define _GL_LTS_MATH_H - -/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ -#if defined __VMS && ! defined NAN -# include -#endif - -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif -_GL_INLINE_HEADER_BEGIN -#ifndef _GL_MATH_INLINE -# define _GL_MATH_INLINE _GL_INLINE -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -#ifdef __cplusplus -/* Helper macros to define type-generic function FUNC as overloaded functions, - rather than as macros like in C. POSIX declares these with an argument of - real-floating (that is, one of float, double, or long double). */ -# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ -static inline int \ -_gl_cxx_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -static inline int \ -_gl_cxx_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -static inline int \ -_gl_cxx_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \ -_GL_BEGIN_NAMESPACE \ -inline rettype \ -rpl_func (float f) \ -{ \ - return _gl_cxx_ ## func ## f (f); \ -} \ -inline rettype \ -rpl_func (double d) \ -{ \ - return _gl_cxx_ ## func ## d (d); \ -} \ -inline rettype \ -rpl_func (long double l) \ -{ \ - return _gl_cxx_ ## func ## l (l); \ -} \ -_GL_END_NAMESPACE -#endif - -/* Helper macros to define a portability warning for the - classification macro FUNC called with VALUE. POSIX declares the - classification macros with an argument of real-floating (that is, - one of float, double, or long double). */ -#define _GL_WARN_REAL_FLOATING_DECL(func) \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} -#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ - (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ - : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ - : rpl_ ## func ## l (value)) - - -#if 0 -/* Pull in a function that fixes the 'int' to 'long double' conversion - of glibc 2.7. */ -_GL_EXTERN_C void _Qp_itoq (long double *, int); -static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; -#endif - - -/* For clang: Use __has_builtin to determine whether a builtin is available. */ -#ifndef __has_builtin -# define __has_builtin(name) 0 -#endif - - -/* POSIX allows platforms that don't support NAN. But all major - machines in the past 15 years have supported something close to - IEEE NaN, so we define this unconditionally. We also must define - it on platforms like Solaris 10, where NAN is present but defined - as a function pointer rather than a floating point constant. */ -#if !defined NAN || 0 -# if !GNULIB_defined_NAN -# undef NAN - /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler - choke on the expression 0.0 / 0.0. */ -# if defined __DECC || defined _MSC_VER -_GL_MATH_INLINE float -_NaN () -{ - static float zero = 0.0f; - return zero / zero; -} -# define NAN (_NaN()) -# else -# define NAN (0.0f / 0.0f) -# endif -# define GNULIB_defined_NAN 1 -# endif -#endif - -/* Solaris 10 defines HUGE_VAL, but as a function pointer rather - than a floating point constant. */ -#if 0 -# undef HUGE_VALF -# define HUGE_VALF (1.0f / 0.0f) -# undef HUGE_VAL -# define HUGE_VAL (1.0 / 0.0) -# undef HUGE_VALL -# define HUGE_VALL (1.0L / 0.0L) -#endif - -/* HUGE_VALF is a 'float' Infinity. */ -#ifndef HUGE_VALF -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ -# define HUGE_VALF (1e25f * 1e25f) -# else -# define HUGE_VALF (1.0f / 0.0f) -# endif -#endif - -/* HUGE_VAL is a 'double' Infinity. */ -#ifndef HUGE_VAL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ -# define HUGE_VAL (1e250 * 1e250) -# else -# define HUGE_VAL (1.0 / 0.0) -# endif -#endif - -/* HUGE_VALL is a 'long double' Infinity. */ -#ifndef HUGE_VALL -# if defined _MSC_VER -/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ -# define HUGE_VALL (1e250L * 1e250L) -# else -# define HUGE_VALL (1.0L / 0.0L) -# endif -#endif - - -#if defined FP_ILOGB0 && defined FP_ILOGBNAN - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */ -# if defined __HAIKU__ - /* Haiku: match what ilogb() does */ -# undef FP_ILOGB0 -# undef FP_ILOGBNAN -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#else - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ -# if defined __NetBSD__ || defined __sgi - /* NetBSD, IRIX 6.5: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# elif defined _AIX - /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# elif defined __sun - /* Solaris 9: match what ilogb() does */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN 2147483647 /* INT_MAX */ -# else - /* Gnulib defined values. */ -# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef acosf -# define acosf rpl_acosf -# endif -_GL_FUNCDECL_RPL (acosf, float, (float x)); -_GL_CXXALIAS_RPL (acosf, float, (float x)); -# else -# if !1 -# undef acosf -_GL_FUNCDECL_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIASWARN (acosf); -#elif defined GNULIB_POSIXCHECK -# undef acosf -# if HAVE_RAW_DECL_ACOSF -_GL_WARN_ON_USE (acosf, "acosf is unportable - " - "use gnulib module acosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef acosl -_GL_FUNCDECL_SYS (acosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (acosl, long double, (long double x)); -_GL_CXXALIASWARN (acosl); -#elif defined GNULIB_POSIXCHECK -# undef acosl -# if HAVE_RAW_DECL_ACOSL -_GL_WARN_ON_USE (acosl, "acosl is unportable - " - "use gnulib module acosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef asinf -# define asinf rpl_asinf -# endif -_GL_FUNCDECL_RPL (asinf, float, (float x)); -_GL_CXXALIAS_RPL (asinf, float, (float x)); -# else -# if !1 -# undef asinf -_GL_FUNCDECL_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIASWARN (asinf); -#elif defined GNULIB_POSIXCHECK -# undef asinf -# if HAVE_RAW_DECL_ASINF -_GL_WARN_ON_USE (asinf, "asinf is unportable - " - "use gnulib module asinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef asinl -_GL_FUNCDECL_SYS (asinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (asinl, long double, (long double x)); -_GL_CXXALIASWARN (asinl); -#elif defined GNULIB_POSIXCHECK -# undef asinl -# if HAVE_RAW_DECL_ASINL -_GL_WARN_ON_USE (asinl, "asinl is unportable - " - "use gnulib module asinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atanf -# define atanf rpl_atanf -# endif -_GL_FUNCDECL_RPL (atanf, float, (float x)); -_GL_CXXALIAS_RPL (atanf, float, (float x)); -# else -# if !1 -# undef atanf -_GL_FUNCDECL_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIASWARN (atanf); -#elif defined GNULIB_POSIXCHECK -# undef atanf -# if HAVE_RAW_DECL_ATANF -_GL_WARN_ON_USE (atanf, "atanf is unportable - " - "use gnulib module atanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef atanl -_GL_FUNCDECL_SYS (atanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (atanl, long double, (long double x)); -_GL_CXXALIASWARN (atanl); -#elif defined GNULIB_POSIXCHECK -# undef atanl -# if HAVE_RAW_DECL_ATANL -_GL_WARN_ON_USE (atanl, "atanl is unportable - " - "use gnulib module atanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atan2f -# define atan2f rpl_atan2f -# endif -_GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); -_GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); -# else -# if !1 -# undef atan2f -_GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIASWARN (atan2f); -#elif defined GNULIB_POSIXCHECK -# undef atan2f -# if HAVE_RAW_DECL_ATAN2F -_GL_WARN_ON_USE (atan2f, "atan2f is unportable - " - "use gnulib module atan2f for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtf -# define cbrtf rpl_cbrtf -# endif -_GL_FUNCDECL_RPL (cbrtf, float, (float x)); -_GL_CXXALIAS_RPL (cbrtf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cbrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (cbrtf); -#elif defined GNULIB_POSIXCHECK -# undef cbrtf -# if HAVE_RAW_DECL_CBRTF -_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " - "use gnulib module cbrtf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (cbrt, double, (double x)); -# endif -_GL_CXXALIAS_SYS (cbrt, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (cbrt); -# endif -#elif defined GNULIB_POSIXCHECK -# undef cbrt -# if HAVE_RAW_DECL_CBRT -_GL_WARN_ON_USE (cbrt, "cbrt is unportable - " - "use gnulib module cbrt for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cbrtl -# define cbrtl rpl_cbrtl -# endif -_GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (cbrtl); -#elif defined GNULIB_POSIXCHECK -# undef cbrtl -# if HAVE_RAW_DECL_CBRTL -_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " - "use gnulib module cbrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceilf -# define ceilf rpl_ceilf -# endif -_GL_FUNCDECL_RPL (ceilf, float, (float x)); -_GL_CXXALIAS_RPL (ceilf, float, (float x)); -# else -# if !1 -# undef ceilf -_GL_FUNCDECL_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIASWARN (ceilf); -#elif defined GNULIB_POSIXCHECK -# undef ceilf -# if HAVE_RAW_DECL_CEILF -_GL_WARN_ON_USE (ceilf, "ceilf is unportable - " - "use gnulib module ceilf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceil -# define ceil rpl_ceil -# endif -_GL_FUNCDECL_RPL (ceil, double, (double x)); -_GL_CXXALIAS_RPL (ceil, double, (double x)); -# else -_GL_CXXALIAS_SYS (ceil, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ceil); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ceill -# define ceill rpl_ceill -# endif -_GL_FUNCDECL_RPL (ceill, long double, (long double x)); -_GL_CXXALIAS_RPL (ceill, long double, (long double x)); -# else -# if !1 -# undef ceill -_GL_FUNCDECL_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIASWARN (ceill); -#elif defined GNULIB_POSIXCHECK -# undef ceill -# if HAVE_RAW_DECL_CEILL -_GL_WARN_ON_USE (ceill, "ceill is unportable - " - "use gnulib module ceill for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef copysignf -_GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); -_GL_CXXALIASWARN (copysignf); -#elif defined GNULIB_POSIXCHECK -# undef copysignf -# if HAVE_RAW_DECL_COPYSIGNF -_GL_WARN_ON_USE (copysignf, "copysignf is unportable - " - "use gnulib module copysignf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysign, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (copysign, double, (double x, double y)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (copysign); -# endif -#elif defined GNULIB_POSIXCHECK -# undef copysign -# if HAVE_RAW_DECL_COPYSIGN -_GL_WARN_ON_USE (copysign, "copysign is unportable - " - "use gnulib module copysign for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); -_GL_CXXALIASWARN (copysignl); -#elif defined GNULIB_POSIXCHECK -# undef copysignl -# if HAVE_RAW_DECL_COPYSIGNL -_GL_WARN_ON_USE (copysign, "copysignl is unportable - " - "use gnulib module copysignl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cosf -# define cosf rpl_cosf -# endif -_GL_FUNCDECL_RPL (cosf, float, (float x)); -_GL_CXXALIAS_RPL (cosf, float, (float x)); -# else -# if !1 -# undef cosf -_GL_FUNCDECL_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIASWARN (cosf); -#elif defined GNULIB_POSIXCHECK -# undef cosf -# if HAVE_RAW_DECL_COSF -_GL_WARN_ON_USE (cosf, "cosf is unportable - " - "use gnulib module cosf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef cosl -_GL_FUNCDECL_SYS (cosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cosl, long double, (long double x)); -_GL_CXXALIASWARN (cosl); -#elif defined GNULIB_POSIXCHECK -# undef cosl -# if HAVE_RAW_DECL_COSL -_GL_WARN_ON_USE (cosl, "cosl is unportable - " - "use gnulib module cosl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef coshf -# define coshf rpl_coshf -# endif -_GL_FUNCDECL_RPL (coshf, float, (float x)); -_GL_CXXALIAS_RPL (coshf, float, (float x)); -# else -# if !1 -# undef coshf -_GL_FUNCDECL_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIASWARN (coshf); -#elif defined GNULIB_POSIXCHECK -# undef coshf -# if HAVE_RAW_DECL_COSHF -_GL_WARN_ON_USE (coshf, "coshf is unportable - " - "use gnulib module coshf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expf -# define expf rpl_expf -# endif -_GL_FUNCDECL_RPL (expf, float, (float x)); -_GL_CXXALIAS_RPL (expf, float, (float x)); -# else -# if !1 -# undef expf -_GL_FUNCDECL_SYS (expf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expf, float, (float x)); -# endif -_GL_CXXALIASWARN (expf); -#elif defined GNULIB_POSIXCHECK -# undef expf -# if HAVE_RAW_DECL_EXPF -_GL_WARN_ON_USE (expf, "expf is unportable - " - "use gnulib module expf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expl -# define expl rpl_expl -# endif -_GL_FUNCDECL_RPL (expl, long double, (long double x)); -_GL_CXXALIAS_RPL (expl, long double, (long double x)); -# else -# if !1 || !1 -# undef expl -_GL_FUNCDECL_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expl); -#elif defined GNULIB_POSIXCHECK -# undef expl -# if HAVE_RAW_DECL_EXPL -_GL_WARN_ON_USE (expl, "expl is unportable - " - "use gnulib module expl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (exp2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (exp2f, float, (float x)); -_GL_CXXALIASWARN (exp2f); -#elif defined GNULIB_POSIXCHECK -# undef exp2f -# if HAVE_RAW_DECL_EXP2F -_GL_WARN_ON_USE (exp2f, "exp2f is unportable - " - "use gnulib module exp2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2 -# define exp2 rpl_exp2 -# endif -_GL_FUNCDECL_RPL (exp2, double, (double x)); -_GL_CXXALIAS_RPL (exp2, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (exp2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (exp2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (exp2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef exp2 -# if HAVE_RAW_DECL_EXP2 -_GL_WARN_ON_USE (exp2, "exp2 is unportable - " - "use gnulib module exp2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef exp2l -# define exp2l rpl_exp2l -# endif -_GL_FUNCDECL_RPL (exp2l, long double, (long double x)); -_GL_CXXALIAS_RPL (exp2l, long double, (long double x)); -# else -# if !1 -# undef exp2l -_GL_FUNCDECL_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (exp2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (exp2l); -#elif defined GNULIB_POSIXCHECK -# undef exp2l -# if HAVE_RAW_DECL_EXP2L -_GL_WARN_ON_USE (exp2l, "exp2l is unportable - " - "use gnulib module exp2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1f -# define expm1f rpl_expm1f -# endif -_GL_FUNCDECL_RPL (expm1f, float, (float x)); -_GL_CXXALIAS_RPL (expm1f, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expm1f, float, (float x)); -# endif -_GL_CXXALIASWARN (expm1f); -#elif defined GNULIB_POSIXCHECK -# undef expm1f -# if HAVE_RAW_DECL_EXPM1F -_GL_WARN_ON_USE (expm1f, "expm1f is unportable - " - "use gnulib module expm1f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1 -# define expm1 rpl_expm1 -# endif -_GL_FUNCDECL_RPL (expm1, double, (double x)); -_GL_CXXALIAS_RPL (expm1, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (expm1, double, (double x)); -# endif -_GL_CXXALIAS_SYS (expm1, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (expm1); -# endif -#elif defined GNULIB_POSIXCHECK -# undef expm1 -# if HAVE_RAW_DECL_EXPM1 -_GL_WARN_ON_USE (expm1, "expm1 is unportable - " - "use gnulib module expm1 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expm1l -# define expm1l rpl_expm1l -# endif -_GL_FUNCDECL_RPL (expm1l, long double, (long double x)); -_GL_CXXALIAS_RPL (expm1l, long double, (long double x)); -# else -# if !1 -# undef expm1l -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (expm1l, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (expm1l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (expm1l); -#elif defined GNULIB_POSIXCHECK -# undef expm1l -# if HAVE_RAW_DECL_EXPM1L -_GL_WARN_ON_USE (expm1l, "expm1l is unportable - " - "use gnulib module expm1l for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef fabsf -_GL_FUNCDECL_SYS (fabsf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (fabsf, float, (float x)); -_GL_CXXALIASWARN (fabsf); -#elif defined GNULIB_POSIXCHECK -# undef fabsf -# if HAVE_RAW_DECL_FABSF -_GL_WARN_ON_USE (fabsf, "fabsf is unportable - " - "use gnulib module fabsf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fabsl -# define fabsl rpl_fabsl -# endif -_GL_FUNCDECL_RPL (fabsl, long double, (long double x)); -_GL_CXXALIAS_RPL (fabsl, long double, (long double x)); -# else -# if !1 -# undef fabsl -_GL_FUNCDECL_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (fabsl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (fabsl); -#elif defined GNULIB_POSIXCHECK -# undef fabsl -# if HAVE_RAW_DECL_FABSL -_GL_WARN_ON_USE (fabsl, "fabsl is unportable - " - "use gnulib module fabsl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorf -# define floorf rpl_floorf -# endif -_GL_FUNCDECL_RPL (floorf, float, (float x)); -_GL_CXXALIAS_RPL (floorf, float, (float x)); -# else -# if !1 -# undef floorf -_GL_FUNCDECL_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIASWARN (floorf); -#elif defined GNULIB_POSIXCHECK -# undef floorf -# if HAVE_RAW_DECL_FLOORF -_GL_WARN_ON_USE (floorf, "floorf is unportable - " - "use gnulib module floorf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floor -# define floor rpl_floor -# endif -_GL_FUNCDECL_RPL (floor, double, (double x)); -_GL_CXXALIAS_RPL (floor, double, (double x)); -# else -_GL_CXXALIAS_SYS (floor, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (floor); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef floorl -# define floorl rpl_floorl -# endif -_GL_FUNCDECL_RPL (floorl, long double, (long double x)); -_GL_CXXALIAS_RPL (floorl, long double, (long double x)); -# else -# if !1 -# undef floorl -_GL_FUNCDECL_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (floorl); -#elif defined GNULIB_POSIXCHECK -# undef floorl -# if HAVE_RAW_DECL_FLOORL -_GL_WARN_ON_USE (floorl, "floorl is unportable - " - "use gnulib module floorl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmaf -# define fmaf rpl_fmaf -# endif -_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); -_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); -# else -# if !1 -# undef fmaf -_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); -# endif -_GL_CXXALIASWARN (fmaf); -#elif defined GNULIB_POSIXCHECK -# undef fmaf -# if HAVE_RAW_DECL_FMAF -_GL_WARN_ON_USE (fmaf, "fmaf is unportable - " - "use gnulib module fmaf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fma -# define fma rpl_fma -# endif -_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); -_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); -# else -# if !1 -# undef fma -_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); -# endif -_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fma); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fma -# if HAVE_RAW_DECL_FMA -_GL_WARN_ON_USE (fma, "fma is unportable - " - "use gnulib module fma for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmal -# define fmal rpl_fmal -# endif -_GL_FUNCDECL_RPL (fmal, long double, - (long double x, long double y, long double z)); -_GL_CXXALIAS_RPL (fmal, long double, - (long double x, long double y, long double z)); -# else -# if !1 -# undef fmal -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -# endif -_GL_CXXALIAS_SYS (fmal, long double, - (long double x, long double y, long double z)); -# endif -_GL_CXXALIASWARN (fmal); -#elif defined GNULIB_POSIXCHECK -# undef fmal -# if HAVE_RAW_DECL_FMAL -_GL_WARN_ON_USE (fmal, "fmal is unportable - " - "use gnulib module fmal for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodf -# define fmodf rpl_fmodf -# endif -_GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); -_GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); -# else -# if !1 -# undef fmodf -_GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (fmodf); -#elif defined GNULIB_POSIXCHECK -# undef fmodf -# if HAVE_RAW_DECL_FMODF -_GL_WARN_ON_USE (fmodf, "fmodf is unportable - " - "use gnulib module fmodf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmod -# define fmod rpl_fmod -# endif -_GL_FUNCDECL_RPL (fmod, double, (double x, double y)); -_GL_CXXALIAS_RPL (fmod, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (fmod, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fmod); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fmod -# if HAVE_RAW_DECL_FMOD -_GL_WARN_ON_USE (fmod, "fmod has portability problems - " - "use gnulib module fmod for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fmodl -# define fmodl rpl_fmodl -# endif -_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); -# else -# if !1 -# undef fmodl -_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (fmodl); -#elif defined GNULIB_POSIXCHECK -# undef fmodl -# if HAVE_RAW_DECL_FMODL -_GL_WARN_ON_USE (fmodl, "fmodl is unportable - " - "use gnulib module fmodl for portability"); -# endif -#endif - - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpf -# define frexpf rpl_frexpf -# endif -_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); -# else -# if !1 -# undef frexpf -_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); -# endif -_GL_CXXALIASWARN (frexpf); -#elif defined GNULIB_POSIXCHECK -# undef frexpf -# if HAVE_RAW_DECL_FREXPF -_GL_WARN_ON_USE (frexpf, "frexpf is unportable - " - "use gnulib module frexpf for portability"); -# endif -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexp -# define frexp rpl_frexp -# endif -_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); -# else -_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef frexp -/* Assume frexp is always declared. */ -_GL_WARN_ON_USE (frexp, "frexp is unportable - " - "use gnulib module frexp for portability"); -#endif - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if 1 && 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef frexpl -# define frexpl rpl_frexpl -# endif -_GL_FUNCDECL_RPL (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); -#else -# if !1 -_GL_FUNCDECL_SYS (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -# if 1 -_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); -# endif -#endif -#if 1 && !(1 && !1) -_GL_CXXALIASWARN (frexpl); -#endif -#if !1 && defined GNULIB_POSIXCHECK -# undef frexpl -# if HAVE_RAW_DECL_FREXPL -_GL_WARN_ON_USE (frexpl, "frexpl is unportable - " - "use gnulib module frexpl for portability"); -# endif -#endif - - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotf -# define hypotf rpl_hypotf -# endif -_GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); -_GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (hypotf); -#elif defined GNULIB_POSIXCHECK -# undef hypotf -# if HAVE_RAW_DECL_HYPOTF -_GL_WARN_ON_USE (hypotf, "hypotf is unportable - " - "use gnulib module hypotf for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypot -# define hypot rpl_hypot -# endif -_GL_FUNCDECL_RPL (hypot, double, (double x, double y)); -_GL_CXXALIAS_RPL (hypot, double, (double x, double y)); -# else -_GL_CXXALIAS_SYS (hypot, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (hypot); -# endif -#elif defined GNULIB_POSIXCHECK -# undef hypot -# if HAVE_RAW_DECL_HYPOT -_GL_WARN_ON_USE (hypotf, "hypot has portability problems - " - "use gnulib module hypot for portability"); -# endif -#endif - -/* Return sqrt(x^2+y^2). */ -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef hypotl -# define hypotl rpl_hypotl -# endif -_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); -# else -# if !1 -_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (hypotl); -#elif defined GNULIB_POSIXCHECK -# undef hypotl -# if HAVE_RAW_DECL_HYPOTL -_GL_WARN_ON_USE (hypotl, "hypotl is unportable - " - "use gnulib module hypotl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbf -# define ilogbf rpl_ilogbf -# endif -_GL_FUNCDECL_RPL (ilogbf, int, (float x)); -_GL_CXXALIAS_RPL (ilogbf, int, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIAS_SYS (ilogbf, int, (float x)); -# endif -_GL_CXXALIASWARN (ilogbf); -#elif defined GNULIB_POSIXCHECK -# undef ilogbf -# if HAVE_RAW_DECL_ILOGBF -_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " - "use gnulib module ilogbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogb -# define ilogb rpl_ilogb -# endif -_GL_FUNCDECL_RPL (ilogb, int, (double x)); -_GL_CXXALIAS_RPL (ilogb, int, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogb, int, (double x)); -# endif -_GL_CXXALIAS_SYS (ilogb, int, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ilogb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef ilogb -# if HAVE_RAW_DECL_ILOGB -_GL_WARN_ON_USE (ilogb, "ilogb is unportable - " - "use gnulib module ilogb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbl -# define ilogbl rpl_ilogbl -# endif -_GL_FUNCDECL_RPL (ilogbl, int, (long double x)); -_GL_CXXALIAS_RPL (ilogbl, int, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIASWARN (ilogbl); -#elif defined GNULIB_POSIXCHECK -# undef ilogbl -# if HAVE_RAW_DECL_ILOGBL -_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " - "use gnulib module ilogbl for portability"); -# endif -#endif - - -/* Return x * 2^exp. */ -#if 0 -# if !1 -# undef ldexpf -_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); -# endif -_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); -_GL_CXXALIASWARN (ldexpf); -#elif defined GNULIB_POSIXCHECK -# undef ldexpf -# if HAVE_RAW_DECL_LDEXPF -_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " - "use gnulib module ldexpf for portability"); -# endif -#endif - -/* Return x * 2^exp. */ -#if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ldexpl -# define ldexpl rpl_ldexpl -# endif -_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); -_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); -#else -# if !1 -_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); -# endif -# if 0 -_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); -# endif -#endif -#if 0 -_GL_CXXALIASWARN (ldexpl); -#endif -#if !0 && defined GNULIB_POSIXCHECK -# undef ldexpl -# if HAVE_RAW_DECL_LDEXPL -_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " - "use gnulib module ldexpl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logf -# define logf rpl_logf -# endif -_GL_FUNCDECL_RPL (logf, float, (float x)); -_GL_CXXALIAS_RPL (logf, float, (float x)); -# else -# if !1 -# undef logf -_GL_FUNCDECL_SYS (logf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logf, float, (float x)); -# endif -_GL_CXXALIASWARN (logf); -#elif defined GNULIB_POSIXCHECK -# undef logf -# if HAVE_RAW_DECL_LOGF -_GL_WARN_ON_USE (logf, "logf is unportable - " - "use gnulib module logf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log -# define log rpl_log -# endif -_GL_FUNCDECL_RPL (log, double, (double x)); -_GL_CXXALIAS_RPL (log, double, (double x)); -# else -_GL_CXXALIAS_SYS (log, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log -# if HAVE_RAW_DECL_LOG -_GL_WARN_ON_USE (log, "log has portability problems - " - "use gnulib module log for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logl -# define logl rpl_logl -# endif -_GL_FUNCDECL_RPL (logl, long double, (long double x)); -_GL_CXXALIAS_RPL (logl, long double, (long double x)); -# else -# if !1 || !1 -# undef logl -_GL_FUNCDECL_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logl); -#elif defined GNULIB_POSIXCHECK -# undef logl -# if HAVE_RAW_DECL_LOGL -_GL_WARN_ON_USE (logl, "logl is unportable - " - "use gnulib module logl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10f -# define log10f rpl_log10f -# endif -_GL_FUNCDECL_RPL (log10f, float, (float x)); -_GL_CXXALIAS_RPL (log10f, float, (float x)); -# else -# if !1 -# undef log10f -_GL_FUNCDECL_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log10f, float, (float x)); -# endif -_GL_CXXALIASWARN (log10f); -#elif defined GNULIB_POSIXCHECK -# undef log10f -# if HAVE_RAW_DECL_LOG10F -_GL_WARN_ON_USE (log10f, "log10f is unportable - " - "use gnulib module log10f for portability"); -# endif -#endif - -#if 1 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10 -# define log10 rpl_log10 -# endif -_GL_FUNCDECL_RPL (log10, double, (double x)); -_GL_CXXALIAS_RPL (log10, double, (double x)); -# else -_GL_CXXALIAS_SYS (log10, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log10); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log10 -# if HAVE_RAW_DECL_LOG10 -_GL_WARN_ON_USE (log10, "log10 has portability problems - " - "use gnulib module log10 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log10l -# define log10l rpl_log10l -# endif -_GL_FUNCDECL_RPL (log10l, long double, (long double x)); -_GL_CXXALIAS_RPL (log10l, long double, (long double x)); -# else -# if !1 || !1 -# undef log10l -_GL_FUNCDECL_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log10l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log10l); -#elif defined GNULIB_POSIXCHECK -# undef log10l -# if HAVE_RAW_DECL_LOG10L -_GL_WARN_ON_USE (log10l, "log10l is unportable - " - "use gnulib module log10l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pf -# define log1pf rpl_log1pf -# endif -_GL_FUNCDECL_RPL (log1pf, float, (float x)); -_GL_CXXALIAS_RPL (log1pf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log1pf, float, (float x)); -# endif -_GL_CXXALIASWARN (log1pf); -#elif defined GNULIB_POSIXCHECK -# undef log1pf -# if HAVE_RAW_DECL_LOG1PF -_GL_WARN_ON_USE (log1pf, "log1pf is unportable - " - "use gnulib module log1pf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1p -# define log1p rpl_log1p -# endif -_GL_FUNCDECL_RPL (log1p, double, (double x)); -_GL_CXXALIAS_RPL (log1p, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1p, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log1p, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log1p); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log1p -# if HAVE_RAW_DECL_LOG1P -_GL_WARN_ON_USE (log1p, "log1p has portability problems - " - "use gnulib module log1p for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log1pl -# define log1pl rpl_log1pl -# endif -_GL_FUNCDECL_RPL (log1pl, long double, (long double x)); -_GL_CXXALIAS_RPL (log1pl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log1pl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log1pl); -#elif defined GNULIB_POSIXCHECK -# undef log1pl -# if HAVE_RAW_DECL_LOG1PL -_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " - "use gnulib module log1pl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2f -# define log2f rpl_log2f -# endif -_GL_FUNCDECL_RPL (log2f, float, (float x)); -_GL_CXXALIAS_RPL (log2f, float, (float x)); -# else -# if !1 -# undef log2f -_GL_FUNCDECL_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIAS_SYS (log2f, float, (float x)); -# endif -_GL_CXXALIASWARN (log2f); -#elif defined GNULIB_POSIXCHECK -# undef log2f -# if HAVE_RAW_DECL_LOG2F -_GL_WARN_ON_USE (log2f, "log2f is unportable - " - "use gnulib module log2f for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2 -# define log2 rpl_log2 -# endif -_GL_FUNCDECL_RPL (log2, double, (double x)); -_GL_CXXALIAS_RPL (log2, double, (double x)); -# else -# if !1 -# undef log2 -_GL_FUNCDECL_SYS (log2, double, (double x)); -# endif -_GL_CXXALIAS_SYS (log2, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (log2); -# endif -#elif defined GNULIB_POSIXCHECK -# undef log2 -# if HAVE_RAW_DECL_LOG2 -_GL_WARN_ON_USE (log2, "log2 is unportable - " - "use gnulib module log2 for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef log2l -# define log2l rpl_log2l -# endif -_GL_FUNCDECL_RPL (log2l, long double, (long double x)); -_GL_CXXALIAS_RPL (log2l, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (log2l, long double, (long double x)); -# endif -_GL_CXXALIASWARN (log2l); -#elif defined GNULIB_POSIXCHECK -# undef log2l -# if HAVE_RAW_DECL_LOG2L -_GL_WARN_ON_USE (log2l, "log2l is unportable - " - "use gnulib module log2l for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbf -# define logbf rpl_logbf -# endif -_GL_FUNCDECL_RPL (logbf, float, (float x)); -_GL_CXXALIAS_RPL (logbf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (logbf, float, (float x)); -# endif -_GL_CXXALIASWARN (logbf); -#elif defined GNULIB_POSIXCHECK -# undef logbf -# if HAVE_RAW_DECL_LOGBF -_GL_WARN_ON_USE (logbf, "logbf is unportable - " - "use gnulib module logbf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logb -# define logb rpl_logb -# endif -_GL_FUNCDECL_RPL (logb, double, (double x)); -_GL_CXXALIAS_RPL (logb, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logb, double, (double x)); -# endif -_GL_CXXALIAS_SYS (logb, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (logb); -# endif -#elif defined GNULIB_POSIXCHECK -# undef logb -# if HAVE_RAW_DECL_LOGB -_GL_WARN_ON_USE (logb, "logb is unportable - " - "use gnulib module logb for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef logbl -# define logbl rpl_logbl -# endif -_GL_FUNCDECL_RPL (logbl, long double, (long double x)); -_GL_CXXALIAS_RPL (logbl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logbl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (logbl); -#elif defined GNULIB_POSIXCHECK -# undef logbl -# if HAVE_RAW_DECL_LOGBL -_GL_WARN_ON_USE (logbl, "logbl is unportable - " - "use gnulib module logbl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modff -# define modff rpl_modff -# endif -_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); -# else -# if !1 -# undef modff -_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); -# endif -_GL_CXXALIASWARN (modff); -#elif defined GNULIB_POSIXCHECK -# undef modff -# if HAVE_RAW_DECL_MODFF -_GL_WARN_ON_USE (modff, "modff is unportable - " - "use gnulib module modff for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modf -# define modf rpl_modf -# endif -_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); -# else -_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (modf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef modf -# if HAVE_RAW_DECL_MODF -_GL_WARN_ON_USE (modf, "modf has portability problems - " - "use gnulib module modf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef modfl -# define modfl rpl_modfl -# endif -_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); -# else -# if !1 -# undef modfl -_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); -# endif -_GL_CXXALIASWARN (modfl); -#elif defined GNULIB_POSIXCHECK -# undef modfl -# if HAVE_RAW_DECL_MODFL -_GL_WARN_ON_USE (modfl, "modfl is unportable - " - "use gnulib module modfl for portability"); -# endif -#endif - - -#if 0 -# if !1 -# undef powf -_GL_FUNCDECL_SYS (powf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (powf, float, (float x, float y)); -_GL_CXXALIASWARN (powf); -#elif defined GNULIB_POSIXCHECK -# undef powf -# if HAVE_RAW_DECL_POWF -_GL_WARN_ON_USE (powf, "powf is unportable - " - "use gnulib module powf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderf -# define remainderf rpl_remainderf -# endif -_GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); -_GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); -# else -# if !1 -_GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); -# endif -_GL_CXXALIASWARN (remainderf); -#elif defined GNULIB_POSIXCHECK -# undef remainderf -# if HAVE_RAW_DECL_REMAINDERF -_GL_WARN_ON_USE (remainderf, "remainderf is unportable - " - "use gnulib module remainderf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainder -# define remainder rpl_remainder -# endif -_GL_FUNCDECL_RPL (remainder, double, (double x, double y)); -_GL_CXXALIAS_RPL (remainder, double, (double x, double y)); -# else -# if !1 || !1 -_GL_FUNCDECL_SYS (remainder, double, (double x, double y)); -# endif -_GL_CXXALIAS_SYS (remainder, double, (double x, double y)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remainder); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remainder -# if HAVE_RAW_DECL_REMAINDER -_GL_WARN_ON_USE (remainder, "remainder is unportable - " - "use gnulib module remainder for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remainderl -# define remainderl rpl_remainderl -# endif -_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); -_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); -# else -# if !1 -# undef remainderl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); -# endif -# endif -_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); -# endif -_GL_CXXALIASWARN (remainderl); -#elif defined GNULIB_POSIXCHECK -# undef remainderl -# if HAVE_RAW_DECL_REMAINDERL -_GL_WARN_ON_USE (remainderl, "remainderl is unportable - " - "use gnulib module remainderl for portability"); -# endif -#endif - - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rintf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (rintf, float, (float x)); -_GL_CXXALIASWARN (rintf); -#elif defined GNULIB_POSIXCHECK -# undef rintf -# if HAVE_RAW_DECL_RINTF -_GL_WARN_ON_USE (rintf, "rintf is unportable - " - "use gnulib module rintf for portability"); -# endif -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (rint, double, (double x)); -# endif -_GL_CXXALIAS_SYS (rint, double, (double x)); -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rint); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rint -# if HAVE_RAW_DECL_RINT -_GL_WARN_ON_USE (rint, "rint is unportable - " - "use gnulib module rint for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rintl -# define rintl rpl_rintl -# endif -_GL_FUNCDECL_RPL (rintl, long double, (long double x)); -_GL_CXXALIAS_RPL (rintl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (rintl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (rintl); -#elif defined GNULIB_POSIXCHECK -# undef rintl -# if HAVE_RAW_DECL_RINTL -_GL_WARN_ON_USE (rintl, "rintl is unportable - " - "use gnulib module rintl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundf -# define roundf rpl_roundf -# endif -_GL_FUNCDECL_RPL (roundf, float, (float x)); -_GL_CXXALIAS_RPL (roundf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIASWARN (roundf); -#elif defined GNULIB_POSIXCHECK -# undef roundf -# if HAVE_RAW_DECL_ROUNDF -_GL_WARN_ON_USE (roundf, "roundf is unportable - " - "use gnulib module roundf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef round -# define round rpl_round -# endif -_GL_FUNCDECL_RPL (round, double, (double x)); -_GL_CXXALIAS_RPL (round, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (round, double, (double x)); -# endif -_GL_CXXALIAS_SYS (round, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (round); -# endif -#elif defined GNULIB_POSIXCHECK -# undef round -# if HAVE_RAW_DECL_ROUND -_GL_WARN_ON_USE (round, "round is unportable - " - "use gnulib module round for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundl -# define roundl rpl_roundl -# endif -_GL_FUNCDECL_RPL (roundl, long double, (long double x)); -_GL_CXXALIAS_RPL (roundl, long double, (long double x)); -# else -# if !1 -# undef roundl -# if !(defined __cplusplus && defined _AIX) -_GL_FUNCDECL_SYS (roundl, long double, (long double x)); -# endif -# endif -_GL_CXXALIAS_SYS (roundl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (roundl); -#elif defined GNULIB_POSIXCHECK -# undef roundl -# if HAVE_RAW_DECL_ROUNDL -_GL_WARN_ON_USE (roundl, "roundl is unportable - " - "use gnulib module roundl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinf -# define sinf rpl_sinf -# endif -_GL_FUNCDECL_RPL (sinf, float, (float x)); -_GL_CXXALIAS_RPL (sinf, float, (float x)); -# else -# if !1 - # undef sinf -_GL_FUNCDECL_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinf); -#elif defined GNULIB_POSIXCHECK -# undef sinf -# if HAVE_RAW_DECL_SINF -_GL_WARN_ON_USE (sinf, "sinf is unportable - " - "use gnulib module sinf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef sinl -_GL_FUNCDECL_SYS (sinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sinl, long double, (long double x)); -_GL_CXXALIASWARN (sinl); -#elif defined GNULIB_POSIXCHECK -# undef sinl -# if HAVE_RAW_DECL_SINL -_GL_WARN_ON_USE (sinl, "sinl is unportable - " - "use gnulib module sinl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinhf -# define sinhf rpl_sinhf -# endif -_GL_FUNCDECL_RPL (sinhf, float, (float x)); -_GL_CXXALIAS_RPL (sinhf, float, (float x)); -# else -# if !1 -# undef sinhf -_GL_FUNCDECL_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIASWARN (sinhf); -#elif defined GNULIB_POSIXCHECK -# undef sinhf -# if HAVE_RAW_DECL_SINHF -_GL_WARN_ON_USE (sinhf, "sinhf is unportable - " - "use gnulib module sinhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtf -# define sqrtf rpl_sqrtf -# endif -_GL_FUNCDECL_RPL (sqrtf, float, (float x)); -_GL_CXXALIAS_RPL (sqrtf, float, (float x)); -# else -# if !1 -# undef sqrtf -_GL_FUNCDECL_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIASWARN (sqrtf); -#elif defined GNULIB_POSIXCHECK -# undef sqrtf -# if HAVE_RAW_DECL_SQRTF -_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " - "use gnulib module sqrtf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtl -# define sqrtl rpl_sqrtl -# endif -_GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); -_GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); -# else -# if !1 || !1 -# undef sqrtl -_GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (sqrtl); -#elif defined GNULIB_POSIXCHECK -# undef sqrtl -# if HAVE_RAW_DECL_SQRTL -_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " - "use gnulib module sqrtl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanf -# define tanf rpl_tanf -# endif -_GL_FUNCDECL_RPL (tanf, float, (float x)); -_GL_CXXALIAS_RPL (tanf, float, (float x)); -# else -# if !1 -# undef tanf -_GL_FUNCDECL_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanf); -#elif defined GNULIB_POSIXCHECK -# undef tanf -# if HAVE_RAW_DECL_TANF -_GL_WARN_ON_USE (tanf, "tanf is unportable - " - "use gnulib module tanf for portability"); -# endif -#endif - -#if 0 -# if !1 || !1 -# undef tanl -_GL_FUNCDECL_SYS (tanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (tanl, long double, (long double x)); -_GL_CXXALIASWARN (tanl); -#elif defined GNULIB_POSIXCHECK -# undef tanl -# if HAVE_RAW_DECL_TANL -_GL_WARN_ON_USE (tanl, "tanl is unportable - " - "use gnulib module tanl for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanhf -# define tanhf rpl_tanhf -# endif -_GL_FUNCDECL_RPL (tanhf, float, (float x)); -_GL_CXXALIAS_RPL (tanhf, float, (float x)); -# else -# if !1 -# undef tanhf -_GL_FUNCDECL_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIASWARN (tanhf); -#elif defined GNULIB_POSIXCHECK -# undef tanhf -# if HAVE_RAW_DECL_TANHF -_GL_WARN_ON_USE (tanhf, "tanhf is unportable - " - "use gnulib module tanhf for portability"); -# endif -#endif - - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncf -# define truncf rpl_truncf -# endif -_GL_FUNCDECL_RPL (truncf, float, (float x)); -_GL_CXXALIAS_RPL (truncf, float, (float x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIASWARN (truncf); -#elif defined GNULIB_POSIXCHECK -# undef truncf -# if HAVE_RAW_DECL_TRUNCF -_GL_WARN_ON_USE (truncf, "truncf is unportable - " - "use gnulib module truncf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef trunc -# define trunc rpl_trunc -# endif -_GL_FUNCDECL_RPL (trunc, double, (double x)); -_GL_CXXALIAS_RPL (trunc, double, (double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (trunc, double, (double x)); -# endif -_GL_CXXALIAS_SYS (trunc, double, (double x)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (trunc); -# endif -#elif defined GNULIB_POSIXCHECK -# undef trunc -# if HAVE_RAW_DECL_TRUNC -_GL_WARN_ON_USE (trunc, "trunc is unportable - " - "use gnulib module trunc for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncl -# define truncl rpl_truncl -# endif -_GL_FUNCDECL_RPL (truncl, long double, (long double x)); -_GL_CXXALIAS_RPL (truncl, long double, (long double x)); -# else -# if !1 -_GL_FUNCDECL_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (truncl); -#elif defined GNULIB_POSIXCHECK -# undef truncl -# if HAVE_RAW_DECL_TRUNCL -_GL_WARN_ON_USE (truncl, "truncl is unportable - " - "use gnulib module truncl for portability"); -# endif -#endif - - -/* Definitions of function-like macros come here, after the function - declarations. */ - - -#if 0 -# if 0 -_GL_EXTERN_C int gl_isfinitef (float x); -_GL_EXTERN_C int gl_isfinited (double x); -_GL_EXTERN_C int gl_isfinitel (long double x); -# undef isfinite -# define isfinite(x) \ - (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ - sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ - gl_isfinitef (x)) -# endif -# ifdef __cplusplus -# if defined isfinite || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) -# undef isfinite -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines isfinite through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) -# define isfinite rpl_isfinite -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isfinite -_GL_WARN_REAL_FLOATING_DECL (isfinite); -# undef isfinite -# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) -# endif -#endif - - -#if 1 -# if 1 -_GL_EXTERN_C int gl_isinff (float x); -_GL_EXTERN_C int gl_isinfd (double x); -_GL_EXTERN_C int gl_isinfl (long double x); -# undef isinf -# define isinf(x) \ - (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ - sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ - gl_isinff (x)) -# endif -# ifdef __cplusplus -# if defined isinf || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) -# undef isinf -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isinf through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) -# define isinf rpl_isinf -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isinf -_GL_WARN_REAL_FLOATING_DECL (isinf); -# undef isinf -# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) -# endif -#endif - - -#if 1 -/* Test for NaN for 'float' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan macro - or (older) isnanf function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) -# elif defined isnan -# undef isnanf -# define isnanf(x) isnan ((float)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanf -# define isnanf rpl_isnanf -_GL_EXTERN_C int isnanf (float x); -# endif -#endif - -#if 1 -/* Test for NaN for 'double' numbers. - This function is a gnulib extension, unlike isnan() which applied only - to 'double' numbers earlier but now is a type-generic macro. */ -# if 1 -/* The original included above provides a declaration of isnan - macro. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnand -# define isnand(x) __builtin_isnan ((double)(x)) -# else -# undef isnand -# define isnand(x) isnan ((double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnand -# define isnand rpl_isnand -_GL_EXTERN_C int isnand (double x); -# endif -#endif - -#if 1 -/* Test for NaN for 'long double' numbers. */ -# if 0 -/* The original included above provides a declaration of isnan - macro or (older) isnanl function. */ -# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) -# elif defined isnan -# undef isnanl -# define isnanl(x) isnan ((long double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanl -# define isnanl rpl_isnanl -_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; -# endif -#endif - -/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ -#if 1 -# if 1 -/* We can't just use the isnanf macro (e.g.) as exposed by - isnanf.h (e.g.) here, because those may end up being macros - that recursively expand back to isnan. So use the gnulib - replacements for them directly. */ -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf)) -# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) -# else -_GL_EXTERN_C int rpl_isnanf (float x); -# define gl_isnan_f(x) rpl_isnanf (x) -# endif -# if 1 && __GNUC__ >= 4 -# define gl_isnan_d(x) __builtin_isnan ((double)(x)) -# else -_GL_EXTERN_C int rpl_isnand (double x); -# define gl_isnan_d(x) rpl_isnand (x) -# endif -# if 0 && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) -# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) -# else -_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; -# define gl_isnan_l(x) rpl_isnanl (x) -# endif -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ - sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ - gl_isnan_f (x)) -# elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl))) -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ - sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ - __builtin_isnanf ((float)(x))) -# endif -# ifdef __cplusplus -# if defined isnan || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) -# undef isnan -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)) - /* This platform's possibly defines isnan through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) -# define isnan rpl_isnan -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) -# endif -# endif -# else -/* Ensure isnan is a macro. */ -# ifndef isnan -# define isnan isnan -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isnan -_GL_WARN_REAL_FLOATING_DECL (isnan); -# undef isnan -# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) -# endif -#endif - - -#if 1 -# if (0 \ - && (!defined __cplusplus || __cplusplus < 201103)) -# undef signbit - /* GCC 4.0 and newer provides three built-ins for signbit. */ -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ - sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ - __builtin_signbitf (x)) -# endif -# if 0 && !GNULIB_defined_signbit -# undef signbit -_GL_EXTERN_C int gl_signbitf (float arg); -_GL_EXTERN_C int gl_signbitd (double arg); -_GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ -# define _GL_NUM_UINT_WORDS(type) \ - ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) -# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf -# define gl_signbitf_OPTIMIZED_MACRO -# define gl_signbitf(arg) \ - ({ union { float _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd -# define gl_signbitd_OPTIMIZED_MACRO -# define gl_signbitd(arg) \ - ({ union { double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl -# define gl_signbitl_OPTIMIZED_MACRO -# define gl_signbitl(arg) \ - ({ union { long double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# endif -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ - sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ - gl_signbitf (x)) -# define GNULIB_defined_signbit 1 -# endif -# ifdef __cplusplus -# if defined signbit || defined GNULIB_NAMESPACE -_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) -# undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX)) - /* This platform's possibly defines signbit through a set of inline - functions. */ -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) -# define signbit rpl_signbit -# else -_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if defined signbit -_GL_WARN_REAL_FLOATING_DECL (signbit); -# undef signbit -# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) -# endif -#endif - -_GL_INLINE_HEADER_END - -#endif /* _GL_LTS_MATH_H */ -#endif /* _GL_LTS_MATH_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-runtime/config.h b/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-runtime/config.h deleted file mode 100644 index 79ccb987d..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-runtime/config.h +++ /dev/null @@ -1,1542 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if // is a file system root distinct from /. */ -#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the file system. */ -#define ENABLE_RELOCATABLE 1 - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like 'struct s { int n; short - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate - the size in bytes of such a struct containing an N-element array. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ -/* #undef FUNC_REALPATH_WORKS */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize-lgpl shall be considered present. */ -#define GNULIB_CANONICALIZE_LGPL 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fwriteerror shall be considered present. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module sigpipe shall be considered present. */ -#define GNULIB_SIGPIPE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to 1 when the gnulib module canonicalize_file_name should be tested. - */ -#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module environ should be tested. */ -#define GNULIB_TEST_ENVIRON 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module getopt-posix should be tested. */ -#define GNULIB_TEST_GETOPT_POSIX 1 - -/* Define to 1 when the gnulib module iswblank should be tested. */ -#define GNULIB_TEST_ISWBLANK 1 - -/* Define to 1 when the gnulib module iswdigit should be tested. */ -#define GNULIB_TEST_ISWDIGIT 1 - -/* Define to 1 when the gnulib module iswxdigit should be tested. */ -#define GNULIB_TEST_ISWXDIGIT 1 - -/* Define to 1 when the gnulib module localename should be tested. */ -#define GNULIB_TEST_LOCALENAME 1 - -/* Define to 1 when the gnulib module lstat should be tested. */ -#define GNULIB_TEST_LSTAT 1 - -/* Define to 1 when the gnulib module mbrtowc should be tested. */ -#define GNULIB_TEST_MBRTOWC 1 - -/* Define to 1 when the gnulib module mbsinit should be tested. */ -#define GNULIB_TEST_MBSINIT 1 - -/* Define to 1 when the gnulib module mbslen should be tested. */ -#define GNULIB_TEST_MBSLEN 1 - -/* Define to 1 when the gnulib module mbsstr should be tested. */ -#define GNULIB_TEST_MBSSTR 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module readlink should be tested. */ -#define GNULIB_TEST_READLINK 1 - -/* Define to 1 when the gnulib module realpath should be tested. */ -#define GNULIB_TEST_REALPATH 1 - -/* Define to 1 when the gnulib module setlocale should be tested. */ -#define GNULIB_TEST_SETLOCALE 1 - -/* Define to 1 when the gnulib module setlocale_null should be tested. */ -#define GNULIB_TEST_SETLOCALE_NULL 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module strnlen should be tested. */ -#define GNULIB_TEST_STRNLEN 1 - -/* Define to 1 when the gnulib module wcwidth should be tested. */ -#define GNULIB_TEST_WCWIDTH 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUCR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-uctomb shall be considered present. */ -#define GNULIB_UNISTR_U8_UCTOMB 1 - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the Mac OS X function - CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define to 1 if you have the `copy_file_range' function. */ -/* #undef HAVE_COPY_FILE_RANGE */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `iswblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISWBLANK 1 - -/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBRTOWC */ - -/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you - don't. */ -#define HAVE_DECL_MBSINIT 1 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. - */ -#define HAVE_DECL_SETENV 0 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 1 - -/* Define to 1 if you have the declaration of `towlower', and to 0 if you - don't. */ -/* #undef HAVE_DECL_TOWLOWER */ - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 0 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the `duplocale' function. */ -/* #undef HAVE_DUPLOCALE */ - -/* Define if you have the declaration of environ. */ -#define HAVE_ENVIRON_DECL 1 - -/* Define if the locale_t type contains insufficient information, as on - OpenBSD. */ -/* #undef HAVE_FAKE_LOCALES */ - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the `freelocale' function. */ -/* #undef HAVE_FREELOCALE */ - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the `getlocalename_l' function. */ -/* #undef HAVE_GETLOCALENAME_L */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getopt_long_only' function. */ -/* #undef HAVE_GETOPT_LONG_ONLY */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ICONV_H 1 - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the `iswblank' function. */ -#define HAVE_ISWBLANK 1 - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define if you have and nl_langinfo(CODESET). */ -/* #undef HAVE_LANGINFO_CODESET */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LANGINFO_H */ - -/* Define if your file defines LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACH_O_DYLD_H */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the `mbsinit' function. */ -/* #undef HAVE_MBSINIT */ - -/* Define to 1 if you have the `mbslen' function. */ -/* #undef HAVE_MBSLEN */ - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define if the locale_t type does not contain the name of each locale - category. */ -/* #undef HAVE_NAMELESS_LOCALES */ - -/* Define to 1 if you have the `newlocale' function. */ -/* #undef HAVE_NEWLOCALE */ - -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the `readlinkat' function. */ -/* #undef HAVE_READLINKAT */ - -/* Define to 1 if you have the `realpath' function. */ -/* #undef HAVE_REALPATH */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the locale_t type is as on Solaris 11.4. */ -/* #undef HAVE_SOLARIS114_LOCALES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CDEFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the `towlower' function. */ -/* #undef HAVE_TOWLOWER */ - -/* Define to 1 if you have the `tsearch' function. */ -/* #undef HAVE_TSEARCH */ - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if the system has the type 'unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define to 1 if you have the `uselocale' function. */ -/* #undef HAVE_USELOCALE */ - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -/* #undef HAVE_WCWIDTH */ - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define if the uselocale function exists any may safely be called. */ -/* #undef HAVE_WORKING_USELOCALE */ - -/* Define to 1 if you have the `wprintf' function. */ -/* #undef HAVE_WPRINTF */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_XLOCALE_H */ - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -#define INSTALLPREFIX "/cygdrive/c/software.b/gettext-0.21.0" - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing - slash. */ -/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Define if the mbrtowc function does not return (size_t) -2 for empty input. - */ -#define MBRTOWC_EMPTY_INPUT_BUG 1 - -/* Define if the mbrtowc function may signal encoding errors in the C locale. - */ -/* #undef MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ */ - -/* Define if the mbrtowc function has the NULL pwc argument bug. */ -/* #undef MBRTOWC_NULL_ARG1_BUG */ - -/* Define if the mbrtowc function has the NULL string argument bug. */ -/* #undef MBRTOWC_NULL_ARG2_BUG */ - -/* Define if the mbrtowc function does not return 0 for a NUL character. */ -/* #undef MBRTOWC_NUL_RETVAL_BUG */ - -/* Define if the mbrtowc function returns a wrong return value. */ -#define MBRTOWC_RETVAL_BUG 1 - -/* Define if the mbrtowc function stores a wide character when reporting - incomplete input. */ -#define MBRTOWC_STORES_INCOMPLETE_BUG 1 - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define to 1 to enable general improvements of setlocale. */ -#define NEED_SETLOCALE_IMPROVED 1 - -/* Define to 1 to enable a multithread-safety fix of setlocale. */ -#define NEED_SETLOCALE_MTSAFE 0 - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "gettext-runtime" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "bug-gettext@gnu.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gettext-runtime" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-runtime 0.21" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gettext-runtime" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.21" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -/* #undef READLINK_TRAILING_SLASH_BUG */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ALL_MTSAFE 1 - -/* Define to 1 if setlocale (category, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ONE_MTSAFE 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define to the prefix of C symbols at the assembler and linker level, either - an underscore or empty. */ -#define USER_LABEL_PREFIX - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define when --enable-shared is used on mingw or Cygwin. */ -#define WOE32DLL 1 - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 on Solaris. */ -/* #undef _LCONV_C99 */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#ifndef _GL_UNUSED -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -# else -# define _GL_UNUSED -# endif -#endif - -/* The __pure__ attribute was added in gcc 2.96. */ -#ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define _GL_ATTRIBUTE_PURE /* empty */ -# endif -#endif - - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded - - - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#if defined __EMX__ && !defined __KLIBC__ -# include "intl/os2compat.h" -#endif - diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-runtime/gnulib-lib/stdint.h b/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-runtime/gnulib-lib/stdint.h deleted file mode 100644 index 851128d88..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-runtime/gnulib-lib/stdint.h +++ /dev/null @@ -1,747 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _GL_STDINT_H - -#if __GNUC__ >= 3 - -#endif - - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H -# include "../include/stdint.h" -#else - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if 1 -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _GL_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# include "../include/stdint.h" -#endif - -#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_STDINT_H - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -#include - -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if 1 -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - -#if ! 1 - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after "../include/stdint.h". */ -# if 1 && ! defined _AIX -# include -# endif - -# if 1 - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -# elif 0 - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -# endif - -# if 0 && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -# endif - -# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -/* These are separate macros, because if you try to merge these macros into - a single one, HP-UX cc rejects the resulting expression in constant - expressions. */ -# define _STDINT_UNSIGNED_MIN(bits, zero) \ - (zero) -# define _STDINT_SIGNED_MIN(bits, zero) \ - (~ _STDINT_MAX (1, bits, zero)) - -# define _STDINT_MAX(signed, bits, zero) \ - (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef int8_t -# undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -# define int8_t gl_int8_t -# define uint8_t gl_uint8_t - -# undef int16_t -# undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -# define int16_t gl_int16_t -# define uint16_t gl_uint16_t - -# undef int32_t -# undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -# define int32_t gl_int32_t -# define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -# ifdef INT64_MAX -# define GL_INT64_T -# else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# else -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -# endif - -# ifdef UINT64_MAX -# define GL_UINT64_T -# else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# else -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -# endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -# define _UINT8_T -# define _UINT32_T -# define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef int_least8_t -# undef uint_least8_t -# undef int_least16_t -# undef uint_least16_t -# undef int_least32_t -# undef uint_least32_t -# undef int_least64_t -# undef uint_least64_t -# define int_least8_t int8_t -# define uint_least8_t uint8_t -# define int_least16_t int16_t -# define uint_least16_t uint16_t -# define int_least32_t int32_t -# define uint_least32_t uint32_t -# ifdef GL_INT64_T -# define int_least64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_least64_t uint64_t -# endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -# undef int_fast8_t -# undef uint_fast8_t -# undef int_fast16_t -# undef uint_fast16_t -# undef int_fast32_t -# undef uint_fast32_t -# undef int_fast64_t -# undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -# ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -# else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -# endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -# define int_fast8_t gl_int_fast8_t -# define uint_fast8_t gl_uint_fast8_t -# define int_fast16_t gl_int_fast16_t -# define uint_fast16_t gl_uint_fast16_t -# define int_fast32_t gl_int_fast32_t -# define uint_fast32_t gl_uint_fast32_t -# ifdef GL_INT64_T -# define int_fast64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -# endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -/* kLIBC's defines _INTPTR_T_DECLARED and needs its own - definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and - uintptr_t to avoid conflicting declarations of system functions like - _findclose in . */ -# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) -# undef intptr_t -# undef uintptr_t -# ifdef _WIN64 -typedef long long int gl_intptr_t; -typedef unsigned long long int gl_uintptr_t; -# else -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -# endif -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t -# endif - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -# ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -# endif - -# ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -# endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -# define GNULIB_defined_stdint_types 1 -# endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef INT8_MIN -# undef INT8_MAX -# undef UINT8_MAX -# define INT8_MIN (~ INT8_MAX) -# define INT8_MAX 127 -# define UINT8_MAX 255 - -# undef INT16_MIN -# undef INT16_MAX -# undef UINT16_MAX -# define INT16_MIN (~ INT16_MAX) -# define INT16_MAX 32767 -# define UINT16_MAX 65535 - -# undef INT32_MIN -# undef INT32_MAX -# undef UINT32_MAX -# define INT32_MIN (~ INT32_MAX) -# define INT32_MAX 2147483647 -# define UINT32_MAX 4294967295U - -# if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -# endif - -# if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -# endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef INT_LEAST8_MIN -# undef INT_LEAST8_MAX -# undef UINT_LEAST8_MAX -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST8_MAX INT8_MAX -# define UINT_LEAST8_MAX UINT8_MAX - -# undef INT_LEAST16_MIN -# undef INT_LEAST16_MAX -# undef UINT_LEAST16_MAX -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST16_MAX INT16_MAX -# define UINT_LEAST16_MAX UINT16_MAX - -# undef INT_LEAST32_MIN -# undef INT_LEAST32_MAX -# undef UINT_LEAST32_MAX -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST32_MAX INT32_MAX -# define UINT_LEAST32_MAX UINT32_MAX - -# undef INT_LEAST64_MIN -# undef INT_LEAST64_MAX -# ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -# endif - -# undef UINT_LEAST64_MAX -# ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -# undef INT_FAST8_MIN -# undef INT_FAST8_MAX -# undef UINT_FAST8_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define UINT_FAST8_MAX UCHAR_MAX - -# undef INT_FAST16_MIN -# undef INT_FAST16_MAX -# undef UINT_FAST16_MAX -# define INT_FAST16_MIN INT_FAST32_MIN -# define INT_FAST16_MAX INT_FAST32_MAX -# define UINT_FAST16_MAX UINT_FAST32_MAX - -# undef INT_FAST32_MIN -# undef INT_FAST32_MAX -# undef UINT_FAST32_MAX -# ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -# else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -# endif - -# undef INT_FAST64_MIN -# undef INT_FAST64_MAX -# ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -# endif - -# undef UINT_FAST64_MAX -# ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -# undef INTPTR_MIN -# undef INTPTR_MAX -# undef UINTPTR_MAX -# ifdef _WIN64 -# define INTPTR_MIN LLONG_MIN -# define INTPTR_MAX LLONG_MAX -# define UINTPTR_MAX ULLONG_MAX -# else -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX -# endif - -/* 7.18.2.5. Limits of greatest-width integer types */ - -# ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -# endif - -# ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -# endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -# undef PTRDIFF_MIN -# undef PTRDIFF_MAX -# if 0 -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -# else -# define PTRDIFF_MIN \ - _STDINT_SIGNED_MIN (, 0) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, , 0) -# endif - -/* sig_atomic_t limits */ -# undef SIG_ATOMIC_MIN -# undef SIG_ATOMIC_MAX -# if -# define SIG_ATOMIC_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define SIG_ATOMIC_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define SIG_ATOMIC_MAX \ - _STDINT_MAX (, , \ - 0) - - -/* size_t limit */ -# undef SIZE_MAX -# if 0 -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -# else -# define SIZE_MAX _STDINT_MAX (0, , 0) -# endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -# if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# endif -# undef WCHAR_MIN -# undef WCHAR_MAX -# if -# define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WCHAR_MAX \ - _STDINT_MAX (, , 0) - -/* wint_t limits */ -/* If gnulib's or overrides wint_t, is not - accurate, therefore use the definitions from above. */ -# if !1 -# undef WINT_MIN -# undef WINT_MAX -# if -# define WINT_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WINT_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WINT_MAX \ - _STDINT_MAX (, , 0) -# endif - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -# undef INT8_C -# undef UINT8_C -# define INT8_C(x) x -# define UINT8_C(x) x - -# undef INT16_C -# undef UINT16_C -# define INT16_C(x) x -# define UINT16_C(x) x - -# undef INT32_C -# undef UINT32_C -# define INT32_C(x) x -# define UINT32_C(x) x ## U - -# undef INT64_C -# undef UINT64_C -# if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -# elif defined _MSC_VER -# define INT64_C(x) x##i64 -# else -# define INT64_C(x) x##LL -# endif -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -# elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -# else -# define UINT64_C(x) x##ULL -# endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -# ifndef INTMAX_C -# if LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -# endif - -# ifndef UINTMAX_C -# if ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -# endif - -#endif /* !1 */ - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (!defined UINTMAX_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# ifdef INT8_MAX -# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -# endif -# ifdef UINT8_MAX -# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -# endif -# ifdef INT16_MAX -# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -# endif -# ifdef UINT16_MAX -# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -# endif -# ifdef INT32_MAX -# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -# endif -# ifdef UINT32_MAX -# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -# endif -# ifdef INT64_MAX -# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -# endif -# ifdef UINT64_MAX -# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -# endif -# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -# ifdef WINT_MAX -# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -# endif -# ifdef SIG_ATOMIC_MAX -# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -# endif -#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _GL_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/config.h b/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/config.h deleted file mode 100644 index d262c4f74..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/config.h +++ /dev/null @@ -1,2872 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - - -/* Default value for alignment of strings in .mo file. */ -#define DEFAULT_OUTPUT_ALIGNMENT 1 - - -/* Define this to an absolute name of . */ -#define ABSOLUTE_LIBXML2_LIBXML_XMLEXPORTS_H "c:\\vs14.0\\include\\libxml2/libxml/xmlexports.h" - -/* Define this to an absolute name of . */ -/* #undef ABSOLUTE_LIBXML2_LIBXML_XMLVERSION_H */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to the number of bits in type 'ptrdiff_t'. */ -/* #undef BITSIZEOF_PTRDIFF_T */ - -/* Define to the number of bits in type 'sig_atomic_t'. */ -/* #undef BITSIZEOF_SIG_ATOMIC_T */ - -/* Define to the number of bits in type 'size_t'. */ -/* #undef BITSIZEOF_SIZE_T */ - -/* Define to the number of bits in type 'wchar_t'. */ -/* #undef BITSIZEOF_WCHAR_T */ - -/* Define to the number of bits in type 'wint_t'. */ -/* #undef BITSIZEOF_WINT_T */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define to 1 if using 'alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'double'. */ -#define DBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'double'. */ -#define DBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'double'. */ -/* #undef DBL_SIGNBIT_WORD */ - -/* the name of the file descriptor member of DIR */ -/* #undef DIR_FD_MEMBER_NAME */ - -#ifdef DIR_FD_MEMBER_NAME -# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME) -#else -# define DIR_TO_FD(Dir_p) -1 -#endif - - -/* Define to 1 if // is a file system root distinct from /. */ -#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the file system. */ -#define ENABLE_RELOCATABLE 1 - -/* Define according to the byte order of the target machine: 1 for big endian, - 0 for little endian. */ -#define ENDIANNESS 0 - -/* Define this to 1 if F_DUPFD behavior does not match POSIX */ -/* #undef FCNTL_DUPFD_BUGGY */ - -/* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like 'struct s { int n; short - d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 - compilers. Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate - the size in bytes of such a struct containing an N-element array. */ -#define FLEXIBLE_ARRAY_MEMBER /**/ - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'float'. */ -#define FLT_EXPBIT0_BIT 23 - -/* Define as the word index where to find the exponent of 'float'. */ -#define FLT_EXPBIT0_WORD 0 - -/* Define as the bit index in the word where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'float'. */ -/* #undef FLT_SIGNBIT_WORD */ - -/* Define to 1 if fopen() fails to recognize a trailing slash. */ -#define FOPEN_TRAILING_SLASH_BUG 1 - -/* Define to 1 if the system's ftello function has the Solaris bug. */ -/* #undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE */ - -/* Define to 1 if mkdir mistakenly creates a directory given with a trailing - dot component. */ -#define FUNC_MKDIR_DOT_BUG 1 - -/* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */ -/* #undef FUNC_NL_LANGINFO_YESEXPR_WORKS */ - -/* Define to 1 if realpath() can malloc memory, always gives an absolute path, - and handles trailing slash correctly. */ -/* #undef FUNC_REALPATH_WORKS */ - -/* Define to 1 if ungetc is broken when used on arbitrary bytes. */ -/* #undef FUNC_UNGETC_BROKEN */ - -/* Define to 1 if futimesat mishandles a NULL file name. */ -/* #undef FUTIMESAT_NULL_BUG */ - -/* Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday. */ -#define GETTIMEOFDAY_TIMEZONE void - -/* Define to 1 if getxattr works with XATTR_NAME_POSIX_ACL_ACCESS and - XATTR_NAME_POSIX_ACL_DEFAULT. */ -/* #undef GETXATTR_WITH_POSIX_ACLS */ - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize shall be considered present. */ -#define GNULIB_CANONICALIZE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module canonicalize-lgpl shall be considered present. */ -#define GNULIB_CANONICALIZE_LGPL 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fd-safer-flag shall be considered present. */ -#define GNULIB_FD_SAFER_FLAG 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module filenamecat shall be considered present. */ -#define GNULIB_FILENAMECAT IN_GETTEXT_TOOLS_GNULIB_TESTS - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fopen-gnu shall be considered present. */ -#define GNULIB_FOPEN_GNU 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fscanf shall be considered present. */ -#define GNULIB_FSCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fwriteerror shall be considered present. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module isblank shall be considered present. */ -#define GNULIB_ISBLANK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module lock shall be considered present. */ -#define GNULIB_LOCK 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#define GNULIB_MSVC_NOTHROW 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module pipe2-safer shall be considered present. */ -#define GNULIB_PIPE2_SAFER 1 - -/* Define to 1 if printf and friends should be labeled with attribute - "__gnu_printf__" instead of "__printf__" */ -/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */ - -/* Define when the error facility is replaced by gnulib. */ -#define GNULIB_REPLACE_ERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module scanf shall be considered present. */ -#define GNULIB_SCANF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module sigpipe shall be considered present. */ -#define GNULIB_SIGPIPE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module snprintf shall be considered present. */ -#define GNULIB_SNPRINTF 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror shall be considered present. */ -#define GNULIB_STRERROR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module strerror_r-posix shall be considered present. */ -#define GNULIB_STRERROR_R_POSIX IN_GETTEXT_TOOLS_GNULIB_TESTS - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module tempname shall be considered present. */ -#define GNULIB_TEMPNAME 1 - -/* Define to 1 when the gnulib module accept should be tested. */ -#define GNULIB_TEST_ACCEPT 1 - -/* Define to 1 when the gnulib module access should be tested. */ -#define GNULIB_TEST_ACCESS 1 - -/* Define to 1 when the gnulib module bind should be tested. */ -#define GNULIB_TEST_BIND 1 - -/* Define to 1 when the gnulib module btowc should be tested. */ -#define GNULIB_TEST_BTOWC 1 - -/* Define to 1 when the gnulib module canonicalize should be tested. */ -#define GNULIB_TEST_CANONICALIZE 1 - -/* Define to 1 when the gnulib module canonicalize_file_name should be tested. - */ -#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 - -/* Define to 1 when the gnulib module cloexec should be tested. */ -#define GNULIB_TEST_CLOEXEC 1 - -/* Define to 1 when the gnulib module close should be tested. */ -#define GNULIB_TEST_CLOSE 1 - -/* Define to 1 when the gnulib module closedir should be tested. */ -#define GNULIB_TEST_CLOSEDIR 1 - -/* Define to 1 when the gnulib module connect should be tested. */ -#define GNULIB_TEST_CONNECT 1 - -/* Define to 1 when the gnulib module copy-file-range should be tested. */ -#define GNULIB_TEST_COPY_FILE_RANGE 1 - -/* Define to 1 when the gnulib module creat should be tested. */ -#define GNULIB_TEST_CREAT 1 - -/* Define to 1 when the gnulib module dirfd should be tested. */ -#define GNULIB_TEST_DIRFD 1 - -/* Define to 1 when the gnulib module dup should be tested. */ -#define GNULIB_TEST_DUP 1 - -/* Define to 1 when the gnulib module dup2 should be tested. */ -#define GNULIB_TEST_DUP2 1 - -/* Define to 1 when the gnulib module environ should be tested. */ -#define GNULIB_TEST_ENVIRON 1 - -/* Define to 1 when the gnulib module explicit_bzero should be tested. */ -#define GNULIB_TEST_EXPLICIT_BZERO 1 - -/* Define to 1 when the gnulib module fcntl should be tested. */ -#define GNULIB_TEST_FCNTL 1 - -/* Define to 1 when the gnulib module fdopen should be tested. */ -#define GNULIB_TEST_FDOPEN 1 - -/* Define to 1 when the gnulib module fnmatch should be tested. */ -#define GNULIB_TEST_FNMATCH 1 - -/* Define to 1 when the gnulib module fopen should be tested. */ -#define GNULIB_TEST_FOPEN 1 - -/* Define to 1 when the gnulib module fstat should be tested. */ -#define GNULIB_TEST_FSTAT 1 - -/* Define to 1 when the gnulib module fsync should be tested. */ -#define GNULIB_TEST_FSYNC 1 - -/* Define to 1 when the gnulib module ftell should be tested. */ -#define GNULIB_TEST_FTELL 1 - -/* Define to 1 when the gnulib module ftello should be tested. */ -#define GNULIB_TEST_FTELLO 1 - -/* Define to 1 when the gnulib module ftruncate should be tested. */ -#define GNULIB_TEST_FTRUNCATE 1 - -/* Define to 1 when the gnulib module getcwd should be tested. */ -#define GNULIB_TEST_GETCWD 1 - -/* Define to 1 when the gnulib module getdelim should be tested. */ -#define GNULIB_TEST_GETDELIM 1 - -/* Define to 1 when the gnulib module getdtablesize should be tested. */ -#define GNULIB_TEST_GETDTABLESIZE 1 - -/* Define to 1 when the gnulib module getline should be tested. */ -#define GNULIB_TEST_GETLINE 1 - -/* Define to 1 when the gnulib module getopt-posix should be tested. */ -#define GNULIB_TEST_GETOPT_POSIX 1 - -/* Define to 1 when the gnulib module getpagesize should be tested. */ -#define GNULIB_TEST_GETPAGESIZE 1 - -/* Define to 1 when the gnulib module getrandom should be tested. */ -#define GNULIB_TEST_GETRANDOM 1 - -/* Define to 1 when the gnulib module gettimeofday should be tested. */ -#define GNULIB_TEST_GETTIMEOFDAY 1 - -/* Define to 1 when the gnulib module ioctl should be tested. */ -#define GNULIB_TEST_IOCTL 1 - -/* Define to 1 when the gnulib module isinf should be tested. */ -#define GNULIB_TEST_ISINF 1 - -/* Define to 1 when the gnulib module isnan should be tested. */ -#define GNULIB_TEST_ISNAN 1 - -/* Define to 1 when the gnulib module isnand should be tested. */ -#define GNULIB_TEST_ISNAND 1 - -/* Define to 1 when the gnulib module isnanf should be tested. */ -#define GNULIB_TEST_ISNANF 1 - -/* Define to 1 when the gnulib module isnanl should be tested. */ -#define GNULIB_TEST_ISNANL 1 - -/* Define to 1 when the gnulib module iswblank should be tested. */ -#define GNULIB_TEST_ISWBLANK 1 - -/* Define to 1 when the gnulib module iswdigit should be tested. */ -#define GNULIB_TEST_ISWDIGIT 1 - -/* Define to 1 when the gnulib module iswxdigit should be tested. */ -#define GNULIB_TEST_ISWXDIGIT 1 - -/* Define to 1 when the gnulib module listen should be tested. */ -#define GNULIB_TEST_LISTEN 1 - -/* Define to 1 when the gnulib module localeconv should be tested. */ -#define GNULIB_TEST_LOCALECONV 1 - -/* Define to 1 when the gnulib module localename should be tested. */ -#define GNULIB_TEST_LOCALENAME 1 - -/* Define to 1 when the gnulib module localtime should be tested. */ -#define GNULIB_TEST_LOCALTIME 1 - -/* Define to 1 when the gnulib module log10 should be tested. */ -#define GNULIB_TEST_LOG10 1 - -/* Define to 1 when the gnulib module lseek should be tested. */ -#define GNULIB_TEST_LSEEK 1 - -/* Define to 1 when the gnulib module lstat should be tested. */ -#define GNULIB_TEST_LSTAT 1 - -/* Define to 1 when the gnulib module malloc-posix should be tested. */ -#define GNULIB_TEST_MALLOC_POSIX 1 - -/* Define to 1 when the gnulib module mbrlen should be tested. */ -#define GNULIB_TEST_MBRLEN 1 - -/* Define to 1 when the gnulib module mbrtowc should be tested. */ -#define GNULIB_TEST_MBRTOWC 1 - -/* Define to 1 when the gnulib module mbsinit should be tested. */ -#define GNULIB_TEST_MBSINIT 1 - -/* Define to 1 when the gnulib module mbslen should be tested. */ -#define GNULIB_TEST_MBSLEN 1 - -/* Define to 1 when the gnulib module mbsrtowcs should be tested. */ -#define GNULIB_TEST_MBSRTOWCS 1 - -/* Define to 1 when the gnulib module mbsstr should be tested. */ -#define GNULIB_TEST_MBSSTR 1 - -/* Define to 1 when the gnulib module mbtowc should be tested. */ -#define GNULIB_TEST_MBTOWC 1 - -/* Define to 1 when the gnulib module memchr should be tested. */ -#define GNULIB_TEST_MEMCHR 1 - -/* Define to 1 when the gnulib module mempcpy should be tested. */ -#define GNULIB_TEST_MEMPCPY 1 - -/* Define to 1 when the gnulib module mkdtemp should be tested. */ -#define GNULIB_TEST_MKDTEMP 1 - -/* Define to 1 when the gnulib module nanosleep should be tested. */ -#define GNULIB_TEST_NANOSLEEP 1 - -/* Define to 1 when the gnulib module nl_langinfo should be tested. */ -#define GNULIB_TEST_NL_LANGINFO 1 - -/* Define to 1 when the gnulib module open should be tested. */ -#define GNULIB_TEST_OPEN 1 - -/* Define to 1 when the gnulib module opendir should be tested. */ -#define GNULIB_TEST_OPENDIR 1 - -/* Define to 1 when the gnulib module perror should be tested. */ -#define GNULIB_TEST_PERROR 1 - -/* Define to 1 when the gnulib module pipe should be tested. */ -#define GNULIB_TEST_PIPE 1 - -/* Define to 1 when the gnulib module pipe2 should be tested. */ -#define GNULIB_TEST_PIPE2 1 - -/* Define to 1 when the gnulib module posix_spawnattr_destroy should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1 - -/* Define to 1 when the gnulib module posix_spawnattr_init should be tested. - */ -#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1 - -/* Define to 1 when the gnulib module posix_spawnattr_setflags should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1 - -/* Define to 1 when the gnulib module posix_spawnattr_setsigmask should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1 - -/* Define to 1 when the gnulib module posix_spawnp should be tested. */ -#define GNULIB_TEST_POSIX_SPAWNP 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_addclose should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_adddup2 should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_addopen should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_destroy should - be tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1 - -/* Define to 1 when the gnulib module posix_spawn_file_actions_init should be - tested. */ -#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1 - -/* Define to 1 when the gnulib module pthread_sigmask should be tested. */ -#define GNULIB_TEST_PTHREAD_SIGMASK 1 - -/* Define to 1 when the gnulib module pthread-thread should be tested. */ -#define GNULIB_TEST_PTHREAD_THREAD 1 - -/* Define to 1 when the gnulib module putenv should be tested. */ -#define GNULIB_TEST_PUTENV 1 - -/* Define to 1 when the gnulib module raise should be tested. */ -#define GNULIB_TEST_RAISE 1 - -/* Define to 1 when the gnulib module rawmemchr should be tested. */ -#define GNULIB_TEST_RAWMEMCHR 1 - -/* Define to 1 when the gnulib module read should be tested. */ -#define GNULIB_TEST_READ 1 - -/* Define to 1 when the gnulib module readdir should be tested. */ -#define GNULIB_TEST_READDIR 1 - -/* Define to 1 when the gnulib module readlink should be tested. */ -#define GNULIB_TEST_READLINK 1 - -/* Define to 1 when the gnulib module realloc-posix should be tested. */ -#define GNULIB_TEST_REALLOC_POSIX 1 - -/* Define to 1 when the gnulib module realpath should be tested. */ -#define GNULIB_TEST_REALPATH 1 - -/* Define to 1 when the gnulib module rmdir should be tested. */ -#define GNULIB_TEST_RMDIR 1 - -/* Define to 1 when the gnulib module secure_getenv should be tested. */ -#define GNULIB_TEST_SECURE_GETENV 1 - -/* Define to 1 when the gnulib module select should be tested. */ -#define GNULIB_TEST_SELECT 1 - -/* Define to 1 when the gnulib module setenv should be tested. */ -#define GNULIB_TEST_SETENV 1 - -/* Define to 1 when the gnulib module setlocale should be tested. */ -#define GNULIB_TEST_SETLOCALE 1 - -/* Define to 1 when the gnulib module setlocale_null should be tested. */ -#define GNULIB_TEST_SETLOCALE_NULL 1 - -/* Define to 1 when the gnulib module setsockopt should be tested. */ -#define GNULIB_TEST_SETSOCKOPT 1 - -/* Define to 1 when the gnulib module sigaction should be tested. */ -#define GNULIB_TEST_SIGACTION 1 - -/* Define to 1 when the gnulib module signbit should be tested. */ -#define GNULIB_TEST_SIGNBIT 1 - -/* Define to 1 when the gnulib module sigprocmask should be tested. */ -#define GNULIB_TEST_SIGPROCMASK 1 - -/* Define to 1 when the gnulib module sleep should be tested. */ -#define GNULIB_TEST_SLEEP 1 - -/* Define to 1 when the gnulib module snprintf should be tested. */ -#define GNULIB_TEST_SNPRINTF 1 - -/* Define to 1 when the gnulib module socket should be tested. */ -#define GNULIB_TEST_SOCKET 1 - -/* Define to 1 when the gnulib module stat should be tested. */ -#define GNULIB_TEST_STAT 1 - -/* Define to 1 when the gnulib module stpcpy should be tested. */ -#define GNULIB_TEST_STPCPY 1 - -/* Define to 1 when the gnulib module stpncpy should be tested. */ -#define GNULIB_TEST_STPNCPY 1 - -/* Define to 1 when the gnulib module strchrnul should be tested. */ -#define GNULIB_TEST_STRCHRNUL 1 - -/* Define to 1 when the gnulib module strerror should be tested. */ -#define GNULIB_TEST_STRERROR 1 - -/* Define to 1 when the gnulib module strerror_r should be tested. */ -#define GNULIB_TEST_STRERROR_R 1 - -/* Define to 1 when the gnulib module strnlen should be tested. */ -#define GNULIB_TEST_STRNLEN 1 - -/* Define to 1 when the gnulib module strpbrk should be tested. */ -#define GNULIB_TEST_STRPBRK 1 - -/* Define to 1 when the gnulib module strstr should be tested. */ -#define GNULIB_TEST_STRSTR 1 - -/* Define to 1 when the gnulib module symlink should be tested. */ -#define GNULIB_TEST_SYMLINK 1 - -/* Define to 1 when the gnulib module unlink should be tested. */ -#define GNULIB_TEST_UNLINK 1 - -/* Define to 1 when the gnulib module unsetenv should be tested. */ -#define GNULIB_TEST_UNSETENV 1 - -/* Define to 1 when the gnulib module usleep should be tested. */ -#define GNULIB_TEST_USLEEP 1 - -/* Define to 1 when the gnulib module utime should be tested. */ -#define GNULIB_TEST_UTIME 1 - -/* Define to 1 when the gnulib module vasprintf should be tested. */ -#define GNULIB_TEST_VASPRINTF 1 - -/* Define to 1 when the gnulib module vsnprintf should be tested. */ -#define GNULIB_TEST_VSNPRINTF 1 - -/* Define to 1 when the gnulib module waitpid should be tested. */ -#define GNULIB_TEST_WAITPID 1 - -/* Define to 1 when the gnulib module wcrtomb should be tested. */ -#define GNULIB_TEST_WCRTOMB 1 - -/* Define to 1 when the gnulib module wctob should be tested. */ -#define GNULIB_TEST_WCTOB 1 - -/* Define to 1 when the gnulib module wctomb should be tested. */ -#define GNULIB_TEST_WCTOMB 1 - -/* Define to 1 when the gnulib module wcwidth should be tested. */ -#define GNULIB_TEST_WCWIDTH 1 - -/* Define to 1 when the gnulib module wmemchr should be tested. */ -#define GNULIB_TEST_WMEMCHR 1 - -/* Define to 1 when the gnulib module wmempcpy should be tested. */ -#define GNULIB_TEST_WMEMPCPY 1 - -/* Define to 1 when the gnulib module write should be tested. */ -#define GNULIB_TEST_WRITE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u16-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U16_MBTOUC 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUC 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ -#define GNULIB_UNISTR_U8_MBTOUCR 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-mbtouc-unsafe shall be considered - present. */ -#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1 - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module unistr/u8-uctomb shall be considered present. */ -#define GNULIB_UNISTR_U8_UCTOMB 1 - -/* Define to 1 if you have the `aclsort' function. */ -/* #undef HAVE_ACLSORT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ACLV_H */ - -/* Define to 1 if you have the `aclx_get' function. */ -/* #undef HAVE_ACLX_GET */ - -/* Define to 1 if you have the `acl_copy_ext_native' function. */ -/* #undef HAVE_ACL_COPY_EXT_NATIVE */ - -/* Define to 1 if you have the `acl_create_entry_np' function. */ -/* #undef HAVE_ACL_CREATE_ENTRY_NP */ - -/* Define to 1 if you have the `acl_delete_def_file' function. */ -/* #undef HAVE_ACL_DELETE_DEF_FILE */ - -/* Define to 1 if you have the `acl_delete_fd_np' function. */ -/* #undef HAVE_ACL_DELETE_FD_NP */ - -/* Define to 1 if you have the `acl_delete_file_np' function. */ -/* #undef HAVE_ACL_DELETE_FILE_NP */ - -/* Define to 1 if you have the `acl_entries' function. */ -/* #undef HAVE_ACL_ENTRIES */ - -/* Define to 1 if you have the `acl_extended_file' function. */ -/* #undef HAVE_ACL_EXTENDED_FILE */ - -/* Define to 1 if the constant ACL_FIRST_ENTRY exists. */ -/* #undef HAVE_ACL_FIRST_ENTRY */ - -/* Define to 1 if you have the `acl_free' function. */ -/* #undef HAVE_ACL_FREE */ - -/* Define to 1 if you have the `acl_free_text' function. */ -/* #undef HAVE_ACL_FREE_TEXT */ - -/* Define to 1 if you have the `acl_from_mode' function. */ -/* #undef HAVE_ACL_FROM_MODE */ - -/* Define to 1 if you have the `acl_from_text' function. */ -/* #undef HAVE_ACL_FROM_TEXT */ - -/* Define to 1 if you have the `acl_get_fd' function. */ -/* #undef HAVE_ACL_GET_FD */ - -/* Define to 1 if you have the `acl_get_file' function. */ -/* #undef HAVE_ACL_GET_FILE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ACL_LIBACL_H */ - -/* Define to 1 if you have the `acl_set_fd' function. */ -/* #undef HAVE_ACL_SET_FD */ - -/* Define to 1 if you have the `acl_set_file' function. */ -/* #undef HAVE_ACL_SET_FILE */ - -/* Define to 1 if you have the `acl_to_short_text' function. */ -/* #undef HAVE_ACL_TO_SHORT_TEXT */ - -/* Define to 1 if you have the `acl_trivial' function. */ -/* #undef HAVE_ACL_TRIVIAL */ - -/* Define to 1 if the ACL type ACL_TYPE_EXTENDED exists. */ -/* #undef HAVE_ACL_TYPE_EXTENDED */ - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_NAMESER_H */ - -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_BCRYPT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if you have the `btowc' function. */ -#define HAVE_BTOWC 1 - -/* Define to 1 if nanosleep mishandles large arguments. */ -/* #undef HAVE_BUG_BIG_NANOSLEEP */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BYTESWAP_H */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the `catgets' function. */ -/* #undef HAVE_CATGETS */ - -/* Define to 1 if you have the Mac OS X function - CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define to 1 if you have the `chown' function. */ -/* #undef HAVE_CHOWN */ - -/* Define to 1 if you have the `chsize' function. */ -#define HAVE_CHSIZE 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -/* #undef HAVE_CLOCK_GETTIME */ - -/* Define to 1 if you have the `clock_settime' function. */ -/* #undef HAVE_CLOCK_SETTIME */ - -/* Define to 1 if you have the `closedir' function. */ -/* #undef HAVE_CLOSEDIR */ - -/* Define to 1 if you have the `confstr' function. */ -/* #undef HAVE_CONFSTR */ - -/* Define if the copysignf function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNF_IN_LIBC */ - -/* Define if the copysignl function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGNL_IN_LIBC */ - -/* Define if the copysign function is declared in and available in - libc. */ -/* #undef HAVE_COPYSIGN_IN_LIBC */ - -/* Define to 1 if you have the `copy_file_range' function. */ -/* #undef HAVE_COPY_FILE_RANGE */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CRTDEFS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_CTYPE_H 1 - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. - */ -#define HAVE_DECL_ALARM 0 - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `copysign', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGN */ - -/* Define to 1 if you have the declaration of `copysignf', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNF */ - -/* Define to 1 if you have the declaration of `copysignl', and to 0 if you - don't. */ -/* #undef HAVE_DECL_COPYSIGNL */ - -/* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't. - */ -#define HAVE_DECL_DIRFD 0 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ftello', and to 0 if you don't. - */ -#define HAVE_DECL_FTELLO 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getdelim', and to 0 if you - don't. */ -#define HAVE_DECL_GETDELIM 0 - -/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you - don't. */ -#define HAVE_DECL_GETDTABLESIZE 0 - -/* Define to 1 if you have the declaration of `getline', and to 0 if you - don't. */ -#define HAVE_DECL_GETLINE 0 - -/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you - don't. */ -#define HAVE_DECL_INET_PTON 1 - -/* Define to 1 if you have the declaration of `isblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISBLANK 1 - -/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. - */ -#define HAVE_DECL_ISINF 1 - -/* Define to 1 if you have the declaration of `iswblank', and to 0 if you - don't. */ -#define HAVE_DECL_ISWBLANK 1 - -/* Define to 1 if you have the declaration of `mbrlen', and to 0 if you don't. - */ -/* #undef HAVE_DECL_MBRLEN */ - -/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBRTOWC */ - -/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you - don't. */ -#define HAVE_DECL_MBSINIT 1 - -/* Define to 1 if you have the declaration of `mbsrtowcs', and to 0 if you - don't. */ -/* #undef HAVE_DECL_MBSRTOWCS */ - -/* Define to 1 if you have a declaration of mbswidth() in , and to 0 - otherwise. */ -#define HAVE_DECL_MBSWIDTH_IN_WCHAR_H 0 - -/* Define to 1 if you have the declaration of `program_invocation_name', and - to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 - -/* Define to 1 if you have the declaration of `program_invocation_short_name', - and to 0 if you don't. */ -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. - */ -#define HAVE_DECL_SETENV 0 - -/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't. - */ -#define HAVE_DECL_SLEEP 0 - -/* Define to 1 if you have the declaration of `snprintf', and to 0 if you - don't. */ -#define HAVE_DECL_SNPRINTF 1 - -/* Define to 1 if you have the declaration of `stpncpy', and to 0 if you - don't. */ -#define HAVE_DECL_STPNCPY 0 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 1 - -/* Define to 1 if you have the declaration of `towlower', and to 0 if you - don't. */ -/* #undef HAVE_DECL_TOWLOWER */ - -/* Define to 1 if you have the declaration of `unsetenv', and to 0 if you - don't. */ -#define HAVE_DECL_UNSETENV 0 - -/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VSNPRINTF 1 - -/* Define to 1 if you have the declaration of `wcrtomb', and to 0 if you - don't. */ -/* #undef HAVE_DECL_WCRTOMB */ - -/* Define to 1 if you have the declaration of `wctob', and to 0 if you don't. - */ -/* #undef HAVE_DECL_WCTOB */ - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 0 - -/* Define to 1 if you have the declaration of `_putenv', and to 0 if you - don't. */ -#define HAVE_DECL__PUTENV 1 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - -/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. - */ -#define HAVE_DECL___ARGV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DIRENT_H */ - -/* Define to 1 if you have the `dirfd' function. */ -/* #undef HAVE_DIRFD */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DL_H */ - -/* Define to 1 if you have the `duplocale' function. */ -/* #undef HAVE_DUPLOCALE */ - -/* Define if you have the declaration of environ. */ -#define HAVE_ENVIRON_DECL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the `explicit_bzero' function. */ -/* #undef HAVE_EXPLICIT_BZERO */ - -/* Define to 1 if you have the `explicit_memset' function. */ -/* #undef HAVE_EXPLICIT_MEMSET */ - -/* Define to 1 if you have the `facl' function. */ -/* #undef HAVE_FACL */ - -/* Define if the locale_t type contains insufficient information, as on - OpenBSD. */ -/* #undef HAVE_FAKE_LOCALES */ - -/* Define to 1 if you have the `fchmod' function. */ -/* #undef HAVE_FCHMOD */ - -/* Define to 1 if you have the `fcntl' function. */ -/* #undef HAVE_FCNTL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FEATURES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `flockfile' function. */ -/* #undef HAVE_FLOCKFILE */ - -/* Define to 1 if you have the `fnmatch' function. */ -/* #undef HAVE_FNMATCH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FNMATCH_H */ - -/* Define to 1 if you have the `fork' function. */ -/* #undef HAVE_FORK */ - -/* Define to 1 if you have the `freelocale' function. */ -/* #undef HAVE_FREELOCALE */ - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -/* #undef HAVE_FSEEKO */ - -/* Define to 1 if you have the `fsync' function. */ -/* #undef HAVE_FSYNC */ - -/* Define to 1 if you have the `ftruncate' function. */ -/* #undef HAVE_FTRUNCATE */ - -/* Define to 1 if you have the `funlockfile' function. */ -/* #undef HAVE_FUNLOCKFILE */ - -/* Define to 1 if you have the `futimens' function. */ -/* #undef HAVE_FUTIMENS */ - -/* Define to 1 if you have the `futimes' function. */ -/* #undef HAVE_FUTIMES */ - -/* Define to 1 if you have the `futimesat' function. */ -/* #undef HAVE_FUTIMESAT */ - -/* Define to 1 if you have the `getacl' function. */ -/* #undef HAVE_GETACL */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -/* #undef HAVE_GETADDRINFO */ - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getdelim' function. */ -/* #undef HAVE_GETDELIM */ - -/* Define to 1 if you have the `getdtablesize' function. */ -/* #undef HAVE_GETDTABLESIZE */ - -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the `getexecname' function. */ -/* #undef HAVE_GETEXECNAME */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the `gethostbyname' function. */ -/* #undef HAVE_GETHOSTBYNAME */ - -/* Define to 1 if you have the `gethostname' function. */ -/* #undef HAVE_GETHOSTNAME */ - -/* Define to 1 if you have the `getlocalename_l' function. */ -/* #undef HAVE_GETLOCALENAME_L */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getopt_long_only' function. */ -/* #undef HAVE_GETOPT_LONG_ONLY */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define to 1 if you have the `getppriv' function. */ -/* #undef HAVE_GETPPRIV */ - -/* Define to 1 if you have the `getprogname' function. */ -/* #undef HAVE_GETPROGNAME */ - -/* Define to 1 if you have the `getrandom' function. */ -/* #undef HAVE_GETRANDOM */ - -/* Define to 1 if you have the `getrlimit' function. */ -/* #undef HAVE_GETRLIMIT */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define if you have the iconv() function and it works. */ -#define HAVE_ICONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ICONV_H 1 - -/* Define to 1 if you have the `inet_ntop' function. */ -/* #undef HAVE_INET_NTOP */ - -/* Define to 1 if you have the `inet_pton' function. */ -/* #undef HAVE_INET_PTON */ - -/* Define to 1 if the compiler supports one of the keywords 'inline', - '__inline__', '__inline' and effectively inlines functions marked as such. - */ -#define HAVE_INLINE 1 - -/* Define if you have the 'intmax_t' type in or . */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the `ioctl' function. */ -/* #undef HAVE_IOCTL */ - -/* Define to 1 if defines AF_INET. */ -#define HAVE_IPV4 1 - -/* Define if defines AF_INET6. */ -#define HAVE_IPV6 1 - -/* Define to 1 if you have the `isascii' function. */ -/* #undef HAVE_ISASCII */ - -/* Define to 1 if you have the `isblank' function. */ -#define HAVE_ISBLANK 1 - -/* Define if the isnan(double) function is available in libc. */ -#define HAVE_ISNAND_IN_LIBC 1 - -/* Define if the isnan(float) function is available in libc. */ -/* #undef HAVE_ISNANF_IN_LIBC */ - -/* Define if the isnan(long double) function is available in libc. */ -/* #undef HAVE_ISNANL_IN_LIBC */ - -/* Define to 1 if you have the `issetugid' function. */ -/* #undef HAVE_ISSETUGID */ - -/* Define to 1 if you have the `iswblank' function. */ -#define HAVE_ISWBLANK 1 - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define to 1 if you have the `iswctype' function. */ -#define HAVE_ISWCTYPE 1 - -/* Define if you have and nl_langinfo(CODESET). */ -/* #undef HAVE_LANGINFO_CODESET */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LANGINFO_H */ - -/* Define if your file defines LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBINTL_H 1 - -/* Define if you have the libtextstyle library. */ -/* #undef HAVE_LIBTEXTSTYLE */ - -/* Define if you have the libunistring library. */ -/* #undef HAVE_LIBUNISTRING */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBXML2_LIBXML_XMLEXPORTS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBXML2_LIBXML_XMLVERSION_H 1 - -/* Define to 1 if the bcrypt library is guaranteed to be present. */ -#define HAVE_LIB_BCRYPT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `localtime' function. */ -#define HAVE_LOCALTIME 1 - -/* Define to 1 if you support file names longer than 14 characters. */ -#define HAVE_LONG_FILE_NAMES 1 - -/* Define to 1 if the system has the type 'long long int'. */ -#define HAVE_LONG_LONG_INT 1 - -/* Define to 1 if you have the `lstat' function. */ -/* #undef HAVE_LSTAT */ - -/* Define to 1 if you have the `lutimes' function. */ -/* #undef HAVE_LUTIMES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACH_O_DYLD_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define if the 'malloc' function is POSIX compliant. */ -/* #undef HAVE_MALLOC_POSIX */ - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the `mbrlen' function. */ -#define HAVE_MBRLEN 1 - -/* Define to 1 if you have the `mbrtowc' function. */ -#define HAVE_MBRTOWC 1 - -/* Define to 1 if you have the `mbsinit' function. */ -/* #undef HAVE_MBSINIT */ - -/* Define to 1 if you have the `mbslen' function. */ -/* #undef HAVE_MBSLEN */ - -/* Define to 1 if you have the `mbsrtowcs' function. */ -#define HAVE_MBSRTOWCS 1 - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `mbtowc' function. */ -#define HAVE_MBTOWC 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `memset_s' function. */ -/* #undef HAVE_MEMSET_S */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_LIMITS_H */ - -/* Define to 1 if defines the MIN and MAX macros. */ -/* #undef HAVE_MINMAX_IN_SYS_PARAM_H */ - -/* Define to 1 if you have the `mkdtemp' function. */ -/* #undef HAVE_MKDTEMP */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `mprotect' function. */ -/* #undef HAVE_MPROTECT */ - -/* Define to 1 if you have the `mquery' function. */ -/* #undef HAVE_MQUERY */ - -/* Define to 1 on MSVC platforms that have the "invalid parameter handler" - concept. */ -#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define if the locale_t type does not contain the name of each locale - category. */ -/* #undef HAVE_NAMELESS_LOCALES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETDB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN_H */ - -/* Define to 1 if you have the `newlocale' function. */ -/* #undef HAVE_NEWLOCALE */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -/* #undef HAVE_NL_LANGINFO */ - -/* Define to 1 if the system has obstacks that work with any size object. */ -/* #undef HAVE_OBSTACK */ - -/* Define to 1 if you have the `opendir' function. */ -/* #undef HAVE_OPENDIR */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_OS_H */ - -/* Define to 1 if you have the `pathconf' function. */ -/* #undef HAVE_PATHCONF */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PATHS_H */ - -/* Define to 1 if you have the `pipe' function. */ -/* #undef HAVE_PIPE */ - -/* Define to 1 if you have the `pipe2' function. */ -/* #undef HAVE_PIPE2 */ - -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - -/* Define to 1 if you have the `posix_spawn' function. */ -/* #undef HAVE_POSIX_SPAWN */ - -/* Define to 1 if the system has the type `posix_spawnattr_t'. */ -/* #undef HAVE_POSIX_SPAWNATTR_T */ - -/* Define to 1 if the system has the type `posix_spawn_file_actions_t'. */ -/* #undef HAVE_POSIX_SPAWN_FILE_ACTIONS_T */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PRIV_H */ - -/* Define to 1 if you have the `pstat_getprocvm' function. */ -/* #undef HAVE_PSTAT_GETPROCVM */ - -/* Define if you have the header and the POSIX threads API. */ -/* #undef HAVE_PTHREAD_API */ - -/* Define to 1 if you have the `pthread_atfork' function. */ -/* #undef HAVE_PTHREAD_ATFORK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PTHREAD_H */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a - reader. */ -/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER */ - -/* Define to 1 if the pthread_sigmask function can be used (despite bugs). */ -/* #undef HAVE_PTHREAD_SIGMASK */ - -/* Define to 1 if the system has the type `pthread_spinlock_t'. */ -/* #undef HAVE_PTHREAD_SPINLOCK_T */ - -/* Define to 1 if the system has the type `pthread_t'. */ -/* #undef HAVE_PTHREAD_T */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PWD_H */ - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `rawmemchr' function. */ -/* #undef HAVE_RAWMEMCHR */ - -/* Define to 1 if you have the `readdir' function. */ -/* #undef HAVE_READDIR */ - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the `readlinkat' function. */ -/* #undef HAVE_READLINKAT */ - -/* Define if the 'realloc' function is POSIX compliant. */ -/* #undef HAVE_REALLOC_POSIX */ - -/* Define to 1 if you have the `realpath' function. */ -/* #undef HAVE_REALPATH */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_RESOLV_H */ - -/* Define to 1 if 'long double' and 'double' have the same representation. */ -#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1 - -/* Define to 1 if the system has the type `sa_family_t'. */ -/* #undef HAVE_SA_FAMILY_T */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SCHED_H */ - -/* Define to 1 if you have the `sched_setparam' function. */ -/* #undef HAVE_SCHED_SETPARAM */ - -/* Define to 1 if you have the `sched_setscheduler' function. */ -/* #undef HAVE_SCHED_SETSCHEDULER */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `secure_getenv' function. */ -/* #undef HAVE_SECURE_GETENV */ - -/* Define to 1 if you have the `select' function. */ -/* #undef HAVE_SELECT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SEMAPHORE_H */ - -/* Define to 1 if you have the `setdtablesize' function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define to 1 if you have the `setegid' function. */ -/* #undef HAVE_SETEGID */ - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `seteuid' function. */ -/* #undef HAVE_SETEUID */ - -/* Define to 1 if you have the `setrlimit' function. */ -/* #undef HAVE_SETRLIMIT */ - -/* Define to 1 if you have the `shutdown' function. */ -/* #undef HAVE_SHUTDOWN */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if you have the `sigaltstack' function. */ -/* #undef HAVE_SIGALTSTACK */ - -/* Define to 1 if defines the siginfo_t type, and struct sigaction - has the sa_sigaction member and the SA_SIGINFO flag. */ -/* #undef HAVE_SIGINFO */ - -/* Define to 1 if the system has the type `siginfo_t'. */ -/* #undef HAVE_SIGINFO_T */ - -/* Define to 1 if you have the `siginterrupt' function. */ -/* #undef HAVE_SIGINTERRUPT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if the system has the type `sigset_t'. */ -/* #undef HAVE_SIGSET_T */ - -/* Define to 1 if the system has the type `sig_atomic_t'. */ -#define HAVE_SIG_ATOMIC_T 1 - -/* Define to 1 if you have the `sleep' function. */ -/* #undef HAVE_SLEEP */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define if the return value of the snprintf function is the number of of - bytes (excluding the terminating NUL) that would have been produced if the - buffer had been large enough. */ -#define HAVE_SNPRINTF_RETVAL_C99 1 - -/* Define if the locale_t type is as on Solaris 11.4. */ -/* #undef HAVE_SOLARIS114_LOCALES */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SPAWN_H */ - -/* Define to 1 if you have the `stat' function. */ -#define HAVE_STAT 1 - -/* Define to 1 if you have the `statacl' function. */ -/* #undef HAVE_STATACL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#define HAVE_STDINT_H_WITH_UINTMAX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define if you have the stpncpy() function and it works. */ -/* #undef HAVE_STPNCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strchrnul' function. */ -/* #undef HAVE_STRCHRNUL */ - -/* Define to 1 if you have the `strcspn' function. */ -#define HAVE_STRCSPN 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strpbrk' function. */ -#define HAVE_STRPBRK 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `decimal_point' is a member of `struct lconv'. */ -/* #undef HAVE_STRUCT_LCONV_DECIMAL_POINT */ - -/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ -/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */ - -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 - -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */ - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */ - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */ - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */ - -/* Define to 1 if you have the `symlink' function. */ -/* #undef HAVE_SYMLINK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ACL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CDEFS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOCTL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_RANDOM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SOCKET_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_UIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_WAIT_H */ - -/* Define to 1 if you have the `tcdrain' function. */ -/* #undef HAVE_TCDRAIN */ - -/* Define to 1 if you have the `thrd_create' function. */ -/* #undef HAVE_THRD_CREATE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_THREADS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the `towlower' function. */ -/* #undef HAVE_TOWLOWER */ - -/* Define to 1 if you have the `tsearch' function. */ -/* #undef HAVE_TSEARCH */ - -/* Define if you have the 'uintmax_t' type in or . */ -#define HAVE_UINTMAX_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if you have the `unsetenv' function. */ -/* #undef HAVE_UNSETENV */ - -/* Define to 1 if the system has the type `unsigned long long int'. */ -#define HAVE_UNSIGNED_LONG_LONG_INT 1 - -/* Define to 1 if you have the `uselocale' function. */ -/* #undef HAVE_USELOCALE */ - -/* Define to 1 if you have the `usleep' function. */ -/* #undef HAVE_USLEEP */ - -/* Define to 1 if you have the `utime' function. */ -#define HAVE_UTIME 1 - -/* Define to 1 if you have the `utimensat' function. */ -/* #undef HAVE_UTIMENSAT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UTIME_H */ - -/* Define if you have a global __progname variable */ -/* #undef HAVE_VAR___PROGNAME */ - -/* Define to 1 if you have the `vasnprintf' function. */ -/* #undef HAVE_VASNPRINTF */ - -/* Define to 1 if you have the `vasprintf' function. */ -/* #undef HAVE_VASPRINTF */ - -/* Define to 1 if you have the `vfork' function. */ -/* #undef HAVE_VFORK */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VFORK_H */ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if you have the `vsnprintf' function. */ -/* #undef HAVE_VSNPRINTF */ - -/* Define to 1 if you have the `waitid' function. */ -/* #undef HAVE_WAITID */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcrtomb' function. */ -#define HAVE_WCRTOMB 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the `wcsnlen' function. */ -#define HAVE_WCSNLEN 1 - -/* Define to 1 if you have the `wctob' function. */ -#define HAVE_WCTOB 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -/* #undef HAVE_WCWIDTH */ - -/* Define to 1 if the compiler and linker support weak declarations of - symbols. */ -/* #undef HAVE_WEAK_SYMBOLS */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WINSOCK2_H 1 - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if you have the `wmempcpy' function. */ -/* #undef HAVE_WMEMPCPY */ - -/* Define to 1 if `fork' works. */ -/* #undef HAVE_WORKING_FORK */ - -/* Define to 1 if O_NOATIME works. */ -#define HAVE_WORKING_O_NOATIME 0 - -/* Define to 1 if O_NOFOLLOW works. */ -#define HAVE_WORKING_O_NOFOLLOW 0 - -/* Define if the uselocale function exists any may safely be called. */ -/* #undef HAVE_WORKING_USELOCALE */ - -/* Define if utimes works properly. */ -/* #undef HAVE_WORKING_UTIMES */ - -/* Define to 1 if `vfork' works. */ -/* #undef HAVE_WORKING_VFORK */ - -/* Define to 1 if you have the `wprintf' function. */ -/* #undef HAVE_WPRINTF */ - -/* Define to 1 if you have the header file. */ -#define HAVE_WS2TCPIP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_XLOCALE_H */ - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to 1 if you have the `_ftelli64' function. */ -#define HAVE__FTELLI64 1 - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ -#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 - -/* Define to 1 if the compiler supports __builtin_expect, - and to 2 if does. */ -/* #undef HAVE___BUILTIN_EXPECT */ -#ifndef HAVE___BUILTIN_EXPECT -# define __builtin_expect(e, c) (e) -#elif HAVE___BUILTIN_EXPECT == 2 -# include -#endif - - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define to 1 if the compiler supports the keyword '__inline'. */ -#define HAVE___INLINE 1 - -/* Define to 1 if you have the `__secure_getenv' function. */ -/* #undef HAVE___SECURE_GETENV */ - -/* Define to 1 if you have the `__xpg_strerror_r' function. */ -/* #undef HAVE___XPG_STRERROR_R */ - -/* Define as const if the declaration of iconv() needs const. */ -#define ICONV_CONST - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -#define INSTALLPREFIX "/cygdrive/c/software.b/gettext-0.21.0" - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* Define as the bit index in the word where to find bit 0 of the exponent of - 'long double'. */ -#define LDBL_EXPBIT0_BIT 20 - -/* Define as the word index where to find the exponent of 'long double'. */ -#define LDBL_EXPBIT0_WORD 1 - -/* Define as the bit index in the word where to find the sign of 'long - double'. */ -/* #undef LDBL_SIGNBIT_BIT */ - -/* Define as the word index where to find the sign of 'long double'. */ -/* #undef LDBL_SIGNBIT_WORD */ - -/* Define if libxml is being used as a static library. */ -/* #undef LIBXML_STATIC */ - -/* Define to 1 if lseek does not detect pipes. */ -#define LSEEK_PIPE_BROKEN 1 - -/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing - slash. */ -/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ - -/* Define if the mbrtowc function does not return (size_t) -2 for empty input. - */ -#define MBRTOWC_EMPTY_INPUT_BUG 1 - -/* Define if the mbrtowc function may signal encoding errors in the C locale. - */ -/* #undef MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ */ - -/* Define if the mbrtowc function has the NULL pwc argument bug. */ -/* #undef MBRTOWC_NULL_ARG1_BUG */ - -/* Define if the mbrtowc function has the NULL string argument bug. */ -/* #undef MBRTOWC_NULL_ARG2_BUG */ - -/* Define if the mbrtowc function does not return 0 for a NUL character. */ -/* #undef MBRTOWC_NUL_RETVAL_BUG */ - -/* Define if the mbrtowc function returns a wrong return value. */ -#define MBRTOWC_RETVAL_BUG 1 - -/* Define if the mbrtowc function stores a wide character when reporting - incomplete input. */ -#define MBRTOWC_STORES_INCOMPLETE_BUG 1 - -/* Use GNU style printf and scanf. */ -#ifndef __USE_MINGW_ANSI_STDIO -# define __USE_MINGW_ANSI_STDIO 1 -#endif - - -/* Define to 1 on musl libc. */ -/* #undef MUSL_LIBC */ - -/* Define to 1 to enable general improvements of setlocale. */ -#define NEED_SETLOCALE_IMPROVED 1 - -/* Define to 1 to enable a multithread-safety fix of setlocale. */ -#define NEED_SETLOCALE_MTSAFE 0 - -/* Define to 1 if open() fails to recognize a trailing slash. */ -/* #undef OPEN_TRAILING_SLASH_BUG */ - -/* Name of package */ -#define PACKAGE "gettext-tools" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "bug-gettext@gnu.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "gettext-tools" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gettext-tools 0.21" - -/* Define to the suffix of this package */ -#define PACKAGE_SUFFIX "-0.21" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gettext-tools" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "0.21" - -/* Define to the type that is the result of default argument promotions of - type mode_t. */ -#define PROMOTED_MODE_T mode_t - -/* Define if pthread_create is an inline function. */ -/* #undef PTHREAD_CREATE_IS_INLINE */ - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to 1 if pthread_sigmask(), when it fails, returns -1 and sets errno. - */ -/* #undef PTHREAD_SIGMASK_FAILS_WITH_ERRNO */ - -/* Define to 1 if pthread_sigmask may return 0 and have no effect. */ -/* #undef PTHREAD_SIGMASK_INEFFECTIVE */ - -/* Define to 1 if pthread_sigmask() unblocks signals incorrectly. */ -/* #undef PTHREAD_SIGMASK_UNBLOCK_BUG */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -/* #undef PTRDIFF_T_SUFFIX */ - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -/* #undef READLINK_TRAILING_SLASH_BUG */ - -/* Define to 1 if gnulib's dirfd() replacement is used. */ -/* #undef REPLACE_DIRFD */ - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -/* #undef REPLACE_FUNC_STAT_FILE */ - -/* Define if nl_langinfo exists but is overridden by gnulib. */ -/* #undef REPLACE_NL_LANGINFO */ - -/* Define if gnulib uses its own posix_spawn and posix_spawnp functions. */ -#define REPLACE_POSIX_SPAWN 1 - -/* Define to 1 if strerror(0) does not return a message implying success. */ -/* #undef REPLACE_STRERROR_0 */ - -/* Define if vasnprintf exists but is overridden by gnulib. */ -/* #undef REPLACE_VASNPRINTF */ - -/* Define as const if the declaration of setlocale() needs const. */ -#define SETLOCALE_CONST - -/* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ALL_MTSAFE 1 - -/* Define to 1 if setlocale (category, NULL) is multithread-safe. */ -#define SETLOCALE_NULL_ONE_MTSAFE 1 - -/* File name of the Bourne shell. */ -#if defined __CYGWIN__ || defined __ANDROID__ -/* Omit the directory part because - - For 32-bit Cygwin programs in a 64-bit Cygwin environment, the Cygwin - mounts are not visible. - - On Android, /bin/sh does not exist. It's /system/bin/sh instead. */ -# define BOURNE_SHELL "sh" -#else -# define BOURNE_SHELL "/bin/sh" -#endif - -/* Define if lists must be signal-safe. */ -#define SIGNAL_SAFE_LIST 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -/* #undef SIG_ATOMIC_T_SUFFIX */ - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -/* # undef SIZE_MAX */ -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -/* #undef SIZE_T_SUFFIX */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */ - -/* Define to 1 if unlink (dir) cannot possibly succeed. */ -#define UNLINK_CANNOT_UNLINK_DIR 1 - -/* Define to 1 if unlink() on a parent directory may succeed */ -/* #undef UNLINK_PARENT_BUG */ - -/* Define to the prefix of C symbols at the assembler and linker level, either - an underscore or empty. */ -#define USER_LABEL_PREFIX - -/* Define to nonzero if you want access control list support. */ -#define USE_ACL 0 - -/* Define if the combination of the ISO C and POSIX multithreading APIs can be - used. */ -/* #undef USE_ISOC_AND_POSIX_THREADS */ - -/* Define if the ISO C multithreading library can be used. */ -/* #undef USE_ISOC_THREADS */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable general extensions on macOS. */ -#ifndef _DARWIN_C_SOURCE -# define _DARWIN_C_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# define _NETBSD_SOURCE 1 -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# define _OPENBSD_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 -#endif -/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -#ifndef __STDC_WANT_LIB_EXT2__ -# define __STDC_WANT_LIB_EXT2__ 1 -#endif -/* Enable extensions specified by ISO/IEC 24747:2009. */ -#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable X/Open extensions if necessary. HP-UX 11.11 defines - mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of - whether compiling with -Ae or -D_HPUX_SOURCE=1. */ -#ifndef _XOPEN_SOURCE -/* # undef _XOPEN_SOURCE */ -#endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# define _HPUX_ALT_XOPEN_SOCKET_API 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 1 - -/* Define if the native Windows multithreading API can be used. */ -#define USE_WINDOWS_THREADS 1 - -/* Define to a working va_copy macro or replacement. */ -#define VA_COPY va_copy - -/* Version number of package */ -#define VERSION "0.21" - -/* Define to 1 if unsetenv returns void instead of int. */ -/* #undef VOID_UNSETENV */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -/* #undef WCHAR_T_SUFFIX */ - -/* Define if the wcrtomb function does not work in the C locale. */ -/* #undef WCRTOMB_C_LOCALE_BUG */ - -/* Define if the wcrtomb function has an incorrect return value. */ -#define WCRTOMB_RETVAL_BUG 1 - -/* Define if WSAStartup is needed. */ -#define WINDOWS_SOCKETS 1 - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -/* #undef WINT_T_SUFFIX */ - -/* Define when --enable-shared is used on mingw or Cygwin. */ -#define WOE32DLL 1 - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 to internationalize bison runtime messages. */ -#define YYENABLE_NLS 1 - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* True if the compiler says it groks GNU C version MAJOR.MINOR. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ -# define _GL_GNUC_PREREQ(major, minor) \ - ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__)) -#else -# define _GL_GNUC_PREREQ(major, minor) 0 -#endif - - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -/* #undef _LARGEFILE_SOURCE */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to 1 on Solaris. */ -/* #undef _LCONV_C99 */ - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ -#define _NETBSD_SOURCE 1 - -/* The _Noreturn keyword of C11. */ -#ifndef _Noreturn -# if (defined __cplusplus \ - && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \ - || (defined _MSC_VER && 1900 <= _MSC_VER)) \ - && 0) - /* [[noreturn]] is not practically usable, because with it the syntax - extern _Noreturn void func (...); - would not be valid; such a declaration would only be valid with 'extern' - and '_Noreturn' swapped, or without the 'extern' keyword. However, some - AIX system header files and several gnulib header files use precisely - this syntax with 'extern'. */ -# define _Noreturn [[noreturn]] -# elif ((!defined __cplusplus || defined __clang__) \ - && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \ - || _GL_GNUC_PREREQ (4, 7) \ - || (defined __apple_build_version__ \ - ? 6000000 <= __apple_build_version__ \ - : 3 < __clang_major__ + (5 <= __clang_minor__)))) - /* _Noreturn works as-is. */ -# elif _GL_GNUC_PREREQ (2, 8) || 0x5110 <= __SUNPRO_C -# define _Noreturn __attribute__ ((__noreturn__)) -# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0) -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 in order to get the POSIX compatible declarations of socket - functions. */ -/* #undef _POSIX_PII_SOCKET */ - -/* Define to 1 if you need to in order for 'stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define if you want to include , so that it consistently - overrides 's RE_DUP_MAX. */ -#define _REGEX_INCLUDE_LIMITS_H 1 - -/* Define if you want regoff_t to be at least as wide POSIX requires. */ -#define _REGEX_LARGE_OFFSETS 1 - -/* For standard stat data types on VMS. */ -#define _USE_STD_STAT 1 - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_CONSTANT_MACROS */ - -/* Define to 1 if the system predates C++11. */ -/* #undef __STDC_LIMIT_MACROS */ - -/* The _GL_ASYNC_SAFE marker should be attached to functions that are - signal handlers (for signals other than SIGABRT, SIGPIPE) or can be - invoked from such signal handlers. Such functions have some restrictions: - * All functions that it calls should be marked _GL_ASYNC_SAFE as well, - or should be listed as async-signal-safe in POSIX - - section 2.4.3. Note that malloc(), sprintf(), and fwrite(), in - particular, are NOT async-signal-safe. - * All memory locations (variables and struct fields) that these functions - access must be marked 'volatile'. This holds for both read and write - accesses. Otherwise the compiler might optimize away stores to and - reads from such locations that occur in the program, depending on its - data flow analysis. For example, when the program contains a loop - that is intended to inspect a variable set from within a signal handler - while (!signal_occurred) - ; - the compiler is allowed to transform this into an endless loop if the - variable 'signal_occurred' is not declared 'volatile'. - Additionally, recall that: - * A signal handler should not modify errno (except if it is a handler - for a fatal signal and ends by raising the same signal again, thus - provoking the termination of the process). If it invokes a function - that may clobber errno, it needs to save and restore the value of - errno. */ -#define _GL_ASYNC_SAFE - - -/* Attributes. */ -#ifdef __has_attribute -# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) -#else -# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr -# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2) -# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95) -# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3) -# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1) -# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0) -# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6) -# ifdef _ICC -# define _GL_ATTR_may_alias 0 -# else -# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3) -# endif -# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0) -# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1) -# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0) -# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3) -# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96) -# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) -# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) -# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) -# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) -#endif - - -#if _GL_HAS_ATTRIBUTE (alloc_size) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -#else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -#endif - -#if _GL_HAS_ATTRIBUTE (always_inline) -# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__)) -#else -# define _GL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if _GL_HAS_ATTRIBUTE (artificial) -# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__)) -#else -# define _GL_ATTRIBUTE_ARTIFICIAL -#endif - -/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - . */ -#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) -#else -# define _GL_ATTRIBUTE_COLD -#endif - -#if _GL_HAS_ATTRIBUTE (const) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]] -#elif _GL_HAS_ATTRIBUTE (deprecated) -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -#else -# define _GL_ATTRIBUTE_DEPRECATED -#endif - -#if _GL_HAS_ATTRIBUTE (error) -# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) -# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) -#else -# define _GL_ATTRIBUTE_ERROR(msg) -# define _GL_ATTRIBUTE_WARNING(msg) -#endif - -#if _GL_HAS_ATTRIBUTE (externally_visible) -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible)) -#else -# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE -#endif - -/* FALLTHROUGH is special, because it always expands to something. */ -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]] -#elif _GL_HAS_ATTRIBUTE (fallthrough) -# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__)) -#else -# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0) -#endif - -#if _GL_HAS_ATTRIBUTE (format) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) -#endif - -#if _GL_HAS_ATTRIBUTE (leaf) -# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__)) -#else -# define _GL_ATTRIBUTE_LEAF -#endif - -#if _GL_HAS_ATTRIBUTE (may_alias) -# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) -#else -# define _GL_ATTRIBUTE_MAY_ALIAS -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] -#elif _GL_HAS_ATTRIBUTE (unused) -# define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_ATTRIBUTE_MAYBE_UNUSED -#endif -/* Earlier spellings of this macro. */ -#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED -#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED - -#if _GL_HAS_ATTRIBUTE (malloc) -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC -#endif - -#if 201710L < __STDC_VERSION__ -# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] -#elif _GL_HAS_ATTRIBUTE (warn_unused_result) -# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__)) -#else -# define _GL_ATTRIBUTE_NODISCARD -#endif - -#if _GL_HAS_ATTRIBUTE (noinline) -# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__)) -#else -# define _GL_ATTRIBUTE_NOINLINE -#endif - -#if _GL_HAS_ATTRIBUTE (nonnull) -# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args)) -#else -# define _GL_ATTRIBUTE_NONNULL(args) -#endif - -#if _GL_HAS_ATTRIBUTE (nonstring) -# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) -#else -# define _GL_ATTRIBUTE_NONSTRING -#endif - -/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */ - -#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus -# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__)) -#else -# define _GL_ATTRIBUTE_NOTHROW -#endif - -#if _GL_HAS_ATTRIBUTE (packed) -# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__)) -#else -# define _GL_ATTRIBUTE_PACKED -#endif - -#if _GL_HAS_ATTRIBUTE (pure) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE -#endif - -#if _GL_HAS_ATTRIBUTE (returns_nonnull) -# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) -#else -# define _GL_ATTRIBUTE_RETURNS_NONNULL -#endif - -#if _GL_HAS_ATTRIBUTE (sentinel) -# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos)) -#else -# define _GL_ATTRIBUTE_SENTINEL(pos) -#endif - - -/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'. */ -#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5) -# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_MAYBE_UNUSED -#else -# define _GL_UNUSED_LABEL -#endif - - -/* Define as 'access' if you don't have the eaccess() function. */ -#define eaccess access - -/* Please see the Gnulib manual for how to use these macros. - - Suppress extern inline with HP-UX cc, as it appears to be broken; see - . - - Suppress extern inline with Sun C in standards-conformance mode, as it - mishandles inline functions that call each other. E.g., for 'inline void f - (void) { } inline void g (void) { f (); }', c99 incorrectly complains - 'reference to static identifier "f" in extern inline function'. - This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - - Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) - on configurations that mistakenly use 'static inline' to implement - functions or macros in standard C headers like . For example, - if isdigit is mistakenly implemented via a static inline function, - a program containing an extern inline function that calls isdigit - may not work since the C standard prohibits extern inline functions - from calling static functions (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: - - OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html - - DragonFly; see - http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log - - FreeBSD; see: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html - - OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and - for clang but remains for g++; see . - Assume DragonFly and FreeBSD will be similar. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ -#if (((defined __APPLE__ && defined __MACH__) \ - || defined __DragonFly__ || defined __FreeBSD__) \ - && (defined __header_inline \ - ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ - && ! defined __clang__) \ - : ((! defined _DONT_USE_CTYPE_INLINE_ \ - && (defined __GNUC__ || defined __cplusplus)) \ - || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ - && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_STDHEADER_BUG -#endif -#if ((__GNUC__ \ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ - && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# define _GL_INLINE inline -# define _GL_EXTERN_INLINE extern inline -# define _GL_EXTERN_INLINE_IN_USE -#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) -# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ - /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ -# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) -# else -# define _GL_INLINE extern inline -# endif -# define _GL_EXTERN_INLINE extern -# define _GL_EXTERN_INLINE_IN_USE -#else -# define _GL_INLINE static _GL_UNUSED -# define _GL_EXTERN_INLINE static _GL_UNUSED -#endif - -/* In GCC 4.6 (inclusive) to 5.1 (exclusive), - suppress bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - and - . */ -#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ -# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ -# define _GL_INLINE_HEADER_CONST_PRAGMA -# else -# define _GL_INLINE_HEADER_CONST_PRAGMA \ - _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") -# endif -# define _GL_INLINE_HEADER_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ - _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ - _GL_INLINE_HEADER_CONST_PRAGMA -# define _GL_INLINE_HEADER_END \ - _Pragma ("GCC diagnostic pop") -#else -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -#endif - -/* Define to `int' if doesn't define. */ -#define gid_t int - -/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b)) - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#ifndef _GL_UNUSED -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -# else -# define _GL_UNUSED -# endif -#endif - -/* The __pure__ attribute was added in gcc 2.96. */ -#ifndef _GL_ATTRIBUTE_PURE -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -# else -# define _GL_ATTRIBUTE_PURE /* empty */ -# endif -#endif - - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to long or long long if and don't define. */ -/* #undef intmax_t */ - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. - It returns - 1 if n1 > n2 - 0 if n1 == n2 - -1 if n1 < n2 - The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional - jump with nearly all GCC versions up to GCC 10. - This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many - GCC versions up to GCC 9. - The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 - avoids conditional jumps in all GCC versions >= 3.4. */ -#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) - - -/* Define to `int' if does not define. */ -#define mode_t int - -/* Define to the type of st_nlink in struct stat, or a supertype. */ -#define nlink_t int - -/* Define to `long int' if does not define. */ -/* #undef off_t */ - -/* Define to `int' if does not define. */ -#define pid_t int - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to rpl_re_comp if the replacement should be used. */ -#define re_comp rpl_re_comp - -/* Define to rpl_re_compile_fastmap if the replacement should be used. */ -#define re_compile_fastmap rpl_re_compile_fastmap - -/* Define to rpl_re_compile_pattern if the replacement should be used. */ -#define re_compile_pattern rpl_re_compile_pattern - -/* Define to rpl_re_exec if the replacement should be used. */ -#define re_exec rpl_re_exec - -/* Define to rpl_re_match if the replacement should be used. */ -#define re_match rpl_re_match - -/* Define to rpl_re_match_2 if the replacement should be used. */ -#define re_match_2 rpl_re_match_2 - -/* Define to rpl_re_search if the replacement should be used. */ -#define re_search rpl_re_search - -/* Define to rpl_re_search_2 if the replacement should be used. */ -#define re_search_2 rpl_re_search_2 - -/* Define to rpl_re_set_registers if the replacement should be used. */ -#define re_set_registers rpl_re_set_registers - -/* Define to rpl_re_set_syntax if the replacement should be used. */ -#define re_set_syntax rpl_re_set_syntax - -/* Define to rpl_re_syntax_options if the replacement should be used. */ -#define re_syntax_options rpl_re_syntax_options - -/* Define to rpl_regcomp if the replacement should be used. */ -#define regcomp rpl_regcomp - -/* Define to rpl_regerror if the replacement should be used. */ -#define regerror rpl_regerror - -/* Define to rpl_regexec if the replacement should be used. */ -#define regexec rpl_regexec - -/* Define to rpl_regfree if the replacement should be used. */ -#define regfree rpl_regfree - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict /**/ -/* Work around a bug in older versions of Sun C++, which did not - #define __restrict__ or support _Restrict or __restrict__ - even though the corresponding Sun C compiler ended up with - "#define restrict _Restrict" or "#define restrict __restrict__" - in the previous line. This workaround can be removed once - we assume Oracle Developer Studio 12.5 (2016) or later. */ -#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ -# define _Restrict -# define __restrict__ -#endif - -/* Define as an integer type suitable for memory locations that can be - accessed atomically even in the presence of asynchronous signals. */ -/* #undef sig_atomic_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* type to use in place of socklen_t if not defined */ -/* #undef socklen_t */ - -/* Define as a signed type of the same size as size_t. */ -#define ssize_t int - -/* Define to `int' if doesn't define. */ -#define uid_t int - -/* Define to unsigned long or unsigned long long if and - don't define. */ -/* #undef uintmax_t */ - -/* Define to an unsigned 32-bit type if lacks this type. */ -#define useconds_t unsigned int - -/* Define as a macro for copying va_list variables. */ -/* #undef va_copy */ - -/* Define as `fork' if `vfork' does not work. */ -#define vfork fork - - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded - - - -#ifndef ENDIANNESS -# if defined __BIG_ENDIAN__ -# define ENDIANNESS 0 -# endif -# if defined __LITTLE_ENDIAN__ -# define ENDIANNESS 0 -# endif -#endif - - - -/* A file name cannot consist of any character possible. INVALID_PATH_CHAR - contains the characters not allowed. */ -#if defined _MSC_VER || defined __MINGW32__ -/* Woe32. This string is valid for Windows NT/2000. On Windows 95/98/ME some - few characters in the range 0x80..0xff are invalid as well, but this doesn't - matter much for our purposes. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\"*/:<>?\\|" -#elif defined MSDOS -/* Something like this for MSDOG. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 \177\\:." -#else -/* Unix. */ -# define INVALID_PATH_CHAR "\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 \177/" -#endif - -/* This is the page width for the message_print function. It should - not be set to more than 79 characters (Emacs users will appreciate - it). It is used to wrap the msgid and msgstr strings, and also to - wrap the file position (#:) comments. */ -#define PAGE_WIDTH 79 - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if defined WOE32DLL && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#if defined __EMX__ && !defined __KLIBC__ -# include "intl/os2compat.h" -#endif - diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/configmake.h b/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/configmake.h deleted file mode 100644 index 915fdfa82..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/configmake.h +++ /dev/null @@ -1,31 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#if HAVE_WINSOCK2_H -# include /* avoid mingw pollution on DATADIR */ -#endif -#define PREFIX "/cygdrive/c/software.b/gettext-0.21.0" -#define EXEC_PREFIX "/cygdrive/c/software.b/gettext-0.21.0" -#define BINDIR "/cygdrive/c/software.b/gettext-0.21.0/bin" -#define SBINDIR "/cygdrive/c/software.b/gettext-0.21.0/sbin" -#define LIBEXECDIR "/cygdrive/c/software.b/gettext-0.21.0/libexec" -#define DATAROOTDIR "/cygdrive/c/software.b/gettext-0.21.0/share" -#define DATADIR "/cygdrive/c/software.b/gettext-0.21.0/share" -#define SYSCONFDIR "/cygdrive/c/software.b/gettext-0.21.0/etc" -#define SHAREDSTATEDIR "/cygdrive/c/software.b/gettext-0.21.0/com" -#define LOCALSTATEDIR "/cygdrive/c/software.b/gettext-0.21.0/var" -#define RUNSTATEDIR "/cygdrive/c/software.b/gettext-0.21.0/var/run" -#define INCLUDEDIR "/cygdrive/c/software.b/gettext-0.21.0/include" -#define OLDINCLUDEDIR "/usr/include" -#define DOCDIR "/cygdrive/c/software.b/gettext-0.21.0/share/doc/gettext" -#define INFODIR "/cygdrive/c/software.b/gettext-0.21.0/share/info" -#define HTMLDIR "/cygdrive/c/software.b/gettext-0.21.0/share/doc/gettext" -#define DVIDIR "/cygdrive/c/software.b/gettext-0.21.0/share/doc/gettext" -#define PDFDIR "/cygdrive/c/software.b/gettext-0.21.0/share/doc/gettext" -#define PSDIR "/cygdrive/c/software.b/gettext-0.21.0/share/doc/gettext" -#define LIBDIR "/cygdrive/c/software.b/gettext-0.21.0/lib" -#define LISPDIR "/cygdrive/c/software.b/gettext-0.21.0/share/emacs/site-lisp" -#define LOCALEDIR "/cygdrive/c/software.b/gettext-0.21.0/share/locale" -#define MANDIR "/cygdrive/c/software.b/gettext-0.21.0/share/man" -#define PKGDATADIR "/cygdrive/c/software.b/gettext-0.21.0/share/gettext" -#define PKGINCLUDEDIR "/cygdrive/c/software.b/gettext-0.21.0/include/gettext-tools" -#define PKGLIBDIR "/cygdrive/c/software.b/gettext-0.21.0/lib/gettext-tools" -#define PKGLIBEXECDIR "/cygdrive/c/software.b/gettext-0.21.0/libexec/gettext-tools" diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/stdint.h b/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/stdint.h deleted file mode 100644 index 851128d88..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/gnulib-lib/stdint.h +++ /dev/null @@ -1,747 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _GL_STDINT_H - -#if __GNUC__ >= 3 - -#endif - - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H -# include "../include/stdint.h" -#else - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if 1 -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _GL_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# include "../include/stdint.h" -#endif - -#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_STDINT_H - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -#include - -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if 1 -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - -#if ! 1 - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after "../include/stdint.h". */ -# if 1 && ! defined _AIX -# include -# endif - -# if 1 - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -# elif 0 - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -# endif - -# if 0 && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -# endif - -# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -/* These are separate macros, because if you try to merge these macros into - a single one, HP-UX cc rejects the resulting expression in constant - expressions. */ -# define _STDINT_UNSIGNED_MIN(bits, zero) \ - (zero) -# define _STDINT_SIGNED_MIN(bits, zero) \ - (~ _STDINT_MAX (1, bits, zero)) - -# define _STDINT_MAX(signed, bits, zero) \ - (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef int8_t -# undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -# define int8_t gl_int8_t -# define uint8_t gl_uint8_t - -# undef int16_t -# undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -# define int16_t gl_int16_t -# define uint16_t gl_uint16_t - -# undef int32_t -# undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -# define int32_t gl_int32_t -# define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -# ifdef INT64_MAX -# define GL_INT64_T -# else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# else -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -# endif - -# ifdef UINT64_MAX -# define GL_UINT64_T -# else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# else -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -# endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -# define _UINT8_T -# define _UINT32_T -# define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef int_least8_t -# undef uint_least8_t -# undef int_least16_t -# undef uint_least16_t -# undef int_least32_t -# undef uint_least32_t -# undef int_least64_t -# undef uint_least64_t -# define int_least8_t int8_t -# define uint_least8_t uint8_t -# define int_least16_t int16_t -# define uint_least16_t uint16_t -# define int_least32_t int32_t -# define uint_least32_t uint32_t -# ifdef GL_INT64_T -# define int_least64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_least64_t uint64_t -# endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -# undef int_fast8_t -# undef uint_fast8_t -# undef int_fast16_t -# undef uint_fast16_t -# undef int_fast32_t -# undef uint_fast32_t -# undef int_fast64_t -# undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -# ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -# else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -# endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -# define int_fast8_t gl_int_fast8_t -# define uint_fast8_t gl_uint_fast8_t -# define int_fast16_t gl_int_fast16_t -# define uint_fast16_t gl_uint_fast16_t -# define int_fast32_t gl_int_fast32_t -# define uint_fast32_t gl_uint_fast32_t -# ifdef GL_INT64_T -# define int_fast64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -# endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -/* kLIBC's defines _INTPTR_T_DECLARED and needs its own - definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and - uintptr_t to avoid conflicting declarations of system functions like - _findclose in . */ -# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) -# undef intptr_t -# undef uintptr_t -# ifdef _WIN64 -typedef long long int gl_intptr_t; -typedef unsigned long long int gl_uintptr_t; -# else -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -# endif -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t -# endif - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -# ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -# endif - -# ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -# endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -# define GNULIB_defined_stdint_types 1 -# endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef INT8_MIN -# undef INT8_MAX -# undef UINT8_MAX -# define INT8_MIN (~ INT8_MAX) -# define INT8_MAX 127 -# define UINT8_MAX 255 - -# undef INT16_MIN -# undef INT16_MAX -# undef UINT16_MAX -# define INT16_MIN (~ INT16_MAX) -# define INT16_MAX 32767 -# define UINT16_MAX 65535 - -# undef INT32_MIN -# undef INT32_MAX -# undef UINT32_MAX -# define INT32_MIN (~ INT32_MAX) -# define INT32_MAX 2147483647 -# define UINT32_MAX 4294967295U - -# if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -# endif - -# if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -# endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef INT_LEAST8_MIN -# undef INT_LEAST8_MAX -# undef UINT_LEAST8_MAX -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST8_MAX INT8_MAX -# define UINT_LEAST8_MAX UINT8_MAX - -# undef INT_LEAST16_MIN -# undef INT_LEAST16_MAX -# undef UINT_LEAST16_MAX -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST16_MAX INT16_MAX -# define UINT_LEAST16_MAX UINT16_MAX - -# undef INT_LEAST32_MIN -# undef INT_LEAST32_MAX -# undef UINT_LEAST32_MAX -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST32_MAX INT32_MAX -# define UINT_LEAST32_MAX UINT32_MAX - -# undef INT_LEAST64_MIN -# undef INT_LEAST64_MAX -# ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -# endif - -# undef UINT_LEAST64_MAX -# ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -# undef INT_FAST8_MIN -# undef INT_FAST8_MAX -# undef UINT_FAST8_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define UINT_FAST8_MAX UCHAR_MAX - -# undef INT_FAST16_MIN -# undef INT_FAST16_MAX -# undef UINT_FAST16_MAX -# define INT_FAST16_MIN INT_FAST32_MIN -# define INT_FAST16_MAX INT_FAST32_MAX -# define UINT_FAST16_MAX UINT_FAST32_MAX - -# undef INT_FAST32_MIN -# undef INT_FAST32_MAX -# undef UINT_FAST32_MAX -# ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -# else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -# endif - -# undef INT_FAST64_MIN -# undef INT_FAST64_MAX -# ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -# endif - -# undef UINT_FAST64_MAX -# ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -# undef INTPTR_MIN -# undef INTPTR_MAX -# undef UINTPTR_MAX -# ifdef _WIN64 -# define INTPTR_MIN LLONG_MIN -# define INTPTR_MAX LLONG_MAX -# define UINTPTR_MAX ULLONG_MAX -# else -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX -# endif - -/* 7.18.2.5. Limits of greatest-width integer types */ - -# ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -# endif - -# ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -# endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -# undef PTRDIFF_MIN -# undef PTRDIFF_MAX -# if 0 -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -# else -# define PTRDIFF_MIN \ - _STDINT_SIGNED_MIN (, 0) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, , 0) -# endif - -/* sig_atomic_t limits */ -# undef SIG_ATOMIC_MIN -# undef SIG_ATOMIC_MAX -# if -# define SIG_ATOMIC_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define SIG_ATOMIC_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define SIG_ATOMIC_MAX \ - _STDINT_MAX (, , \ - 0) - - -/* size_t limit */ -# undef SIZE_MAX -# if 0 -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -# else -# define SIZE_MAX _STDINT_MAX (0, , 0) -# endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -# if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# endif -# undef WCHAR_MIN -# undef WCHAR_MAX -# if -# define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WCHAR_MAX \ - _STDINT_MAX (, , 0) - -/* wint_t limits */ -/* If gnulib's or overrides wint_t, is not - accurate, therefore use the definitions from above. */ -# if !1 -# undef WINT_MIN -# undef WINT_MAX -# if -# define WINT_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WINT_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WINT_MAX \ - _STDINT_MAX (, , 0) -# endif - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -# undef INT8_C -# undef UINT8_C -# define INT8_C(x) x -# define UINT8_C(x) x - -# undef INT16_C -# undef UINT16_C -# define INT16_C(x) x -# define UINT16_C(x) x - -# undef INT32_C -# undef UINT32_C -# define INT32_C(x) x -# define UINT32_C(x) x ## U - -# undef INT64_C -# undef UINT64_C -# if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -# elif defined _MSC_VER -# define INT64_C(x) x##i64 -# else -# define INT64_C(x) x##LL -# endif -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -# elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -# else -# define UINT64_C(x) x##ULL -# endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -# ifndef INTMAX_C -# if LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -# endif - -# ifndef UINTMAX_C -# if ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -# endif - -#endif /* !1 */ - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (!defined UINTMAX_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# ifdef INT8_MAX -# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -# endif -# ifdef UINT8_MAX -# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -# endif -# ifdef INT16_MAX -# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -# endif -# ifdef UINT16_MAX -# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -# endif -# ifdef INT32_MAX -# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -# endif -# ifdef UINT32_MAX -# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -# endif -# ifdef INT64_MAX -# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -# endif -# ifdef UINT64_MAX -# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -# endif -# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -# ifdef WINT_MAX -# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -# endif -# ifdef SIG_ATOMIC_MAX -# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -# endif -#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _GL_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/config.h b/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/config.h deleted file mode 100644 index 1dd5fe629..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/config.h +++ /dev/null @@ -1,387 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#ifndef GTPO_CONFIG_H -#define GTPO_CONFIG_H - -#include "../config.h" -#define DEFAULT_TEXT_DOMAIN "gettext-tools" -#undef DLL_VARIABLE -#define DLL_VARIABLE - -#endif /* GTPO_CONFIG_H */ -#define _gl_convert_FILETIME_to_POSIX libgettextpo__gl_convert_FILETIME_to_POSIX -#define _gl_fstat_by_handle libgettextpo__gl_fstat_by_handle -#define _gl_nothrow_get_osfhandle libgettextpo__gl_nothrow_get_osfhandle -#define _gl_raise_SIGPIPE libgettextpo__gl_raise_SIGPIPE -#define _obstack_allocated_p libgettextpo__obstack_allocated_p -#define _obstack_begin libgettextpo__obstack_begin -#define _obstack_begin_1 libgettextpo__obstack_begin_1 -#define _obstack_free libgettextpo__obstack_free -#define _obstack_memory_used libgettextpo__obstack_memory_used -#define _obstack_newchunk libgettextpo__obstack_newchunk -#define allow_duplicates libgettextpo_allow_duplicates -#define asnprintf libgettextpo_asnprintf -#define asprintf libgettextpo_asprintf -#define base_len libgettextpo_base_len -#define c_strcasecmp libgettextpo_c_strcasecmp -#define c_strncasecmp libgettextpo_c_strncasecmp -#define c_strstr libgettextpo_c_strstr -#define catalog_reader_alloc libgettextpo_catalog_reader_alloc -#define catalog_reader_free libgettextpo_catalog_reader_free -#define catalog_reader_parse libgettextpo_catalog_reader_parse -#define check_message libgettextpo_check_message -#define check_message_list libgettextpo_check_message_list -#define check_msgid_msgstr_format libgettextpo_check_msgid_msgstr_format -#define check_msgid_msgstr_format_i libgettextpo_check_msgid_msgstr_format_i -#define check_plural_eval libgettextpo_check_plural_eval -#define compute_curr_prefix libgettextpo_compute_curr_prefix -#define concatenated_filename libgettextpo_concatenated_filename -#define default_add_message libgettextpo_default_add_message -#define default_catalog_reader_alloc libgettextpo_default_catalog_reader_alloc -#define default_comment libgettextpo_default_comment -#define default_comment_dot libgettextpo_default_comment_dot -#define default_comment_filepos libgettextpo_default_comment_filepos -#define default_comment_special libgettextpo_default_comment_special -#define default_constructor libgettextpo_default_constructor -#define default_destructor libgettextpo_default_destructor -#define default_directive_domain libgettextpo_default_directive_domain -#define default_directive_message libgettextpo_default_directive_message -#define default_parse_brief libgettextpo_default_parse_brief -#define default_parse_debrief libgettextpo_default_parse_debrief -#define default_set_domain libgettextpo_default_set_domain -#define dir_list_append libgettextpo_dir_list_append -#define dir_list_nth libgettextpo_dir_list_nth -#define dir_list_restore libgettextpo_dir_list_restore -#define dir_list_save_reset libgettextpo_dir_list_save_reset -#define dup_cloexec libgettextpo_dup_cloexec -#define error libgettextpo_error -#define error_at_line libgettextpo_error_at_line -#define error_with_progname libgettextpo_error_with_progname -#define execute_all_close_hooks libgettextpo_execute_all_close_hooks -#define execute_all_ioctl_hooks libgettextpo_execute_all_ioctl_hooks -#define execute_close_hooks libgettextpo_execute_close_hooks -#define execute_ioctl_hooks libgettextpo_execute_ioctl_hooks -#define exit_failure libgettextpo_exit_failure -#define extract_plural_expression libgettextpo_extract_plural_expression -#define fcntl libgettextpo_fcntl -#define format_language libgettextpo_format_language -#define format_language_pretty libgettextpo_format_language_pretty -#define formatstring_awk libgettextpo_formatstring_awk -#define formatstring_boost libgettextpo_formatstring_boost -#define formatstring_c libgettextpo_formatstring_c -#define formatstring_csharp libgettextpo_formatstring_csharp -#define formatstring_elisp libgettextpo_formatstring_elisp -#define formatstring_gcc_internal libgettextpo_formatstring_gcc_internal -#define formatstring_gfc_internal libgettextpo_formatstring_gfc_internal -#define formatstring_java libgettextpo_formatstring_java -#define formatstring_java_printf libgettextpo_formatstring_java_printf -#define formatstring_javascript libgettextpo_formatstring_javascript -#define formatstring_kde libgettextpo_formatstring_kde -#define formatstring_kde_kuit libgettextpo_formatstring_kde_kuit -#define formatstring_librep libgettextpo_formatstring_librep -#define formatstring_lisp libgettextpo_formatstring_lisp -#define formatstring_lua libgettextpo_formatstring_lua -#define formatstring_objc libgettextpo_formatstring_objc -#define formatstring_parsers libgettextpo_formatstring_parsers -#define formatstring_pascal libgettextpo_formatstring_pascal -#define formatstring_perl libgettextpo_formatstring_perl -#define formatstring_perl_brace libgettextpo_formatstring_perl_brace -#define formatstring_php libgettextpo_formatstring_php -#define formatstring_python libgettextpo_formatstring_python -#define formatstring_python_brace libgettextpo_formatstring_python_brace -#define formatstring_qt libgettextpo_formatstring_qt -#define formatstring_qt_plural libgettextpo_formatstring_qt_plural -#define formatstring_ruby libgettextpo_formatstring_ruby -#define formatstring_scheme libgettextpo_formatstring_scheme -#define formatstring_sh libgettextpo_formatstring_sh -#define formatstring_smalltalk libgettextpo_formatstring_smalltalk -#define formatstring_tcl libgettextpo_formatstring_tcl -#define formatstring_ycp libgettextpo_formatstring_ycp -#define free_plural_expression libgettextpo_free_plural_expression -#define freea libgettextpo_freea -#define fstrcmp_bounded libgettextpo_fstrcmp_bounded -#define fstrcmp_free_resources libgettextpo_fstrcmp_free_resources -#define fsync libgettextpo_fsync -#define fuzzy_search_goal_function libgettextpo_fuzzy_search_goal_function -#define fwriteerror libgettextpo_fwriteerror -#define fwriteerror_no_ebadf libgettextpo_fwriteerror_no_ebadf -#define gcd libgettextpo_gcd -#define germanic_plural libgettextpo_germanic_plural -#define get_python_format_unnamed_arg_count libgettextpo_get_python_format_unnamed_arg_count -#define get_sysdep_c_format_directives libgettextpo_get_sysdep_c_format_directives -#define getdelim libgettextpo_getdelim -#define getdtablesize libgettextpo_getdtablesize -#define getprogname libgettextpo_getprogname -#define gl_linked_list_implementation libgettextpo_gl_linked_list_implementation -#define gl_msvc_inval_ensure_handler libgettextpo_gl_msvc_inval_ensure_handler -#define glwthread_mutex_destroy libgettextpo_glwthread_mutex_destroy -#define glwthread_mutex_init libgettextpo_glwthread_mutex_init -#define glwthread_mutex_lock libgettextpo_glwthread_mutex_lock -#define glwthread_mutex_trylock libgettextpo_glwthread_mutex_trylock -#define glwthread_mutex_unlock libgettextpo_glwthread_mutex_unlock -#define glwthread_once libgettextpo_glwthread_once -#define glwthread_recmutex_destroy libgettextpo_glwthread_recmutex_destroy -#define glwthread_recmutex_init libgettextpo_glwthread_recmutex_init -#define glwthread_recmutex_lock libgettextpo_glwthread_recmutex_lock -#define glwthread_recmutex_trylock libgettextpo_glwthread_recmutex_trylock -#define glwthread_recmutex_unlock libgettextpo_glwthread_recmutex_unlock -#define glwthread_rwlock_destroy libgettextpo_glwthread_rwlock_destroy -#define glwthread_rwlock_init libgettextpo_glwthread_rwlock_init -#define glwthread_rwlock_rdlock libgettextpo_glwthread_rwlock_rdlock -#define glwthread_rwlock_tryrdlock libgettextpo_glwthread_rwlock_tryrdlock -#define glwthread_rwlock_trywrlock libgettextpo_glwthread_rwlock_trywrlock -#define glwthread_rwlock_unlock libgettextpo_glwthread_rwlock_unlock -#define glwthread_rwlock_wrlock libgettextpo_glwthread_rwlock_wrlock -#define glwthread_tls_get libgettextpo_glwthread_tls_get -#define glwthread_tls_key_create libgettextpo_glwthread_tls_key_create -#define glwthread_tls_key_delete libgettextpo_glwthread_tls_key_delete -#define glwthread_tls_process_destructors libgettextpo_glwthread_tls_process_destructors -#define glwthread_tls_set libgettextpo_glwthread_tls_set -#define gnu_mbswidth libgettextpo_gnu_mbswidth -#define gram_max_allowed_errors libgettextpo_gram_max_allowed_errors -#define gram_pos libgettextpo_gram_pos -#define gram_pos_column libgettextpo_gram_pos_column -#define handle_filepos_comment_option libgettextpo_handle_filepos_comment_option -#define hard_locale libgettextpo_hard_locale -#define hash_destroy libgettextpo_hash_destroy -#define hash_find_entry libgettextpo_hash_find_entry -#define hash_init libgettextpo_hash_init -#define hash_insert_entry libgettextpo_hash_insert_entry -#define hash_iterate libgettextpo_hash_iterate -#define hash_iterate_modify libgettextpo_hash_iterate_modify -#define hash_set_value libgettextpo_hash_set_value -#define iconveh_close libgettextpo_iconveh_close -#define iconveh_open libgettextpo_iconveh_open -#define input_format_po libgettextpo_input_format_po -#define install_sigfpe_handler libgettextpo_install_sigfpe_handler -#define is_ascii_message libgettextpo_is_ascii_message -#define is_ascii_message_list libgettextpo_is_ascii_message_list -#define is_ascii_msgdomain_list libgettextpo_is_ascii_msgdomain_list -#define is_ascii_string libgettextpo_is_ascii_string -#define is_ascii_string_list libgettextpo_is_ascii_string_list -#define last_component libgettextpo_last_component -#define lex_end libgettextpo_lex_end -#define lex_start libgettextpo_lex_start -#define locale_charset libgettextpo_locale_charset -#define make_format_description_string libgettextpo_make_format_description_string -#define make_range_description_string libgettextpo_make_range_description_string -#define markup_parse_context_end_parse libgettextpo_markup_parse_context_end_parse -#define markup_parse_context_free libgettextpo_markup_parse_context_free -#define markup_parse_context_get_error libgettextpo_markup_parse_context_get_error -#define markup_parse_context_new libgettextpo_markup_parse_context_new -#define markup_parse_context_parse libgettextpo_markup_parse_context_parse -#define maybe_print_progname libgettextpo_maybe_print_progname -#define mbsnwidth libgettextpo_mbsnwidth -#define mem_cd_iconv libgettextpo_mem_cd_iconv -#define mem_cd_iconveh libgettextpo_mem_cd_iconveh -#define mem_iconveh libgettextpo_mem_iconveh -#define mem_iconveha libgettextpo_mem_iconveha -#define message_alloc libgettextpo_message_alloc -#define message_comment_append libgettextpo_message_comment_append -#define message_comment_dot_append libgettextpo_message_comment_dot_append -#define message_comment_filepos libgettextpo_message_comment_filepos -#define message_copy libgettextpo_message_copy -#define message_free libgettextpo_message_free -#define message_list_alloc libgettextpo_message_list_alloc -#define message_list_append libgettextpo_message_list_append -#define message_list_copy libgettextpo_message_list_copy -#define message_list_free libgettextpo_message_list_free -#define message_list_insert_at libgettextpo_message_list_insert_at -#define message_list_list_alloc libgettextpo_message_list_list_alloc -#define message_list_list_append libgettextpo_message_list_list_append -#define message_list_list_append_list libgettextpo_message_list_list_append_list -#define message_list_list_free libgettextpo_message_list_list_free -#define message_list_list_search libgettextpo_message_list_list_search -#define message_list_msgids_changed libgettextpo_message_list_msgids_changed -#define message_list_prepend libgettextpo_message_list_prepend -#define message_list_remove_if_not libgettextpo_message_list_remove_if_not -#define message_list_search libgettextpo_message_list_search -#define message_list_search_fuzzy libgettextpo_message_list_search_fuzzy -#define message_page_width_ignore libgettextpo_message_page_width_ignore -#define message_page_width_set libgettextpo_message_page_width_set -#define message_print_comment libgettextpo_message_print_comment -#define message_print_comment_dot libgettextpo_message_print_comment_dot -#define message_print_comment_filepos libgettextpo_message_print_comment_filepos -#define message_print_comment_flags libgettextpo_message_print_comment_flags -#define message_print_style_comment libgettextpo_message_print_style_comment -#define message_print_style_escape libgettextpo_message_print_style_escape -#define message_print_style_filepos libgettextpo_message_print_style_filepos -#define message_print_style_indent libgettextpo_message_print_style_indent -#define message_print_style_uniforum libgettextpo_message_print_style_uniforum -#define mmalloca libgettextpo_mmalloca -#define msgdomain_alloc libgettextpo_msgdomain_alloc -#define msgdomain_free libgettextpo_msgdomain_free -#define msgdomain_list_alloc libgettextpo_msgdomain_list_alloc -#define msgdomain_list_append libgettextpo_msgdomain_list_append -#define msgdomain_list_copy libgettextpo_msgdomain_list_copy -#define msgdomain_list_free libgettextpo_msgdomain_list_free -#define msgdomain_list_print libgettextpo_msgdomain_list_print -#define msgdomain_list_sort_by_filepos libgettextpo_msgdomain_list_sort_by_filepos -#define msgdomain_list_sort_by_msgid libgettextpo_msgdomain_list_sort_by_msgid -#define msgdomain_list_sublist libgettextpo_msgdomain_list_sublist -#define multiline_error libgettextpo_multiline_error -#define multiline_warning libgettextpo_multiline_warning -#define next_prime libgettextpo_next_prime -#define obstack_alloc_failed_handler libgettextpo_obstack_alloc_failed_handler -#define open_catalog_file libgettextpo_open_catalog_file -#define output_format_po libgettextpo_output_format_po -#define parse_plural_expression libgettextpo_parse_plural_expression -#define pass_obsolete_entries libgettextpo_pass_obsolete_entries -#define plural_eval libgettextpo_plural_eval -#define plural_table libgettextpo_plural_table -#define plural_table_size libgettextpo_plural_table_size -#define po_callback_comment libgettextpo_po_callback_comment -#define po_callback_comment_dispatcher libgettextpo_po_callback_comment_dispatcher -#define po_callback_comment_dot libgettextpo_po_callback_comment_dot -#define po_callback_comment_filepos libgettextpo_po_callback_comment_filepos -#define po_callback_comment_special libgettextpo_po_callback_comment_special -#define po_callback_domain libgettextpo_po_callback_domain -#define po_callback_message libgettextpo_po_callback_message -#define po_charset_ascii libgettextpo_po_charset_ascii -#define po_charset_ascii_compatible libgettextpo_po_charset_ascii_compatible -#define po_charset_canonicalize libgettextpo_po_charset_canonicalize -#define po_charset_character_iterator libgettextpo_po_charset_character_iterator -#define po_charset_utf8 libgettextpo_po_charset_utf8 -#define po_error libgettextpo_po_error -#define po_error_at_line libgettextpo_po_error_at_line -#define po_gram_char libgettextpo_po_gram_char -#define po_gram_error libgettextpo_po_gram_error -#define po_gram_error_at_line libgettextpo_po_gram_error_at_line -#define po_gram_lex libgettextpo_po_gram_lex -#define po_gram_lval libgettextpo_po_gram_lval -#define po_gram_nerrs libgettextpo_po_gram_nerrs -#define po_gram_parse libgettextpo_po_gram_parse -#define po_is_charset_weird libgettextpo_po_is_charset_weird -#define po_is_charset_weird_cjk libgettextpo_po_is_charset_weird_cjk -#define po_lex_charset libgettextpo_po_lex_charset -#define po_lex_charset_close libgettextpo_po_lex_charset_close -#define po_lex_charset_init libgettextpo_po_lex_charset_init -#define po_lex_charset_set libgettextpo_po_lex_charset_set -#define po_lex_iconv libgettextpo_po_lex_iconv -#define po_lex_pass_comments libgettextpo_po_lex_pass_comments -#define po_lex_pass_obsolete_entries libgettextpo_po_lex_pass_obsolete_entries -#define po_lex_weird_cjk libgettextpo_po_lex_weird_cjk -#define po_multiline_error libgettextpo_po_multiline_error -#define po_multiline_warning libgettextpo_po_multiline_warning -#define po_parse_comment_special libgettextpo_po_parse_comment_special -#define po_xerror libgettextpo_po_xerror -#define po_xerror2 libgettextpo_po_xerror2 -#define possible_format_p libgettextpo_possible_format_p -#define printf_fetchargs libgettextpo_printf_fetchargs -#define printf_parse libgettextpo_printf_parse -#define rawmemchr libgettextpo_rawmemchr -#define read_catalog_file libgettextpo_read_catalog_file -#define read_catalog_stream libgettextpo_read_catalog_stream -#define register_fd_hook libgettextpo_register_fd_hook -#define relocate libgettextpo_relocate -#define relocate2 libgettextpo_relocate2 -#define rpl_close libgettextpo_rpl_close -#define rpl_dup2 libgettextpo_rpl_dup2 -#define rpl_error_message_count libgettextpo_rpl_error_message_count -#define rpl_error_one_per_line libgettextpo_rpl_error_one_per_line -#define rpl_error_print_progname libgettextpo_rpl_error_print_progname -#define rpl_fdopen libgettextpo_rpl_fdopen -#define rpl_fopen libgettextpo_rpl_fopen -#define rpl_fprintf libgettextpo_rpl_fprintf -#define rpl_fputc libgettextpo_rpl_fputc -#define rpl_fputs libgettextpo_rpl_fputs -#define rpl_fstat libgettextpo_rpl_fstat -#define rpl_fwrite libgettextpo_rpl_fwrite -#define rpl_getline libgettextpo_rpl_getline -#define rpl_malloc libgettextpo_rpl_malloc -#define rpl_mbrtowc libgettextpo_rpl_mbrtowc -#define rpl_mbsinit libgettextpo_rpl_mbsinit -#define rpl_open libgettextpo_rpl_open -#define rpl_printf libgettextpo_rpl_printf -#define rpl_putchar libgettextpo_rpl_putchar -#define rpl_puts libgettextpo_rpl_puts -#define rpl_raise libgettextpo_rpl_raise -#define rpl_realloc libgettextpo_rpl_realloc -#define rpl_signal libgettextpo_rpl_signal -#define rpl_stat libgettextpo_rpl_stat -#define rpl_strerror libgettextpo_rpl_strerror -#define rpl_strstr libgettextpo_rpl_strstr -#define rpl_vfprintf libgettextpo_rpl_vfprintf -#define rpl_vprintf libgettextpo_rpl_vprintf -#define sentence_end libgettextpo_sentence_end -#define sentence_end_required_spaces libgettextpo_sentence_end_required_spaces -#define set_cloexec_flag libgettextpo_set_cloexec_flag -#define set_relocation_prefix libgettextpo_set_relocation_prefix -#define setlocale_null libgettextpo_setlocale_null -#define setlocale_null_r libgettextpo_setlocale_null_r -#define sigaddset libgettextpo_sigaddset -#define sigdelset libgettextpo_sigdelset -#define sigemptyset libgettextpo_sigemptyset -#define sigfillset libgettextpo_sigfillset -#define sigfpe_exit libgettextpo_sigfpe_exit -#define sigismember libgettextpo_sigismember -#define significant_format_p libgettextpo_significant_format_p -#define sigpending libgettextpo_sigpending -#define sigprocmask libgettextpo_sigprocmask -#define stpcpy libgettextpo_stpcpy -#define stpncpy libgettextpo_stpncpy -#define str_cd_iconv libgettextpo_str_cd_iconv -#define str_cd_iconveh libgettextpo_str_cd_iconveh -#define str_iconv libgettextpo_str_iconv -#define str_iconveh libgettextpo_str_iconveh -#define str_iconveha libgettextpo_str_iconveha -#define strchrnul libgettextpo_strchrnul -#define strerror_override libgettextpo_strerror_override -#define string_list_alloc libgettextpo_string_list_alloc -#define string_list_append libgettextpo_string_list_append -#define string_list_append_unique libgettextpo_string_list_append_unique -#define string_list_concat libgettextpo_string_list_concat -#define string_list_concat_destroy libgettextpo_string_list_concat_destroy -#define string_list_destroy libgettextpo_string_list_destroy -#define string_list_free libgettextpo_string_list_free -#define string_list_init libgettextpo_string_list_init -#define string_list_join libgettextpo_string_list_join -#define string_list_member libgettextpo_string_list_member -#define string_list_remove libgettextpo_string_list_remove -#define syntax_check_message_list libgettextpo_syntax_check_message_list -#define syntax_check_name libgettextpo_syntax_check_name -#define textmode_xerror libgettextpo_textmode_xerror -#define textmode_xerror2 libgettextpo_textmode_xerror2 -#define u16_mbtouc_aux libgettextpo_u16_mbtouc_aux -#define u8_check libgettextpo_u8_check -#define u8_conv_from_encoding libgettextpo_u8_conv_from_encoding -#define u8_mblen libgettextpo_u8_mblen -#define u8_mbtouc_aux libgettextpo_u8_mbtouc_aux -#define u8_mbtouc_unsafe_aux libgettextpo_u8_mbtouc_unsafe_aux -#define u8_mbtoucr libgettextpo_u8_mbtoucr -#define u8_next libgettextpo_u8_next -#define u8_possible_linebreaks libgettextpo_u8_possible_linebreaks -#define u8_prev libgettextpo_u8_prev -#define u8_strmbtouc libgettextpo_u8_strmbtouc -#define u8_uctomb_aux libgettextpo_u8_uctomb_aux -#define u8_width_linebreaks libgettextpo_u8_width_linebreaks -#define uc_is_alpha libgettextpo_uc_is_alpha -#define uc_is_space libgettextpo_uc_is_space -#define uc_width libgettextpo_uc_width -#define ulc_width_linebreaks libgettextpo_ulc_width_linebreaks -#define uniconv_register_autodetect libgettextpo_uniconv_register_autodetect -#define unilbrk_is_all_ascii libgettextpo_unilbrk_is_all_ascii -#define unilbrk_is_utf8_encoding libgettextpo_unilbrk_is_utf8_encoding -#define unilbrk_table libgettextpo_unilbrk_table -#define unilbrkprop libgettextpo_unilbrkprop -#define uninstall_sigfpe_handler libgettextpo_uninstall_sigfpe_handler -#define unregister_fd_hook libgettextpo_unregister_fd_hook -#define vasnprintf libgettextpo_vasnprintf -#define vasprintf libgettextpo_vasprintf -#define wcwidth libgettextpo_wcwidth -#define x2realloc libgettextpo_x2realloc -#define xalloc_die libgettextpo_xalloc_die -#define xasprintf libgettextpo_xasprintf -#define xcalloc libgettextpo_xcalloc -#define xconcatenated_filename libgettextpo_xconcatenated_filename -#define xmalloc libgettextpo_xmalloc -#define xmalloc_exit_failure libgettextpo_xmalloc_exit_failure -#define xmem_cd_iconv libgettextpo_xmem_cd_iconv -#define xmemdup libgettextpo_xmemdup -#define xmmalloca libgettextpo_xmmalloca -#define xnmalloc libgettextpo_xnmalloc -#define xrealloc libgettextpo_xrealloc -#define xstr_cd_iconv libgettextpo_xstr_cd_iconv -#define xstr_iconv libgettextpo_xstr_iconv -#define xstrdup libgettextpo_xstrdup -#define xvasprintf libgettextpo_xvasprintf -#define xzalloc libgettextpo_xzalloc diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/stdint.h b/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/stdint.h deleted file mode 100644 index becb64c1c..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/stdint.h +++ /dev/null @@ -1,747 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _GL_GTPO_STDINT_H - -#if __GNUC__ >= 3 - -#endif - - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H -# include "../include/stdint.h" -#else - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if 1 -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _GL_GTPO_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# include "../include/stdint.h" -#endif - -#if ! defined _GL_GTPO_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_GTPO_STDINT_H - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -#include - -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if 1 -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - -#if ! 1 - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after "../include/stdint.h". */ -# if 1 && ! defined _AIX -# include -# endif - -# if 1 - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -# elif 0 - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -# endif - -# if 0 && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -# endif - -# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -/* These are separate macros, because if you try to merge these macros into - a single one, HP-UX cc rejects the resulting expression in constant - expressions. */ -# define _STDINT_UNSIGNED_MIN(bits, zero) \ - (zero) -# define _STDINT_SIGNED_MIN(bits, zero) \ - (~ _STDINT_MAX (1, bits, zero)) - -# define _STDINT_MAX(signed, bits, zero) \ - (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef int8_t -# undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -# define int8_t gl_int8_t -# define uint8_t gl_uint8_t - -# undef int16_t -# undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -# define int16_t gl_int16_t -# define uint16_t gl_uint16_t - -# undef int32_t -# undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -# define int32_t gl_int32_t -# define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -# ifdef INT64_MAX -# define GL_INT64_T -# else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# else -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -# endif - -# ifdef UINT64_MAX -# define GL_UINT64_T -# else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# else -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -# endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -# define _UINT8_T -# define _UINT32_T -# define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef int_least8_t -# undef uint_least8_t -# undef int_least16_t -# undef uint_least16_t -# undef int_least32_t -# undef uint_least32_t -# undef int_least64_t -# undef uint_least64_t -# define int_least8_t int8_t -# define uint_least8_t uint8_t -# define int_least16_t int16_t -# define uint_least16_t uint16_t -# define int_least32_t int32_t -# define uint_least32_t uint32_t -# ifdef GL_INT64_T -# define int_least64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_least64_t uint64_t -# endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -# undef int_fast8_t -# undef uint_fast8_t -# undef int_fast16_t -# undef uint_fast16_t -# undef int_fast32_t -# undef uint_fast32_t -# undef int_fast64_t -# undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -# ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -# else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -# endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -# define int_fast8_t gl_int_fast8_t -# define uint_fast8_t gl_uint_fast8_t -# define int_fast16_t gl_int_fast16_t -# define uint_fast16_t gl_uint_fast16_t -# define int_fast32_t gl_int_fast32_t -# define uint_fast32_t gl_uint_fast32_t -# ifdef GL_INT64_T -# define int_fast64_t int64_t -# endif -# ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -# endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -/* kLIBC's defines _INTPTR_T_DECLARED and needs its own - definitions of intptr_t and uintptr_t (which use int and unsigned) - to avoid clashes with declarations of system functions like sbrk. - Similarly, mingw 5.22 defines _INTPTR_T_DEFINED and - _UINTPTR_T_DEFINED and needs its own definitions of intptr_t and - uintptr_t to avoid conflicting declarations of system functions like - _findclose in . */ -# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \ - || (defined __MINGW32__ && defined _INTPTR_T_DEFINED && defined _UINTPTR_T_DEFINED)) -# undef intptr_t -# undef uintptr_t -# ifdef _WIN64 -typedef long long int gl_intptr_t; -typedef unsigned long long int gl_uintptr_t; -# else -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -# endif -# define intptr_t gl_intptr_t -# define uintptr_t gl_uintptr_t -# endif - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -# ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -# endif - -# ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -# endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -# define GNULIB_defined_stdint_types 1 -# endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -# undef INT8_MIN -# undef INT8_MAX -# undef UINT8_MAX -# define INT8_MIN (~ INT8_MAX) -# define INT8_MAX 127 -# define UINT8_MAX 255 - -# undef INT16_MIN -# undef INT16_MAX -# undef UINT16_MAX -# define INT16_MIN (~ INT16_MAX) -# define INT16_MAX 32767 -# define UINT16_MAX 65535 - -# undef INT32_MIN -# undef INT32_MAX -# undef UINT32_MAX -# define INT32_MIN (~ INT32_MAX) -# define INT32_MAX 2147483647 -# define UINT32_MAX 4294967295U - -# if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -# endif - -# if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -# endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -# undef INT_LEAST8_MIN -# undef INT_LEAST8_MAX -# undef UINT_LEAST8_MAX -# define INT_LEAST8_MIN INT8_MIN -# define INT_LEAST8_MAX INT8_MAX -# define UINT_LEAST8_MAX UINT8_MAX - -# undef INT_LEAST16_MIN -# undef INT_LEAST16_MAX -# undef UINT_LEAST16_MAX -# define INT_LEAST16_MIN INT16_MIN -# define INT_LEAST16_MAX INT16_MAX -# define UINT_LEAST16_MAX UINT16_MAX - -# undef INT_LEAST32_MIN -# undef INT_LEAST32_MAX -# undef UINT_LEAST32_MAX -# define INT_LEAST32_MIN INT32_MIN -# define INT_LEAST32_MAX INT32_MAX -# define UINT_LEAST32_MAX UINT32_MAX - -# undef INT_LEAST64_MIN -# undef INT_LEAST64_MAX -# ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -# endif - -# undef UINT_LEAST64_MAX -# ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -# undef INT_FAST8_MIN -# undef INT_FAST8_MAX -# undef UINT_FAST8_MAX -# define INT_FAST8_MIN SCHAR_MIN -# define INT_FAST8_MAX SCHAR_MAX -# define UINT_FAST8_MAX UCHAR_MAX - -# undef INT_FAST16_MIN -# undef INT_FAST16_MAX -# undef UINT_FAST16_MAX -# define INT_FAST16_MIN INT_FAST32_MIN -# define INT_FAST16_MAX INT_FAST32_MAX -# define UINT_FAST16_MAX UINT_FAST32_MAX - -# undef INT_FAST32_MIN -# undef INT_FAST32_MAX -# undef UINT_FAST32_MAX -# ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -# else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -# endif - -# undef INT_FAST64_MIN -# undef INT_FAST64_MAX -# ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -# endif - -# undef UINT_FAST64_MAX -# ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -# endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -# undef INTPTR_MIN -# undef INTPTR_MAX -# undef UINTPTR_MAX -# ifdef _WIN64 -# define INTPTR_MIN LLONG_MIN -# define INTPTR_MAX LLONG_MAX -# define UINTPTR_MAX ULLONG_MAX -# else -# define INTPTR_MIN LONG_MIN -# define INTPTR_MAX LONG_MAX -# define UINTPTR_MAX ULONG_MAX -# endif - -/* 7.18.2.5. Limits of greatest-width integer types */ - -# ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -# endif - -# ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -# endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -# undef PTRDIFF_MIN -# undef PTRDIFF_MAX -# if 0 -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -# else -# define PTRDIFF_MIN \ - _STDINT_SIGNED_MIN (, 0) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, , 0) -# endif - -/* sig_atomic_t limits */ -# undef SIG_ATOMIC_MIN -# undef SIG_ATOMIC_MAX -# if -# define SIG_ATOMIC_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define SIG_ATOMIC_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define SIG_ATOMIC_MAX \ - _STDINT_MAX (, , \ - 0) - - -/* size_t limit */ -# undef SIZE_MAX -# if 0 -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -# else -# define SIZE_MAX _STDINT_MAX (0, , 0) -# endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -# if 1 && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# endif -# undef WCHAR_MIN -# undef WCHAR_MAX -# if -# define WCHAR_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WCHAR_MAX \ - _STDINT_MAX (, , 0) - -/* wint_t limits */ -/* If gnulib's or overrides wint_t, is not - accurate, therefore use the definitions from above. */ -# if !1 -# undef WINT_MIN -# undef WINT_MAX -# if -# define WINT_MIN \ - _STDINT_SIGNED_MIN (, 0) -# else -# define WINT_MIN \ - _STDINT_UNSIGNED_MIN (, 0) -# endif -# define WINT_MAX \ - _STDINT_MAX (, , 0) -# endif - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -# undef INT8_C -# undef UINT8_C -# define INT8_C(x) x -# define UINT8_C(x) x - -# undef INT16_C -# undef UINT16_C -# define INT16_C(x) x -# define UINT16_C(x) x - -# undef INT32_C -# undef UINT32_C -# define INT32_C(x) x -# define UINT32_C(x) x ## U - -# undef INT64_C -# undef UINT64_C -# if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -# elif defined _MSC_VER -# define INT64_C(x) x##i64 -# else -# define INT64_C(x) x##LL -# endif -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -# elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -# else -# define UINT64_C(x) x##ULL -# endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -# ifndef INTMAX_C -# if LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -# endif - -# ifndef UINTMAX_C -# if ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -# endif - -#endif /* !1 */ - -/* Macros specified by ISO/IEC TS 18661-1:2014. */ - -#if (!defined UINTMAX_WIDTH \ - && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -# ifdef INT8_MAX -# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -# endif -# ifdef UINT8_MAX -# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -# endif -# ifdef INT16_MAX -# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -# endif -# ifdef UINT16_MAX -# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -# endif -# ifdef INT32_MAX -# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -# endif -# ifdef UINT32_MAX -# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -# endif -# ifdef INT64_MAX -# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -# endif -# ifdef UINT64_MAX -# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -# endif -# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -# ifdef WINT_MAX -# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -# endif -# ifdef SIG_ATOMIC_MAX -# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -# endif -#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - -#endif /* _GL_GTPO_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _GL_GTPO_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/stdio.h b/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/stdio.h deleted file mode 100644 index 928fd41b4..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/gettext-tools/libgettextpo/stdio.h +++ /dev/null @@ -1,1986 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* A GNU-like . - - Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#if __GNUC__ >= 3 - -#endif - - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#include "../ucrt/stdio.h" - -#else -/* Normal invocation convention. */ - -#ifndef _GL_GTPO_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#include "../ucrt/stdio.h" - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_GTPO_STDIO_H -#define _GL_GTPO_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#ifndef _GL_ATTRIBUTE_FORMAT -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -# else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -# endif -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ - && ! defined __GLIBC__ -# include -#endif - -/* Android 4.3 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (IN_GETTEXT_TOOLS_GNULIB_TESTS || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (0 || 0 || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* Begin/end the GNULIB_NAMESPACE namespace. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -# define _GL_END_NAMESPACE } -#else -# define _GL_BEGIN_NAMESPACE -# define _GL_END_NAMESPACE -#endif - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - - Wrapping rpl_func in an object with an inline conversion operator - avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - - Wrapping func in an object with an inline conversion operator - avoids a reference to func unless GNULIB_NAMESPACE::func is - actually used in the program. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static const struct _gl_ ## func ## _wrapper \ - { \ - typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ - } func = {}; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif - -/* The definition of _GL_WARN_ON_USE is copied here. */ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2020 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the - function is declared with the given prototype, consisting of return type, - parameters, and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if !defined __cplusplus -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ - _GL_WARN_ON_USE (function, msg) -# else -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - -/* When also using extern inline, suppress the use of static inline in - standard headers of problematic Apple configurations, as Libc at - least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., - . - Perhaps Apple will fix this some day. */ -#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ - && defined __GNUC__ && defined __STDC__) -# undef putc_unlocked -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if 0 -/* Close STREAM and its underlying file descriptor. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fclose); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if 0 -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fflush); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgetc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, - (char *restrict s, int n, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fgets); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, - (const char *restrict filename, const char *restrict mode)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, - (FILE *restrict fp, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !1 -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, - (const char *restrict string, FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fputs); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, - (void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fread); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *restrict filename, const char *restrict mode, - FILE *restrict stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (freopen); -# endif -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, - (FILE *restrict stream, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fscanf); -# endif -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if 0 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fseek); -# endif -#endif - -#if 0 -# if !0 && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if 0 -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! 1 -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if 1 -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (ftell); -# endif -#endif - -#if 1 -# if !1 && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! 0 -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *restrict ptr, size_t s, size_t n, - FILE *restrict stream)); - -/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 - , - which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes under certain - versions of gcc and clang, and is not needed for C++. */ -# if (0 < __USE_FORTIFY_LEVEL \ - && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ - && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ - && !defined __cplusplus) -# undef fwrite -# undef fwrite_unlocked -extern size_t __REDIRECT (rpl_fwrite, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite); -extern size_t __REDIRECT (rpl_fwrite_unlocked, - (const void *__restrict, size_t, size_t, - FILE *__restrict), - fwrite_unlocked); -# define fwrite rpl_fwrite -# define fwrite_unlocked rpl_fwrite_unlocked -# endif -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (fwrite); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getc -# define getc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getc); -# endif -#endif - -#if 1 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getchar -# define getchar rpl_getchar -# endif -_GL_FUNCDECL_RPL (getchar, int, (void)); -_GL_CXXALIAS_RPL (getchar, int, (void)); -# else -_GL_CXXALIAS_SYS (getchar, int, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (getchar); -# endif -#endif - -#if 1 -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - int delimiter, - FILE *restrict stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if 1 -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# else -# if !0 -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **restrict lineptr, size_t *restrict linesize, - FILE *restrict stream)); -# endif -# if 0 -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - -#if 0 || 0 -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if 0 -# if !1 -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if IN_GETTEXT_TOOLS_GNULIB_TESTS -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (perror); -# endif -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !1 -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if 0 || 0 -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (printf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putc); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (putchar); -# endif -#endif - -#if 1 -# if 1 && (0 || 1) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (puts); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (remove); -# endif -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (rename); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !1 -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if 1 -# if 0 && 0 -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *restrict format, ...) - __asm__ ("" - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (scanf); -# endif -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# else -# if !1 -_GL_FUNCDECL_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *restrict str, size_t size, - const char *restrict format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, - (char *restrict str, const char *restrict format, ...)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (sprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (tmpfile); -# endif -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if 1 -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !0 -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !0 -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vdprintf, int, - (int fd, const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vdprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if 0 -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *restrict fp, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vfprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *restrict stream, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if 0 || 1 -# if (0 && 0) \ - || (1 && 1 && (0 || 1)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if 0 || 0 -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, - (const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vprintf); -# endif -#endif -#if !0 && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if 0 -# if 0 && 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if 1 -# if 1 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# else -# if !1 -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *restrict str, size_t size, - const char *restrict format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if 0 -# if 0 -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *restrict str, - const char *restrict format, va_list args)); -# endif -# if __GLIBC__ >= 2 -_GL_CXXALIASWARN (vsprintf); -# endif -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - -#endif /* _GL_GTPO_STDIO_H */ -#endif /* _GL_GTPO_STDIO_H */ -#endif diff --git a/gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/lib/config.h b/gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/lib/config.h deleted file mode 100644 index bd5668611..000000000 --- a/gvsbuild/patches/gettext/msvc/vs14/x64/libtextstyle/lib/config.h +++ /dev/null @@ -1,1250 +0,0 @@ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -#ifndef LIBTEXTSTYLE_CONFIG_H -#define LIBTEXTSTYLE_CONFIG_H - -#include "../config.h" - -#endif /* LIBTEXTSTYLE_CONFIG_H */ -#define isatty libtextstyle_isatty -#define __oldXMLWDcompatibility libtextstyle___oldXMLWDcompatibility -#define __xmlBufferAllocScheme libtextstyle___xmlBufferAllocScheme -#define __xmlDefaultBufferSize libtextstyle___xmlDefaultBufferSize -#define __xmlDefaultSAXLocator libtextstyle___xmlDefaultSAXLocator -#define __xmlDeregisterNodeDefaultValue libtextstyle___xmlDeregisterNodeDefaultValue -#define __xmlDoValidityCheckingDefaultValue libtextstyle___xmlDoValidityCheckingDefaultValue -#define __xmlErrEncoding libtextstyle___xmlErrEncoding -#define __xmlGenericError libtextstyle___xmlGenericError -#define __xmlGenericErrorContext libtextstyle___xmlGenericErrorContext -#define __xmlGetWarningsDefaultValue libtextstyle___xmlGetWarningsDefaultValue -#define __xmlGlobalInitMutexDestroy libtextstyle___xmlGlobalInitMutexDestroy -#define __xmlGlobalInitMutexLock libtextstyle___xmlGlobalInitMutexLock -#define __xmlGlobalInitMutexUnlock libtextstyle___xmlGlobalInitMutexUnlock -#define __xmlIOErr libtextstyle___xmlIOErr -#define __xmlIndentTreeOutput libtextstyle___xmlIndentTreeOutput -#define __xmlInitializeDict libtextstyle___xmlInitializeDict -#define __xmlKeepBlanksDefaultValue libtextstyle___xmlKeepBlanksDefaultValue -#define __xmlLastError libtextstyle___xmlLastError -#define __xmlLineNumbersDefaultValue libtextstyle___xmlLineNumbersDefaultValue -#define __xmlLoadExtDtdDefaultValue libtextstyle___xmlLoadExtDtdDefaultValue -#define __xmlLoaderErr libtextstyle___xmlLoaderErr -#define __xmlOutputBufferCreateFilenameValue libtextstyle___xmlOutputBufferCreateFilenameValue -#define __xmlParserDebugEntities libtextstyle___xmlParserDebugEntities -#define __xmlParserInputBufferCreateFilename libtextstyle___xmlParserInputBufferCreateFilename -#define __xmlParserInputBufferCreateFilenameValue libtextstyle___xmlParserInputBufferCreateFilenameValue -#define __xmlParserVersion libtextstyle___xmlParserVersion -#define __xmlPedanticParserDefaultValue libtextstyle___xmlPedanticParserDefaultValue -#define __xmlRaiseError libtextstyle___xmlRaiseError -#define __xmlRegisterCallbacks libtextstyle___xmlRegisterCallbacks -#define __xmlRegisterNodeDefaultValue libtextstyle___xmlRegisterNodeDefaultValue -#define __xmlSaveNoEmptyTags libtextstyle___xmlSaveNoEmptyTags -#define __xmlSimpleError libtextstyle___xmlSimpleError -#define __xmlStructuredError libtextstyle___xmlStructuredError -#define __xmlStructuredErrorContext libtextstyle___xmlStructuredErrorContext -#define __xmlSubstituteEntitiesDefaultValue libtextstyle___xmlSubstituteEntitiesDefaultValue -#define __xmlTreeIndentString libtextstyle___xmlTreeIndentString -#define activate_term_non_default_mode libtextstyle_activate_term_non_default_mode -#define activate_term_style_controller libtextstyle_activate_term_style_controller -#define at_fatal_signal libtextstyle_at_fatal_signal -#define base_len libtextstyle_base_len -#define block_fatal_signals libtextstyle_block_fatal_signals -#define c_strcasecmp libtextstyle_c_strcasecmp -#define c_strncasecmp libtextstyle_c_strncasecmp -#define concatenated_filename libtextstyle_concatenated_filename -#define cr_additional_sel_append libtextstyle_cr_additional_sel_append -#define cr_additional_sel_destroy libtextstyle_cr_additional_sel_destroy -#define cr_additional_sel_dump libtextstyle_cr_additional_sel_dump -#define cr_additional_sel_new libtextstyle_cr_additional_sel_new -#define cr_additional_sel_new_with_type libtextstyle_cr_additional_sel_new_with_type -#define cr_additional_sel_one_to_string libtextstyle_cr_additional_sel_one_to_string -#define cr_additional_sel_prepend libtextstyle_cr_additional_sel_prepend -#define cr_additional_sel_set_attr_sel libtextstyle_cr_additional_sel_set_attr_sel -#define cr_additional_sel_set_class_name libtextstyle_cr_additional_sel_set_class_name -#define cr_additional_sel_set_id_name libtextstyle_cr_additional_sel_set_id_name -#define cr_additional_sel_set_pseudo libtextstyle_cr_additional_sel_set_pseudo -#define cr_additional_sel_to_string libtextstyle_cr_additional_sel_to_string -#define cr_attr_sel_append_attr_sel libtextstyle_cr_attr_sel_append_attr_sel -#define cr_attr_sel_destroy libtextstyle_cr_attr_sel_destroy -#define cr_attr_sel_dump libtextstyle_cr_attr_sel_dump -#define cr_attr_sel_new libtextstyle_cr_attr_sel_new -#define cr_attr_sel_prepend_attr_sel libtextstyle_cr_attr_sel_prepend_attr_sel -#define cr_attr_sel_to_string libtextstyle_cr_attr_sel_to_string -#define cr_cascade_destroy libtextstyle_cr_cascade_destroy -#define cr_cascade_get_sheet libtextstyle_cr_cascade_get_sheet -#define cr_cascade_new libtextstyle_cr_cascade_new -#define cr_cascade_ref libtextstyle_cr_cascade_ref -#define cr_cascade_set_sheet libtextstyle_cr_cascade_set_sheet -#define cr_cascade_unref libtextstyle_cr_cascade_unref -#define cr_declaration_append libtextstyle_cr_declaration_append -#define cr_declaration_append2 libtextstyle_cr_declaration_append2 -#define cr_declaration_destroy libtextstyle_cr_declaration_destroy -#define cr_declaration_dump libtextstyle_cr_declaration_dump -#define cr_declaration_dump_one libtextstyle_cr_declaration_dump_one -#define cr_declaration_get_by_prop_name libtextstyle_cr_declaration_get_by_prop_name -#define cr_declaration_get_from_list libtextstyle_cr_declaration_get_from_list -#define cr_declaration_list_to_string libtextstyle_cr_declaration_list_to_string -#define cr_declaration_list_to_string2 libtextstyle_cr_declaration_list_to_string2 -#define cr_declaration_new libtextstyle_cr_declaration_new -#define cr_declaration_nr_props libtextstyle_cr_declaration_nr_props -#define cr_declaration_parse_from_buf libtextstyle_cr_declaration_parse_from_buf -#define cr_declaration_parse_list_from_buf libtextstyle_cr_declaration_parse_list_from_buf -#define cr_declaration_prepend libtextstyle_cr_declaration_prepend -#define cr_declaration_ref libtextstyle_cr_declaration_ref -#define cr_declaration_to_string libtextstyle_cr_declaration_to_string -#define cr_declaration_unlink libtextstyle_cr_declaration_unlink -#define cr_declaration_unref libtextstyle_cr_declaration_unref -#define cr_doc_handler_associate_a_parser libtextstyle_cr_doc_handler_associate_a_parser -#define cr_doc_handler_destroy libtextstyle_cr_doc_handler_destroy -#define cr_doc_handler_get_ctxt libtextstyle_cr_doc_handler_get_ctxt -#define cr_doc_handler_get_result libtextstyle_cr_doc_handler_get_result -#define cr_doc_handler_new libtextstyle_cr_doc_handler_new -#define cr_doc_handler_ref libtextstyle_cr_doc_handler_ref -#define cr_doc_handler_set_ctxt libtextstyle_cr_doc_handler_set_ctxt -#define cr_doc_handler_set_default_sac_handler libtextstyle_cr_doc_handler_set_default_sac_handler -#define cr_doc_handler_set_result libtextstyle_cr_doc_handler_set_result -#define cr_doc_handler_unref libtextstyle_cr_doc_handler_unref -#define cr_enc_handler_convert_input libtextstyle_cr_enc_handler_convert_input -#define cr_enc_handler_get_instance libtextstyle_cr_enc_handler_get_instance -#define cr_enc_handler_resolve_enc_alias libtextstyle_cr_enc_handler_resolve_enc_alias -#define cr_font_family_append libtextstyle_cr_font_family_append -#define cr_font_family_destroy libtextstyle_cr_font_family_destroy -#define cr_font_family_new libtextstyle_cr_font_family_new -#define cr_font_family_prepend libtextstyle_cr_font_family_prepend -#define cr_font_family_set_name libtextstyle_cr_font_family_set_name -#define cr_font_family_to_string libtextstyle_cr_font_family_to_string -#define cr_font_size_adjust_destroy libtextstyle_cr_font_size_adjust_destroy -#define cr_font_size_adjust_new libtextstyle_cr_font_size_adjust_new -#define cr_font_size_adjust_to_string libtextstyle_cr_font_size_adjust_to_string -#define cr_font_size_clear libtextstyle_cr_font_size_clear -#define cr_font_size_copy libtextstyle_cr_font_size_copy -#define cr_font_size_destroy libtextstyle_cr_font_size_destroy -#define cr_font_size_get_larger_predefined_font_size libtextstyle_cr_font_size_get_larger_predefined_font_size -#define cr_font_size_get_smaller_predefined_font_size libtextstyle_cr_font_size_get_smaller_predefined_font_size -#define cr_font_size_is_predefined_absolute_font_size libtextstyle_cr_font_size_is_predefined_absolute_font_size -#define cr_font_size_is_set_to_inherit libtextstyle_cr_font_size_is_set_to_inherit -#define cr_font_size_new libtextstyle_cr_font_size_new -#define cr_font_size_set_absolute_font_size libtextstyle_cr_font_size_set_absolute_font_size -#define cr_font_size_set_predefined_absolute_font_size libtextstyle_cr_font_size_set_predefined_absolute_font_size -#define cr_font_size_set_relative_font_size libtextstyle_cr_font_size_set_relative_font_size -#define cr_font_size_set_to_inherit libtextstyle_cr_font_size_set_to_inherit -#define cr_font_size_to_string libtextstyle_cr_font_size_to_string -#define cr_font_stretch_to_string libtextstyle_cr_font_stretch_to_string -#define cr_font_style_to_string libtextstyle_cr_font_style_to_string -#define cr_font_variant_to_string libtextstyle_cr_font_variant_to_string -#define cr_font_weight_get_bolder libtextstyle_cr_font_weight_get_bolder -#define cr_font_weight_to_string libtextstyle_cr_font_weight_to_string -#define cr_input_consume_char libtextstyle_cr_input_consume_char -#define cr_input_consume_chars libtextstyle_cr_input_consume_chars -#define cr_input_consume_white_spaces libtextstyle_cr_input_consume_white_spaces -#define cr_input_destroy libtextstyle_cr_input_destroy -#define cr_input_end_of_input libtextstyle_cr_input_end_of_input -#define cr_input_get_byte_addr libtextstyle_cr_input_get_byte_addr -#define cr_input_get_column_num libtextstyle_cr_input_get_column_num -#define cr_input_get_cur_byte_addr libtextstyle_cr_input_get_cur_byte_addr -#define cr_input_get_cur_index libtextstyle_cr_input_get_cur_index -#define cr_input_get_cur_pos libtextstyle_cr_input_get_cur_pos -#define cr_input_get_end_of_file libtextstyle_cr_input_get_end_of_file -#define cr_input_get_end_of_line libtextstyle_cr_input_get_end_of_line -#define cr_input_get_line_num libtextstyle_cr_input_get_line_num -#define cr_input_get_nb_bytes_left libtextstyle_cr_input_get_nb_bytes_left -#define cr_input_get_parsing_location libtextstyle_cr_input_get_parsing_location -#define cr_input_increment_col_num libtextstyle_cr_input_increment_col_num -#define cr_input_increment_line_num libtextstyle_cr_input_increment_line_num -#define cr_input_new_from_buf libtextstyle_cr_input_new_from_buf -#define cr_input_new_from_uri libtextstyle_cr_input_new_from_uri -#define cr_input_peek_byte libtextstyle_cr_input_peek_byte -#define cr_input_peek_byte2 libtextstyle_cr_input_peek_byte2 -#define cr_input_peek_char libtextstyle_cr_input_peek_char -#define cr_input_read_byte libtextstyle_cr_input_read_byte -#define cr_input_read_char libtextstyle_cr_input_read_char -#define cr_input_ref libtextstyle_cr_input_ref -#define cr_input_seek_index libtextstyle_cr_input_seek_index -#define cr_input_set_column_num libtextstyle_cr_input_set_column_num -#define cr_input_set_cur_index libtextstyle_cr_input_set_cur_index -#define cr_input_set_cur_pos libtextstyle_cr_input_set_cur_pos -#define cr_input_set_end_of_file libtextstyle_cr_input_set_end_of_file -#define cr_input_set_end_of_line libtextstyle_cr_input_set_end_of_line -#define cr_input_set_line_num libtextstyle_cr_input_set_line_num -#define cr_input_unref libtextstyle_cr_input_unref -#define cr_num_copy libtextstyle_cr_num_copy -#define cr_num_destroy libtextstyle_cr_num_destroy -#define cr_num_dup libtextstyle_cr_num_dup -#define cr_num_is_fixed_length libtextstyle_cr_num_is_fixed_length -#define cr_num_new libtextstyle_cr_num_new -#define cr_num_new_with_val libtextstyle_cr_num_new_with_val -#define cr_num_set libtextstyle_cr_num_set -#define cr_num_to_string libtextstyle_cr_num_to_string -#define cr_om_parser_destroy libtextstyle_cr_om_parser_destroy -#define cr_om_parser_new libtextstyle_cr_om_parser_new -#define cr_om_parser_parse_buf libtextstyle_cr_om_parser_parse_buf -#define cr_om_parser_parse_file libtextstyle_cr_om_parser_parse_file -#define cr_om_parser_parse_paths_to_cascade libtextstyle_cr_om_parser_parse_paths_to_cascade -#define cr_om_parser_simply_parse_buf libtextstyle_cr_om_parser_simply_parse_buf -#define cr_om_parser_simply_parse_file libtextstyle_cr_om_parser_simply_parse_file -#define cr_om_parser_simply_parse_paths_to_cascade libtextstyle_cr_om_parser_simply_parse_paths_to_cascade -#define cr_parser_destroy libtextstyle_cr_parser_destroy -#define cr_parser_get_parsing_location libtextstyle_cr_parser_get_parsing_location -#define cr_parser_get_sac_handler libtextstyle_cr_parser_get_sac_handler -#define cr_parser_get_tknzr libtextstyle_cr_parser_get_tknzr -#define cr_parser_get_use_core_grammar libtextstyle_cr_parser_get_use_core_grammar -#define cr_parser_new libtextstyle_cr_parser_new -#define cr_parser_new_from_buf libtextstyle_cr_parser_new_from_buf -#define cr_parser_new_from_file libtextstyle_cr_parser_new_from_file -#define cr_parser_new_from_input libtextstyle_cr_parser_new_from_input -#define cr_parser_parse libtextstyle_cr_parser_parse -#define cr_parser_parse_buf libtextstyle_cr_parser_parse_buf -#define cr_parser_parse_charset libtextstyle_cr_parser_parse_charset -#define cr_parser_parse_declaration libtextstyle_cr_parser_parse_declaration -#define cr_parser_parse_expr libtextstyle_cr_parser_parse_expr -#define cr_parser_parse_file libtextstyle_cr_parser_parse_file -#define cr_parser_parse_font_face libtextstyle_cr_parser_parse_font_face -#define cr_parser_parse_import libtextstyle_cr_parser_parse_import -#define cr_parser_parse_media libtextstyle_cr_parser_parse_media -#define cr_parser_parse_page libtextstyle_cr_parser_parse_page -#define cr_parser_parse_prio libtextstyle_cr_parser_parse_prio -#define cr_parser_parse_ruleset libtextstyle_cr_parser_parse_ruleset -#define cr_parser_parse_statement_core libtextstyle_cr_parser_parse_statement_core -#define cr_parser_parse_term libtextstyle_cr_parser_parse_term -#define cr_parser_set_default_sac_handler libtextstyle_cr_parser_set_default_sac_handler -#define cr_parser_set_sac_handler libtextstyle_cr_parser_set_sac_handler -#define cr_parser_set_tknzr libtextstyle_cr_parser_set_tknzr -#define cr_parser_set_use_core_grammar libtextstyle_cr_parser_set_use_core_grammar -#define cr_parser_try_to_skip_spaces_and_comments libtextstyle_cr_parser_try_to_skip_spaces_and_comments -#define cr_parsing_location_copy libtextstyle_cr_parsing_location_copy -#define cr_parsing_location_destroy libtextstyle_cr_parsing_location_destroy -#define cr_parsing_location_dump libtextstyle_cr_parsing_location_dump -#define cr_parsing_location_init libtextstyle_cr_parsing_location_init -#define cr_parsing_location_new libtextstyle_cr_parsing_location_new -#define cr_parsing_location_to_string libtextstyle_cr_parsing_location_to_string -#define cr_prop_list_append libtextstyle_cr_prop_list_append -#define cr_prop_list_append2 libtextstyle_cr_prop_list_append2 -#define cr_prop_list_destroy libtextstyle_cr_prop_list_destroy -#define cr_prop_list_get_decl libtextstyle_cr_prop_list_get_decl -#define cr_prop_list_get_next libtextstyle_cr_prop_list_get_next -#define cr_prop_list_get_prev libtextstyle_cr_prop_list_get_prev -#define cr_prop_list_get_prop libtextstyle_cr_prop_list_get_prop -#define cr_prop_list_lookup_prop libtextstyle_cr_prop_list_lookup_prop -#define cr_prop_list_prepend libtextstyle_cr_prop_list_prepend -#define cr_prop_list_prepend2 libtextstyle_cr_prop_list_prepend2 -#define cr_prop_list_set_decl libtextstyle_cr_prop_list_set_decl -#define cr_prop_list_set_prop libtextstyle_cr_prop_list_set_prop -#define cr_prop_list_unlink libtextstyle_cr_prop_list_unlink -#define cr_pseudo_destroy libtextstyle_cr_pseudo_destroy -#define cr_pseudo_dump libtextstyle_cr_pseudo_dump -#define cr_pseudo_new libtextstyle_cr_pseudo_new -#define cr_pseudo_to_string libtextstyle_cr_pseudo_to_string -#define cr_rgb_compute_from_percentage libtextstyle_cr_rgb_compute_from_percentage -#define cr_rgb_copy libtextstyle_cr_rgb_copy -#define cr_rgb_destroy libtextstyle_cr_rgb_destroy -#define cr_rgb_dump libtextstyle_cr_rgb_dump -#define cr_rgb_is_set_to_inherit libtextstyle_cr_rgb_is_set_to_inherit -#define cr_rgb_is_set_to_transparent libtextstyle_cr_rgb_is_set_to_transparent -#define cr_rgb_new libtextstyle_cr_rgb_new -#define cr_rgb_new_with_vals libtextstyle_cr_rgb_new_with_vals -#define cr_rgb_parse_from_buf libtextstyle_cr_rgb_parse_from_buf -#define cr_rgb_set libtextstyle_cr_rgb_set -#define cr_rgb_set_from_hex_str libtextstyle_cr_rgb_set_from_hex_str -#define cr_rgb_set_from_name libtextstyle_cr_rgb_set_from_name -#define cr_rgb_set_from_rgb libtextstyle_cr_rgb_set_from_rgb -#define cr_rgb_set_from_term libtextstyle_cr_rgb_set_from_term -#define cr_rgb_set_to_inherit libtextstyle_cr_rgb_set_to_inherit -#define cr_rgb_set_to_transparent libtextstyle_cr_rgb_set_to_transparent -#define cr_rgb_to_string libtextstyle_cr_rgb_to_string -#define cr_sel_eng_destroy libtextstyle_cr_sel_eng_destroy -#define cr_sel_eng_get_matched_properties_from_cascade libtextstyle_cr_sel_eng_get_matched_properties_from_cascade -#define cr_sel_eng_get_matched_rulesets libtextstyle_cr_sel_eng_get_matched_rulesets -#define cr_sel_eng_get_matched_style libtextstyle_cr_sel_eng_get_matched_style -#define cr_sel_eng_get_pseudo_class_selector_handler libtextstyle_cr_sel_eng_get_pseudo_class_selector_handler -#define cr_sel_eng_matches_node libtextstyle_cr_sel_eng_matches_node -#define cr_sel_eng_new libtextstyle_cr_sel_eng_new -#define cr_sel_eng_register_pseudo_class_sel_handler libtextstyle_cr_sel_eng_register_pseudo_class_sel_handler -#define cr_sel_eng_unregister_all_pseudo_class_sel_handlers libtextstyle_cr_sel_eng_unregister_all_pseudo_class_sel_handlers -#define cr_sel_eng_unregister_pseudo_class_sel_handler libtextstyle_cr_sel_eng_unregister_pseudo_class_sel_handler -#define cr_selector_append libtextstyle_cr_selector_append -#define cr_selector_append_simple_sel libtextstyle_cr_selector_append_simple_sel -#define cr_selector_destroy libtextstyle_cr_selector_destroy -#define cr_selector_dump libtextstyle_cr_selector_dump -#define cr_selector_new libtextstyle_cr_selector_new -#define cr_selector_parse_from_buf libtextstyle_cr_selector_parse_from_buf -#define cr_selector_prepend libtextstyle_cr_selector_prepend -#define cr_selector_ref libtextstyle_cr_selector_ref -#define cr_selector_to_string libtextstyle_cr_selector_to_string -#define cr_selector_unref libtextstyle_cr_selector_unref -#define cr_simple_sel_append_simple_sel libtextstyle_cr_simple_sel_append_simple_sel -#define cr_simple_sel_compute_specificity libtextstyle_cr_simple_sel_compute_specificity -#define cr_simple_sel_destroy libtextstyle_cr_simple_sel_destroy -#define cr_simple_sel_dump libtextstyle_cr_simple_sel_dump -#define cr_simple_sel_new libtextstyle_cr_simple_sel_new -#define cr_simple_sel_one_to_string libtextstyle_cr_simple_sel_one_to_string -#define cr_simple_sel_prepend_simple_sel libtextstyle_cr_simple_sel_prepend_simple_sel -#define cr_simple_sel_to_string libtextstyle_cr_simple_sel_to_string -#define cr_statement_append libtextstyle_cr_statement_append -#define cr_statement_at_charset_rule_get_charset libtextstyle_cr_statement_at_charset_rule_get_charset -#define cr_statement_at_charset_rule_parse_from_buf libtextstyle_cr_statement_at_charset_rule_parse_from_buf -#define cr_statement_at_charset_rule_set_charset libtextstyle_cr_statement_at_charset_rule_set_charset -#define cr_statement_at_font_face_rule_add_decl libtextstyle_cr_statement_at_font_face_rule_add_decl -#define cr_statement_at_font_face_rule_get_decls libtextstyle_cr_statement_at_font_face_rule_get_decls -#define cr_statement_at_font_face_rule_set_decls libtextstyle_cr_statement_at_font_face_rule_set_decls -#define cr_statement_at_import_rule_get_imported_sheet libtextstyle_cr_statement_at_import_rule_get_imported_sheet -#define cr_statement_at_import_rule_get_url libtextstyle_cr_statement_at_import_rule_get_url -#define cr_statement_at_import_rule_parse_from_buf libtextstyle_cr_statement_at_import_rule_parse_from_buf -#define cr_statement_at_import_rule_set_imported_sheet libtextstyle_cr_statement_at_import_rule_set_imported_sheet -#define cr_statement_at_import_rule_set_url libtextstyle_cr_statement_at_import_rule_set_url -#define cr_statement_at_media_get_from_list libtextstyle_cr_statement_at_media_get_from_list -#define cr_statement_at_media_nr_rules libtextstyle_cr_statement_at_media_nr_rules -#define cr_statement_at_media_rule_parse_from_buf libtextstyle_cr_statement_at_media_rule_parse_from_buf -#define cr_statement_at_page_rule_get_declarations libtextstyle_cr_statement_at_page_rule_get_declarations -#define cr_statement_at_page_rule_parse_from_buf libtextstyle_cr_statement_at_page_rule_parse_from_buf -#define cr_statement_at_page_rule_set_declarations libtextstyle_cr_statement_at_page_rule_set_declarations -#define cr_statement_destroy libtextstyle_cr_statement_destroy -#define cr_statement_does_buf_parses_against_core libtextstyle_cr_statement_does_buf_parses_against_core -#define cr_statement_dump libtextstyle_cr_statement_dump -#define cr_statement_dump_charset libtextstyle_cr_statement_dump_charset -#define cr_statement_dump_font_face_rule libtextstyle_cr_statement_dump_font_face_rule -#define cr_statement_dump_import_rule libtextstyle_cr_statement_dump_import_rule -#define cr_statement_dump_media_rule libtextstyle_cr_statement_dump_media_rule -#define cr_statement_dump_page libtextstyle_cr_statement_dump_page -#define cr_statement_dump_ruleset libtextstyle_cr_statement_dump_ruleset -#define cr_statement_font_face_rule_parse_from_buf libtextstyle_cr_statement_font_face_rule_parse_from_buf -#define cr_statement_get_from_list libtextstyle_cr_statement_get_from_list -#define cr_statement_get_parent_sheet libtextstyle_cr_statement_get_parent_sheet -#define cr_statement_list_to_string libtextstyle_cr_statement_list_to_string -#define cr_statement_new_at_charset_rule libtextstyle_cr_statement_new_at_charset_rule -#define cr_statement_new_at_font_face_rule libtextstyle_cr_statement_new_at_font_face_rule -#define cr_statement_new_at_import_rule libtextstyle_cr_statement_new_at_import_rule -#define cr_statement_new_at_media_rule libtextstyle_cr_statement_new_at_media_rule -#define cr_statement_new_at_page_rule libtextstyle_cr_statement_new_at_page_rule -#define cr_statement_new_ruleset libtextstyle_cr_statement_new_ruleset -#define cr_statement_nr_rules libtextstyle_cr_statement_nr_rules -#define cr_statement_parse_from_buf libtextstyle_cr_statement_parse_from_buf -#define cr_statement_prepend libtextstyle_cr_statement_prepend -#define cr_statement_ruleset_append_decl libtextstyle_cr_statement_ruleset_append_decl -#define cr_statement_ruleset_append_decl2 libtextstyle_cr_statement_ruleset_append_decl2 -#define cr_statement_ruleset_get_declarations libtextstyle_cr_statement_ruleset_get_declarations -#define cr_statement_ruleset_get_sel_list libtextstyle_cr_statement_ruleset_get_sel_list -#define cr_statement_ruleset_parse_from_buf libtextstyle_cr_statement_ruleset_parse_from_buf -#define cr_statement_ruleset_set_decl_list libtextstyle_cr_statement_ruleset_set_decl_list -#define cr_statement_ruleset_set_sel_list libtextstyle_cr_statement_ruleset_set_sel_list -#define cr_statement_set_parent_sheet libtextstyle_cr_statement_set_parent_sheet -#define cr_statement_to_string libtextstyle_cr_statement_to_string -#define cr_statement_unlink libtextstyle_cr_statement_unlink -#define cr_string_destroy libtextstyle_cr_string_destroy -#define cr_string_dup libtextstyle_cr_string_dup -#define cr_string_dup2 libtextstyle_cr_string_dup2 -#define cr_string_new libtextstyle_cr_string_new -#define cr_string_new_from_gstring libtextstyle_cr_string_new_from_gstring -#define cr_string_new_from_string libtextstyle_cr_string_new_from_string -#define cr_string_peek_raw_str libtextstyle_cr_string_peek_raw_str -#define cr_string_peek_raw_str_len libtextstyle_cr_string_peek_raw_str_len -#define cr_style_border_style_to_string libtextstyle_cr_style_border_style_to_string -#define cr_style_copy libtextstyle_cr_style_copy -#define cr_style_destroy libtextstyle_cr_style_destroy -#define cr_style_display_type_to_string libtextstyle_cr_style_display_type_to_string -#define cr_style_dup libtextstyle_cr_style_dup -#define cr_style_float_type_to_string libtextstyle_cr_style_float_type_to_string -#define cr_style_new libtextstyle_cr_style_new -#define cr_style_num_prop_val_to_string libtextstyle_cr_style_num_prop_val_to_string -#define cr_style_position_type_to_string libtextstyle_cr_style_position_type_to_string -#define cr_style_ref libtextstyle_cr_style_ref -#define cr_style_resolve_inherited_properties libtextstyle_cr_style_resolve_inherited_properties -#define cr_style_rgb_prop_val_to_string libtextstyle_cr_style_rgb_prop_val_to_string -#define cr_style_set_props_to_default_values libtextstyle_cr_style_set_props_to_default_values -#define cr_style_set_props_to_initial_values libtextstyle_cr_style_set_props_to_initial_values -#define cr_style_set_style_from_decl libtextstyle_cr_style_set_style_from_decl -#define cr_style_to_string libtextstyle_cr_style_to_string -#define cr_style_unref libtextstyle_cr_style_unref -#define cr_style_white_space_type_to_string libtextstyle_cr_style_white_space_type_to_string -#define cr_stylesheet_destroy libtextstyle_cr_stylesheet_destroy -#define cr_stylesheet_dump libtextstyle_cr_stylesheet_dump -#define cr_stylesheet_new libtextstyle_cr_stylesheet_new -#define cr_stylesheet_nr_rules libtextstyle_cr_stylesheet_nr_rules -#define cr_stylesheet_ref libtextstyle_cr_stylesheet_ref -#define cr_stylesheet_statement_get_from_list libtextstyle_cr_stylesheet_statement_get_from_list -#define cr_stylesheet_to_string libtextstyle_cr_stylesheet_to_string -#define cr_stylesheet_unref libtextstyle_cr_stylesheet_unref -#define cr_term_append_term libtextstyle_cr_term_append_term -#define cr_term_destroy libtextstyle_cr_term_destroy -#define cr_term_dump libtextstyle_cr_term_dump -#define cr_term_get_from_list libtextstyle_cr_term_get_from_list -#define cr_term_new libtextstyle_cr_term_new -#define cr_term_nr_values libtextstyle_cr_term_nr_values -#define cr_term_one_to_string libtextstyle_cr_term_one_to_string -#define cr_term_parse_expression_from_buf libtextstyle_cr_term_parse_expression_from_buf -#define cr_term_prepend_term libtextstyle_cr_term_prepend_term -#define cr_term_ref libtextstyle_cr_term_ref -#define cr_term_set_function libtextstyle_cr_term_set_function -#define cr_term_set_hash libtextstyle_cr_term_set_hash -#define cr_term_set_ident libtextstyle_cr_term_set_ident -#define cr_term_set_number libtextstyle_cr_term_set_number -#define cr_term_set_rgb libtextstyle_cr_term_set_rgb -#define cr_term_set_string libtextstyle_cr_term_set_string -#define cr_term_set_uri libtextstyle_cr_term_set_uri -#define cr_term_to_string libtextstyle_cr_term_to_string -#define cr_term_unref libtextstyle_cr_term_unref -#define cr_tknzr_consume_chars libtextstyle_cr_tknzr_consume_chars -#define cr_tknzr_destroy libtextstyle_cr_tknzr_destroy -#define cr_tknzr_get_cur_byte_addr libtextstyle_cr_tknzr_get_cur_byte_addr -#define cr_tknzr_get_cur_pos libtextstyle_cr_tknzr_get_cur_pos -#define cr_tknzr_get_input libtextstyle_cr_tknzr_get_input -#define cr_tknzr_get_nb_bytes_left libtextstyle_cr_tknzr_get_nb_bytes_left -#define cr_tknzr_get_next_token libtextstyle_cr_tknzr_get_next_token -#define cr_tknzr_get_parsing_location libtextstyle_cr_tknzr_get_parsing_location -#define cr_tknzr_new libtextstyle_cr_tknzr_new -#define cr_tknzr_new_from_buf libtextstyle_cr_tknzr_new_from_buf -#define cr_tknzr_new_from_uri libtextstyle_cr_tknzr_new_from_uri -#define cr_tknzr_parse_token libtextstyle_cr_tknzr_parse_token -#define cr_tknzr_peek_byte libtextstyle_cr_tknzr_peek_byte -#define cr_tknzr_peek_byte2 libtextstyle_cr_tknzr_peek_byte2 -#define cr_tknzr_peek_char libtextstyle_cr_tknzr_peek_char -#define cr_tknzr_read_byte libtextstyle_cr_tknzr_read_byte -#define cr_tknzr_read_char libtextstyle_cr_tknzr_read_char -#define cr_tknzr_ref libtextstyle_cr_tknzr_ref -#define cr_tknzr_seek_index libtextstyle_cr_tknzr_seek_index -#define cr_tknzr_set_cur_pos libtextstyle_cr_tknzr_set_cur_pos -#define cr_tknzr_set_input libtextstyle_cr_tknzr_set_input -#define cr_tknzr_unget_token libtextstyle_cr_tknzr_unget_token -#define cr_tknzr_unref libtextstyle_cr_tknzr_unref -#define cr_token_destroy libtextstyle_cr_token_destroy -#define cr_token_new libtextstyle_cr_token_new -#define cr_token_set_angle libtextstyle_cr_token_set_angle -#define cr_token_set_atkeyword libtextstyle_cr_token_set_atkeyword -#define cr_token_set_bc libtextstyle_cr_token_set_bc -#define cr_token_set_bo libtextstyle_cr_token_set_bo -#define cr_token_set_cbc libtextstyle_cr_token_set_cbc -#define cr_token_set_cbo libtextstyle_cr_token_set_cbo -#define cr_token_set_cdc libtextstyle_cr_token_set_cdc -#define cr_token_set_cdo libtextstyle_cr_token_set_cdo -#define cr_token_set_charset_sym libtextstyle_cr_token_set_charset_sym -#define cr_token_set_comment libtextstyle_cr_token_set_comment -#define cr_token_set_dashmatch libtextstyle_cr_token_set_dashmatch -#define cr_token_set_delim libtextstyle_cr_token_set_delim -#define cr_token_set_dimen libtextstyle_cr_token_set_dimen -#define cr_token_set_ems libtextstyle_cr_token_set_ems -#define cr_token_set_exs libtextstyle_cr_token_set_exs -#define cr_token_set_font_face_sym libtextstyle_cr_token_set_font_face_sym -#define cr_token_set_freq libtextstyle_cr_token_set_freq -#define cr_token_set_function libtextstyle_cr_token_set_function -#define cr_token_set_hash libtextstyle_cr_token_set_hash -#define cr_token_set_ident libtextstyle_cr_token_set_ident -#define cr_token_set_import_sym libtextstyle_cr_token_set_import_sym -#define cr_token_set_important_sym libtextstyle_cr_token_set_important_sym -#define cr_token_set_includes libtextstyle_cr_token_set_includes -#define cr_token_set_length libtextstyle_cr_token_set_length -#define cr_token_set_media_sym libtextstyle_cr_token_set_media_sym -#define cr_token_set_number libtextstyle_cr_token_set_number -#define cr_token_set_page_sym libtextstyle_cr_token_set_page_sym -#define cr_token_set_pc libtextstyle_cr_token_set_pc -#define cr_token_set_percentage libtextstyle_cr_token_set_percentage -#define cr_token_set_po libtextstyle_cr_token_set_po -#define cr_token_set_rgb libtextstyle_cr_token_set_rgb -#define cr_token_set_s libtextstyle_cr_token_set_s -#define cr_token_set_semicolon libtextstyle_cr_token_set_semicolon -#define cr_token_set_string libtextstyle_cr_token_set_string -#define cr_token_set_time libtextstyle_cr_token_set_time -#define cr_token_set_uri libtextstyle_cr_token_set_uri -#define cr_utils_dump_n_chars libtextstyle_cr_utils_dump_n_chars -#define cr_utils_dump_n_chars2 libtextstyle_cr_utils_dump_n_chars2 -#define cr_utils_dup_glist_of_cr_string libtextstyle_cr_utils_dup_glist_of_cr_string -#define cr_utils_dup_glist_of_string libtextstyle_cr_utils_dup_glist_of_string -#define cr_utils_is_hexa_char libtextstyle_cr_utils_is_hexa_char -#define cr_utils_is_newline libtextstyle_cr_utils_is_newline -#define cr_utils_is_nonascii libtextstyle_cr_utils_is_nonascii -#define cr_utils_is_white_space libtextstyle_cr_utils_is_white_space -#define cr_utils_read_char_from_utf8_buf libtextstyle_cr_utils_read_char_from_utf8_buf -#define cr_utils_ucs1_str_len_as_utf8 libtextstyle_cr_utils_ucs1_str_len_as_utf8 -#define cr_utils_ucs1_str_to_utf8 libtextstyle_cr_utils_ucs1_str_to_utf8 -#define cr_utils_ucs1_to_utf8 libtextstyle_cr_utils_ucs1_to_utf8 -#define cr_utils_ucs4_str_len_as_utf8 libtextstyle_cr_utils_ucs4_str_len_as_utf8 -#define cr_utils_ucs4_str_to_utf8 libtextstyle_cr_utils_ucs4_str_to_utf8 -#define cr_utils_ucs4_to_utf8 libtextstyle_cr_utils_ucs4_to_utf8 -#define cr_utils_utf8_str_len_as_ucs1 libtextstyle_cr_utils_utf8_str_len_as_ucs1 -#define cr_utils_utf8_str_len_as_ucs4 libtextstyle_cr_utils_utf8_str_len_as_ucs4 -#define cr_utils_utf8_str_to_ucs1 libtextstyle_cr_utils_utf8_str_to_ucs1 -#define cr_utils_utf8_str_to_ucs4 libtextstyle_cr_utils_utf8_str_to_ucs4 -#define cr_utils_utf8_to_ucs1 libtextstyle_cr_utils_utf8_to_ucs1 -#define cr_utils_utf8_to_ucs4 libtextstyle_cr_utils_utf8_to_ucs4 -#define deactivate_term_non_default_mode libtextstyle_deactivate_term_non_default_mode -#define deactivate_term_style_controller libtextstyle_deactivate_term_style_controller -#define dup_cloexec libtextstyle_dup_cloexec -#define execute_all_close_hooks libtextstyle_execute_all_close_hooks -#define execute_all_ioctl_hooks libtextstyle_execute_all_ioctl_hooks -#define execute_close_hooks libtextstyle_execute_close_hooks -#define execute_ioctl_hooks libtextstyle_execute_ioctl_hooks -#define exit_failure libtextstyle_exit_failure -#define fd_ostream_typeinfo libtextstyle_fd_ostream_typeinfo -#define fd_ostream_vtable libtextstyle_fd_ostream_vtable -#define file_ostream_typeinfo libtextstyle_file_ostream_typeinfo -#define file_ostream_vtable libtextstyle_file_ostream_vtable -#define freea libtextstyle_freea -#define full_write libtextstyle_full_write -#define g_ascii_dtostr libtextstyle_g_ascii_dtostr -#define g_ascii_formatd libtextstyle_g_ascii_formatd -#define g_ascii_strcasecmp libtextstyle_g_ascii_strcasecmp -#define g_ascii_strup libtextstyle_g_ascii_strup -#define g_ascii_table libtextstyle_g_ascii_table -#define g_ascii_toupper libtextstyle_g_ascii_toupper -#define g_hash_table_insert libtextstyle_g_hash_table_insert -#define g_hash_table_lookup libtextstyle_g_hash_table_lookup -#define g_hash_table_new libtextstyle_g_hash_table_new -#define g_hash_table_new_full libtextstyle_g_hash_table_new_full -#define g_list_append libtextstyle_g_list_append -#define g_list_delete_link libtextstyle_g_list_delete_link -#define g_list_free libtextstyle_g_list_free -#define g_list_last libtextstyle_g_list_last -#define g_list_prepend libtextstyle_g_list_prepend -#define g_log libtextstyle_g_log -#define g_printerr libtextstyle_g_printerr -#define g_spaced_primes_closest libtextstyle_g_spaced_primes_closest -#define g_stpcpy libtextstyle_g_stpcpy -#define g_str_equal libtextstyle_g_str_equal -#define g_str_hash libtextstyle_g_str_hash -#define g_strconcat libtextstyle_g_strconcat -#define g_strdup libtextstyle_g_strdup -#define g_strdup_printf libtextstyle_g_strdup_printf -#define g_strdup_vprintf libtextstyle_g_strdup_vprintf -#define g_string_append libtextstyle_g_string_append -#define g_string_append_c libtextstyle_g_string_append_c -#define g_string_append_len libtextstyle_g_string_append_len -#define g_string_append_printf libtextstyle_g_string_append_printf -#define g_string_append_unichar libtextstyle_g_string_append_unichar -#define g_string_free libtextstyle_g_string_free -#define g_string_insert_c libtextstyle_g_string_insert_c -#define g_string_insert_len libtextstyle_g_string_insert_len -#define g_string_insert_unichar libtextstyle_g_string_insert_unichar -#define g_string_new libtextstyle_g_string_new -#define g_string_new_len libtextstyle_g_string_new_len -#define g_string_sized_new libtextstyle_g_string_sized_new -#define g_strndup libtextstyle_g_strndup -#define g_strstr_len libtextstyle_g_strstr_len -#define g_warning libtextstyle_g_warning -#define get_fatal_signal_set libtextstyle_get_fatal_signal_set -#define get_fatal_signals libtextstyle_get_fatal_signals -#define get_ppid_of libtextstyle_get_ppid_of -#define get_progname_of libtextstyle_get_progname_of -#define getprogname libtextstyle_getprogname -#define gl_array_list_implementation libtextstyle_gl_array_list_implementation -#define gl_sockets_cleanup libtextstyle_gl_sockets_cleanup -#define gl_sockets_startup libtextstyle_gl_sockets_startup -#define hash_destroy libtextstyle_hash_destroy -#define hash_find_entry libtextstyle_hash_find_entry -#define hash_init libtextstyle_hash_init -#define hash_insert_entry libtextstyle_hash_insert_entry -#define hash_iterate libtextstyle_hash_iterate -#define hash_iterate_modify libtextstyle_hash_iterate_modify -#define hash_set_value libtextstyle_hash_set_value -#define html_ostream_typeinfo libtextstyle_html_ostream_typeinfo -#define html_ostream_vtable libtextstyle_html_ostream_vtable -#define html_styled_ostream_typeinfo libtextstyle_html_styled_ostream_typeinfo -#define html_styled_ostream_vtable libtextstyle_html_styled_ostream_vtable -#define iconv_ostream_typeinfo libtextstyle_iconv_ostream_typeinfo -#define iconv_ostream_vtable libtextstyle_iconv_ostream_vtable -#define initGenericErrorDefaultFunc libtextstyle_initGenericErrorDefaultFunc -#define inputPop libtextstyle_inputPop -#define inputPush libtextstyle_inputPush -#define isolat1ToUTF8 libtextstyle_isolat1ToUTF8 -#define last_component libtextstyle_last_component -#define libxml_domnode_binary_insertion_sort libtextstyle_libxml_domnode_binary_insertion_sort -#define libxml_domnode_tim_sort libtextstyle_libxml_domnode_tim_sort -#define memory_ostream__contents libtextstyle_memory_ostream__contents -#define memory_ostream_typeinfo libtextstyle_memory_ostream_typeinfo -#define memory_ostream_vtable libtextstyle_memory_ostream_vtable -#define mmalloca libtextstyle_mmalloca -#define namePop libtextstyle_namePop -#define namePush libtextstyle_namePush -#define next_prime libtextstyle_next_prime -#define nodePop libtextstyle_nodePop -#define nodePush libtextstyle_nodePush -#define noop_styled_ostream_typeinfo libtextstyle_noop_styled_ostream_typeinfo -#define noop_styled_ostream_vtable libtextstyle_noop_styled_ostream_vtable -#define oldXMLWDcompatibility libtextstyle_oldXMLWDcompatibility -#define ostream__flush libtextstyle_ostream__flush -#define ostream__free libtextstyle_ostream__free -#define ostream__write_mem libtextstyle_ostream__write_mem -#define ostream_typeinfo libtextstyle_ostream_typeinfo -#define ostream_vtable libtextstyle_ostream_vtable -#define printf_frexp libtextstyle_printf_frexp -#define printf_frexpl libtextstyle_printf_frexpl -#define register_fd_hook libtextstyle_register_fd_hook -#define safe_read libtextstyle_safe_read -#define safe_write libtextstyle_safe_write -#define set_cloexec_flag libtextstyle_set_cloexec_flag -#define styled_ostream__begin_use_class libtextstyle_styled_ostream__begin_use_class -#define styled_ostream__end_use_class libtextstyle_styled_ostream__end_use_class -#define styled_ostream__flush libtextstyle_styled_ostream__flush -#define styled_ostream__flush_to_current_style libtextstyle_styled_ostream__flush_to_current_style -#define styled_ostream__free libtextstyle_styled_ostream__free -#define styled_ostream__get_hyperlink_id libtextstyle_styled_ostream__get_hyperlink_id -#define styled_ostream__get_hyperlink_ref libtextstyle_styled_ostream__get_hyperlink_ref -#define styled_ostream__set_hyperlink libtextstyle_styled_ostream__set_hyperlink -#define styled_ostream__write_mem libtextstyle_styled_ostream__write_mem -#define styled_ostream_typeinfo libtextstyle_styled_ostream_typeinfo -#define styled_ostream_vtable libtextstyle_styled_ostream_vtable -#define term_ostream_typeinfo libtextstyle_term_ostream_typeinfo -#define term_ostream_vtable libtextstyle_term_ostream_vtable -#define term_styled_ostream_typeinfo libtextstyle_term_styled_ostream_typeinfo -#define term_styled_ostream_vtable libtextstyle_term_styled_ostream_vtable -#define u8_mbtouc libtextstyle_u8_mbtouc -#define unblock_fatal_signals libtextstyle_unblock_fatal_signals -#define unregister_fd_hook libtextstyle_unregister_fd_hook -#define x2realloc libtextstyle_x2realloc -#define xalloc_die libtextstyle_xalloc_die -#define xasprintf libtextstyle_xasprintf -#define xcalloc libtextstyle_xcalloc -#define xconcatenated_filename libtextstyle_xconcatenated_filename -#define xgethostname libtextstyle_xgethostname -#define xmalloc libtextstyle_xmalloc -#define xmalloc_exit_failure libtextstyle_xmalloc_exit_failure -#define xmemdup libtextstyle_xmemdup -#define xmlAddAttributeDecl libtextstyle_xmlAddAttributeDecl -#define xmlAddChild libtextstyle_xmlAddChild -#define xmlAddChildList libtextstyle_xmlAddChildList -#define xmlAddDocEntity libtextstyle_xmlAddDocEntity -#define xmlAddDtdEntity libtextstyle_xmlAddDtdEntity -#define xmlAddElementDecl libtextstyle_xmlAddElementDecl -#define xmlAddEncodingAlias libtextstyle_xmlAddEncodingAlias -#define xmlAddID libtextstyle_xmlAddID -#define xmlAddNextSibling libtextstyle_xmlAddNextSibling -#define xmlAddNotationDecl libtextstyle_xmlAddNotationDecl -#define xmlAddPrevSibling libtextstyle_xmlAddPrevSibling -#define xmlAddRef libtextstyle_xmlAddRef -#define xmlAddSibling libtextstyle_xmlAddSibling -#define xmlAllocParserInputBuffer libtextstyle_xmlAllocParserInputBuffer -#define xmlBufAdd libtextstyle_xmlBufAdd -#define xmlBufAddHead libtextstyle_xmlBufAddHead -#define xmlBufAddLen libtextstyle_xmlBufAddLen -#define xmlBufAvail libtextstyle_xmlBufAvail -#define xmlBufBackToBuffer libtextstyle_xmlBufBackToBuffer -#define xmlBufCCat libtextstyle_xmlBufCCat -#define xmlBufCat libtextstyle_xmlBufCat -#define xmlBufContent libtextstyle_xmlBufContent -#define xmlBufCreate libtextstyle_xmlBufCreate -#define xmlBufCreateSize libtextstyle_xmlBufCreateSize -#define xmlBufCreateStatic libtextstyle_xmlBufCreateStatic -#define xmlBufDetach libtextstyle_xmlBufDetach -#define xmlBufDump libtextstyle_xmlBufDump -#define xmlBufEmpty libtextstyle_xmlBufEmpty -#define xmlBufEnd libtextstyle_xmlBufEnd -#define xmlBufErase libtextstyle_xmlBufErase -#define xmlBufFree libtextstyle_xmlBufFree -#define xmlBufFromBuffer libtextstyle_xmlBufFromBuffer -#define xmlBufGetAllocationScheme libtextstyle_xmlBufGetAllocationScheme -#define xmlBufGetInputBase libtextstyle_xmlBufGetInputBase -#define xmlBufGetNodeContent libtextstyle_xmlBufGetNodeContent -#define xmlBufGrow libtextstyle_xmlBufGrow -#define xmlBufInflate libtextstyle_xmlBufInflate -#define xmlBufIsEmpty libtextstyle_xmlBufIsEmpty -#define xmlBufLength libtextstyle_xmlBufLength -#define xmlBufMergeBuffer libtextstyle_xmlBufMergeBuffer -#define xmlBufResetInput libtextstyle_xmlBufResetInput -#define xmlBufResize libtextstyle_xmlBufResize -#define xmlBufSetAllocationScheme libtextstyle_xmlBufSetAllocationScheme -#define xmlBufSetInputBaseCur libtextstyle_xmlBufSetInputBaseCur -#define xmlBufShrink libtextstyle_xmlBufShrink -#define xmlBufUse libtextstyle_xmlBufUse -#define xmlBufWriteCHAR libtextstyle_xmlBufWriteCHAR -#define xmlBufWriteChar libtextstyle_xmlBufWriteChar -#define xmlBufWriteQuotedString libtextstyle_xmlBufWriteQuotedString -#define xmlBufferAdd libtextstyle_xmlBufferAdd -#define xmlBufferAddHead libtextstyle_xmlBufferAddHead -#define xmlBufferAllocScheme libtextstyle_xmlBufferAllocScheme -#define xmlBufferCCat libtextstyle_xmlBufferCCat -#define xmlBufferCat libtextstyle_xmlBufferCat -#define xmlBufferContent libtextstyle_xmlBufferContent -#define xmlBufferCreate libtextstyle_xmlBufferCreate -#define xmlBufferCreateSize libtextstyle_xmlBufferCreateSize -#define xmlBufferCreateStatic libtextstyle_xmlBufferCreateStatic -#define xmlBufferDetach libtextstyle_xmlBufferDetach -#define xmlBufferDump libtextstyle_xmlBufferDump -#define xmlBufferEmpty libtextstyle_xmlBufferEmpty -#define xmlBufferFree libtextstyle_xmlBufferFree -#define xmlBufferGrow libtextstyle_xmlBufferGrow -#define xmlBufferLength libtextstyle_xmlBufferLength -#define xmlBufferResize libtextstyle_xmlBufferResize -#define xmlBufferSetAllocationScheme libtextstyle_xmlBufferSetAllocationScheme -#define xmlBufferShrink libtextstyle_xmlBufferShrink -#define xmlBufferWriteCHAR libtextstyle_xmlBufferWriteCHAR -#define xmlBufferWriteChar libtextstyle_xmlBufferWriteChar -#define xmlBufferWriteQuotedString libtextstyle_xmlBufferWriteQuotedString -#define xmlBuildQName libtextstyle_xmlBuildQName -#define xmlBuildRelativeURI libtextstyle_xmlBuildRelativeURI -#define xmlBuildURI libtextstyle_xmlBuildURI -#define xmlByteConsumed libtextstyle_xmlByteConsumed -#define xmlCanonicPath libtextstyle_xmlCanonicPath -#define xmlCharEncCloseFunc libtextstyle_xmlCharEncCloseFunc -#define xmlCharEncFirstLine libtextstyle_xmlCharEncFirstLine -#define xmlCharEncFirstLineInput libtextstyle_xmlCharEncFirstLineInput -#define xmlCharEncFirstLineInt libtextstyle_xmlCharEncFirstLineInt -#define xmlCharEncInFunc libtextstyle_xmlCharEncInFunc -#define xmlCharEncInput libtextstyle_xmlCharEncInput -#define xmlCharEncOutFunc libtextstyle_xmlCharEncOutFunc -#define xmlCharInRange libtextstyle_xmlCharInRange -#define xmlCharStrdup libtextstyle_xmlCharStrdup -#define xmlCharStrndup libtextstyle_xmlCharStrndup -#define xmlCheckFilename libtextstyle_xmlCheckFilename -#define xmlCheckHTTPInput libtextstyle_xmlCheckHTTPInput -#define xmlCheckLanguageID libtextstyle_xmlCheckLanguageID -#define xmlCheckUTF8 libtextstyle_xmlCheckUTF8 -#define xmlCheckVersion libtextstyle_xmlCheckVersion -#define xmlChildElementCount libtextstyle_xmlChildElementCount -#define xmlCleanupCharEncodingHandlers libtextstyle_xmlCleanupCharEncodingHandlers -#define xmlCleanupEncodingAliases libtextstyle_xmlCleanupEncodingAliases -#define xmlCleanupGlobals libtextstyle_xmlCleanupGlobals -#define xmlCleanupInputCallbacks libtextstyle_xmlCleanupInputCallbacks -#define xmlCleanupMemory libtextstyle_xmlCleanupMemory -#define xmlCleanupParser libtextstyle_xmlCleanupParser -#define xmlCleanupThreads libtextstyle_xmlCleanupThreads -#define xmlClearNodeInfoSeq libtextstyle_xmlClearNodeInfoSeq -#define xmlClearParserCtxt libtextstyle_xmlClearParserCtxt -#define xmlCopyAttributeTable libtextstyle_xmlCopyAttributeTable -#define xmlCopyChar libtextstyle_xmlCopyChar -#define xmlCopyCharMultiByte libtextstyle_xmlCopyCharMultiByte -#define xmlCopyDoc libtextstyle_xmlCopyDoc -#define xmlCopyDocElementContent libtextstyle_xmlCopyDocElementContent -#define xmlCopyDtd libtextstyle_xmlCopyDtd -#define xmlCopyElementContent libtextstyle_xmlCopyElementContent -#define xmlCopyElementTable libtextstyle_xmlCopyElementTable -#define xmlCopyEntitiesTable libtextstyle_xmlCopyEntitiesTable -#define xmlCopyEnumeration libtextstyle_xmlCopyEnumeration -#define xmlCopyError libtextstyle_xmlCopyError -#define xmlCopyNamespace libtextstyle_xmlCopyNamespace -#define xmlCopyNamespaceList libtextstyle_xmlCopyNamespaceList -#define xmlCopyNode libtextstyle_xmlCopyNode -#define xmlCopyNodeList libtextstyle_xmlCopyNodeList -#define xmlCopyNotationTable libtextstyle_xmlCopyNotationTable -#define xmlCopyProp libtextstyle_xmlCopyProp -#define xmlCopyPropList libtextstyle_xmlCopyPropList -#define xmlCreateDocParserCtxt libtextstyle_xmlCreateDocParserCtxt -#define xmlCreateEntitiesTable libtextstyle_xmlCreateEntitiesTable -#define xmlCreateEntityParserCtxt libtextstyle_xmlCreateEntityParserCtxt -#define xmlCreateEnumeration libtextstyle_xmlCreateEnumeration -#define xmlCreateFileParserCtxt libtextstyle_xmlCreateFileParserCtxt -#define xmlCreateIOParserCtxt libtextstyle_xmlCreateIOParserCtxt -#define xmlCreateIntSubset libtextstyle_xmlCreateIntSubset -#define xmlCreateMemoryParserCtxt libtextstyle_xmlCreateMemoryParserCtxt -#define xmlCreateURI libtextstyle_xmlCreateURI -#define xmlCreateURLParserCtxt libtextstyle_xmlCreateURLParserCtxt -#define xmlCtxtGetLastError libtextstyle_xmlCtxtGetLastError -#define xmlCtxtReadDoc libtextstyle_xmlCtxtReadDoc -#define xmlCtxtReadFd libtextstyle_xmlCtxtReadFd -#define xmlCtxtReadFile libtextstyle_xmlCtxtReadFile -#define xmlCtxtReadIO libtextstyle_xmlCtxtReadIO -#define xmlCtxtReadMemory libtextstyle_xmlCtxtReadMemory -#define xmlCtxtReset libtextstyle_xmlCtxtReset -#define xmlCtxtResetLastError libtextstyle_xmlCtxtResetLastError -#define xmlCtxtResetPush libtextstyle_xmlCtxtResetPush -#define xmlCtxtUseOptions libtextstyle_xmlCtxtUseOptions -#define xmlCurrentChar libtextstyle_xmlCurrentChar -#define xmlDOMWrapAdoptNode libtextstyle_xmlDOMWrapAdoptNode -#define xmlDOMWrapCloneNode libtextstyle_xmlDOMWrapCloneNode -#define xmlDOMWrapFreeCtxt libtextstyle_xmlDOMWrapFreeCtxt -#define xmlDOMWrapNewCtxt libtextstyle_xmlDOMWrapNewCtxt -#define xmlDOMWrapReconcileNamespaces libtextstyle_xmlDOMWrapReconcileNamespaces -#define xmlDOMWrapRemoveNode libtextstyle_xmlDOMWrapRemoveNode -#define xmlDefaultBufferSize libtextstyle_xmlDefaultBufferSize -#define xmlDefaultSAXHandlerInit libtextstyle_xmlDefaultSAXHandlerInit -#define xmlDefaultSAXLocator libtextstyle_xmlDefaultSAXLocator -#define xmlDelEncodingAlias libtextstyle_xmlDelEncodingAlias -#define xmlDeregisterNodeDefault libtextstyle_xmlDeregisterNodeDefault -#define xmlDeregisterNodeDefaultValue libtextstyle_xmlDeregisterNodeDefaultValue -#define xmlDetectCharEncoding libtextstyle_xmlDetectCharEncoding -#define xmlDictCleanup libtextstyle_xmlDictCleanup -#define xmlDictCreate libtextstyle_xmlDictCreate -#define xmlDictCreateSub libtextstyle_xmlDictCreateSub -#define xmlDictExists libtextstyle_xmlDictExists -#define xmlDictFree libtextstyle_xmlDictFree -#define xmlDictGetUsage libtextstyle_xmlDictGetUsage -#define xmlDictLookup libtextstyle_xmlDictLookup -#define xmlDictOwns libtextstyle_xmlDictOwns -#define xmlDictQLookup libtextstyle_xmlDictQLookup -#define xmlDictReference libtextstyle_xmlDictReference -#define xmlDictSetLimit libtextstyle_xmlDictSetLimit -#define xmlDictSize libtextstyle_xmlDictSize -#define xmlDoValidityCheckingDefaultValue libtextstyle_xmlDoValidityCheckingDefaultValue -#define xmlDocCopyNode libtextstyle_xmlDocCopyNode -#define xmlDocCopyNodeList libtextstyle_xmlDocCopyNodeList -#define xmlDocGetRootElement libtextstyle_xmlDocGetRootElement -#define xmlDocSetRootElement libtextstyle_xmlDocSetRootElement -#define xmlEncodeAttributeEntities libtextstyle_xmlEncodeAttributeEntities -#define xmlEncodeEntitiesReentrant libtextstyle_xmlEncodeEntitiesReentrant -#define xmlEncodeSpecialChars libtextstyle_xmlEncodeSpecialChars -#define xmlErrMemory libtextstyle_xmlErrMemory -#define xmlEscapeFormatString libtextstyle_xmlEscapeFormatString -#define xmlFileClose libtextstyle_xmlFileClose -#define xmlFileMatch libtextstyle_xmlFileMatch -#define xmlFileOpen libtextstyle_xmlFileOpen -#define xmlFileRead libtextstyle_xmlFileRead -#define xmlFindCharEncodingHandler libtextstyle_xmlFindCharEncodingHandler -#define xmlFirstElementChild libtextstyle_xmlFirstElementChild -#define xmlFree libtextstyle_xmlFree -#define xmlFreeAttributeTable libtextstyle_xmlFreeAttributeTable -#define xmlFreeDoc libtextstyle_xmlFreeDoc -#define xmlFreeDocElementContent libtextstyle_xmlFreeDocElementContent -#define xmlFreeDtd libtextstyle_xmlFreeDtd -#define xmlFreeElementContent libtextstyle_xmlFreeElementContent -#define xmlFreeElementTable libtextstyle_xmlFreeElementTable -#define xmlFreeEntitiesTable libtextstyle_xmlFreeEntitiesTable -#define xmlFreeEnumeration libtextstyle_xmlFreeEnumeration -#define xmlFreeIDTable libtextstyle_xmlFreeIDTable -#define xmlFreeInputStream libtextstyle_xmlFreeInputStream -#define xmlFreeMutex libtextstyle_xmlFreeMutex -#define xmlFreeNode libtextstyle_xmlFreeNode -#define xmlFreeNodeList libtextstyle_xmlFreeNodeList -#define xmlFreeNotationTable libtextstyle_xmlFreeNotationTable -#define xmlFreeNs libtextstyle_xmlFreeNs -#define xmlFreeNsList libtextstyle_xmlFreeNsList -#define xmlFreeParserCtxt libtextstyle_xmlFreeParserCtxt -#define xmlFreeParserInputBuffer libtextstyle_xmlFreeParserInputBuffer -#define xmlFreeProp libtextstyle_xmlFreeProp -#define xmlFreePropList libtextstyle_xmlFreePropList -#define xmlFreeRMutex libtextstyle_xmlFreeRMutex -#define xmlFreeRefTable libtextstyle_xmlFreeRefTable -#define xmlFreeURI libtextstyle_xmlFreeURI -#define xmlGcMemGet libtextstyle_xmlGcMemGet -#define xmlGcMemSetup libtextstyle_xmlGcMemSetup -#define xmlGenericError libtextstyle_xmlGenericError -#define xmlGenericErrorContext libtextstyle_xmlGenericErrorContext -#define xmlGenericErrorDefaultFunc libtextstyle_xmlGenericErrorDefaultFunc -#define xmlGetBufferAllocationScheme libtextstyle_xmlGetBufferAllocationScheme -#define xmlGetCharEncodingHandler libtextstyle_xmlGetCharEncodingHandler -#define xmlGetCharEncodingName libtextstyle_xmlGetCharEncodingName -#define xmlGetCompressMode libtextstyle_xmlGetCompressMode -#define xmlGetDocCompressMode libtextstyle_xmlGetDocCompressMode -#define xmlGetDocEntity libtextstyle_xmlGetDocEntity -#define xmlGetDtdAttrDesc libtextstyle_xmlGetDtdAttrDesc -#define xmlGetDtdElementDesc libtextstyle_xmlGetDtdElementDesc -#define xmlGetDtdEntity libtextstyle_xmlGetDtdEntity -#define xmlGetDtdNotationDesc libtextstyle_xmlGetDtdNotationDesc -#define xmlGetDtdQAttrDesc libtextstyle_xmlGetDtdQAttrDesc -#define xmlGetDtdQElementDesc libtextstyle_xmlGetDtdQElementDesc -#define xmlGetEncodingAlias libtextstyle_xmlGetEncodingAlias -#define xmlGetExternalEntityLoader libtextstyle_xmlGetExternalEntityLoader -#define xmlGetGlobalState libtextstyle_xmlGetGlobalState -#define xmlGetID libtextstyle_xmlGetID -#define xmlGetIntSubset libtextstyle_xmlGetIntSubset -#define xmlGetLastChild libtextstyle_xmlGetLastChild -#define xmlGetLastError libtextstyle_xmlGetLastError -#define xmlGetLineNo libtextstyle_xmlGetLineNo -#define xmlGetNoNsProp libtextstyle_xmlGetNoNsProp -#define xmlGetNodePath libtextstyle_xmlGetNodePath -#define xmlGetNsList libtextstyle_xmlGetNsList -#define xmlGetNsProp libtextstyle_xmlGetNsProp -#define xmlGetParameterEntity libtextstyle_xmlGetParameterEntity -#define xmlGetPredefinedEntity libtextstyle_xmlGetPredefinedEntity -#define xmlGetProp libtextstyle_xmlGetProp -#define xmlGetRefs libtextstyle_xmlGetRefs -#define xmlGetThreadId libtextstyle_xmlGetThreadId -#define xmlGetUTF8Char libtextstyle_xmlGetUTF8Char -#define xmlGetWarningsDefaultValue libtextstyle_xmlGetWarningsDefaultValue -#define xmlHasFeature libtextstyle_xmlHasFeature -#define xmlHasNsProp libtextstyle_xmlHasNsProp -#define xmlHasProp libtextstyle_xmlHasProp -#define xmlHashAddEntry libtextstyle_xmlHashAddEntry -#define xmlHashAddEntry2 libtextstyle_xmlHashAddEntry2 -#define xmlHashAddEntry3 libtextstyle_xmlHashAddEntry3 -#define xmlHashCopy libtextstyle_xmlHashCopy -#define xmlHashCreate libtextstyle_xmlHashCreate -#define xmlHashCreateDict libtextstyle_xmlHashCreateDict -#define xmlHashDefaultDeallocator libtextstyle_xmlHashDefaultDeallocator -#define xmlHashFree libtextstyle_xmlHashFree -#define xmlHashLookup libtextstyle_xmlHashLookup -#define xmlHashLookup2 libtextstyle_xmlHashLookup2 -#define xmlHashLookup3 libtextstyle_xmlHashLookup3 -#define xmlHashQLookup libtextstyle_xmlHashQLookup -#define xmlHashQLookup2 libtextstyle_xmlHashQLookup2 -#define xmlHashQLookup3 libtextstyle_xmlHashQLookup3 -#define xmlHashRemoveEntry libtextstyle_xmlHashRemoveEntry -#define xmlHashRemoveEntry2 libtextstyle_xmlHashRemoveEntry2 -#define xmlHashRemoveEntry3 libtextstyle_xmlHashRemoveEntry3 -#define xmlHashScan libtextstyle_xmlHashScan -#define xmlHashScan3 libtextstyle_xmlHashScan3 -#define xmlHashScanFull libtextstyle_xmlHashScanFull -#define xmlHashScanFull3 libtextstyle_xmlHashScanFull3 -#define xmlHashSize libtextstyle_xmlHashSize -#define xmlHashUpdateEntry libtextstyle_xmlHashUpdateEntry -#define xmlHashUpdateEntry2 libtextstyle_xmlHashUpdateEntry2 -#define xmlHashUpdateEntry3 libtextstyle_xmlHashUpdateEntry3 -#define xmlIndentTreeOutput libtextstyle_xmlIndentTreeOutput -#define xmlInitCharEncodingHandlers libtextstyle_xmlInitCharEncodingHandlers -#define xmlInitGlobals libtextstyle_xmlInitGlobals -#define xmlInitMemory libtextstyle_xmlInitMemory -#define xmlInitNodeInfoSeq libtextstyle_xmlInitNodeInfoSeq -#define xmlInitParser libtextstyle_xmlInitParser -#define xmlInitParserCtxt libtextstyle_xmlInitParserCtxt -#define xmlInitThreads libtextstyle_xmlInitThreads -#define xmlInitializeDict libtextstyle_xmlInitializeDict -#define xmlInitializeGlobalState libtextstyle_xmlInitializeGlobalState -#define xmlInputReadCallbackNop libtextstyle_xmlInputReadCallbackNop -#define xmlIsBaseChar libtextstyle_xmlIsBaseChar -#define xmlIsBaseCharGroup libtextstyle_xmlIsBaseCharGroup -#define xmlIsBlank libtextstyle_xmlIsBlank -#define xmlIsBlankNode libtextstyle_xmlIsBlankNode -#define xmlIsChar libtextstyle_xmlIsChar -#define xmlIsCharGroup libtextstyle_xmlIsCharGroup -#define xmlIsCombining libtextstyle_xmlIsCombining -#define xmlIsCombiningGroup libtextstyle_xmlIsCombiningGroup -#define xmlIsDigit libtextstyle_xmlIsDigit -#define xmlIsDigitGroup libtextstyle_xmlIsDigitGroup -#define xmlIsExtender libtextstyle_xmlIsExtender -#define xmlIsExtenderGroup libtextstyle_xmlIsExtenderGroup -#define xmlIsID libtextstyle_xmlIsID -#define xmlIsIdeographic libtextstyle_xmlIsIdeographic -#define xmlIsIdeographicGroup libtextstyle_xmlIsIdeographicGroup -#define xmlIsLetter libtextstyle_xmlIsLetter -#define xmlIsMainThread libtextstyle_xmlIsMainThread -#define xmlIsMixedElement libtextstyle_xmlIsMixedElement -#define xmlIsPubidChar libtextstyle_xmlIsPubidChar -#define xmlIsPubidChar_tab libtextstyle_xmlIsPubidChar_tab -#define xmlIsRef libtextstyle_xmlIsRef -#define xmlIsXHTML libtextstyle_xmlIsXHTML -#define xmlKeepBlanksDefault libtextstyle_xmlKeepBlanksDefault -#define xmlKeepBlanksDefaultValue libtextstyle_xmlKeepBlanksDefaultValue -#define xmlLastElementChild libtextstyle_xmlLastElementChild -#define xmlLastError libtextstyle_xmlLastError -#define xmlLineNumbersDefault libtextstyle_xmlLineNumbersDefault -#define xmlLineNumbersDefaultValue libtextstyle_xmlLineNumbersDefaultValue -#define xmlLinkGetData libtextstyle_xmlLinkGetData -#define xmlListAppend libtextstyle_xmlListAppend -#define xmlListClear libtextstyle_xmlListClear -#define xmlListCopy libtextstyle_xmlListCopy -#define xmlListCreate libtextstyle_xmlListCreate -#define xmlListDelete libtextstyle_xmlListDelete -#define xmlListDup libtextstyle_xmlListDup -#define xmlListEmpty libtextstyle_xmlListEmpty -#define xmlListEnd libtextstyle_xmlListEnd -#define xmlListFront libtextstyle_xmlListFront -#define xmlListInsert libtextstyle_xmlListInsert -#define xmlListMerge libtextstyle_xmlListMerge -#define xmlListPopBack libtextstyle_xmlListPopBack -#define xmlListPopFront libtextstyle_xmlListPopFront -#define xmlListPushBack libtextstyle_xmlListPushBack -#define xmlListPushFront libtextstyle_xmlListPushFront -#define xmlListRemoveAll libtextstyle_xmlListRemoveAll -#define xmlListRemoveFirst libtextstyle_xmlListRemoveFirst -#define xmlListRemoveLast libtextstyle_xmlListRemoveLast -#define xmlListReverse libtextstyle_xmlListReverse -#define xmlListReverseSearch libtextstyle_xmlListReverseSearch -#define xmlListReverseWalk libtextstyle_xmlListReverseWalk -#define xmlListSearch libtextstyle_xmlListSearch -#define xmlListSize libtextstyle_xmlListSize -#define xmlListSort libtextstyle_xmlListSort -#define xmlListWalk libtextstyle_xmlListWalk -#define xmlLoadExtDtdDefaultValue libtextstyle_xmlLoadExtDtdDefaultValue -#define xmlLoadExternalEntity libtextstyle_xmlLoadExternalEntity -#define xmlLockLibrary libtextstyle_xmlLockLibrary -#define xmlMalloc libtextstyle_xmlMalloc -#define xmlMallocAtomic libtextstyle_xmlMallocAtomic -#define xmlMallocAtomicLoc libtextstyle_xmlMallocAtomicLoc -#define xmlMallocBreakpoint libtextstyle_xmlMallocBreakpoint -#define xmlMallocLoc libtextstyle_xmlMallocLoc -#define xmlMemBlocks libtextstyle_xmlMemBlocks -#define xmlMemDisplay libtextstyle_xmlMemDisplay -#define xmlMemDisplayLast libtextstyle_xmlMemDisplayLast -#define xmlMemFree libtextstyle_xmlMemFree -#define xmlMemGet libtextstyle_xmlMemGet -#define xmlMemMalloc libtextstyle_xmlMemMalloc -#define xmlMemRealloc libtextstyle_xmlMemRealloc -#define xmlMemSetup libtextstyle_xmlMemSetup -#define xmlMemShow libtextstyle_xmlMemShow -#define xmlMemStrdup libtextstyle_xmlMemStrdup -#define xmlMemStrdupLoc libtextstyle_xmlMemStrdupLoc -#define xmlMemUsed libtextstyle_xmlMemUsed -#define xmlMemoryDump libtextstyle_xmlMemoryDump -#define xmlMemoryStrdup libtextstyle_xmlMemoryStrdup -#define xmlMutexLock libtextstyle_xmlMutexLock -#define xmlMutexUnlock libtextstyle_xmlMutexUnlock -#define xmlNewCDataBlock libtextstyle_xmlNewCDataBlock -#define xmlNewCharEncodingHandler libtextstyle_xmlNewCharEncodingHandler -#define xmlNewCharRef libtextstyle_xmlNewCharRef -#define xmlNewChild libtextstyle_xmlNewChild -#define xmlNewComment libtextstyle_xmlNewComment -#define xmlNewDoc libtextstyle_xmlNewDoc -#define xmlNewDocComment libtextstyle_xmlNewDocComment -#define xmlNewDocElementContent libtextstyle_xmlNewDocElementContent -#define xmlNewDocFragment libtextstyle_xmlNewDocFragment -#define xmlNewDocNode libtextstyle_xmlNewDocNode -#define xmlNewDocNodeEatName libtextstyle_xmlNewDocNodeEatName -#define xmlNewDocPI libtextstyle_xmlNewDocPI -#define xmlNewDocProp libtextstyle_xmlNewDocProp -#define xmlNewDocRawNode libtextstyle_xmlNewDocRawNode -#define xmlNewDocText libtextstyle_xmlNewDocText -#define xmlNewDocTextLen libtextstyle_xmlNewDocTextLen -#define xmlNewDtd libtextstyle_xmlNewDtd -#define xmlNewElementContent libtextstyle_xmlNewElementContent -#define xmlNewEntity libtextstyle_xmlNewEntity -#define xmlNewEntityInputStream libtextstyle_xmlNewEntityInputStream -#define xmlNewIOInputStream libtextstyle_xmlNewIOInputStream -#define xmlNewInputFromFile libtextstyle_xmlNewInputFromFile -#define xmlNewInputStream libtextstyle_xmlNewInputStream -#define xmlNewMutex libtextstyle_xmlNewMutex -#define xmlNewNode libtextstyle_xmlNewNode -#define xmlNewNodeEatName libtextstyle_xmlNewNodeEatName -#define xmlNewNs libtextstyle_xmlNewNs -#define xmlNewNsProp libtextstyle_xmlNewNsProp -#define xmlNewNsPropEatName libtextstyle_xmlNewNsPropEatName -#define xmlNewPI libtextstyle_xmlNewPI -#define xmlNewParserCtxt libtextstyle_xmlNewParserCtxt -#define xmlNewProp libtextstyle_xmlNewProp -#define xmlNewRMutex libtextstyle_xmlNewRMutex -#define xmlNewReference libtextstyle_xmlNewReference -#define xmlNewStringInputStream libtextstyle_xmlNewStringInputStream -#define xmlNewText libtextstyle_xmlNewText -#define xmlNewTextChild libtextstyle_xmlNewTextChild -#define xmlNewTextLen libtextstyle_xmlNewTextLen -#define xmlNextChar libtextstyle_xmlNextChar -#define xmlNextElementSibling libtextstyle_xmlNextElementSibling -#define xmlNoNetExternalEntityLoader libtextstyle_xmlNoNetExternalEntityLoader -#define xmlNodeAddContent libtextstyle_xmlNodeAddContent -#define xmlNodeAddContentLen libtextstyle_xmlNodeAddContentLen -#define xmlNodeBufGetContent libtextstyle_xmlNodeBufGetContent -#define xmlNodeGetBase libtextstyle_xmlNodeGetBase -#define xmlNodeGetContent libtextstyle_xmlNodeGetContent -#define xmlNodeGetLang libtextstyle_xmlNodeGetLang -#define xmlNodeGetSpacePreserve libtextstyle_xmlNodeGetSpacePreserve -#define xmlNodeIsText libtextstyle_xmlNodeIsText -#define xmlNodeListGetRawString libtextstyle_xmlNodeListGetRawString -#define xmlNodeListGetString libtextstyle_xmlNodeListGetString -#define xmlNodeSetBase libtextstyle_xmlNodeSetBase -#define xmlNodeSetContent libtextstyle_xmlNodeSetContent -#define xmlNodeSetContentLen libtextstyle_xmlNodeSetContentLen -#define xmlNodeSetLang libtextstyle_xmlNodeSetLang -#define xmlNodeSetName libtextstyle_xmlNodeSetName -#define xmlNodeSetSpacePreserve libtextstyle_xmlNodeSetSpacePreserve -#define xmlNormalizeURIPath libtextstyle_xmlNormalizeURIPath -#define xmlNormalizeWindowsPath libtextstyle_xmlNormalizeWindowsPath -#define xmlOutputBufferCreateFilenameDefault libtextstyle_xmlOutputBufferCreateFilenameDefault -#define xmlOutputBufferCreateFilenameValue libtextstyle_xmlOutputBufferCreateFilenameValue -#define xmlParseAttValue libtextstyle_xmlParseAttValue -#define xmlParseAttributeListDecl libtextstyle_xmlParseAttributeListDecl -#define xmlParseAttributeType libtextstyle_xmlParseAttributeType -#define xmlParseCDSect libtextstyle_xmlParseCDSect -#define xmlParseCharData libtextstyle_xmlParseCharData -#define xmlParseCharEncoding libtextstyle_xmlParseCharEncoding -#define xmlParseCharRef libtextstyle_xmlParseCharRef -#define xmlParseComment libtextstyle_xmlParseComment -#define xmlParseContent libtextstyle_xmlParseContent -#define xmlParseCtxtExternalEntity libtextstyle_xmlParseCtxtExternalEntity -#define xmlParseDefaultDecl libtextstyle_xmlParseDefaultDecl -#define xmlParseDocTypeDecl libtextstyle_xmlParseDocTypeDecl -#define xmlParseDocument libtextstyle_xmlParseDocument -#define xmlParseElement libtextstyle_xmlParseElement -#define xmlParseElementChildrenContentDecl libtextstyle_xmlParseElementChildrenContentDecl -#define xmlParseElementContentDecl libtextstyle_xmlParseElementContentDecl -#define xmlParseElementDecl libtextstyle_xmlParseElementDecl -#define xmlParseElementMixedContentDecl libtextstyle_xmlParseElementMixedContentDecl -#define xmlParseEncName libtextstyle_xmlParseEncName -#define xmlParseEncodingDecl libtextstyle_xmlParseEncodingDecl -#define xmlParseEntityDecl libtextstyle_xmlParseEntityDecl -#define xmlParseEntityRef libtextstyle_xmlParseEntityRef -#define xmlParseEntityValue libtextstyle_xmlParseEntityValue -#define xmlParseEnumeratedType libtextstyle_xmlParseEnumeratedType -#define xmlParseEnumerationType libtextstyle_xmlParseEnumerationType -#define xmlParseExtParsedEnt libtextstyle_xmlParseExtParsedEnt -#define xmlParseExternalID libtextstyle_xmlParseExternalID -#define xmlParseExternalSubset libtextstyle_xmlParseExternalSubset -#define xmlParseInNodeContext libtextstyle_xmlParseInNodeContext -#define xmlParseMarkupDecl libtextstyle_xmlParseMarkupDecl -#define xmlParseMisc libtextstyle_xmlParseMisc -#define xmlParseName libtextstyle_xmlParseName -#define xmlParseNmtoken libtextstyle_xmlParseNmtoken -#define xmlParseNotationDecl libtextstyle_xmlParseNotationDecl -#define xmlParseNotationType libtextstyle_xmlParseNotationType -#define xmlParsePEReference libtextstyle_xmlParsePEReference -#define xmlParsePI libtextstyle_xmlParsePI -#define xmlParsePITarget libtextstyle_xmlParsePITarget -#define xmlParsePubidLiteral libtextstyle_xmlParsePubidLiteral -#define xmlParseReference libtextstyle_xmlParseReference -#define xmlParseSDDecl libtextstyle_xmlParseSDDecl -#define xmlParseSystemLiteral libtextstyle_xmlParseSystemLiteral -#define xmlParseTextDecl libtextstyle_xmlParseTextDecl -#define xmlParseURI libtextstyle_xmlParseURI -#define xmlParseURIRaw libtextstyle_xmlParseURIRaw -#define xmlParseURIReference libtextstyle_xmlParseURIReference -#define xmlParseVersionInfo libtextstyle_xmlParseVersionInfo -#define xmlParseVersionNum libtextstyle_xmlParseVersionNum -#define xmlParseXMLDecl libtextstyle_xmlParseXMLDecl -#define xmlParserAddNodeInfo libtextstyle_xmlParserAddNodeInfo -#define xmlParserDebugEntities libtextstyle_xmlParserDebugEntities -#define xmlParserError libtextstyle_xmlParserError -#define xmlParserFindNodeInfo libtextstyle_xmlParserFindNodeInfo -#define xmlParserFindNodeInfoIndex libtextstyle_xmlParserFindNodeInfoIndex -#define xmlParserGetDirectory libtextstyle_xmlParserGetDirectory -#define xmlParserHandlePEReference libtextstyle_xmlParserHandlePEReference -#define xmlParserInputBufferCreateFd libtextstyle_xmlParserInputBufferCreateFd -#define xmlParserInputBufferCreateFile libtextstyle_xmlParserInputBufferCreateFile -#define xmlParserInputBufferCreateFilename libtextstyle_xmlParserInputBufferCreateFilename -#define xmlParserInputBufferCreateFilenameDefault libtextstyle_xmlParserInputBufferCreateFilenameDefault -#define xmlParserInputBufferCreateFilenameValue libtextstyle_xmlParserInputBufferCreateFilenameValue -#define xmlParserInputBufferCreateIO libtextstyle_xmlParserInputBufferCreateIO -#define xmlParserInputBufferCreateMem libtextstyle_xmlParserInputBufferCreateMem -#define xmlParserInputBufferCreateStatic libtextstyle_xmlParserInputBufferCreateStatic -#define xmlParserInputBufferGrow libtextstyle_xmlParserInputBufferGrow -#define xmlParserInputBufferPush libtextstyle_xmlParserInputBufferPush -#define xmlParserInputBufferRead libtextstyle_xmlParserInputBufferRead -#define xmlParserInputGrow libtextstyle_xmlParserInputGrow -#define xmlParserInputRead libtextstyle_xmlParserInputRead -#define xmlParserInputShrink libtextstyle_xmlParserInputShrink -#define xmlParserMaxDepth libtextstyle_xmlParserMaxDepth -#define xmlParserPrintFileContext libtextstyle_xmlParserPrintFileContext -#define xmlParserPrintFileInfo libtextstyle_xmlParserPrintFileInfo -#define xmlParserValidityError libtextstyle_xmlParserValidityError -#define xmlParserValidityWarning libtextstyle_xmlParserValidityWarning -#define xmlParserVersion libtextstyle_xmlParserVersion -#define xmlParserWarning libtextstyle_xmlParserWarning -#define xmlPathToURI libtextstyle_xmlPathToURI -#define xmlPedanticParserDefault libtextstyle_xmlPedanticParserDefault -#define xmlPedanticParserDefaultValue libtextstyle_xmlPedanticParserDefaultValue -#define xmlPopInput libtextstyle_xmlPopInput -#define xmlPopInputCallbacks libtextstyle_xmlPopInputCallbacks -#define xmlPreviousElementSibling libtextstyle_xmlPreviousElementSibling -#define xmlPrintURI libtextstyle_xmlPrintURI -#define xmlPushInput libtextstyle_xmlPushInput -#define xmlRMutexLock libtextstyle_xmlRMutexLock -#define xmlRMutexUnlock libtextstyle_xmlRMutexUnlock -#define xmlReadDoc libtextstyle_xmlReadDoc -#define xmlReadFd libtextstyle_xmlReadFd -#define xmlReadFile libtextstyle_xmlReadFile -#define xmlReadIO libtextstyle_xmlReadIO -#define xmlReadMemory libtextstyle_xmlReadMemory -#define xmlRealloc libtextstyle_xmlRealloc -#define xmlReallocLoc libtextstyle_xmlReallocLoc -#define xmlReconciliateNs libtextstyle_xmlReconciliateNs -#define xmlRegisterCharEncodingHandler libtextstyle_xmlRegisterCharEncodingHandler -#define xmlRegisterDefaultInputCallbacks libtextstyle_xmlRegisterDefaultInputCallbacks -#define xmlRegisterInputCallbacks libtextstyle_xmlRegisterInputCallbacks -#define xmlRegisterNodeDefault libtextstyle_xmlRegisterNodeDefault -#define xmlRegisterNodeDefaultValue libtextstyle_xmlRegisterNodeDefaultValue -#define xmlRemoveID libtextstyle_xmlRemoveID -#define xmlRemoveProp libtextstyle_xmlRemoveProp -#define xmlRemoveRef libtextstyle_xmlRemoveRef -#define xmlReplaceNode libtextstyle_xmlReplaceNode -#define xmlResetError libtextstyle_xmlResetError -#define xmlResetLastError libtextstyle_xmlResetLastError -#define xmlSAX2AttributeDecl libtextstyle_xmlSAX2AttributeDecl -#define xmlSAX2CDataBlock libtextstyle_xmlSAX2CDataBlock -#define xmlSAX2Characters libtextstyle_xmlSAX2Characters -#define xmlSAX2Comment libtextstyle_xmlSAX2Comment -#define xmlSAX2ElementDecl libtextstyle_xmlSAX2ElementDecl -#define xmlSAX2EndDocument libtextstyle_xmlSAX2EndDocument -#define xmlSAX2EndElementNs libtextstyle_xmlSAX2EndElementNs -#define xmlSAX2EntityDecl libtextstyle_xmlSAX2EntityDecl -#define xmlSAX2ExternalSubset libtextstyle_xmlSAX2ExternalSubset -#define xmlSAX2GetColumnNumber libtextstyle_xmlSAX2GetColumnNumber -#define xmlSAX2GetEntity libtextstyle_xmlSAX2GetEntity -#define xmlSAX2GetLineNumber libtextstyle_xmlSAX2GetLineNumber -#define xmlSAX2GetParameterEntity libtextstyle_xmlSAX2GetParameterEntity -#define xmlSAX2GetPublicId libtextstyle_xmlSAX2GetPublicId -#define xmlSAX2GetSystemId libtextstyle_xmlSAX2GetSystemId -#define xmlSAX2HasExternalSubset libtextstyle_xmlSAX2HasExternalSubset -#define xmlSAX2HasInternalSubset libtextstyle_xmlSAX2HasInternalSubset -#define xmlSAX2IgnorableWhitespace libtextstyle_xmlSAX2IgnorableWhitespace -#define xmlSAX2InitDefaultSAXHandler libtextstyle_xmlSAX2InitDefaultSAXHandler -#define xmlSAX2InternalSubset libtextstyle_xmlSAX2InternalSubset -#define xmlSAX2IsStandalone libtextstyle_xmlSAX2IsStandalone -#define xmlSAX2NotationDecl libtextstyle_xmlSAX2NotationDecl -#define xmlSAX2ProcessingInstruction libtextstyle_xmlSAX2ProcessingInstruction -#define xmlSAX2Reference libtextstyle_xmlSAX2Reference -#define xmlSAX2ResolveEntity libtextstyle_xmlSAX2ResolveEntity -#define xmlSAX2SetDocumentLocator libtextstyle_xmlSAX2SetDocumentLocator -#define xmlSAX2StartDocument libtextstyle_xmlSAX2StartDocument -#define xmlSAX2StartElementNs libtextstyle_xmlSAX2StartElementNs -#define xmlSAX2UnparsedEntityDecl libtextstyle_xmlSAX2UnparsedEntityDecl -#define xmlSAXVersion libtextstyle_xmlSAXVersion -#define xmlSaveNoEmptyTags libtextstyle_xmlSaveNoEmptyTags -#define xmlSaveUri libtextstyle_xmlSaveUri -#define xmlSearchNs libtextstyle_xmlSearchNs -#define xmlSearchNsByHref libtextstyle_xmlSearchNsByHref -#define xmlSetBufferAllocationScheme libtextstyle_xmlSetBufferAllocationScheme -#define xmlSetCompressMode libtextstyle_xmlSetCompressMode -#define xmlSetDocCompressMode libtextstyle_xmlSetDocCompressMode -#define xmlSetExternalEntityLoader libtextstyle_xmlSetExternalEntityLoader -#define xmlSetGenericErrorFunc libtextstyle_xmlSetGenericErrorFunc -#define xmlSetListDoc libtextstyle_xmlSetListDoc -#define xmlSetNs libtextstyle_xmlSetNs -#define xmlSetNsProp libtextstyle_xmlSetNsProp -#define xmlSetProp libtextstyle_xmlSetProp -#define xmlSetStructuredErrorFunc libtextstyle_xmlSetStructuredErrorFunc -#define xmlSetTreeDoc libtextstyle_xmlSetTreeDoc -#define xmlSkipBlankChars libtextstyle_xmlSkipBlankChars -#define xmlSnprintfElementContent libtextstyle_xmlSnprintfElementContent -#define xmlSplitQName libtextstyle_xmlSplitQName -#define xmlSplitQName2 libtextstyle_xmlSplitQName2 -#define xmlSplitQName3 libtextstyle_xmlSplitQName3 -#define xmlStopParser libtextstyle_xmlStopParser -#define xmlStrEqual libtextstyle_xmlStrEqual -#define xmlStrPrintf libtextstyle_xmlStrPrintf -#define xmlStrQEqual libtextstyle_xmlStrQEqual -#define xmlStrVPrintf libtextstyle_xmlStrVPrintf -#define xmlStrcasecmp libtextstyle_xmlStrcasecmp -#define xmlStrcasestr libtextstyle_xmlStrcasestr -#define xmlStrcat libtextstyle_xmlStrcat -#define xmlStrchr libtextstyle_xmlStrchr -#define xmlStrcmp libtextstyle_xmlStrcmp -#define xmlStrdup libtextstyle_xmlStrdup -#define xmlStringComment libtextstyle_xmlStringComment -#define xmlStringCurrentChar libtextstyle_xmlStringCurrentChar -#define xmlStringDecodeEntities libtextstyle_xmlStringDecodeEntities -#define xmlStringGetNodeList libtextstyle_xmlStringGetNodeList -#define xmlStringLenDecodeEntities libtextstyle_xmlStringLenDecodeEntities -#define xmlStringLenGetNodeList libtextstyle_xmlStringLenGetNodeList -#define xmlStringText libtextstyle_xmlStringText -#define xmlStringTextNoenc libtextstyle_xmlStringTextNoenc -#define xmlStrlen libtextstyle_xmlStrlen -#define xmlStrncasecmp libtextstyle_xmlStrncasecmp -#define xmlStrncat libtextstyle_xmlStrncat -#define xmlStrncatNew libtextstyle_xmlStrncatNew -#define xmlStrncmp libtextstyle_xmlStrncmp -#define xmlStrndup libtextstyle_xmlStrndup -#define xmlStrstr libtextstyle_xmlStrstr -#define xmlStrsub libtextstyle_xmlStrsub -#define xmlStructuredError libtextstyle_xmlStructuredError -#define xmlStructuredErrorContext libtextstyle_xmlStructuredErrorContext -#define xmlSubstituteEntitiesDefault libtextstyle_xmlSubstituteEntitiesDefault -#define xmlSubstituteEntitiesDefaultValue libtextstyle_xmlSubstituteEntitiesDefaultValue -#define xmlSwitchEncoding libtextstyle_xmlSwitchEncoding -#define xmlSwitchInputEncoding libtextstyle_xmlSwitchInputEncoding -#define xmlSwitchToEncoding libtextstyle_xmlSwitchToEncoding -#define xmlTextConcat libtextstyle_xmlTextConcat -#define xmlTextMerge libtextstyle_xmlTextMerge -#define xmlThrDefBufferAllocScheme libtextstyle_xmlThrDefBufferAllocScheme -#define xmlThrDefDefaultBufferSize libtextstyle_xmlThrDefDefaultBufferSize -#define xmlThrDefDeregisterNodeDefault libtextstyle_xmlThrDefDeregisterNodeDefault -#define xmlThrDefDoValidityCheckingDefaultValue libtextstyle_xmlThrDefDoValidityCheckingDefaultValue -#define xmlThrDefGetWarningsDefaultValue libtextstyle_xmlThrDefGetWarningsDefaultValue -#define xmlThrDefIndentTreeOutput libtextstyle_xmlThrDefIndentTreeOutput -#define xmlThrDefKeepBlanksDefaultValue libtextstyle_xmlThrDefKeepBlanksDefaultValue -#define xmlThrDefLineNumbersDefaultValue libtextstyle_xmlThrDefLineNumbersDefaultValue -#define xmlThrDefLoadExtDtdDefaultValue libtextstyle_xmlThrDefLoadExtDtdDefaultValue -#define xmlThrDefOutputBufferCreateFilenameDefault libtextstyle_xmlThrDefOutputBufferCreateFilenameDefault -#define xmlThrDefParserDebugEntities libtextstyle_xmlThrDefParserDebugEntities -#define xmlThrDefParserInputBufferCreateFilenameDefault libtextstyle_xmlThrDefParserInputBufferCreateFilenameDefault -#define xmlThrDefPedanticParserDefaultValue libtextstyle_xmlThrDefPedanticParserDefaultValue -#define xmlThrDefRegisterNodeDefault libtextstyle_xmlThrDefRegisterNodeDefault -#define xmlThrDefSaveNoEmptyTags libtextstyle_xmlThrDefSaveNoEmptyTags -#define xmlThrDefSetGenericErrorFunc libtextstyle_xmlThrDefSetGenericErrorFunc -#define xmlThrDefSetStructuredErrorFunc libtextstyle_xmlThrDefSetStructuredErrorFunc -#define xmlThrDefSubstituteEntitiesDefaultValue libtextstyle_xmlThrDefSubstituteEntitiesDefaultValue -#define xmlThrDefTreeIndentString libtextstyle_xmlThrDefTreeIndentString -#define xmlTreeIndentString libtextstyle_xmlTreeIndentString -#define xmlURIEscape libtextstyle_xmlURIEscape -#define xmlURIEscapeStr libtextstyle_xmlURIEscapeStr -#define xmlURIUnescapeString libtextstyle_xmlURIUnescapeString -#define xmlUTF8Charcmp libtextstyle_xmlUTF8Charcmp -#define xmlUTF8Size libtextstyle_xmlUTF8Size -#define xmlUTF8Strlen libtextstyle_xmlUTF8Strlen -#define xmlUTF8Strloc libtextstyle_xmlUTF8Strloc -#define xmlUTF8Strndup libtextstyle_xmlUTF8Strndup -#define xmlUTF8Strpos libtextstyle_xmlUTF8Strpos -#define xmlUTF8Strsize libtextstyle_xmlUTF8Strsize -#define xmlUTF8Strsub libtextstyle_xmlUTF8Strsub -#define xmlUnlinkNode libtextstyle_xmlUnlinkNode -#define xmlUnlockLibrary libtextstyle_xmlUnlockLibrary -#define xmlUnsetNsProp libtextstyle_xmlUnsetNsProp -#define xmlUnsetProp libtextstyle_xmlUnsetProp -#define xmlValidateNCName libtextstyle_xmlValidateNCName -#define xmlValidateNMToken libtextstyle_xmlValidateNMToken -#define xmlValidateName libtextstyle_xmlValidateName -#define xmlValidateQName libtextstyle_xmlValidateQName -#define xnmalloc libtextstyle_xnmalloc -#define xrealloc libtextstyle_xrealloc -#define xstrdup libtextstyle_xstrdup -#define xvasprintf libtextstyle_xvasprintf -#define xzalloc libtextstyle_xzalloc diff --git a/gvsbuild/patches/gettext/nmake/build-rules-msvc.mak b/gvsbuild/patches/gettext/nmake/build-rules-msvc.mak index f4f414a50..6e91b1f5b 100644 --- a/gvsbuild/patches/gettext/nmake/build-rules-msvc.mak +++ b/gvsbuild/patches/gettext/nmake/build-rules-msvc.mak @@ -15,17 +15,32 @@ # << {..\gettext-runtime\libasprintf\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\asprintf\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\asprintf\ md vs$(VSVER)\$(CFG)\$(PLAT)\asprintf $(CC) $(ASPRINTF_INCLUDES) $(ASPRINTF_DEFINES) /Fovs$(VSVER)\$(CFG)\$(PLAT)\asprintf\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\asprintf\ /c @<< $< << {..\gettext-runtime\libasprintf\}.cc{vs$(VSVER)\$(CFG)\$(PLAT)\asprintf\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\asprintf\ md vs$(VSVER)\$(CFG)\$(PLAT)\asprintf $(CXX) $(CXXFLAGS) $(ASPRINTF_INCLUDES) $(ASPRINTF_DEFINES) /Fovs$(VSVER)\$(CFG)\$(PLAT)\asprintf\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\asprintf\ /c @<< $< << +{..\gettext-runtime\libasprintf\gnulib-lib\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\asprintf-gnulib\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\asprintf-gnulib\ md vs$(VSVER)\$(CFG)\$(PLAT)\asprintf-gnulib + $(CC) $(ASPRINTF_INCLUDES) $(ASPRINTF_DEFINES) /Fovs$(VSVER)\$(CFG)\$(PLAT)\asprintf-gnulib\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\asprintf-gnulib\ /c @<< +$< +<< + {..\gettext-runtime\intl\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\intl-runtime\}.obj:: - $(CC) $(GETTEXT_RUNTIME_INCLUDES) $(GETTEXT_RUNTIME_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\intl-runtime\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\intl-runtime\ /c @<< + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\intl-runtime\ md vs$(VSVER)\$(CFG)\$(PLAT)\intl-runtime + $(CC) $(LIBINTL_INCLUDES) $(GETTEXT_RUNTIME_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\intl-runtime\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\intl-runtime\ /c @<< +$< +<< + +{..\gettext-runtime\intl\gnulib-lib\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\intl-gnulib\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\intl-gnulib\ md vs$(VSVER)\$(CFG)\$(PLAT)\intl-gnulib + $(CC) $(LIBINTL_INCLUDES) $(GETTEXT_RUNTIME_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\intl-gnulib\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\intl-gnulib\ /c @<< $< << @@ -41,12 +56,24 @@ $< $< << +{..\gettext-runtime\gnulib-lib\malloc\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\grt\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\grt\ md vs$(VSVER)\$(CFG)\$(PLAT)\grt + $(CC) $(GETTEXT_RUNTIME_GNULIB_INCLUDES) $(GETTEXT_RUNTIME_GNULIB_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\grt\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\grt\ /c @<< +$< +<< + {..\gettext-runtime\gnulib-lib\unistr\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\grt\}.obj:: @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\grt\ md vs$(VSVER)\$(CFG)\$(PLAT)\grt $(CC) $(GETTEXT_RUNTIME_GNULIB_INCLUDES) $(GETTEXT_RUNTIME_GNULIB_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\grt\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\grt\ /c @<< $< << +{..\gettext-runtime\gnulib-lib\unictype\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\grt\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\grt\ md vs$(VSVER)\$(CFG)\$(PLAT)\grt + $(CC) $(GETTEXT_RUNTIME_GNULIB_INCLUDES) $(GETTEXT_RUNTIME_GNULIB_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\grt\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\grt\ /c @<< +$< +<< + {..\gettext-runtime\gnulib-lib\uniwidth\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\grt\}.obj:: @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\grt\ md vs$(VSVER)\$(CFG)\$(PLAT)\grt $(CC) $(GETTEXT_RUNTIME_GNULIB_INCLUDES) $(GETTEXT_RUNTIME_GNULIB_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\grt\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\grt\ /c @<< @@ -61,31 +88,37 @@ $< ## libtextstyle {..\libtextstyle\lib\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ md vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle $(CC) $(LIBTEXTSTYLE_INCLUDES) $(LIBTEXTSTYLE_DEFINES) /Fovs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ /c @<< $< << {..\libtextstyle\lib\libcroco\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ md vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle $(CC) $(LIBTEXTSTYLE_INCLUDES) $(LIBTEXTSTYLE_DEFINES) /Fovs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ /c @<< $< << {..\libtextstyle\lib\glib\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ md vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle $(CC) $(LIBTEXTSTYLE_INCLUDES) $(LIBTEXTSTYLE_DEFINES) /Fovs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ /c @<< $< << {..\libtextstyle\lib\glthread\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ md vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle $(CC) $(LIBTEXTSTYLE_INCLUDES) $(LIBTEXTSTYLE_DEFINES) /Fovs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ /c @<< $< << {..\libtextstyle\lib\libxml\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\libxml\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\libxml\ md vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\libxml $(CC) $(LIBTEXTSTYLE_INCLUDES) $(LIBTEXTSTYLE_DEFINES) /Fovs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\libxml\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\libxml\ /c @<< $< << {..\libtextstyle\lib\unistr\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ md vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle $(CC) $(LIBTEXTSTYLE_INCLUDES) $(LIBTEXTSTYLE_DEFINES) /Fovs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\ /c @<< $< << @@ -101,6 +134,16 @@ $< $< << +{..\gettext-tools\gnulib-lib\malloc\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\}.obj:: + $(CC) $(GETTEXT_TOOLS_INCLUDES) $(GETTEXT_TOOLS_GNULIB_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\ /c @<< +$< +<< + +{..\gettext-tools\gnulib-lib\unicase\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\}.obj:: + $(CC) $(GETTEXT_TOOLS_INCLUDES) $(GETTEXT_TOOLS_GNULIB_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\ /c @<< +$< +<< + {..\gettext-tools\gnulib-lib\uniconv\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\}.obj:: $(CC) $(GETTEXT_TOOLS_INCLUDES) $(GETTEXT_TOOLS_GNULIB_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\ /c @<< $< @@ -148,6 +191,12 @@ $< $< << +{..\gettext-tools\libgrep\malloc\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\libgrep\}.obj:: + @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\libgrep\ md vs$(VSVER)\$(CFG)\$(PLAT)\libgrep + $(CC) $(LIBGREP_INCLUDES) $(LIBGREP_CFLAGS) /Fovs$(VSVER)\$(CFG)\$(PLAT)\libgrep\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\libgrep\ /c @<< +$< +<< + {..\gettext-tools\libgettextpo\}.c{vs$(VSVER)\$(CFG)\$(PLAT)\gnu\}.obj:: @if not exist vs$(VSVER)\$(CFG)\$(PLAT)\gnu\ md vs$(VSVER)\$(CFG)\$(PLAT)\gnu $(CC) $(GETTEXTPO_GNULIB_INCLUDES) $(LIBGETTEXTPO_DEFINES) /Fovs$(VSVER)\$(CFG)\$(PLAT)\gnu\ /Fdvs$(VSVER)\$(CFG)\$(PLAT)\gnu\ /c @<< @@ -269,10 +318,12 @@ $(GETTEXTPO_LIB): vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBGETTEXTPO_DLL) $(GETTEXTSRC_LIB): vs$(VSVER)\$(CFG)\$(PLAT)\gettextsrc-$(GETTEXT_VERSION).dll $(LIBTEXTSTYLE_LIB): vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBTEXTSTYLE_DLL) +$(ASPRINTF_GNULIB_LIB): $(asprintf_gnulib_OBJS) +$(INTL_GNULIB_LIB): $(intl_gnulib_OBJS) $(GRT_LIB): $(grt_OBJS) $(LIBGREP_LIB): $(libgrep_OBJS) -$(GRT_LIB) $(LIBGREP_LIB): +$(INTL_GNULIB_LIB) $(ASPRINTF_GNULIB_LIB) $(GRT_LIB) $(LIBGREP_LIB): lib $(ARFLAGS) $** /out:$@ # Rules for linking DLLs @@ -282,8 +333,8 @@ $(GRT_LIB) $(LIBGREP_LIB): # $(dependent_objects) # << # @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2 -vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBASPRINTF_DLL): vs$(VSVER)\$(CFG)\$(PLAT)\asprintf $(libasprintf_OBJS) - link /DLL $(LDFLAGS) -out:$@ $(libasprintf_OBJS) /implib:$(ASPRINTF_LIB) +vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBASPRINTF_DLL): $(libasprintf_OBJS) $(ASPRINTF_GNULIB_LIB) + link /DLL $(LDFLAGS) -out:$@ $** /implib:$(ASPRINTF_LIB) @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2 vs$(VSVER)\$(CFG)\$(PLAT)\GNU.Gettext.dll: ..\gettext-runtime\intl-csharp\intl.cs vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBINTL_DLL) @@ -301,11 +352,11 @@ vs$(VSVER)\$(CFG)\$(PLAT)\gettextsrc-$(GETTEXT_VERSION).dll: libgettextsrc.def v link /DLL $(LDFLAGS) -out:$@ $(gettextsrc_OBJS) $(LIBTEXTSTYLE_LIB) $(GETTEXTLIB_LIB) $(INTL_LIB) $(GETTEXT_RUNTIME_DEP_LIBS) /def:libgettextsrc.def @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2 -vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBINTL_DLL): vs$(VSVER)\$(CFG)\$(PLAT)\intl-runtime $(intl_runtime_OBJS) - link /DLL $(LDFLAGS) -out:$@ $(intl_runtime_OBJS) $(GETTEXT_RUNTIME_DEP_LIBS) /implib:$(INTL_LIB) +vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBINTL_DLL): $(intl_runtime_OBJS) $(INTL_GNULIB_LIB) + link /DLL $(LDFLAGS) -out:$@ $** $(GETTEXT_RUNTIME_DEP_LIBS) /implib:$(INTL_LIB) @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2 -vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBTEXTSTYLE_DLL): vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle vs$(VSVER)\$(CFG)\$(PLAT)\libtextstyle\libxml $(libtextstyle_OBJS) +vs$(VSVER)\$(CFG)\$(PLAT)\$(LIBTEXTSTYLE_DLL): $(libtextstyle_OBJS) link /DLL $(LDFLAGS) -out:$@ $(libtextstyle_OBJS) $(TEXTSTYLE_DEP_LIBS) /def:libtextstyle.def /implib:$(LIBTEXTSTYLE_LIB) @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2 @@ -371,6 +422,54 @@ vs$(VSVER)\$(CFG)\$(PLAT)\msggrep.exe: # $(srcfile) # << +install: all + @set PATH=$(ICONV_BINDIR);$(PATH) + @-for %d in (bin lib include\textstyle) do @mkdir $(PREFIX)\%d + @for %f in ($(GETTEXT_RUNTIME_LIBS:.lib=.dll) $(GETTEXTPO_LIB:.lib=.dll) $(LIBTEXTSTYLE_LIB:.lib=.dll)) do \ + @((if exist %~pnf.pdb copy %~pnf.pdb $(PREFIX)\bin) & copy /b %f $(PREFIX)\bin) + @for %f in ($(GETTEXTLIB_LIB:.lib=.dll) $(GETTEXTSRC_LIB:.lib=.dll) $(LIBTEXTSTYLE_LIB:.lib=.dll)) do \ + @((if exist %~pnf.pdb copy %~pnf.pdb $(PREFIX)\bin) & copy /b %f $(PREFIX)\bin) + @for %f in ($(gettext_runtime_tools) $(GETTEXT_TOOLS_TOOLS)) do \ + @((if exist %~pnf.pdb copy %~pnf.pdb $(PREFIX)\bin) & copy /b %f $(PREFIX)\bin) + @for %f in ($(GETTEXT_RUNTIME_LIBS) $(GETTEXTPO_LIB) $(LIBTEXTSTYLE_LIB)) do @copy /b %f $(PREFIX)\lib + @for %f in (intl\libintl.h libasprintf\autosprintf.h) do @copy ..\msvc\gettext-runtime\%f $(PREFIX)\include + @for %d in (lib\textstyle) do @copy ..\msvc\libtextstyle\%d\* $(PREFIX)\include\textstyle + @for %f in (libtextstyle\lib\textstyle.h msvc\gettext-tools\libgettextpo\gettext-po.h) do \ + @copy ..\%f $(PREFIX)\include + @-mkdir $(PREFIX)\share\gettext\po + @for %f in (ABOUT-NLS) do @copy ..\gettext-runtime\%f $(PREFIX)\share\gettext + @for %f in (config.rpath) do @copy ..\build-aux\%f $(PREFIX)\share\gettext + @for %f in (gettext.h) do @copy ..\gnulib-local\lib\%f $(PREFIX)\share\gettext + @for %f in (javaversion.class) do @copy ..\gettext-tools\gnulib-lib\%f $(PREFIX)\share\gettext + @for %f in (msgunfmt.tcl) do @copy ..\gettext-tools\src\%f $(PREFIX)\share\gettext + @for %f in (Makefile.in.in Makevars.template Rules-quot) do @copy ..\gettext-tools\po\%f $(PREFIX)\share\gettext\po + @for %f in (insert-headers remove-potcdate) do @copy ..\gettext-tools\po\%f.sin $(PREFIX)\share\gettext\po + @for %f in (boldquot quot) do @copy ..\gettext-tools\po\%f.sed $(PREFIX)\share\gettext\po + @for %f in (boldquot quot) do @copy ..\gettext-tools\po\en@%f.header $(PREFIX)\share\gettext\po + @-for %d in (GNOME KDE TP) do @mkdir $(PREFIX)\share\gettext\projects\%d + @for %d in (GNOME KDE TP) do @copy ..\gettext-tools\projects\%d\* $(PREFIX)\share\gettext\projects\%d + @for %f in (index team-address) do @copy ..\gettext-tools\projects\%f $(PREFIX)\share\gettext\projects + @-mkdir $(PREFIX)\share\gettext\styles + @copy ..\gettext-tools\styles\po-*.css $(PREFIX)\share\gettext\styles + @-mkdir $(PREFIX)\share\gettext-$(GETTEXT_VERSION) + @for %x in (its loc) do @copy ..\gettext-tools\its\*.%x $(PREFIX)\share\gettext-$(GETTEXT_VERSION) + @-mkdir $(PREFIX)\share\emacs\site-lisp + @for %x in (el) do @copy ..\gettext-tools\emacs\*.%x $(PREFIX)\share\emacs\site-lisp + @-for %d in (gettext\csharpdoc libasprintf) do @mkdir $(PREFIX)\share\doc\%d + @-for %d in (aclocal) do @mkdir $(PREFIX)\share\gettext\%d + @for %f in (gettext iconv intlmacosx nls po progtest) do @copy ..\gettext-runtime\m4\%f.m4 $(PREFIX)\share\gettext\aclocal + @for %f in (ld link prefix) do @copy ..\gettext-runtime\gnulib-m4\lib-%f.m4 $(PREFIX)\share\gettext\aclocal + @for %f in (host-cpu-c-abi) do @copy ..\gettext-runtime\gnulib-m4\%f.m4 $(PREFIX)\share\gettext\aclocal + @copy ..\gettext-runtime\man\*.3.html $(PREFIX)\share\doc\gettext + @copy ..\gettext-runtime\man\*.1.html $(PREFIX)\share\doc\gettext + @copy ..\gettext-tools\man\*.1.html $(PREFIX)\share\doc\gettext + @copy ..\gettext-runtime\intl-csharp\doc\*.html $(PREFIX)\share\doc\gettext\csharpdoc + @copy ..\gettext-tools\doc\*.html $(PREFIX)\share\doc\gettext + @copy ..\gettext-runtime\libasprintf\autosprintf_all.html $(PREFIX)\share\doc\libasprintf + @-for %d in (runtime tools) do @for %l in (..\gettext-%d\po\*.po) do @mkdir $(PREFIX)\share\locale\%~nl\LC_MESSAGES + @-for %d in (runtime tools) do @for %l in (..\gettext-%d\po\*.po) do \ + @vs$(VSVER)\$(CFG)\$(PLAT)\msgfmt.exe -c --statistics --verbose -o $(PREFIX)\share\locale\%~nl\LC_MESSAGES\gettext-%d.mo %l + clean: @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\*.lib @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\*.exe.manifest @@ -381,6 +480,8 @@ clean: @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\asprintf\*.obj @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\asprintf\*.res @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\asprintf\*.pdb + @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\asprintf-gnulib\*.obj + @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\asprintf-gnulib\*.pdb @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\*.obj @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\*.pdb @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gettextlib\libxml\*.obj @@ -400,6 +501,8 @@ clean: @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\gnu\*.pdb @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\grt\*.obj @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\grt\*.pdb + @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\intl-gnulib\*.obj + @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\intl-gnulib\*.pdb @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\intl-runtime\*.obj @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\intl-runtime\*.res @-del /f /q vs$(VSVER)\$(CFG)\$(PLAT)\intl-runtime\*.pdb diff --git a/gvsbuild/patches/gettext/nmake/config-msvc.mak b/gvsbuild/patches/gettext/nmake/config-msvc.mak index 733ca5353..6248b5637 100644 --- a/gvsbuild/patches/gettext/nmake/config-msvc.mak +++ b/gvsbuild/patches/gettext/nmake/config-msvc.mak @@ -5,13 +5,27 @@ # Please do not change anything beneath this line unless maintaining the NMake Makefiles # Bare minimum features and sources built into libiconv on Windows GETTEXT_VERSION_MAJOR=0 -GETTEXT_VERSION_MINOR=21 -GETTEXT_VERSION_MICRO=0 +GETTEXT_VERSION_MINOR=22 +GETTEXT_VERSION_MICRO=3 GETTEXT_VERSION=$(GETTEXT_VERSION_MAJOR).$(GETTEXT_VERSION_MINOR).$(GETTEXT_VERSION_MICRO) +!ifndef ICON_DIR +ICONV_DIR=$(PREFIX) +!endif +!ifndef ICONV_INCLUDEDIR +ICONV_INCLUDEDIR=$(ICONV_DIR)\include +!endif +!ifndef ICONV_LIBDIR +ICONV_LIBDIR=$(ICONV_DIR)\lib +!endif +!ifndef ICONV_BINDIR +ICONV_BINDIR=$(ICONV_DIR)\bin +!endif + # For Windows 7 or later GETTEXT_BASE_DEFINES = \ /DENABLE_RELOCATABLE=1 \ + /DPIC \ /DHAVE_CONFIG_H \ /D_CRT_SECURE_NO_WARNINGS \ /D_CRT_NONSTDC_NO_WARNINGS \ @@ -22,9 +36,9 @@ GETTEXT_BASE_DEFINES = \ GETTEXT_RUNTIME_BASE_DEFINES = \ $(GETTEXT_BASE_DEFINES) \ /DBUILDING_DLL \ + /DDLL_EXPORT \ /DIN_LIBRARY \ - /DNO_XMALLOC \ - /DPIC + /DNO_XMALLOC GETTEXT_BASE_PATH_DEFINES = \ /DINSTALLDIR=\"c:/vs$(VSVER).0/$(PLAT)\" \ @@ -42,14 +56,14 @@ GETTEXT_RUNTIME_CFLAGS = \ $(GETTEXT_BASE_PATH_DEFINES) \ /DBUILDING_LIBINTL \ /DIN_LIBINTL \ + /DWOE32DLL \ /DDEPENDS_ON_LIBICONV=1 \ - /Dset_relocation_prefix=libintl_set_relocation_prefix \ - /Drelocate=libintl_relocate \ - /Drelocate2=libintl_relocate2 + /Dset_relocation_prefix=libintl_set_relocation_prefix GETTEXT_RUNTIME_GNULIB_CFLAGS = \ $(GETTEXT_BASE_DEFINES) \ $(GETTEXT_BASE_PATH_DEFINES) \ + /DDLL_EXPORT \ /DDEPENDS_ON_LIBICONV=1 \ /DDEPENDS_ON_LIBINTL=1 \ /DEXEEXT=\".exe\" @@ -57,7 +71,7 @@ GETTEXT_RUNTIME_GNULIB_CFLAGS = \ GETTEXT_RUNTIME_DEP_LIBS = iconv.lib advapi32.lib TEXTSTYLE_DEP_LIBS = ws2_32.lib $(GETTEXT_RUNTIME_DEP_LIBS) -GETTEXTLIB_DEP_LIBS = bcrypt.lib $(GETTEXT_RUNTIME_DEP_LIBS) +GETTEXTLIB_DEP_LIBS = bcrypt.lib $(TEXTSTYLE_DEP_LIBS) FORCED_INCLUDED_HEADERS = \ /FIarg-nonnull.h \ @@ -65,27 +79,35 @@ FORCED_INCLUDED_HEADERS = \ /FIwarn-on-use.h \ /FI_Noreturn.h -BASE_GETTEXT_RUNTIME_INCLUDES = \ - /I..\gettext-runtime\gnulib-lib \ +BASE_INCLUDE_FLAGS = \ + /I$(ICONV_INCLUDEDIR) \ + /I$(PREFIX)\include \ $(FORCED_INCLUDED_HEADERS) -GETTEXT_RUNTIME_INCLUDES = \ - /I..\msvc\gettext-runtime\intl \ +# Look for iconv.lib in ICONV_LIBDIR too +LDFLAGS = $(LDFLAGS) /libpath:$(ICONV_LIBDIR) /libpath:$(PREFIX)\lib + +LIBINTL_INCLUDES = \ /I..\gettext-runtime\intl \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\gettext-runtime \ - $(BASE_GETTEXT_RUNTIME_INCLUDES) + /I..\msvc\gettext-runtime\intl \ + /I..\gettext-runtime\intl\gnulib-lib \ + /I..\msvc\gettext-runtime\intl\gnulib-lib \ + $(BASE_INCLUDE_FLAGS) GETTEXT_RUNTIME_GNULIB_INCLUDES = \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\gettext-runtime\gnulib-lib \ /I..\msvc\gettext-runtime\gnulib-lib \ /I..\gettext-runtime\gnulib-lib \ - $(GETTEXT_RUNTIME_INCLUDES) + /I..\msvc\gettext-runtime \ + /I..\gettext-runtime\intl \ + /I..\msvc\gettext-runtime\intl \ + $(BASE_INCLUDE_FLAGS) ASPRINTF_INCLUDES = \ /I..\msvc\gettext-runtime\libasprintf \ /I..\gettext-runtime\libasprintf \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\gettext-runtime \ - $(BASE_GETTEXT_RUNTIME_INCLUDES) + /I..\gettext-runtime\libasprintf\gnulib-lib \ + /I..\msvc\gettext-runtime\libasprintf\gnulib-lib \ + $(BASE_INCLUDE_FLAGS) ASPRINTF_DEFINES = \ /DIN_LIBASPRINTF=1 \ @@ -97,41 +119,31 @@ GETTEXT_RC_FLAGS = \ /dPACKAGE_VERSION_SUBMINOR=$(GETTEXT_VERSION_MICRO) \ /dPACKAGE_VERSION_STRING=\"$(GETTEXT_VERSION)\" -BASE_LIBTEXTSTYLE_INCLUDES = \ - /I..\libtextstyle\lib \ - $(FORCED_INCLUDED_HEADERS) - LIBTEXTSTYLE_INCLUDES = \ - /I..\libtextstyle\lib\libcroco \ - /I..\msvc\libtextstyle\lib\glib \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\libtextstyle\lib \ /I..\msvc\libtextstyle\lib \ /I..\libtextstyle\lib \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\libtextstyle \ /I..\msvc\libtextstyle \ - $(BASE_LIBTEXTSTYLE_INCLUDES) + /I..\libtextstyle \ + /I..\msvc\libtextstyle\lib\glib \ + /I..\libtextstyle\lib\libcroco \ + $(BASE_INCLUDE_FLAGS) LIBTEXTSTYLE_DEFINES = \ /DIN_LIBTEXTSTYLE=1 \ /DDEPENDS_ON_LIBICONV=1 \ - /DLIBXML_STATIC=1 \ $(GETTEXT_BASE_DEFINES) -BASE_GETTEXT_TOOLS_INCLUDES = \ - /I..\gettext-tools\gnulib-lib \ - $(FORCED_INCLUDED_HEADERS) - GETTEXT_TOOLS_INCLUDES = \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\gettext-tools\gnulib-lib \ /I..\msvc\gettext-tools\gnulib-lib \ /I..\gettext-tools\gnulib-lib \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\gettext-tools \ + /I..\msvc\gettext-tools \ + /I..\gettext-tools \ /I..\msvc\gettext-runtime\intl \ - $(BASE_GETTEXT_TOOLS_INCLUDES) + /I..\gettext-runtime\intl \ + $(BASE_INCLUDE_FLAGS) GETTEXT_TOOLS_GNULIB_CFLAGS = \ - $(GETTEXT_RUNTIME_GNULIB_CFLAGS) \ - /DLIBXML_STATIC=1 + $(GETTEXT_RUNTIME_GNULIB_CFLAGS) LIBGREP_INCLUDES = \ /I..\msvc\gettext-tools\libgrep \ @@ -143,16 +155,15 @@ LIBGREP_CFLAGS = \ /DIN_GETTEXT_TOOLS_LIBGREP=1 GETTEXTPO_GNULIB_INCLUDES = \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\gettext-tools\libgettextpo \ /I..\msvc\gettext-tools\libgettextpo \ /I..\gettext-tools\libgettextpo \ + /I..\msvc\gettext-tools \ + /I..\gettext-tools \ + /I..\msvc\gettext-tools\src \ /I..\gettext-tools\src \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\gettext-tools\gnulib-lib \ - /I..\msvc\gettext-tools\gnulib-lib \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\gettext-tools \ /I..\msvc\gettext-runtime\intl \ /I..\gettext-runtime\intl \ - $(BASE_GETTEXT_TOOLS_INCLUDES) + $(BASE_INCLUDE_FLAGS) LIBGETTEXTPO_DEFINES = \ /DIN_LIBGETTEXTPO=1 \ @@ -160,17 +171,16 @@ LIBGETTEXTPO_DEFINES = \ $(GETTEXT_RUNTIME_GNULIB_CFLAGS) LIBGETTEXTSRC_INCLUDES = \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\gettext-tools\src \ /I..\msvc\gettext-tools\src \ /I..\gettext-tools\src \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\gettext-tools\gnulib-lib \ + /I..\msvc\gettext-tools \ + /I..\gettext-tools \ + /I..\gettext-tools\libgrep \ /I..\msvc\gettext-tools\gnulib-lib \ /I..\gettext-tools\gnulib-lib \ - /I..\msvc\vs$(PDBVER)\$(PLAT)\gettext-tools \ - /I..\msvc\libtextstyle\lib \ /I..\msvc\gettext-runtime\intl \ /I..\gettext-runtime\intl \ - $(BASE_GETTEXT_TOOLS_INCLUDES) + $(BASE_INCLUDE_FLAGS) LIBGETTEXTSRC_CFLAGS = \ $(GETTEXT_TOOLS_GNULIB_CFLAGS) \ @@ -182,7 +192,9 @@ LIBGETTEXTSRC_CFLAGS = \ # We build the libintl DLL/LIB at least INTL_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\intl.lib +INTL_GNULIB_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\intl-gnulib.lib ASPRINTF_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\asprintf.lib +ASPRINTF_GNULIB_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\asprintf-gnulib.lib GETTEXTLIB_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\gettextlib-$(GETTEXT_VERSION).lib GETTEXTPO_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\gettextpo.lib GETTEXTSRC_LIB = vs$(VSVER)\$(CFG)\$(PLAT)\gettextsrc-$(GETTEXT_VERSION).lib diff --git a/gvsbuild/patches/gettext/nmake/create-lists-msvc.mak b/gvsbuild/patches/gettext/nmake/create-lists-msvc.mak index 2f2449251..e62e2c22c 100644 --- a/gvsbuild/patches/gettext/nmake/create-lists-msvc.mak +++ b/gvsbuild/patches/gettext/nmake/create-lists-msvc.mak @@ -37,386 +37,419 @@ NULL= !include gettext-runtime-sources.mk # Create the list of .obj files -!if [call create-lists.bat header gettext-runtime-objs.mak intl_runtime_OBJS] +!if [call create-lists.bat header gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak intl_runtime_OBJS] !endif -!if [for %c in ($(INTL_RUNTIME_SRCS)) do @if "%~xc" == ".c" @call create-lists.bat file gettext-runtime-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\intl-runtime\%~nc.obj] +!if [for %c in ($(INTL_RUNTIME_SRCS)) do @if "%~xc" == ".c" @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\intl-runtime\%~nc.obj] !endif -!if [@call create-lists.bat file gettext-runtime-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\intl-runtime\libintl.res] +!if [@call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\intl-runtime\libintl.res] !endif -!if [call create-lists.bat footer gettext-runtime-objs.mak] +!if [call create-lists.bat footer gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-runtime-objs.mak grt_OBJS] +!if [call create-lists.bat header gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak intl_gnulib_OBJS] !endif -!if [for %c in ($(GETTEXT_RUNTIME_BASE_GNULIB_SRCS)) do @if "%~xc" == ".c" @call create-lists.bat file gettext-runtime-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\grt\%~nc.obj] +!if [for %c in ($(GETTEXT_RUNTIME_INTL_GNULIB_SRCS)) do @if "%~xc" == ".c" @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\intl-gnulib\%~nc.obj] !endif -!if [for %s in (..\gettext-runtime\gnulib-lib\glthread\*.c) do @call create-lists.bat file gettext-runtime-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\grt\%~ns.obj] +!if [call create-lists.bat footer gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [for %s in (..\gettext-runtime\gnulib-lib\unistr\*.c) do @call create-lists.bat file gettext-runtime-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\grt\%~ns.obj] +!if [call create-lists.bat header gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak grt_OBJS] !endif -!if [for %s in (..\gettext-runtime\gnulib-lib\uniwidth\*.c) do @call create-lists.bat file gettext-runtime-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\grt\%~ns.obj] +!if [for %c in ($(GETTEXT_RUNTIME_BASE_GNULIB_SRCS)) do @if "%~xc" == ".c" @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\grt\%~nc.obj] !endif -!if [call create-lists.bat footer gettext-runtime-objs.mak] +!if [for %s in (..\gettext-runtime\gnulib-lib\malloc\*.c) do @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\grt\%~ns.obj] !endif -!if [call create-lists.bat header gettext-runtime-objs.mak libasprintf_OBJS] +!if [for %s in (..\gettext-runtime\gnulib-lib\glthread\*.c) do @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\grt\%~ns.obj] !endif -!if [for %s in (lib-asprintf.c xsize.c) do @call create-lists.bat file gettext-runtime-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\asprintf\%~ns.obj] +!if [for %s in (..\gettext-runtime\gnulib-lib\unistr\*.c) do @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\grt\%~ns.obj] !endif -!if [for %s in (..\gettext-runtime\libasprintf\*.cc) do @call create-lists.bat file gettext-runtime-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\asprintf\%~ns.obj] +!if [for %s in (..\gettext-runtime\gnulib-lib\unictype\*.c) do @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\grt\%~ns.obj] !endif -!if [@call create-lists.bat file gettext-runtime-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\asprintf\libasprintf.res] +!if [for %s in (..\gettext-runtime\gnulib-lib\uniwidth\*.c) do @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\grt\%~ns.obj] !endif -!if [call create-lists.bat footer gettext-runtime-objs.mak] +!if [call create-lists.bat footer gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-runtime-objs.mak gettext_runtime_tools] +!if [call create-lists.bat header gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak libasprintf_OBJS] !endif -!if [for %s in (..\gettext-runtime\src\*.c) do @call create-lists.bat file gettext-runtime-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\%~ns.exe] +!if [for %s in (lib-asprintf.c) do @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\asprintf\%~ns.obj] !endif -!if [call create-lists.bat footer gettext-runtime-objs.mak] +!if [for %s in (..\gettext-runtime\libasprintf\*.cc) do @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\asprintf\%~ns.obj] !endif -!include gettext-runtime-objs.mak +!if [@call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\asprintf\libasprintf.res] +!endif + +!if [call create-lists.bat footer gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak] +!endif + +!if [call create-lists.bat header gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak asprintf_gnulib_OBJS] +!endif + +!if [for %c in ($(GETTEXT_RUNTIME_ASPRINTF_GNULIB_SRCS)) do @if "%~xc" == ".c" @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\asprintf-gnulib\%~nc.obj] +!endif + +!if [call create-lists.bat footer gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak] +!endif + +!if [call create-lists.bat header gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak gettext_runtime_tools] +!endif -!if [del /f /q gettext-runtime-objs.mak] +!if [for %s in (..\gettext-runtime\src\*.c) do @call create-lists.bat file gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\%~ns.exe] +!endif + +!if [call create-lists.bat footer gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak] +!endif + +!include gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak + +!if [del /f /q gettext-runtime-objs-msvc$(VSVER)-$(PLAT).mak] !endif # libtextstyle !include libtextstyle-sources.mk -!if [call create-lists.bat header libtextstyle-objs.mak libtextstyle_OBJS] +!if [call create-lists.bat header libtextstyle-objs-msvc$(VSVER)-$(PLAT).mak libtextstyle_OBJS] !endif -!if [for %s in ($(LIBTEXTSTYLE_BASE_SRCS)) do @call create-lists.bat file libtextstyle-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\%~ns.obj ] +!if [for %s in ($(LIBTEXTSTYLE_BASE_SRCS)) do @call create-lists.bat file libtextstyle-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\%~ns.obj ] !endif -!if [for %s in (..\libtextstyle\lib\libcroco\*.c) do @call create-lists.bat file libtextstyle-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\%~ns.obj ] +!if [for %s in (..\libtextstyle\lib\libcroco\*.c) do @call create-lists.bat file libtextstyle-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\%~ns.obj ] !endif -!if [for %s in (..\libtextstyle\lib\glib\*.c) do @call create-lists.bat file libtextstyle-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\%~ns.obj ] +!if [for %s in (..\libtextstyle\lib\glib\*.c) do @call create-lists.bat file libtextstyle-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\%~ns.obj ] !endif -!if [for %s in (..\libtextstyle\lib\glthread\*.c) do @call create-lists.bat file libtextstyle-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\%~ns.obj ] +!if [for %s in (..\libtextstyle\lib\glthread\*.c) do @call create-lists.bat file libtextstyle-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\%~ns.obj ] !endif -!if [for %s in (..\libtextstyle\lib\libxml\*.c) do @call create-lists.bat file libtextstyle-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\libxml\%~ns.obj ] +!if [for %s in (..\libtextstyle\lib\libxml\*.c) do @call create-lists.bat file libtextstyle-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\libxml\%~ns.obj ] !endif -!if [for %s in (..\libtextstyle\lib\unistr\*.c) do @call create-lists.bat file libtextstyle-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\%~ns.obj ] +!if [for %s in (..\libtextstyle\lib\unistr\*.c) do @call create-lists.bat file libtextstyle-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\%~ns.obj ] !endif -!if [@call create-lists.bat file libtextstyle-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\libtextstyle.res] +!if [@call create-lists.bat file libtextstyle-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libtextstyle\libtextstyle.res] !endif -!if [call create-lists.bat footer libtextstyle-objs.mak] +!if [call create-lists.bat footer libtextstyle-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!include libtextstyle-objs.mak +!include libtextstyle-objs-msvc$(VSVER)-$(PLAT).mak -!if [del /f /q libtextstyle-objs.mak] +!if [del /f /q libtextstyle-objs-msvc$(VSVER)-$(PLAT).mak] !endif # gettext-tools !include gettext-tools-sources.mk -!if [call create-lists.bat header gettext-tools-objs.mak gettextlib_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak gettextlib_OBJS] +!endif + +!if [for %s in ($(GETTEXT_LIB_BASE_SRCS)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] +!endif + +!if [for %s in (..\gettext-tools\gnulib-lib\glthread\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] +!endif + +!if [for %s in (..\gettext-tools\gnulib-lib\malloc\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] !endif -!if [for %s in ($(GETTEXT_LIB_BASE_SRCS)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] +!if [for %s in (..\gettext-tools\gnulib-lib\uniconv\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\gnulib-lib\glthread\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] +!if [for %s in (..\gettext-tools\gnulib-lib\unicase\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\gnulib-lib\uniconv\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] +!if [for %s in (..\gettext-tools\gnulib-lib\unictype\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\gnulib-lib\unictype\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] +!if [for %s in (..\gettext-tools\gnulib-lib\unilbrk\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\gnulib-lib\unilbrk\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] +!if [for %s in (..\gettext-tools\gnulib-lib\uniname\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\gnulib-lib\uniname\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] +!if [for %s in (..\gettext-tools\gnulib-lib\unistr\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\gnulib-lib\unistr\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] +!if [for %s in (..\gettext-tools\gnulib-lib\uniwidth\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\gnulib-lib\uniwidth\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\%~ns.obj ] +!if [for %s in (..\gettext-tools\gnulib-lib\libxml\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\libxml\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\gnulib-lib\libxml\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextlib\libxml\%~ns.obj ] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak libgrep_OBJS] !endif -!if [call create-lists.bat header gettext-tools-objs.mak libgrep_OBJS] +!if [for %s in ($(LIBGREP_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libgrep\%~ns.obj ] !endif -!if [for %s in ($(LIBGREP_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libgrep\%~ns.obj ] +!if [for %d in (glthread malloc) do @for %s in (..\gettext-tools\libgrep\%d\*.c) do @if not "%~nxs" == "dynarray-skeleton.c" call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\libgrep\%~ns.obj ] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak gettextpo_gnulib_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak gettextpo_gnulib_OBJS] !endif -!if [for %s in ($(LIBGETTEXTPO_GNULIB_SRCS)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] +!if [for %s in ($(LIBGETTEXTPO_GNULIB_SRCS)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\libgettextpo\glthread\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] +!if [for %s in (..\gettext-tools\libgettextpo\glthread\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\libgettextpo\uniconv\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] +!if [for %s in (..\gettext-tools\libgettextpo\uniconv\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\libgettextpo\unictype\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] +!if [for %s in (..\gettext-tools\libgettextpo\unictype\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\libgettextpo\unilbrk\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] +!if [for %s in (..\gettext-tools\libgettextpo\unilbrk\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\libgettextpo\unistr\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] +!if [for %s in (..\gettext-tools\libgettextpo\unistr\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] !endif -!if [for %s in (..\gettext-tools\libgettextpo\uniwidth\*.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] +!if [for %s in (..\gettext-tools\libgettextpo\uniwidth\*.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gnu\%~ns.obj ] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak gettextpo_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak gettextpo_OBJS] !endif -!if [for %s in ($(LIBGETTEXTPO_AUX_SRCS) gettext-po.c) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextpo\%~ns.obj ] +!if [for %s in ($(LIBGETTEXTPO_AUX_SRCS) gettext-po.c) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextpo\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextpo\libgettextpo.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextpo\libgettextpo.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak gettextsrc_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak gettextsrc_OBJS] !endif -!if [for %s in ($(LIBGETTEXTSRC_SRCS)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextsrc\%~ns.obj ] +!if [for %s in ($(LIBGETTEXTSRC_SRCS)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettextsrc\%~ns.obj ] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msgattrib_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msgattrib_OBJS] !endif -!if [for %s in ($(MSGATTRIB_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGATTRIB_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msgcat_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msgcat_OBJS] !endif -!if [for %s in ($(MSGCAT_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGCAT_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msgcmp_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msgcmp_OBJS] !endif -!if [for %s in ($(MSGCMP_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGCMP_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msgcomm_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msgcomm_OBJS] !endif -!if [for %s in ($(MSGCOMM_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGCOMM_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msgconv_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msgconv_OBJS] !endif -!if [for %s in ($(MSGCONV_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGCONV_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msgen_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msgen_OBJS] !endif -!if [for %s in ($(MSGEN_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGEN_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msgexec_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msgexec_OBJS] !endif -!if [for %s in ($(MSGEXEC_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGEXEC_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msgfilter_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msgfilter_OBJS] !endif -!if [for %s in ($(MSGFILTER_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGFILTER_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msgfmt_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msgfmt_OBJS] !endif -!if [for %s in ($(MSGFMT_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGFMT_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msggrep_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msggrep_OBJS] !endif -!if [for %s in ($(MSGGREP_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGGREP_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msgmerge_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msgmerge_OBJS] !endif -!if [for %s in ($(MSGMERGE_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGMERGE_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msgunfmt_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msgunfmt_OBJS] !endif -!if [for %s in ($(MSGUNFMT_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGUNFMT_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msguniq_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msguniq_OBJS] !endif -!if [for %s in ($(MSGUNIQ_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGUNIQ_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak recode_sr_latin_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak recode_sr_latin_OBJS] !endif -!if [for %s in ($(RECODE_SR_LATIN_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(RECODE_SR_LATIN_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak xgettext_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak xgettext_OBJS] !endif -!if [for %s in ($(XGETTEXT_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(XGETTEXT_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!if [call create-lists.bat header gettext-tools-objs.mak msginit_OBJS] +!if [call create-lists.bat header gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak msginit_OBJS] !endif -!if [for %s in ($(MSGINIT_SOURCES)) do @call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] +!if [for %s in ($(MSGINIT_SOURCES)) do @call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\%~ns.obj ] !endif -!if [@call create-lists.bat file gettext-tools-objs.mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] +!if [@call create-lists.bat file gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak vs^$(VSVER)\^$(CFG)\^$(PLAT)\gettext-tools-tools\gettext.res] !endif -!if [call create-lists.bat footer gettext-tools-objs.mak] +!if [call create-lists.bat footer gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif -!include gettext-tools-objs.mak +!include gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak -!if [del /f /q gettext-tools-objs.mak] +!if [del /f /q gettext-tools-objs-msvc$(VSVER)-$(PLAT).mak] !endif diff --git a/gvsbuild/patches/gettext/nmake/detectenv-msvc.mak b/gvsbuild/patches/gettext/nmake/detectenv-msvc.mak index 15208ba93..d9a12a186 100644 --- a/gvsbuild/patches/gettext/nmake/detectenv-msvc.mak +++ b/gvsbuild/patches/gettext/nmake/detectenv-msvc.mak @@ -54,7 +54,7 @@ PKG_CONFIG = pkg-config # VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir) !if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR) MSG = ^ -This Makefile is only for Visual Studio 2008 and later.^ +This Makefile is only for Visual Studio 2015 and later.^ You need to ensure that the Visual Studio Environment is properly set up^ before running this Makefile. !error $(MSG) @@ -108,11 +108,11 @@ VSVER = 0 PDBVER = $(VSVER) !endif -!if "$(VSVER)" == "0" +!if $(VSVER) < 14 MSG = ^ This NMake Makefile set supports Visual Studio^ -9 (2008) through 14 (2015). Your Visual Studio^ -version is not supported. +2015 or later. Your Visual Studio version is^ +not supported. !error $(MSG) !endif @@ -125,11 +125,6 @@ VALID_CFGSET = TRUE # the resulting binaries !if "$(CFG)" == "release" CFLAGS_ADD = /MD /O2 /MP /GL -!if $(VSVER) > 9 && $(VSVER) < 14 -# Undocumented "enhance optimized debugging" switch. Became documented -# as "/Zo" in VS 2013 Update 3, and is turned on by default in VS 2015. -CFLAGS_ADD = $(CFLAGS_ADD) /d2Zi+ -!endif !else CFLAGS_ADD = /MDd /Od !endif @@ -146,12 +141,12 @@ LDFLAGS_ARCH = /machine:x86 !endif !if "$(VALID_CFGSET)" == "TRUE" -CFLAGS = $(CFLAGS_ADD) /W3 /Zi /I.. /I..\src /I. /I$(PREFIX)\include +CFLAGS = $(CFLAGS_ADD) /W3 /Zi /I.. /I..\src /I. !if "$(ADDITIONAL_LIB_DIR)" != "" ADDITIONAL_LIB_ARG = /libpath:$(ADDITIONAL_LIB_DIR) !endif -LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib $(ADDITIONAL_LIB_ARG) /DEBUG +LDFLAGS_BASE = $(LDFLAGS_ARCH) $(ADDITIONAL_LIB_ARG) /DEBUG !if "$(CFG)" == "debug" ARFLAGS = $(LDFLAGS_ARCH) diff --git a/gvsbuild/patches/gettext/nmake/gettext-runtime-sources.mk b/gvsbuild/patches/gettext/nmake/gettext-runtime-sources.mk index 4b55d5769..075e6eaf4 100644 --- a/gvsbuild/patches/gettext/nmake/gettext-runtime-sources.mk +++ b/gvsbuild/patches/gettext/nmake/gettext-runtime-sources.mk @@ -13,29 +13,57 @@ INTL_RUNTIME_SRCS = \ ..\gettext-runtime\intl\l10nflist.c \ ..\gettext-runtime\intl\langprefs.c \ ..\gettext-runtime\intl\loadmsgcat.c \ - ..\gettext-runtime\intl\localcharset.c \ ..\gettext-runtime\intl\localealias.c \ - ..\gettext-runtime\intl\localename-table.c \ - ..\gettext-runtime\intl\localename.c \ - ..\gettext-runtime\intl\lock.c \ ..\gettext-runtime\intl\log.c \ ..\gettext-runtime\intl\ngettext.c \ ..\gettext-runtime\intl\osdep.c \ ..\gettext-runtime\intl\plural-exp.c \ ..\gettext-runtime\intl\plural.c \ ..\gettext-runtime\intl\printf.c \ - ..\gettext-runtime\intl\relocatable.c \ - ..\gettext-runtime\intl\setlocale-lock.c \ - ..\gettext-runtime\intl\setlocale_null.c \ ..\gettext-runtime\intl\setlocale.c \ ..\gettext-runtime\intl\textdomain.c \ - ..\gettext-runtime\intl\threadlib.c \ - ..\gettext-runtime\intl\version.c \ - ..\gettext-runtime\intl\windows-mutex.c \ - ..\gettext-runtime\intl\windows-once.c \ - ..\gettext-runtime\intl\windows-recmutex.c \ - ..\gettext-runtime\intl\windows-rwlock.c \ - ..\gettext-runtime\intl\xsize.c + ..\gettext-runtime\intl\version.c + +GETTEXT_RUNTIME_INTL_GNULIB_SRCS = \ + ..\gettext-runtime\intl\gnulib-lib\asnprintf.c \ + ..\gettext-runtime\intl\gnulib-lib\asnwprintf.c \ + ..\gettext-runtime\intl\gnulib-lib\free.c \ + ..\gettext-runtime\intl\gnulib-lib\hard-locale.c \ + ..\gettext-runtime\intl\gnulib-lib\isnanf.c \ + ..\gettext-runtime\intl\gnulib-lib\isnanl.c \ + ..\gettext-runtime\intl\gnulib-lib\localcharset.c \ + ..\gettext-runtime\intl\gnulib-lib\localename-table.c \ + ..\gettext-runtime\intl\gnulib-lib\localename.c \ + ..\gettext-runtime\intl\gnulib-lib\math.c \ + ..\gettext-runtime\intl\gnulib-lib\mbrtowc.c \ + ..\gettext-runtime\intl\gnulib-lib\mbsinit.c \ + ..\gettext-runtime\intl\gnulib-lib\mbszero.c \ + ..\gettext-runtime\intl\gnulib-lib\printf-args.c \ + ..\gettext-runtime\intl\gnulib-lib\printf-frexp.c \ + ..\gettext-runtime\intl\gnulib-lib\printf-frexpl.c \ + ..\gettext-runtime\intl\gnulib-lib\printf-parse.c \ + ..\gettext-runtime\intl\gnulib-lib\relocatable.c \ + ..\gettext-runtime\intl\gnulib-lib\setlocale_null.c \ + ..\gettext-runtime\intl\gnulib-lib\tsearch.c \ + ..\gettext-runtime\intl\gnulib-lib\unistd.c \ + ..\gettext-runtime\intl\gnulib-lib\vasnprintf.c \ + ..\gettext-runtime\intl\gnulib-lib\vasnwprintf.c \ + ..\gettext-runtime\intl\gnulib-lib\windows-mutex.c \ + ..\gettext-runtime\intl\gnulib-lib\windows-once.c \ + ..\gettext-runtime\intl\gnulib-lib\windows-recmutex.c \ + ..\gettext-runtime\intl\gnulib-lib\windows-rwlock.c \ + ..\gettext-runtime\intl\gnulib-lib\wprintf-parse.c \ + ..\gettext-runtime\intl\gnulib-lib\xsize.c + +GETTEXT_RUNTIME_ASPRINTF_GNULIB_SRCS = \ + ..\gettext-runtime\libasprintf\gnulib-lib\asnprintf.c \ + ..\gettext-runtime\libasprintf\gnulib-lib\free.c \ + ..\gettext-runtime\libasprintf\gnulib-lib\mbszero.c \ + ..\gettext-runtime\libasprintf\gnulib-lib\printf-args.c \ + ..\gettext-runtime\libasprintf\gnulib-lib\printf-parse.c \ + ..\gettext-runtime\libasprintf\gnulib-lib\unistd.c \ + ..\gettext-runtime\libasprintf\gnulib-lib\vasnprintf.c \ + ..\gettext-runtime\libasprintf\gnulib-lib\xsize.c GETTEXT_RUNTIME_BASE_GNULIB_SRCS = \ ..\gettext-runtime\gnulib-lib\allocator.c \ @@ -45,6 +73,21 @@ GETTEXT_RUNTIME_BASE_GNULIB_SRCS = \ ..\gettext-runtime\gnulib-lib\c-ctype.c \ ..\gettext-runtime\gnulib-lib\c-strcasecmp.c \ ..\gettext-runtime\gnulib-lib\c-strncasecmp.c \ + ..\gettext-runtime\gnulib-lib\c32isalnum.c \ + ..\gettext-runtime\gnulib-lib\c32isalpha.c \ + ..\gettext-runtime\gnulib-lib\c32isblank.c \ + ..\gettext-runtime\gnulib-lib\c32iscntrl.c \ + ..\gettext-runtime\gnulib-lib\c32isdigit.c \ + ..\gettext-runtime\gnulib-lib\c32isgraph.c \ + ..\gettext-runtime\gnulib-lib\c32islower.c \ + ..\gettext-runtime\gnulib-lib\c32isprint.c \ + ..\gettext-runtime\gnulib-lib\c32ispunct.c \ + ..\gettext-runtime\gnulib-lib\c32isspace.c \ + ..\gettext-runtime\gnulib-lib\c32isupper.c \ + ..\gettext-runtime\gnulib-lib\c32isxdigit.c \ + ..\gettext-runtime\gnulib-lib\c32tolower.c \ + ..\gettext-runtime\gnulib-lib\c32width.c \ + ..\gettext-runtime\gnulib-lib\calloc.c \ ..\gettext-runtime\gnulib-lib\canonicalize-lgpl.c \ ..\gettext-runtime\gnulib-lib\careadlinkat.c \ ..\gettext-runtime\gnulib-lib\cloexec.c \ @@ -52,8 +95,10 @@ GETTEXT_RUNTIME_BASE_GNULIB_SRCS = \ ..\gettext-runtime\gnulib-lib\closeout.c \ ..\gettext-runtime\gnulib-lib\dup2.c \ ..\gettext-runtime\gnulib-lib\error.c \ + ..\gettext-runtime\gnulib-lib\exitfail.c \ ..\gettext-runtime\gnulib-lib\fcntl.c \ ..\gettext-runtime\gnulib-lib\fd-hook.c \ + ..\gettext-runtime\gnulib-lib\free.c \ ..\gettext-runtime\gnulib-lib\fstat.c \ ..\gettext-runtime\gnulib-lib\fwriteerror.c \ ..\gettext-runtime\gnulib-lib\getdtablesize.c \ @@ -61,17 +106,22 @@ GETTEXT_RUNTIME_BASE_GNULIB_SRCS = \ ..\gettext-runtime\gnulib-lib\getopt1.c \ ..\gettext-runtime\gnulib-lib\getprogname.c \ ..\gettext-runtime\gnulib-lib\hard-locale.c \ + ..\gettext-runtime\gnulib-lib\ialloc.c \ ..\gettext-runtime\gnulib-lib\localcharset.c \ ..\gettext-runtime\gnulib-lib\localename-table.c \ ..\gettext-runtime\gnulib-lib\localename.c \ + ..\gettext-runtime\gnulib-lib\malloc.c \ ..\gettext-runtime\gnulib-lib\malloca.c \ ..\gettext-runtime\gnulib-lib\mbchar.c \ - ..\gettext-runtime\gnulib-lib\mbiter.c \ + ..\gettext-runtime\gnulib-lib\mbrtoc32.c \ ..\gettext-runtime\gnulib-lib\mbrtowc.c \ ..\gettext-runtime\gnulib-lib\mbsinit.c \ ..\gettext-runtime\gnulib-lib\mbslen.c \ ..\gettext-runtime\gnulib-lib\mbsstr.c \ + ..\gettext-runtime\gnulib-lib\mbszero.c \ ..\gettext-runtime\gnulib-lib\mbuiter.c \ + ..\gettext-runtime\gnulib-lib\mbuiterf.c \ + ..\gettext-runtime\gnulib-lib\mempcpy.c \ ..\gettext-runtime\gnulib-lib\msvc-inval.c \ ..\gettext-runtime\gnulib-lib\msvc-nothrow.c \ ..\gettext-runtime\gnulib-lib\open.c \ @@ -79,28 +129,32 @@ GETTEXT_RUNTIME_BASE_GNULIB_SRCS = \ ..\gettext-runtime\gnulib-lib\progreloc.c \ ..\gettext-runtime\gnulib-lib\propername.c \ ..\gettext-runtime\gnulib-lib\raise.c \ - ..\gettext-runtime\gnulib-lib\readlink.c \ + ..\gettext-runtime\gnulib-lib\rawmemchr.c \ + ..\gettext-runtime\gnulib-lib\realloc.c \ ..\gettext-runtime\gnulib-lib\relocatable.c \ + ..\gettext-runtime\gnulib-lib\readlink.c \ + ..\gettext-runtime\gnulib-lib\reallocarray.c \ ..\gettext-runtime\gnulib-lib\setlocale.c \ ..\gettext-runtime\gnulib-lib\setlocale_null.c \ ..\gettext-runtime\gnulib-lib\sigprocmask.c \ + ..\gettext-runtime\gnulib-lib\stat.c \ ..\gettext-runtime\gnulib-lib\stat-time.c \ ..\gettext-runtime\gnulib-lib\stat-w32.c \ - ..\gettext-runtime\gnulib-lib\stat.c \ ..\gettext-runtime\gnulib-lib\stdio-write.c \ ..\gettext-runtime\gnulib-lib\strerror-override.c \ ..\gettext-runtime\gnulib-lib\strerror.c \ ..\gettext-runtime\gnulib-lib\striconv.c \ ..\gettext-runtime\gnulib-lib\strnlen1.c \ + ..\gettext-runtime\gnulib-lib\strtoul.c \ ..\gettext-runtime\gnulib-lib\trim.c \ ..\gettext-runtime\gnulib-lib\unistd.c \ ..\gettext-runtime\gnulib-lib\wctype-h.c \ ..\gettext-runtime\gnulib-lib\wcwidth.c \ + ..\gettext-runtime\gnulib-lib\windows-mutex.c \ + ..\gettext-runtime\gnulib-lib\windows-once.c \ + ..\gettext-runtime\gnulib-lib\windows-recmutex.c \ + ..\gettext-runtime\gnulib-lib\windows-rwlock.c \ + ..\gettext-runtime\gnulib-lib\xalloc-die.c \ ..\gettext-runtime\gnulib-lib\xmalloc.c \ ..\gettext-runtime\gnulib-lib\xreadlink.c \ - ..\gettext-runtime\gnulib-lib\xstrdup.c \ - ..\gettext-runtime\gnulib-lib\xstriconv.c \ - ..\gettext-runtime\intl\windows-mutex.c \ - ..\gettext-runtime\intl\windows-once.c \ - ..\gettext-runtime\intl\windows-recmutex.c \ - ..\gettext-runtime\intl\windows-rwlock.c + ..\gettext-runtime\gnulib-lib\xstriconv.c diff --git a/gvsbuild/patches/gettext/nmake/gettext-tools-sources.mk b/gvsbuild/patches/gettext/nmake/gettext-tools-sources.mk index fbfad49e1..5bb561ce7 100644 --- a/gvsbuild/patches/gettext/nmake/gettext-tools-sources.mk +++ b/gvsbuild/patches/gettext/nmake/gettext-tools-sources.mk @@ -4,25 +4,44 @@ GETTEXT_LIB_BASE_SRCS = \ acl-internal.c \ addext.c \ allocator.c \ - areadlink-with-size.c \ + asprintf.c \ areadlink.c \ argmatch.c \ asnprintf.c \ - asprintf.c \ asyncsafe-spin.c \ backupfile.c \ basename-lgpl.c \ binary-io.c \ bitrotate.c \ + btoc32.c \ c-ctype.c \ c-strcasecmp.c \ c-strcasestr.c \ c-strncasecmp.c \ c-strstr.c \ + c32isalnum.c \ + c32isalpha.c \ + c32isblank.c \ + c32iscntrl.c \ + c32isdigit.c \ + c32isgraph.c \ + c32islower.c \ + c32isprint.c \ + c32ispunct.c \ + c32isspace.c \ + c32isupper.c \ + c32isxdigit.c \ + c32tolower.c \ + c32width.c \ + c32_apply_type_test.c \ + c32_get_type_test.c \ + calloc.c \ canonicalize-lgpl.c \ canonicalize.c \ careadlinkat.c \ + chdir-long.c \ classpath.c \ + clean-temp-simple.c \ clean-temp.c \ cloexec.c \ close.c \ @@ -37,30 +56,39 @@ GETTEXT_LIB_BASE_SRCS = \ dirname-lgpl.c \ dup-safer-flag.c \ dup-safer.c \ + dup.c \ dup2.c \ error-progname.c \ error.c \ execute.c \ exitfail.c \ - explicit_bzero.c \ fatal-signal.c \ + fchdir.c \ fcntl.c \ fd-hook.c \ fd-safer-flag.c \ fd-safer.c \ fdopen.c \ + fdopendir.c \ file-set.c \ + filenamecat-lgpl.c \ + findprog-in.c \ findprog.c \ fnmatch.c \ fopen.c \ + free.c \ fstat.c \ + fstatat.c \ fstrcmp.c \ ftell.c \ ftello.c \ full-write.c \ fwriteerror.c \ + gai_strerror.c \ gcd.c \ get-permissions.c \ + getcwd-lgpl.c \ + getcwd.c \ getdelim.c \ getdtablesize.c \ getline.c \ @@ -78,10 +106,13 @@ GETTEXT_LIB_BASE_SRCS = \ hash-pjw.c \ hash-triple-simple.c \ hash.c \ + ialloc.c \ + inet_ntop.c \ isinf.c \ isnand.c \ isnanf.c \ isnanl.c \ + iswctype.c \ javacomp.c \ javaexec.c \ javaversion.c \ @@ -94,15 +125,22 @@ GETTEXT_LIB_BASE_SRCS = \ malloca.c \ math.c \ mbchar.c \ - mbiter.c \ + mbrtoc32.c \ mbrtowc.c \ mbsinit.c \ mbslen.c \ + mbsrtoc32s.c \ + mbsrtoc32s-state.c \ mbsstr.c \ mbswidth.c \ + mbszero.c \ mbuiter.c \ + mbuiterf.c \ mem-hash-map.c \ + memmem.c \ mempcpy.c \ + memrchr.c \ + memset_explicit.c \ mkdir.c \ mkdtemp.c \ msvc-inval.c \ @@ -110,10 +148,14 @@ GETTEXT_LIB_BASE_SRCS = \ obstack.c \ omp-init.c \ open.c \ + openat-die.c \ + openat-proc.c \ + openat.c \ opendir.c \ pipe-filter-aux.c \ pipe-filter-ii.c \ pipe-safer.c \ + pipe.c \ pipe2-safer.c \ pipe2.c \ printf-args.c \ @@ -130,10 +172,14 @@ GETTEXT_LIB_BASE_SRCS = \ readdir.c \ readlink.c \ realloc.c \ + reallocarray.c \ relocatable.c \ + rewinddir.c \ rmdir.c \ safe-read.c \ safe-write.c \ + same-inode.c \ + save-cwd.c \ secure_getenv.c \ set-permissions.c \ setenv.c \ @@ -144,34 +190,44 @@ GETTEXT_LIB_BASE_SRCS = \ sigaction.c \ sigprocmask.c \ snprintf.c \ + sockets.c \ spawn-pipe.c \ + spawn.c \ spawnattr_destroy.c \ spawnattr_init.c \ spawnattr_setflags.c \ + spawnattr_setpgroup.c \ spawnattr_setsigmask.c \ spawni.c \ spawnp.c \ + spawn_faction_addchdir.c \ spawn_faction_addclose.c \ spawn_faction_adddup2.c \ spawn_faction_addopen.c \ spawn_faction_destroy.c \ spawn_faction_init.c \ stat-time.c \ - stat-w32.c \ stat.c \ + stat-w32.c \ stdio-write.c \ stpcpy.c \ stpncpy.c \ strchrnul.c \ + strdup.c \ strerror-override.c \ strerror.c \ striconv.c \ striconveh.c \ striconveha.c \ + string-desc-contains.c \ + string-desc.c \ stripslash.c \ strnlen1.c \ strstr.c \ + strtol.c \ + strtoul.c \ supersede.c \ + sys_socket.c \ tempname.c \ timespec.c \ tmpdir.c \ @@ -187,59 +243,49 @@ GETTEXT_LIB_BASE_SRCS = \ wait-process.c \ waitpid.c \ wctype-h.c \ + wctype.c \ wcwidth.c \ windows-mutex.c \ windows-once.c \ windows-recmutex.c \ windows-rwlock.c \ + windows-spawn.c \ windows-spin.c \ windows-tls.c \ wmempcpy.c \ write.c \ + xalloc-die.c \ xasprintf.c \ xconcat-filename.c \ xerror.c \ - xgetcwd.c \ xmalloc.c \ xmalloca.c \ xmemdup0.c \ xreadlink.c \ xsetenv.c \ xsize.c \ - xstrdup.c \ xstriconv.c \ xstriconveh.c \ xvasprintf.c -!if $(VSVER) < 12 -GETTEXT_LIB_BASE_SRCS = \ - $(GETTEXT_LIB_BASE_SRCS) \ - isblank.c \ - signbitd.c \ - signbitf.c \ - signbitl.c -!endif - -!if "$(PLAT)" == "arm64" -GETTEXT_LIB_BASE_SRCS = \ - $(GETTEXT_LIB_BASE_SRCS) \ - mbsrtowcs-state.c \ - mbsrtowcs.c +!if "$(PLAT)" == "Win32" +GETTEXT_LIB_BASE_SRCS = $(GETTEXT_LIB_BASE_SRCS) getaddrinfo.c !endif LIBGREP_SOURCES = \ + iswctype.c \ kwset.c \ + localeconv.c \ m-fgrep.c \ m-regex.c \ mbrlen.c \ + mbszero.c \ nl_langinfo.c \ - regex.c - -!if $(VSVER) > 12 -LIBGREP_SOURCES = \ - $(LIBGREP_SOURCES) \ - wcrtomb.c -!endif + regex.c \ + unistd.c \ + wcrtomb.c \ + wctype.c \ + wctype-h.c LIBGETTEXTPO_GNULIB_SRCS = \ asnprintf.c \ @@ -249,9 +295,12 @@ LIBGETTEXTPO_GNULIB_SRCS = \ c-strcasecmp.c \ c-strncasecmp.c \ c-strstr.c \ + calloc.c \ cloexec.c \ close.c \ concat-filename.c \ + c32iscntrl.c \ + c32width.c \ dup2.c \ error-progname.c \ error.c \ @@ -260,9 +309,11 @@ LIBGETTEXTPO_GNULIB_SRCS = \ fd-hook.c \ fdopen.c \ fopen.c \ + free.c \ fstat.c \ fstrcmp.c \ fsync.c \ + full-write.c \ fwriteerror.c \ gcd.c \ getdelim.c \ @@ -273,14 +324,19 @@ LIBGETTEXTPO_GNULIB_SRCS = \ gl_list.c \ gl_xlist.c \ hard-locale.c \ + ialloc.c \ localcharset.c \ malloc.c \ malloca.c \ markup.c \ + mbrtoc32.c \ mbrtowc.c \ mbsinit.c \ mbswidth.c \ + mbszero.c \ + memmem.c \ mem-hash-map.c \ + memrchr.c \ msvc-inval.c \ msvc-nothrow.c \ obstack.c \ @@ -290,7 +346,9 @@ LIBGETTEXTPO_GNULIB_SRCS = \ raise.c \ rawmemchr.c \ realloc.c \ + reallocarray.c \ relocatable.c \ + safe-write.c \ setlocale_null.c \ sigprocmask.c \ stat-time.c \ @@ -305,6 +363,8 @@ LIBGETTEXTPO_GNULIB_SRCS = \ striconv.c \ striconveh.c \ striconveha.c \ + string-desc-contains.c \ + string-desc.c \ strstr.c \ unistd.c \ vasnprintf.c \ @@ -316,91 +376,145 @@ LIBGETTEXTPO_GNULIB_SRCS = \ windows-recmutex.c \ windows-rwlock.c \ windows-tls.c \ + write.c \ + xalloc-die.c \ xasprintf.c \ xconcat-filename.c \ xerror.c \ xmalloc.c \ xmalloca.c \ xsize.c \ - xstrdup.c \ xstriconv.c \ xvasprintf.c FORMAT_SOURCES = \ - format-awk.c \ - format-boost.c \ + ..\gettext-tools\woe32dll\c++format.cc \ format-c.c \ - format-csharp.c \ - format-elisp.c \ - format-gcc-internal.c \ - format-gfc-internal.c \ - format-java-printf.c \ + format-c++-brace.c \ + format-python.c \ + format-python-brace.c \ format-java.c \ + format-java-printf.c \ + format-csharp.c \ format-javascript.c \ - format-kde-kuit.c \ - format-kde.c \ - format-librep.c \ + format-scheme.c \ format-lisp.c \ - format-lua.c \ - format-pascal.c \ - format-perl-brace.c \ - format-perl.c \ - format-php.c \ - format-python-brace.c \ - format-python.c \ - format-qt-plural.c \ - format-qt.c \ + format-elisp.c \ + format-librep.c \ format-ruby.c \ - format-scheme.c \ format-sh.c \ + format-awk.c \ + format-lua.c \ + format-pascal.c \ format-smalltalk.c \ + format-qt.c \ + format-qt-plural.c \ + format-kde.c \ + format-kde-kuit.c \ + format-boost.c \ format-tcl.c \ - ..\gettext-tools\woe32dll\c++format.cc + format-perl.c \ + format-perl-brace.c \ + format-php.c \ + format-gcc-internal.c \ + format-gfc-internal.c -LIBGETTEXTSRC_COMMON_SRCS = \ - dir-list.c \ +COMMON_SRCS = \ message.c \ - msgl-ascii.c \ - msgl-check.c \ - open-catalog.c \ - plural-exp.c \ - plural-eval.c \ - plural-table.c \ + pos.c \ po-error.c \ - po-gram-gen.c \ - po-charset.c \ - po-lex.c \ po-xerror.c \ - read-catalog.c \ read-catalog-abstract.c \ + po-lex.c \ + po-gram-gen.c \ + po-charset.c \ read-po.c \ + read-properties.c \ read-stringtable.c \ - sentence.c \ - str-list.c \ - write-catalog.c \ - write-po.c \ - $(FORMAT_SOURCES) + open-catalog.c \ + dir-list.c \ + str-list.c LIBGETTEXTSRC_SRCS = \ - $(LIBGETTEXTSRC_COMMON_SRCS) \ - file-list.c \ - its.c \ - locating-rule.c \ + $(COMMON_SRCS) \ + read-catalog.c \ + write-catalog.c \ + write-properties.c \ + write-stringtable.c \ + write-po.c \ + msgl-ascii.c \ + msgl-ofn.c \ + msgl-iconv.c \ + msgl-equal.c \ msgl-cat.c \ + msgl-header.c \ msgl-english.c \ - msgl-equal.c \ - msgl-charset.c \ msgl-check.c \ - msgl-header.c \ - msgl-iconv.c \ + file-list.c \ + msgl-charset.c \ po-time.c \ - read-desktop.c \ - read-properties.c \ - search-path.c \ - write-properties.c \ - write-stringtable.c \ + plural-exp.c \ + plural-eval.c \ + plural-table.c \ + sentence.c \ + $(FORMAT_SOURCES) \ + read-desktop.c \ + locating-rule.c \ + its.c \ + search-path.c -LIBGETTEXTPO_AUX_SRCS = $(LIBGETTEXTSRC_COMMON_SRCS) +LIBGETTEXTPO_AUX_SRCS = \ + str-list.c \ + dir-list.c \ + message.c \ + pos.c \ + msgl-ascii.c \ + po-error.c \ + po-xerror.c \ + write-catalog.c \ + write-po.c \ + open-catalog.c \ + po-charset.c \ + po-lex.c \ + po-gram-gen.c \ + read-po.c \ + read-catalog-abstract.c \ + read-catalog.c \ + plural-table.c \ + format-c.c \ + format-c++-brace.c \ + format-python.c \ + format-python-brace.c \ + format-java.c \ + format-java-printf.c \ + format-csharp.c \ + format-javascript.c \ + format-scheme.c \ + format-lisp.c \ + format-elisp.c \ + format-librep.c \ + format-ruby.c \ + format-sh.c \ + format-awk.c \ + format-lua.c \ + format-pascal.c \ + format-smalltalk.c \ + format-qt.c \ + format-qt-plural.c \ + format-kde.c \ + format-kde-kuit.c \ + format-boost.c \ + format-tcl.c \ + format-perl.c \ + format-perl-brace.c \ + format-php.c \ + format-gcc-internal.c \ + format-gfc-internal.c \ + format.c \ + plural-exp.c \ + plural-eval.c \ + msgl-check.c \ + sentence.c MSGATTRIB_SOURCES = msgattrib.c MSGCAT_SOURCES = msgcat.c @@ -478,7 +592,7 @@ XGETTEXT_SOURCES = \ x-po.c \ x-python.c \ x-rst.c \ - x-ruby.c \ + x-ruby.c \ x-scheme.c \ x-sh.c \ x-smalltalk.c \ diff --git a/gvsbuild/patches/gettext/nmake/libgettextlib.def b/gvsbuild/patches/gettext/nmake/libgettextlib.def index d6c1da362..b69f8491b 100644 --- a/gvsbuild/patches/gettext/nmake/libgettextlib.def +++ b/gvsbuild/patches/gettext/nmake/libgettextlib.def @@ -1,5 +1,6 @@ EXPORTS cleanup_temp_dir +closedir close_stdout compile_csharp_class compile_java_class @@ -27,6 +28,7 @@ fwriteerror fwriteerror_supersede fwriteerror_temp gcd +glwthread_mutex_destroy glwthread_mutex_unlock glwthread_mutex_init glwthread_mutex_lock @@ -45,10 +47,12 @@ locale_charset maybe_print_progname multiline_error multiline_warning +opendir next_prime pipe_filter_ii_execute proper_name proper_name_utf8 +readdir register_temp_file register_temp_subdir relocate @@ -60,6 +64,7 @@ rpl_fopen rpl_fprintf rpl_fputc rpl_fputs +rpl_free rpl_ftell rpl_fwrite rpl_getline @@ -78,6 +83,8 @@ rpl_signal rpl_stat rpl_strerror rpl_strstr +rpl_strtol +rpl_strtoul set_program_name_and_installdir setlocale_null_r shell_quote_argv @@ -87,11 +94,17 @@ sigprocmask stpcpy stpncpy strchrnul +string_desc_c +string_desc_free +string_desc_from_c +string_desc_new_addr +string_desc_new_empty +string_desc_substring trim2 uc_is_java_whitespace uc_is_space uc_width -ulc_width_linebreaks +ulc_width_linebreaks_v2 unicode_name_character unregister_temp_file unregister_temp_subdir @@ -118,7 +131,7 @@ xmlFreeDoc xmlGetLastError xmlGetLineNo xmlReadFd -xmlFree +xmlFree DATA xmlFreeNs xmlFreeTextWriter xmlAddNextSibling @@ -152,9 +165,12 @@ xmlXPathFreeObject xmlXPathNewContext xmlXPathRegisterNs xmlXPathSetContextNode +xnmalloc xrealloc +xreallocarray xsetenv xstrdup +xzalloc _obstack_begin _obstack_free _obstack_newchunk \ No newline at end of file diff --git a/gvsbuild/patches/gettext/nmake/libgettextsrc.def b/gvsbuild/patches/gettext/nmake/libgettextsrc.def index 41d9c3994..62e40a116 100644 --- a/gvsbuild/patches/gettext/nmake/libgettextsrc.def +++ b/gvsbuild/patches/gettext/nmake/libgettextsrc.def @@ -8,6 +8,7 @@ check_msgid_msgstr_format_i check_plural_eval cleanup_temp_dir compare_po_locale_charsets +convert_string_desc_directly convert_string_directly create_temp_dir default_add_message @@ -47,6 +48,7 @@ iconv_msgdomain_list is_ascii_message_list is_ascii_msgdomain_list is_ascii_string +is_ascii_string_desc is_message_list_iconvable its_merge_context_alloc its_merge_context_free @@ -90,6 +92,7 @@ msgdomain_list_alloc msgdomain_list_english msgdomain_list_equal msgdomain_list_free +msgdomain_list_has_filenames_with_spaces msgdomain_list_print msgdomain_list_set_header_field msgdomain_list_sort_by_filepos @@ -111,10 +114,12 @@ register_temp_subdir string_list_alloc string_list_append string_list_append_unique +string_list_append_unique_desc string_list_destroy string_list_free string_list_init string_list_join +string_list_member_desc string_list_member string_list_remove syntax_check_message_list diff --git a/gvsbuild/patches/gettext/nmake/libtextstyle-sources.mk b/gvsbuild/patches/gettext/nmake/libtextstyle-sources.mk index eecbf7eff..d7ae326eb 100644 --- a/gvsbuild/patches/gettext/nmake/libtextstyle-sources.mk +++ b/gvsbuild/patches/gettext/nmake/libtextstyle-sources.mk @@ -6,6 +6,7 @@ LIBTEXTSTYLE_BASE_SRCS = \ ..\libtextstyle\lib\c-ctype.c \ ..\libtextstyle\lib\c-strcasecmp.c \ ..\libtextstyle\lib\c-strncasecmp.c \ + ..\libtextstyle\lib\calloc.c \ ..\libtextstyle\lib\cloexec.c \ ..\libtextstyle\lib\close.c \ ..\libtextstyle\lib\color.c \ @@ -18,7 +19,7 @@ LIBTEXTSTYLE_BASE_SRCS = \ ..\libtextstyle\lib\fd-hook.c \ ..\libtextstyle\lib\fd-ostream.c \ ..\libtextstyle\lib\file-ostream.c \ - ..\libtextstyle\lib\frexpl.c \ + ..\libtextstyle\lib\free.c \ ..\libtextstyle\lib\fstat.c \ ..\libtextstyle\lib\fsync.c \ ..\libtextstyle\lib\full-write.c \ @@ -33,6 +34,7 @@ LIBTEXTSTYLE_BASE_SRCS = \ ..\libtextstyle\lib\gl_xlist.c \ ..\libtextstyle\lib\html-ostream.c \ ..\libtextstyle\lib\html-styled-ostream.c \ + ..\libtextstyle\lib\ialloc.c \ ..\libtextstyle\lib\iconv-ostream.c \ ..\libtextstyle\lib\isatty.c \ ..\libtextstyle\lib\isinf.c \ @@ -42,6 +44,7 @@ LIBTEXTSTYLE_BASE_SRCS = \ ..\libtextstyle\lib\malloc.c \ ..\libtextstyle\lib\malloca.c \ ..\libtextstyle\lib\math.c \ + ..\libtextstyle\lib\mbszero.c \ ..\libtextstyle\lib\mem-hash-map.c \ ..\libtextstyle\lib\memory-ostream.c \ ..\libtextstyle\lib\misc.c \ @@ -57,16 +60,19 @@ LIBTEXTSTYLE_BASE_SRCS = \ ..\libtextstyle\lib\printf-parse.c \ ..\libtextstyle\lib\raise.c \ ..\libtextstyle\lib\read.c \ + ..\libtextstyle\lib\realloc.c \ + ..\libtextstyle\lib\reallocarray.c \ ..\libtextstyle\lib\safe-read.c \ ..\libtextstyle\lib\safe-write.c \ + ..\libtextstyle\lib\same-inode.c \ ..\libtextstyle\lib\sig-handler.c \ ..\libtextstyle\lib\sigaction.c \ ..\libtextstyle\lib\sigprocmask.c \ ..\libtextstyle\lib\snprintf.c \ ..\libtextstyle\lib\sockets.c \ ..\libtextstyle\lib\stat-time.c \ - ..\libtextstyle\lib\stat-w32.c \ ..\libtextstyle\lib\stat.c \ + ..\libtextstyle\lib\stat-w32.c \ ..\libtextstyle\lib\stpcpy.c \ ..\libtextstyle\lib\strerror-override.c \ ..\libtextstyle\lib\strerror.c \ @@ -87,22 +93,10 @@ LIBTEXTSTYLE_BASE_SRCS = \ ..\libtextstyle\lib\windows-recmutex.c \ ..\libtextstyle\lib\windows-rwlock.c \ ..\libtextstyle\lib\write.c \ + ..\libtextstyle\lib\xalloc-die.c \ ..\libtextstyle\lib\xasprintf.c \ ..\libtextstyle\lib\xconcat-filename.c \ ..\libtextstyle\lib\xgethostname.c \ ..\libtextstyle\lib\xmalloc.c \ ..\libtextstyle\lib\xsize.c \ - ..\libtextstyle\lib\xstrdup.c \ ..\libtextstyle\lib\xvasprintf.c - -!if $(PDBVER) < 14 -LIBTEXTSTYLE_BASE_SRCS = $(LIBTEXTSTYLE_BASE_SRCS) ..\libtextstyle\lib\frexp.c -!endif - -!if $(PDBVER) < 12 -LIBTEXTSTYLE_BASE_SRCS = \ - $(LIBTEXTSTYLE_BASE_SRCS) \ - ..\libtextstyle\lib\signbitd.c \ - ..\libtextstyle\lib\signbitf.c \ - ..\libtextstyle\lib\signbitl.c -!endif diff --git a/gvsbuild/projects/gettext.py b/gvsbuild/projects/gettext.py index 3d773f474..eeb1de90c 100644 --- a/gvsbuild/projects/gettext.py +++ b/gvsbuild/projects/gettext.py @@ -25,16 +25,14 @@ def __init__(self): Project.__init__( self, "gettext", - version="0.21", + version="0.22.3", repository="autotools-mirror/gettext", archive_url="http://ftp.gnu.org/pub/gnu/gettext/gettext-{version}.tar.xz", - hash="d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192", + hash="b838228b3f8823a6c1eddf07297197c4db13f7e1b173b9ef93f3f945a63080b6", dependencies=["win-iconv"], patches=[ - "gettext-runtime-c99.patch", - "gettext-tools-c99.patch", - "gettext-tools-gnulib-memset.patch", - "libtextstyle-c99.patch", + "0001-gettext-tools-src-its-c.patch", + "0002-gettext-tools-src-locating-rules-c.patch", ], )