[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60326: [COMMITTED 8/8] gzip: port alignas usage to C23
From: |
Paul Eggert |
Subject: |
bug#60326: [COMMITTED 8/8] gzip: port alignas usage to C23 |
Date: |
Sun, 25 Dec 2022 16:15:30 -0800 |
* gzip.c (BUFFER_ALIGNED): Do not depend on __alignas_is_defined
as that has been removed from C23.
---
NEWS | 2 +-
gzip.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 918fcf2..f2ea30e 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ GNU gzip NEWS -*- outline -*-
[bug present since the beginning]
Port to C23, which does not allow K&R-style function definitions
- with parameters.
+ with parameters, and which does not define __alignas_is_defined.
* Noteworthy changes in release 1.12 (2022-04-07) [stable]
diff --git a/gzip.c b/gzip.c
index fcf8e06..5cfdb24 100644
--- a/gzip.c
+++ b/gzip.c
@@ -134,7 +134,7 @@ static char const *const license_msg[] = {
windows; the alignment requirement is 4096. On other platforms
alignment doesn't hurt, and alignment up to 4096 is portable so
let's do that. */
-#ifdef __alignas_is_defined
+#if defined HAVE_C_ALIGNASOF || defined alignas
# define BUFFER_ALIGNED alignas (4096)
#else
# define BUFFER_ALIGNED /**/
--
2.38.1
- bug#60326: [COMMITTED 1/8] build: update gnulib submodule to latest, Paul Eggert, 2022/12/25
- bug#60327: [COMMITTED 2/8] maint: update .gitignore to match Gnulib changes, Paul Eggert, 2022/12/25
- bug#60326: [COMMITTED 5/8] maint: stop using obsolete dosname module, Paul Eggert, 2022/12/25
- bug#60326: [COMMITTED 4/8] maint: stop using obsolete stdnoreturn module, Paul Eggert, 2022/12/25
- bug#60326: [COMMITTED 3/8] maint: stop using obsolete fdl module, Paul Eggert, 2022/12/25
- bug#60326: [COMMITTED 7/8] gzip: local → static, Paul Eggert, 2022/12/25
- bug#60326: [COMMITTED 6/8] maint: port function definitions to C23, Paul Eggert, 2022/12/25
- bug#60326: [COMMITTED 8/8] gzip: port alignas usage to C23,
Paul Eggert <=
- bug#60326: [PATCH] maint: do not include stdbool.h, stdalign.h, Paul Eggert, 2022/12/26
- bug#60326: [PATCH 1/2] maint: link with $(LIB_FDATASYNC), Paul Eggert, 2022/12/28