xstrtol: use stdnoreturn.h
[gnulib.git] / lib / xstrtol.h
index 716a94f..171c3ef 100644 (file)
@@ -21,6 +21,7 @@
 
 # include <getopt.h>
 # include <inttypes.h>
+# include <stdnoreturn.h>
 
 # ifndef _STRTOL_ERROR
 enum strtol_error
@@ -51,12 +52,6 @@ _DECLARE_XSTRTOL (xstrtoll, long long int)
 _DECLARE_XSTRTOL (xstrtoull, unsigned long long int)
 #endif
 
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
-# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-#else
-# define _GL_ATTRIBUTE_NORETURN /* empty */
-#endif
-
 /* Report an error for an invalid integer in an option argument.
 
    ERR is the error code returned by one of the xstrto* functions.
@@ -72,8 +67,8 @@ _DECLARE_XSTRTOL (xstrtoull, unsigned long long int)
 
    After reporting an error, exit with a failure status.  */
 
-void xstrtol_fatal (enum strtol_error,
-                    int, char, struct option const *,
-                    char const *) _GL_ATTRIBUTE_NORETURN;
+void noreturn xstrtol_fatal (enum strtol_error,
+                             int, char, struct option const *,
+                             char const *);
 
 #endif /* not XSTRTOL_H_ */