[Top][All Lists]

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

bug#60326: [COMMITTED 4/8] maint: stop using obsolete stdnoreturn module

From: Paul Eggert
Subject: bug#60326: [COMMITTED 4/8] maint: stop using obsolete stdnoreturn module
Date: Sun, 25 Dec 2022 16:15:26 -0800

* bootstrap.conf (gnulib_modules): Remove stdnoreturn.
* gzip.h: Do not include stdnoreturn.h.
All uses of noreturn replaced by _Noreturn,
at start of declaration for benefit of C23.
* lib/.gitignore, m4/.gitignore: Remove names of
stdnoreturn-related files.
 bootstrap.conf |  1 -
 gzip.c         |  4 ++--
 gzip.h         | 11 +++++------
 lib/.gitignore |  1 -
 m4/.gitignore  |  1 -
 5 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index 185d5d4..c37cd1c 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -54,7 +54,6 @@ savedir
diff --git a/gzip.c b/gzip.c
index d6afad4..1d732b3 100644
--- a/gzip.c
+++ b/gzip.c
@@ -305,7 +305,7 @@ static const struct option longopts[] =
 /* local functions */
-local noreturn void try_help (void);
+_Noreturn local void try_help (void);
 local void help         (void);
 local void license      (void);
 local void version      (void);
@@ -325,7 +325,7 @@ local void copy_stat    (struct stat *ifstat);
 local void install_signal_handlers (void);
 static void remove_output_file (bool);
 static void abort_gzip_signal (int);
-local noreturn void do_exit (int exitcode);
+_Noreturn local void do_exit (int exitcode);
 static void finish_out (void);
       int main          (int argc, char **argv);
 static int (*work) (int infile, int outfile) = zip; /* function to call */
diff --git a/gzip.h b/gzip.h
index b150145..668d635 100644
--- a/gzip.h
+++ b/gzip.h
@@ -38,7 +38,6 @@
 #include <sys/types.h> /* for off_t */
 #include <time.h>
 #include <string.h>
-#include <stdnoreturn.h>
 #define memzero(s, n) memset ((voidp)(s), 0, (n))
 #define local static
@@ -273,7 +272,7 @@ extern int unpack     (int in, int out);
 extern int unlzh      (int in, int out);
         /* in gzip.c */
-extern noreturn void abort_gzip (void);
+_Noreturn extern void abort_gzip (void);
         /* in deflate.c */
 extern off_t deflate (int pack_level);
@@ -311,11 +310,11 @@ extern char *gzip_base_name (char *fname) 
 extern int xunlink        (char *fname);
 extern void make_simple_name (char *name);
 extern char *add_envopt   (int *argcp, char ***argvp, char const *env);
-extern noreturn void gzip_error    (char const *m);
-extern noreturn void xalloc_die    (void);
+_Noreturn extern void gzip_error (char const *m);
+_Noreturn extern void xalloc_die (void);
 extern void warning       (char const *m);
-extern noreturn void read_error    (void);
-extern noreturn void write_error   (void);
+_Noreturn extern void read_error (void);
+_Noreturn extern void write_error (void);
 extern void display_ratio (off_t num, off_t den, FILE *file);
 extern void fprint_off    (FILE *, off_t, int);
diff --git a/lib/.gitignore b/lib/.gitignore
index 474a6a9..dc16dfe 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -195,7 +195,6 @@
diff --git a/m4/.gitignore b/m4/.gitignore
index f8add13..48f5605 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -125,7 +125,6 @@

reply via email to

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