svn commit: r185684 - head/usr.bin/cpio

Tim Kientzle kientzle at FreeBSD.org
Fri Dec 5 23:15:43 PST 2008


Author: kientzle
Date: Sat Dec  6 07:15:42 2008
New Revision: 185684
URL: http://svn.freebsd.org/changeset/base/185684

Log:
  Make the GCC-specific __dead2 markers conditional on whether
  we're compiling under GCC.

Modified:
  head/usr.bin/cpio/cpio.h
  head/usr.bin/cpio/cpio_platform.h

Modified: head/usr.bin/cpio/cpio.h
==============================================================================
--- head/usr.bin/cpio/cpio.h	Sat Dec  6 07:08:08 2008	(r185683)
+++ head/usr.bin/cpio/cpio.h	Sat Dec  6 07:15:42 2008	(r185684)
@@ -89,7 +89,7 @@ struct cpio {
 /* Name of this program; used in error reporting, initialized in main(). */
 const char *cpio_progname;
 
-void	cpio_errc(int _eval, int _code, const char *fmt, ...) __dead2;
+void	cpio_errc(int _eval, int _code, const char *fmt, ...) __LA_DEAD;
 void	cpio_warnc(int _code, const char *fmt, ...);
 
 int	owner_parse(const char *, int *, int *);

Modified: head/usr.bin/cpio/cpio_platform.h
==============================================================================
--- head/usr.bin/cpio/cpio_platform.h	Sat Dec  6 07:08:08 2008	(r185683)
+++ head/usr.bin/cpio/cpio_platform.h	Sat Dec  6 07:15:42 2008	(r185684)
@@ -81,4 +81,12 @@
 #endif
 #endif
 
+/* How to mark functions that don't return. */
+#if defined(__GNUC__) && (__GNUC__ > 2 || \
+                          (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
+#define __LA_DEAD       __attribute__((__noreturn__))
+#else
+#define __LA_DEAD
+#endif
+
 #endif /* !CPIO_PLATFORM_H_INCLUDED */


More information about the svn-src-all mailing list