Compare commits

..

54 commits

Author SHA1 Message Date
matiwari
98705c64dd stdcountof-h tests: Fix compilation error with gcc-16 2026-01-13 14:01:08 +05:30
matiwari
bb34f17628 Fix build failure with glibc 2.42 C23 const-preserving macros 2025-12-18 21:31:07 +05:30
matiwari
a40f3de97f Update to release 0.26 2025-08-19 23:15:33 +05:30
Fedora Release Engineering
c94ec5b16a Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 21:17:40 +00:00
matiwari
7e8960bf76 Update to release 0.25.1 2025-07-23 13:39:04 +05:30
matiwari
9b44db8d21 Update to 0.25 release 2025-05-14 08:58:54 +05:30
matiwari
74ac9f07a1 Update to 0.24 release 2025-03-07 18:07:11 +05:30
Fedora Release Engineering
9f7d174856 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 19:50:07 +00:00
matiwari
f92414c279 Update to 0.23.1 release 2025-01-01 16:26:09 +05:30
matiwari
ec95bbdbda Use lowercase boolean in SPDX expression to avoid mixed case 2024-12-21 13:12:36 +05:30
matiwari
368c0cc283 Update to 0.23 release 2024-12-16 13:03:43 +05:30
Fedora Release Engineering
057981b371 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 00:29:00 +00:00
matiwari
1a3bc0afb5 CI tests migration to tmt 2024-07-16 06:55:57 +05:30
matiwari
205b6879b5 Add explicit package version requirement for libtextstyle 2024-07-10 11:15:35 +05:30
matiwari
44a6e9d2be Enable libtextstyle for f40 2024-07-02 23:01:16 +05:30
Jens Petersen
935d833dd9 condition libtextstyle obsoletes 2024-03-08 14:49:40 +08:00
matiwari
9c4e3965b5 Update to 0.22.5 release 2024-03-04 01:00:10 +05:30
Jens Petersen
2880ae9755 remove trailing whitespace for libtextstyle subpackages 2024-03-01 20:33:30 +08:00
matiwari
d0e4469234 Use Uppercase AND operator for multiple licenses in SPDX 2024-02-28 12:27:36 +05:30
matiwari
807312ab8f Add back libtextstyle library file for rawhide 2024-02-28 11:24:04 +05:30
matiwari
875215f268 Minor Patch Update 2024-02-13 13:44:40 +05:30
matiwari
eb1d1dcd33 Update to 0.22.4 release 2024-02-09 15:03:46 +05:30
Fedora Release Engineering
0c9f023142 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 12:49:35 +00:00
Fedora Release Engineering
f09e35ca28 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 20:34:15 +00:00
Fedora Release Engineering
89be005c97 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 21:06:30 +00:00
Yaakov Selkowitz
4f470a9f50 Fix LD_LIBRARY_PATH in %check
gettext-0.22 dropped the second copy of libintl in gettext-tools, and
now relies on the copy in gettext-runtime.  These are used for the
tests, without which a number will fail.
2023-07-12 12:19:32 -04:00
Jens Petersen
6a2dc0e302 update to 0.22 release 2023-06-23 19:19:18 +08:00
Sundeep Anand
15c3691527 update license tag to as per SPDX identifiers 2023-03-29 17:57:09 +05:30
Fedora Release Engineering
aa54659070 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 04:40:41 +00:00
Sundeep Anand
7aca11f7d4 update to 0.21.1 release 2022-10-17 14:51:41 +05:30
Sundeep Anand
e09fc9f993 Include doc and man pages for envsubst subpackage.
Move _libdir and _datadir from gettext-runtime to gettext package.
2022-10-13 15:28:24 +05:30
Sundeep Anand
adb95f5020 Add conflicts to enable new (sub)packages installable independently of the original package.
Signed-off-by: Sundeep Anand <suanand@redhat.com>
2022-09-12 14:29:17 +05:30
Sundeep Anand
b032e270f1 Pulling snapshot info before dist in the release string
Signed-off-by: Sundeep Anand <suanand@redhat.com>
2022-08-30 14:52:29 +05:30
Sundeep Anand
4dc394f969 Introduce gettext-envsubst sub-package for allow install envsubst with minimal footprint 2022-08-12 12:07:00 +05:30
Fedora Release Engineering
8faf137723 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 04:25:47 +00:00
Jens Petersen
43488c9689 remove duplicate README from base filelist 2022-07-21 12:15:03 +08:00
Jens Petersen
2dabab53d8 few cleanup tweaks slightly lessening some minor changes
list base files first before the runtime file list
2022-07-21 11:39:25 +08:00
Sundeep Anand
59393a0772 separate out gettext-runtime from the main package into a subpackage 2022-06-08 14:30:29 +05:30
Sundeep Anand
7036fc870c add Provides: gettext-runtime to gettext package for forward compatibility 2022-06-07 16:28:52 +05:30
Sundeep Anand
205b2f420a Adding Provides: gettext-tools
to the gettext package for forward compatibility,
to support proposed gettext-tools package.
See https://fedoraproject.org/wiki/Changes/GettextToolsPackage

Signed-off-by: Sundeep Anand <suanand@redhat.com>
2022-06-06 10:37:07 +00:00
Sundeep Anand
419fa91470 Adding Provides: gettext-tools
to the gettext package for forward compatibility,
to support proposed gettext-tools package.
See https://fedoraproject.org/wiki/Changes/GettextToolsPackage

Signed-off-by: Sundeep Anand <suanand@redhat.com>
2022-06-06 08:49:29 +00:00
Jens Petersen
be4c5c778b add Java 17 support patch from Mamoru Tasaka (#2062407) 2022-03-31 10:44:30 +08:00
Sundeep Anand
b217c073ed fix gettext snapshot versioning issue to make it canonical
Resolves: rhbz#2061646

Signed-off-by: Sundeep Anand <suanand@redhat.com>
2022-03-09 16:09:27 +05:30
Sundeep Anand
7d0cd2d7e2 Rebuild with gettext-snapshot-20220228 to fix ppc64le and tests
Removed gettext-0.21-gnulib-perror-tests.patch as it is upstreamed.

Resolves: rhbz#2045414

Signed-off-by: Sundeep Anand <suanand@redhat.com>
2022-03-04 16:29:41 +05:30
Fedora Release Engineering
b2e6e951dc - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 04:15:12 +00:00
Sundeep Anand
fe68ad1d54 Patch msgmerge-for-msgfmt has been merged upstream hence removed 2021-11-24 11:52:15 +05:30
Jens Petersen
fd237eb4df update autotools files with autoreconf to fix FTBFS (#2000426) 2021-11-23 19:49:48 +08:00
Fedora Release Engineering
757ca1de4b - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 00:04:17 +00:00
Florian Weimer
8b2ebf94ec Rebuild with new binutils to fix ppc64le corruption (#1960730) 2021-05-25 12:18:26 +02:00
Sundeep Anand
5412b38944 fix issues detected by static analyzers 2021-05-11 20:44:03 +05:30
Sundeep Anand
1b17af56ab disable libtextstyle as it is dependent on libcroco, which is unmaintained now 2021-04-30 11:48:13 +05:30
Robert Scheck
685e15bd65 Spec file cleanup 2021-04-27 12:52:14 +00:00
Fedora Release Engineering
3d2b5ea009 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 06:38:07 +00:00
Tom Stellard
8c125f4d85 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-18 23:15:58 +00:00
15 changed files with 1117 additions and 190 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

2
.gitignore vendored
View file

@ -1 +1 @@
/gettext-0.*.tar.xz
/gettext-0.*.tar.*

View file

@ -1,44 +0,0 @@
From 175e0bc72808d564074c4adcc72aeadb74adfcc6 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 27 Aug 2020 17:52:58 -0700
Subject: [PATCH] perror, strerror_r: remove unportable tests
Problem reported by Florian Weimer in:
https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html
* tests/test-perror2.c (main):
* tests/test-strerror_r.c (main): Omit unportable tests.
---
ChangeLog | 8 ++++++++
tests/test-perror2.c | 3 ---
tests/test-strerror_r.c | 3 ---
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/gettext-tools/gnulib-tests/test-perror2.c b/gettext-tools/gnulib-tests/test-perror2.c
index 1d14eda7b..c6214dd25 100644
--- a/gettext-tools/gnulib-tests/test-perror2.c
+++ b/gettext-tools/gnulib-tests/test-perror2.c
@@ -79,9 +79,6 @@ main (void)
errno = -5;
perror ("");
ASSERT (!ferror (stderr));
- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
ASSERT (STREQ (msg4, str4));
free (str1);
diff --git a/gettext-tools/gnulib-tests/test-strerror_r.c b/gettext-tools/gnulib-tests/test-strerror_r.c
index b11d6fd9f..c1dbcf837 100644
--- a/gettext-tools/gnulib-tests/test-strerror_r.c
+++ b/gettext-tools/gnulib-tests/test-strerror_r.c
@@ -165,9 +165,6 @@ main (void)
strerror_r (EACCES, buf, sizeof buf);
strerror_r (-5, buf, sizeof buf);
- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
ASSERT (STREQ (msg4, str4));
free (str1);

View file

@ -0,0 +1,70 @@
diff --git a/gettext-tools/src/msgl-cat.c b/gettext-tools/src/msgl-cat.c
index 965cc8c..38c7ca1 100644
--- a/gettext-tools/src/msgl-cat.c
+++ b/gettext-tools/src/msgl-cat.c
@@ -307,6 +307,7 @@ catenate_msgdomain_list (string_list_ty *file_list,
mp->msgid);
multiline_error (xstrdup (""),
xasprintf ("%s\n", errormsg));
+ free (errormsg);
}
}
else
diff --git a/gettext-tools/src/x-csharp.c b/gettext-tools/src/x-csharp.c
index 13d4a53..669db2f 100644
--- a/gettext-tools/src/x-csharp.c
+++ b/gettext-tools/src/x-csharp.c
@@ -561,6 +561,7 @@ comment_line_end (size_t chars_to_remove)
buffer[buflen] = '\0';
savable_comment_add (buffer);
lexical_context = lc_outside;
+ free (buffer);
}
diff --git a/gettext-tools/src/x-java.c b/gettext-tools/src/x-java.c
index e89ab95..6c1b4a7 100644
--- a/gettext-tools/src/x-java.c
+++ b/gettext-tools/src/x-java.c
@@ -461,6 +461,7 @@ comment_line_end (size_t chars_to_remove)
--buflen;
buffer[buflen] = '\0';
savable_comment_add (buffer);
+ free (buffer);
}
diff --git a/gettext-tools/src/x-rst.c b/gettext-tools/src/x-rst.c
index cde1ee6..82f645f 100644
--- a/gettext-tools/src/x-rst.c
+++ b/gettext-tools/src/x-rst.c
@@ -651,6 +651,8 @@ extract_rsj (FILE *f,
else
goto invalid_rsj;
+ free (s1);
+
/* Parse a comma. */
c = phase2_getc ();
if (c == '}')
@@ -667,6 +669,7 @@ extract_rsj (FILE *f,
fp = NULL;
real_file_name = NULL;
+ free (logical_file_name);
logical_file_name = NULL;
line_number = 0;
diff --git a/gettext-tools/src/xg-arglist-callshape.c b/gettext-tools/src/xg-arglist-callshape.c
index 06b7076..2189aac 100644
--- a/gettext-tools/src/xg-arglist-callshape.c
+++ b/gettext-tools/src/xg-arglist-callshape.c
@@ -118,6 +118,7 @@ split_keywordspec (const char *spec,
memcpy (xcomment, xcomment_start, xcomment_len);
xcomment[xcomment_len] = '\0';
string_list_append (&xcomments, xcomment);
+ free (xcomment);
}
else
break;

486
gettext-0.26-c23.diff Normal file
View file

@ -0,0 +1,486 @@
diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-runtime/gnulib-lib/c++defs.h 2025-07-08 10:54:38.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/gnulib-lib/stdlib.in.h
--- gettext-0.26/gettext-runtime/gnulib-lib/stdlib.in.h 2025-07-08 10:54:38.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.891299356 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-runtime/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/gnulib-lib/wchar.in.h
--- gettext-0.26/gettext-runtime/gnulib-lib/wchar.in.h 2025-07-08 10:54:38.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.399876581 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-runtime/intl/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/stdlib.in.h
--- gettext-0.26/gettext-runtime/intl/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.892299363 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-runtime/intl/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/wchar.in.h
--- gettext-0.26/gettext-runtime/intl/gnulib-lib/wchar.in.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/intl/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.401876594 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h
--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.889299343 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h
--- gettext-0.26/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-runtime/libasprintf/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.397876567 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-tools/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-tools/gnulib-lib/c++defs.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-tools/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-tools/gnulib-lib/stdlib.in.h
--- gettext-0.26/gettext-tools/gnulib-lib/stdlib.in.h 2025-07-08 10:54:39.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.896299390 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-tools/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-tools/gnulib-lib/wchar.in.h
--- gettext-0.26/gettext-tools/gnulib-lib/wchar.in.h 2025-07-08 10:54:40.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.404876615 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-tools/gnulib-tests/c++defs.h gettext-0.26-patched/gettext-tools/gnulib-tests/c++defs.h
--- gettext-0.26/gettext-tools/gnulib-tests/c++defs.h 2025-07-08 10:54:40.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/gnulib-tests/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-tools/libgettextpo/c++defs.h gettext-0.26-patched/gettext-tools/libgettextpo/c++defs.h
--- gettext-0.26/gettext-tools/libgettextpo/c++defs.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgettextpo/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-tools/libgettextpo/stdlib.in.h gettext-0.26-patched/gettext-tools/libgettextpo/stdlib.in.h
--- gettext-0.26/gettext-tools/libgettextpo/stdlib.in.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgettextpo/stdlib.in.h 2025-12-18 13:05:15.899299410 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-tools/libgettextpo/wchar.in.h gettext-0.26-patched/gettext-tools/libgettextpo/wchar.in.h
--- gettext-0.26/gettext-tools/libgettextpo/wchar.in.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgettextpo/wchar.in.h 2025-12-18 13:04:13.407876635 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/c++defs.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/stdlib.in.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/stdlib.in.h
--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/stdlib.in.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/stdlib.in.h 2025-12-18 13:05:15.897299397 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/gettext-tools/libgrep/gnulib-lib/wchar.in.h gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/wchar.in.h
--- gettext-0.26/gettext-tools/libgrep/gnulib-lib/wchar.in.h 2025-07-08 10:54:49.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/libgrep/gnulib-lib/wchar.in.h 2025-12-18 13:04:13.406876628 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/gettext-tools/tests/gnulib-lib/c++defs.h gettext-0.26-patched/gettext-tools/tests/gnulib-lib/c++defs.h
--- gettext-0.26/gettext-tools/tests/gnulib-lib/c++defs.h 2025-07-08 10:55:10.000000000 +0200
+++ gettext-0.26-patched/gettext-tools/tests/gnulib-lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/libtextstyle/lib/c++defs.h gettext-0.26-patched/libtextstyle/lib/c++defs.h
--- gettext-0.26/libtextstyle/lib/c++defs.h 2025-07-08 10:55:22.000000000 +0200
+++ gettext-0.26-patched/libtextstyle/lib/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff -r -u gettext-0.26/libtextstyle/lib/stdlib.in.h gettext-0.26-patched/libtextstyle/lib/stdlib.in.h
--- gettext-0.26/libtextstyle/lib/stdlib.in.h 2025-07-08 10:55:22.000000000 +0200
+++ gettext-0.26-patched/libtextstyle/lib/stdlib.in.h 2025-12-18 13:05:15.894299376 +0100
@@ -237,9 +237,9 @@
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff -r -u gettext-0.26/libtextstyle/lib/wchar.in.h gettext-0.26-patched/libtextstyle/lib/wchar.in.h
--- gettext-0.26/libtextstyle/lib/wchar.in.h 2025-07-08 10:55:22.000000000 +0200
+++ gettext-0.26-patched/libtextstyle/lib/wchar.in.h 2025-12-18 13:04:13.402876601 +0100
@@ -316,7 +316,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
diff -r -u gettext-0.26/libtextstyle/tests/c++defs.h gettext-0.26-patched/libtextstyle/tests/c++defs.h
--- gettext-0.26/libtextstyle/tests/c++defs.h 2025-07-08 10:55:22.000000000 +0200
+++ gettext-0.26-patched/libtextstyle/tests/c++defs.h 2025-12-18 13:08:56.338779679 +0100
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func

View file

@ -0,0 +1,25 @@
diff -ur gettext-0.26.orig/gettext-tools/gnulib-tests/test-stdcountof-h.c gettext-0.26/gettext-tools/gnulib-tests/test-stdcountof-h.c
--- gettext-0.26.orig/gettext-tools/gnulib-tests/test-stdcountof-h.c 2025-07-08 14:24:40.000000000 +0530
+++ gettext-0.26/gettext-tools/gnulib-tests/test-stdcountof-h.c 2026-01-13 13:07:35.226196031 +0530
@@ -42,17 +42,21 @@
(void) local_bounded;
+#ifdef _gl_verify_is_array
(void) _gl_verify_is_array (unbounded);
(void) _gl_verify_is_array (bounded);
(void) _gl_verify_is_array (multidimensional);
+#endif
ASSERT (countof (bounded) == 10);
ASSERT (countof (multidimensional) == 10);
ASSERT (countof (local_bounded) == 20);
#if 0 /* These produce compilation errors. */
+#ifdef _gl_verify_is_array
(void) _gl_verify_is_array (integer);
(void) _gl_verify_is_array (parameter);
+#endif
ASSERT (countof (integer) >= 0);
ASSERT (countof (unbounded) >= 0);

View file

@ -1,82 +0,0 @@
From 2336451ed68d91ff4b5ae1acbc1eca30e47a86a9 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Sun, 19 May 2019 13:10:06 +0200
Subject: [PATCH] msgmerge: Fix behaviour of --for-msgfmt on PO files with no
translations.
Reported by Don Lawrence <dlawrence@iecok.com>
in <https://lists.freedesktop.org/archives/p11-glue/2019-May/000700.html>
via Daiki Ueno
in <https://lists.gnu.org/archive/html/bug-gettext/2019-05/msg00124.html>.
* gettext-tools/src/msgmerge.c (main): Treat force_po like true if for_msgfmt
is true.
* gettext-tools/tests/msgmerge-26: Add test of PO file with no translations.
---
gettext-tools/src/msgmerge.c | 4 ++--
gettext-tools/tests/msgmerge-26 | 36 ++++++++++++++++++++++++++++++---
2 files changed, 35 insertions(+), 5 deletions(-)
diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c
index cd762c029..92c9b7a8e 100644
--- a/gettext-tools/src/msgmerge.c
+++ b/gettext-tools/src/msgmerge.c
@@ -520,8 +520,8 @@ There is NO WARRANTY, to the extent permitted by law.\n\
else
{
/* Write the merged message list out. */
- msgdomain_list_print (result, output_file, output_syntax, force_po,
- false);
+ msgdomain_list_print (result, output_file, output_syntax,
+ for_msgfmt || force_po, false);
}
exit (EXIT_SUCCESS);
diff --git a/gettext-tools/tests/msgmerge-26 b/gettext-tools/tests/msgmerge-26
index cd3862e33..b86f7a073 100755
--- a/gettext-tools/tests/msgmerge-26
+++ b/gettext-tools/tests/msgmerge-26
@@ -73,7 +73,37 @@ msgstr "Papaya"
EOF
: ${DIFF=diff}
-${DIFF} mm-test26.ok mm-test26.out
-result=$?
+${DIFF} mm-test26.ok mm-test26.out || Exit 1
-exit $result
+# Test with a PO file that has no translated messages.
+
+cat <<\EOF > mm-test26a.in1
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+
+msgid "Hello world"
+msgstr "Hallo Welt"
+EOF
+
+cat <<\EOF > mm-test26a.in2
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=ASCII\n"
+
+msgid "Hello, world!"
+msgstr ""
+EOF
+
+: ${MSGMERGE=msgmerge}
+${MSGMERGE} --for-msgfmt -o mm-test26a.tmp mm-test26a.in1 mm-test26a.in2 \
+ || Exit 1
+LC_ALL=C tr -d '\r' < mm-test26a.tmp > mm-test26a.out || Exit 1
+
+cat <<\EOF > mm-test26a.ok
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8\n"
+EOF
+
+: ${DIFF=diff}
+${DIFF} mm-test26a.ok mm-test26a.out || Exit 1
--
2.21.0

View file

@ -1,10 +1,15 @@
%bcond_with jar
%bcond_with java
# Disabled lto flags on i686 to avoid lto memory allocation error
%ifarch i686
%global _lto_cflags %{nil}
%endif
Summary: GNU libraries and utilities for producing multi-lingual messages
Summary: GNU tools and libraries for localized translated messages
Name: gettext
Version: 0.21
Version: 0.26
Release: 3%{?dist}
# The following are licensed under LGPLv2+:
# - libintl and its headers
# - libasprintf and its headers
@ -18,22 +23,19 @@ Release: 3%{?dist}
# - libasprintf info files
# - libtextstyle info files
# Everything else is GPLv3+
License: GPLv3+ and LGPLv2+ and GFDL
URL: http://www.gnu.org/software/gettext/
Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.xz
License: GPL-3.0-or-later and LGPL-2.0-or-later and GFDL-1.2-or-later
URL: https://www.gnu.org/software/gettext/
Source: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz
Source2: msghack.py
Source3: msghack.1
# this patch has merged upstream
# Patch1: gettext-msgmerge-for-msgfmt.patch
# https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html
Patch1: gettext-0.21-gnulib-perror-tests.patch
Patch1: gettext-0.21.1-covscan.patch
Patch2: gettext-0.26-c23.diff
Patch3: gettext-0.26-stdcountof-h.patch
# for bootstrapping
# BuildRequires: autoconf >= 2.62
# BuildRequires: automake
# BuildRequires: libtool
BuildRequires: automake
BuildRequires: libtool
# BuildRequires: bison
BuildRequires: gcc-c++
@ -50,8 +52,6 @@ BuildRequires: zip, unzip
%endif
# for po-mode.el
BuildRequires: emacs
# for autosetup
BuildRequires: git
# ensure 'ARCHIVE_FORMAT=dirxz'
BuildRequires: xz
# for documentation
@ -74,10 +74,10 @@ BuildRequires: glibc-langpack-fr
BuildRequires: glibc-langpack-ja
BuildRequires: glibc-langpack-tr
BuildRequires: glibc-langpack-zh
# Depend on the exact version of the library sub package
Requires: %{name}-libs%{_isa} = %{version}-%{release}
BuildRequires: make
Provides: bundled(gnulib)
Provides: bundled(libcroco) = 0.6.12
Requires: %{name}-runtime = %{version}-%{release}
Requires: libtextstyle%{?_isa} = %{version}-%{release}
%description
The GNU gettext package provides a set of tools and documentation for
@ -92,10 +92,25 @@ catalogs and is a powerful and simple method for internationalizing
programs.
%package runtime
Summary: GNU runtime libraries and programs for producing multi-lingual messages
License: GPL-3.0-or-later and LGPL-2.0-or-later
# Depend on the exact version of the library sub package
Requires: %{name}-libs%{_isa} = %{version}-%{release}
Requires: %{name}-envsubst = %{version}-%{release}
Conflicts: %{name} <= 0.21-15%{?dist}.0.20220203
%description runtime
The GNU gettext-runtime package provides an easy to use runtime libraries and
programs for creating, using, and modifying natural language catalogs
and is a powerful and simple method for internationalizing programs.
%package common-devel
Summary: Common development files for %{name}
# autopoint archive
License: GPLv3+
License: GPL-3.0-or-later
BuildArch: noarch
%description common-devel
@ -107,7 +122,7 @@ Summary: Development files for %{name}
# autopoint is GPLv3+
# libasprintf is LGPLv2+
# libgettextpo is GPLv3+
License: LGPLv2+ and GPLv3+ and GFDL
License: LGPL-2.0-or-later and GPL-3.0-or-later and GFDL-1.2-or-later
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-common-devel = %{version}-%{release}
@ -127,24 +142,23 @@ want to add gettext support for your project.
Summary: Libraries for %{name}
# libasprintf is LGPLv2+
# libgettextpo is GPLv3+
License: LGPLv2+ and GPLv3+
License: LGPL-2.0-or-later and GPL-3.0-or-later
Requires: libtextstyle%{?_isa} = %{version}-%{release}
%description libs
This package contains libraries used internationalization support.
%package -n libtextstyle
Summary: Text styling library
License: GPLv3+
License: GPL-3.0-or-later
%description -n libtextstyle
Library for producing styled text to be displayed in a terminal
emulator.
%package -n libtextstyle-devel
Summary: Development files for libtextstyle
License: GPLv3+ and GFDL
License: GPL-3.0-or-later and GFDL-1.2-or-later
Requires: libtextstyle%{?_isa} = %{version}-%{release}
%description -n libtextstyle-devel
@ -152,7 +166,6 @@ This package contains all development related files necessary for
developing or compiling applications/libraries that needs text
styling.
%package -n emacs-%{name}
Summary: Support for editing po files within GNU Emacs
BuildArch: noarch
@ -174,8 +187,20 @@ This program can be used to alter .po files in ways no sane mind would
think about.
%package envsubst
Summary: Substitutes the values of environment variables
Conflicts: %{name} <= 0.21-15%{?dist}.0.20220203
%description envsubst
Substitutes the values of environment variables.
%prep
%autosetup -S git
%setup -q
%patch 1 -p1 -b .orig~
%patch 2 -p1 -b .orig~
%patch 3 -p1 -b .orig~
autoreconf
# Defeat libtextstyle attempt to bundle libxml2. The comments
# indicate this is done because the libtextstyle authors do not want
@ -200,7 +225,8 @@ export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__"
export CPPFLAGS="-I%{_includedir}/libxml2"
# Side effect of unbundling libxml2 from libtextstyle.
export LIBS="-lxml2"
%configure --without-included-gettext --enable-nls --disable-static \
export CFLAGS="$CFLAGS -Wformat"
%configure --enable-nls --disable-static \
--enable-shared --disable-csharp --disable-rpath \
%if %{with java}
--enable-java \
@ -225,9 +251,8 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}/%{_bindir}/msghack
install -pm 644 %SOURCE3 ${RPM_BUILD_ROOT}/%{_mandir}/man1/msghack.1
install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}%{_bindir}/msghack
install -pm 644 %SOURCE3 ${RPM_BUILD_ROOT}%{_mandir}/man1/msghack.1
# make preloadable_libintl.so executable
chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so
@ -244,7 +269,7 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/examples
rm -rf htmldoc
mkdir htmldoc
mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}/%{_datadir}/doc/libasprintf/* htmldoc
mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf/* htmldoc
rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf
rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext
@ -280,29 +305,27 @@ rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc
%find_lang %{name}-runtime
%find_lang %{name}-tools
cat %{name}-*.lang > %{name}.lang
%check
# this takes quite a lot of time to run
# adapt to rpath removal
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-runtime/intl/.libs
# override LIBUNISTRING to prevent reordering of lib objects
make check LIBUNISTRING=-lunistring
%ldconfig_scriptlets libs
%files -f %{name}.lang
%doc AUTHORS gettext-runtime/BUGS
%doc COPYING gettext-tools/misc/DISCLAIM README
%doc NEWS THANKS
%doc gettext-runtime/man/*.1.html
%doc gettext-runtime/intl/COPYING*
%{_bindir}/envsubst
%{_bindir}/gettext
%{_bindir}/gettext.sh
%files -f %{name}-tools.lang
%doc AUTHORS NEWS README THANKS
%doc gettext-tools/misc/disclaim-translations.txt
%doc gettext-tools/man/msg*.1.html
%doc gettext-tools/man/recode*.1.html
%doc gettext-tools/man/xgettext.1.html
%doc gettext-tools/doc/FAQ.html
%doc gettext-tools/doc/tutorial.html
%{_bindir}/msgattrib
%{_bindir}/msgcat
%{_bindir}/msgcmp
@ -317,14 +340,16 @@ make check LIBUNISTRING=-lunistring
%{_bindir}/msgmerge
%{_bindir}/msgunfmt
%{_bindir}/msguniq
%{_bindir}/ngettext
%{_bindir}/recode-sr-latin
%{_bindir}/xgettext
%{_infodir}/gettext*
%exclude %{_mandir}/man1/autopoint.1*
%exclude %{_mandir}/man1/envsubst.1*
%exclude %{_mandir}/man1/gettextize.1*
%exclude %{_mandir}/man1/msghack.1*
%{_mandir}/man1/*
%{_mandir}/man1/msg*
%{_mandir}/man1/recode*.1*
%{_mandir}/man1/xgettext.1*
%{_libdir}/%{name}
%if %{with java}
%exclude %{_libdir}/%{name}/gnu.gettext.*
@ -334,21 +359,59 @@ make check LIBUNISTRING=-lunistring
%{_datadir}/%{name}/ABOUT-NLS
%{_datadir}/%{name}/po
%{_datadir}/%{name}/styles
%{_datadir}/%{name}/disclaim-translations.txt
%dir %{_datadir}/%{name}-%{version}
%{_datadir}/%{name}-%{version}/its
%dir %{_datadir}/%{name}/schema
%{_datadir}/%{name}/schema/its*.xsd*
%{_datadir}/%{name}/schema/locating-rules.xsd*
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/cldr-plurals
%{_libexecdir}/%{name}/hostname
%{_libexecdir}/%{name}/project-id
%{_libexecdir}/%{name}/urlget
%{_libexecdir}/%{name}/user-email
%files runtime -f %{name}-runtime.lang
%license COPYING
%doc gettext-runtime/BUGS
%doc gettext-runtime/man/gettext.1.html
%doc gettext-runtime/man/ngettext.1.html
%doc gettext-runtime/intl/COPYING*
%{_bindir}/gettext
%{_bindir}/gettext.sh
%{_bindir}/ngettext
%{_bindir}/printf_gettext
%{_bindir}/printf_ngettext
%exclude %{_mandir}/man1/autopoint.1*
%exclude %{_mandir}/man1/envsubst.1*
%exclude %{_mandir}/man1/gettextize.1*
%exclude %{_mandir}/man1/msg*
%exclude %{_mandir}/man1/recode-sr-latin.1*
%exclude %{_mandir}/man1/xgettext.1*
%{_mandir}/man1/*
%files envsubst
%license COPYING
%doc gettext-runtime/man/envsubst.1.html
%{_bindir}/envsubst
%{_mandir}/man1/envsubst.1*
%files common-devel
%{_datadir}/%{name}/archive.*.tar.xz
%files devel
%doc gettext-runtime/man/*.3.html ChangeLog
%doc gettext-tools/man/autopoint.1.html
%doc gettext-tools/man/gettextize.1.html
%{_bindir}/autopoint
%{_bindir}/gettextize
%{_datadir}/%{name}/projects/
%{_datadir}/%{name}/config.rpath
%{_datadir}/%{name}/*.h
%{_datadir}/%{name}/msgunfmt.tcl
%{_datadir}/aclocal/*
%{_datadir}/%{name}/m4/*
%{_datadir}/aclocal/nls.m4
%{_includedir}/autosprintf.h
%{_includedir}/gettext-po.h
%{_infodir}/autosprintf*
@ -395,6 +458,154 @@ make check LIBUNISTRING=-lunistring
%{_mandir}/man1/msghack.1*
%changelog
* Sun Jan 11 2026 Manish Tiwari <matiwari@redhat.com> - 0.26-3
- https://lists.gnu.org/archive/html/bug-gnulib/2025-09/msg00095.html
- Upstream patch to fix implicit declaration error with GCC-16
* Thu Dec 18 2025 Manish Tiwari <matiwari@redhat.com> - 0.26-2
- Add upstream provided patch to fix build failure with glibc 2.42 C23 const-preserving macros
- https://lists.gnu.org/archive/html/bug-gnulib/2025-11/msg00220.html
* Tue Aug 19 2025 Manish Tiwari <matiwari@redhat.com> - 0.26-1
- update to 0.26 release
- https://savannah.gnu.org/news/?id=10789
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.25.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Wed Jul 23 2025 Manish Tiwari <matiwari@redhat.com> - 0.25.1-1
- update to 0.25.1 release
- Bug fixes:
- autopoint no longer fails if configure.ac contains no AM_GNU_GETTEXT_VERSION or AM_GNU_GETTEXT_REQUIRE_VERSION invocation.
- nls.m4 is installed again under $PREFIX/share/aclocal/.
* Mon May 12 2025 Manish Tiwari <matiwari@redhat.com> - 0.25-1
- update to 0.25 release
- https://savannah.gnu.org/news/?id=10769
* Thu Feb 27 2025 Manish Tiwari <matiwari@redhat.com> - 0.24-1
- update to 0.24 release
- https://savannah.gnu.org/news/?id=10730
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jan 1 2025 Manish Tiwari <matiwari@redhat.com> - 0.23.1-1
- update to 0.23.1 release
- Remove gettext-0.23-libxml2 patch
* Wed Dec 11 2024 Manish Tiwari <matiwari@redhat.com> - 0.23-1
- update to 0.23 release
- https://savannah.gnu.org/news/?id=10699
- Add patch to fix compilation error with libxml2 >= 2.12.0 and gcc >= 14.
- Remove gettext-0.22-disable-libtextstyle patch
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.22.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu Jul 11 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.5-5
- CI gating tests migration to tmt
* Thu Jul 4 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.5-4
- Add explicit package version requirement for libtextstyle
* Tue Jul 2 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.5-3
- Add back libtextstyle for f40 (#2278984)
* Fri Mar 8 2024 Jens Petersen <petersen@redhat.com> - 0.22.5-2
- condition libtextstyle obsoletes
* Mon Mar 4 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.5-1
- update to 0.22.5 release
- https://savannah.gnu.org/news/?id=10597
* Wed Feb 21 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.4-2
- Add back libtextstyle library for rawhide (#2264128)
* Fri Feb 9 2024 Manish Tiwari <matiwari@redhat.com> - 0.22.4-1
- update to 0.22.4 release
- https://savannah.gnu.org/news/?id=10544
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.22-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jun 23 2023 Jens Petersen <petersen@redhat.com> - 0.22-1
- update to 0.22 release
- https://savannah.gnu.org/news/?id=10378
* Wed Mar 29 2023 Sundeep Anand <suanand@redhat.com> - 0.21.1-3
- update license tag to as per SPDX identifiers
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Oct 14 2022 Sundeep Anand <suanand@redhat.com> - 0.21.1-1
- update to 0.21.1 release
* Thu Oct 13 2022 Sundeep Anand <suanand@redhat.com> - 0.21-20.0.20220203
- Include doc and man pages for envsubst subpackage.
Move _libdir and _datadir from gettext-runtime to gettext package.
* Mon Sep 12 2022 Sundeep Anand <suanand@redhat.com> - 0.21-19.0.20220203
- Add conflicts to enable new (sub)packages installable independently of the original package.
* Wed Aug 10 2022 Honza Horak <hhorak@redhat.com> - 0.21-18.0.20220203
- Introduce envsubst sub-package for allow install envsubst with minimal
footprint
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-17.0.20220203
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jun 8 2022 Sundeep Anand <suanand@redhat.com> - 0.21-16.0.20220203
- separate out gettext-runtime from the main package into a subpackage
* Tue Jun 7 2022 Sundeep Anand <suanand@redhat.com> - 0.21-15.0.20220203
- add Provides: gettext-runtime to gettext package for forward compatibility.
- and removed Provides: gettext-tools
* Mon Jun 6 2022 Sundeep Anand <suanand@redhat.com> - 0.21-14.0.20220203
- add Provides: gettext-tools to gettext package for forward compatibility.
* Thu Mar 31 2022 Jens Petersen <petersen@redhat.com> - 0.21-13.0.20220203
- add Java 17 support patch from Mamoru Tasaka (#2062407)
* Wed Mar 9 2022 Sundeep Anand <suanand@redhat.com> - 0.21-12.0.20220203
- fix gettext snapshot versioning issue to make it canonical (#2061646)
* Thu Mar 3 2022 Sundeep Anand <suanand@redhat.com> - 0.21-11.0.20220203
- Rebuild with gettext-snapshot-20220228 to fix ppc64le and tests (#2045414)
Removed gettext-0.21-gnulib-perror-tests.patch as it is upstreamed.
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Nov 23 2021 Jens Petersen <petersen@redhat.com> - 0.21-9
- update autotools files with autoreconf to fix FTBFS (#2000426)
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue May 25 2021 Florian Weimer <fweimer@redhat.com> - 0.21-7
- Rebuild with new binutils to fix ppc64le corruption (#1960730)
* Tue May 11 2021 Sundeep Anand <suanand@redhat.com> - 0.21-6
- Add gettext-0.21-covscan.patch to fix issues detected by static analyzers
* Fri Apr 30 2021 Sundeep Anand <suanand@redhat.com> - 0.21-5
- Add gettext-0.21-disable-libtextstyle.patch
Do not build libtextstyle, as it depends on libcroco
which is now unmaintained and has known security bugs.
Obsolete libtextstyle and libtextstyle-devel packages.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Sep 7 2020 Sundeep Anand <suanand@redhat.com> - 0.21-3
- include patch to fix gnulib perror tests (rhbz#1867021)

5
plans/basic.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

View file

@ -1 +1 @@
SHA512 (gettext-0.21.tar.xz) = f7e2968651879f8444d43a176a149db9f9411f4a03132a7f3b37c2ed97e3978ae6888169c995c1953cb78943b6e3573811abcbb8661b6631edbbe067b2699ddf
SHA512 (gettext-0.26.tar.gz) = 6c2afb0737843028e1cd27f1cd7dd5b81372ccff8cd8e01e17cfdc517afdd9a849c232f1ff5adca5eb4b03f2cc64f4a3f689ae8b84e523ceeae85384f3844083

5
tests/main.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Run gettext test
test: ./test.sh
framework: beakerlib
require:
- gettext

25
tests/test.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="gettext"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
rlRun "cp test_i18n.py test_gettext.py $TmpDir"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlLog "Run test_gettext.py"
rlRun "python3 test_gettext.py"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

227
tests/test_gettext.py Normal file
View file

@ -0,0 +1,227 @@
# -*- coding: utf-8 -*-
import logging
import os
import subprocess
# Saving logs
logging.basicConfig(level=logging.INFO)
DECORATE_STR = "************************************"
logging.info("TEST RESULTS FOR GETTEXT\n{0}".format(DECORATE_STR))
# CONSTANTS
PACKAGE_TO_TEST = "gettext"
DOMAIN_TO_BIND = "testdomain"
PYTHON_INTERPRETER = "python3"
TEST_I18N_FILE = "test_i18n.py"
LOG_INFO_PASS = "[ PASS ]"
LOG_INFO_FAIL = "[ FAIL ]"
LOG_INFO_OS_ERROR = "[ OS Error ]"
# Test Data
TEST_DATA = {"fr_FR": '''msgstr "Bonjour le monde!"''',
"de_DE": '''msgstr "Hallo Welt!"''',
"es_ES": '''msgstr "Hola Mundo!"''',
"it_IT": '''msgstr "Ciao mondo!"''',
"pt_BR": '''msgstr "Olá Mundo!"''',
"ja_JP": '''msgstr "「こんにちは世界」"''',
"ko_KR": '''msgstr "안녕하세요!"''',
"ru_RU": '''msgstr "Привет мир!"''',
"zh_CN": '''msgstr "你好,世界!"''',
"zh_TW": '''msgstr "你好,世界!"'''}
def test_locale():
"""
Check common files for locale support
"""
subject = "Locale Support Test"
try:
all_locales = subprocess.Popen(["locale", "-a"], stdout=subprocess.PIPE)
all_locales_data = all_locales.communicate()
if all_locales_data:
actual = all_locales_data[0].decode().split('\n')
else:
logging.error("{0}: ERROR\n".format(subject))
return
expected_locales = ['en_US', 'en_US.iso88591',
'en_US.iso885915', 'en_US.utf8']
if set(expected_locales).issubset(set(actual)):
logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS))
else:
logging.error("{0}: {1}\n".format(subject, LOG_INFO_FAIL))
except OSError as e:
logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR))
def test_gettext():
"""
Check if gettext is present
"""
subject = "GNU Internationalization Utilities Test"
try:
cmd_check_gettext = ['rpm', '-q', PACKAGE_TO_TEST]
p1 = subprocess.Popen(cmd_check_gettext, stdout=subprocess.PIPE)
std_data, stderr = p1.communicate()
std_data = std_data.decode()
logging.info("Found {0} NVR: {1}".format(PACKAGE_TO_TEST, std_data))
if PACKAGE_TO_TEST in std_data:
logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS))
else:
logging.error("{0}: {1}\n".format(subject, LOG_INFO_FAIL))
except OSError as e:
logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR))
def test_pot_creation():
"""
Creates hello.pot file using test_i18n.py file
"""
subject = "POT file Creation Test"
try:
pot_file = subprocess.Popen(
"xgettext -d '{0}' -o {1}.pot {2}".format(DOMAIN_TO_BIND,
DOMAIN_TO_BIND,
TEST_I18N_FILE),
shell=True
)
pot_file.communicate()
except OSError as e:
logging.error("{0}: {1}\n".format(subject, LOG_INFO_OS_ERROR))
else:
logging.info("{0}: {1}\n".format(subject, LOG_INFO_PASS))
def make_dir(locale_dir):
path = "./locale/{0}/LC_MESSAGES".format(locale_dir)
os.makedirs(path)
def create_po_files(active_locale):
"""
creates .po file using POT file
"""
subject = "PO file Creation"
try:
cmd_po_files = subprocess.Popen(
"msginit --no-translator -l {0} -i {1}.pot -o ./locale/{2}/LC_MESSAGES/{3}.po".format(
active_locale, DOMAIN_TO_BIND, active_locale, active_locale), shell=True
)
cmd_po_files.communicate()
except OSError as e:
logging.error("{0} failed: {1}\n".format(subject, LOG_INFO_OS_ERROR))
else:
logging.info("{0} Succeed.".format(subject))
def translate(active_locale):
"""
Updates .po file with the translations for respective language
"""
data = TEST_DATA.get(active_locale)
if not data:
return
with open('./locale/{0}/LC_MESSAGES/{1}.po'.format(active_locale,
active_locale),
'r', encoding='latin-1') as f1:
data1 = f1.readlines()
data1.pop()
data1.append(data)
for index, data in enumerate(data1):
if "Content-Type" in data:
data1[index] = '"Content-Type: text/plain; charset=UTF-8\\n"\n'
with open('./locale/{0}/LC_MESSAGES/{1}'.format(active_locale,
active_locale) + ".po", 'w') as f2:
for line in data1:
f2.write(line)
def create_mo_files(active_locale):
"""
Creates .mo file for different locale form .po file
"""
subject = "MO file Creation"
try:
mo_files = subprocess.Popen(
"msgfmt ./locale/{0}/LC_MESSAGES/{1}.po --output-file ./locale/{2}/LC_MESSAGES/{3}.mo".format(
active_locale, active_locale, active_locale, active_locale
), shell=True
)
mo_files.communicate()
except OSError as e:
logging.error("{0} failed: {1}\n".format(subject, LOG_INFO_OS_ERROR))
else:
logging.info("{0} Succeed.".format(subject))
def test_translations(active_locale):
"""
Verify if the output is correct for different language
"""
subject = "Translation Test"
try:
cmd_translation_test = subprocess.check_output(
'LANGUAGE={0} {1} {2} {3}'.format(active_locale,
PYTHON_INTERPRETER,
TEST_I18N_FILE,
active_locale),
encoding='UTF-8', shell=True
)
if cmd_translation_test.strip() == TEST_DATA[active_locale].strip('msgstr "'):
logging.info("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_PASS))
else:
logging.error("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_FAIL))
except OSError as e:
logging.error("{0} for {1}: {2}\n".format(subject, active_locale, LOG_INFO_OS_ERROR))
def tear_off():
try:
subprocess.call(['rm', '-rf', './locale', '{0}.pot'.format(DOMAIN_TO_BIND)])
except OSError as e:
logging.error("OSError\n")
if __name__ == "__main__":
"""
Gettext Tests
"""
# Prepare tests
env_tests = [test_locale,
test_gettext,
test_pot_creation]
translation_tests = [make_dir,
create_po_files,
translate,
create_mo_files,
test_translations]
# Execute tests
[env_test() for env_test in env_tests]
for locale in TEST_DATA.keys():
[test(locale) for test in translation_tests]
tear_off()

14
tests/test_i18n.py Normal file
View file

@ -0,0 +1,14 @@
import gettext
import sys
def print_message(locale):
# Set up message catalog access
t = gettext.translation('%s' % locale, 'locale', fallback=True)
_ = t.gettext
s = _('Hello World!')
print(s)
print_message(sys.argv[1])

View file

@ -1,16 +0,0 @@
---
# Tests run on Atomic, Classic and Container
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- atomic
- classic
- container
repositories:
- repo: "https://src.fedoraproject.org/tests/gettext.git"
dest: "gettext"
tests:
- gettext/gettext-tests
required_packages:
- gettext