FreeBSD/src 215332f (r355759)include stdlib.h, sys/sys cdefs.h

cdefs: Add __deprecated(message) function attribute macro

The legacy version of GCC4 currently in base does not support the
parameterized form of this function attribute, as recent introduced in
stdlib.h (r355747).

As we have done for other function attributes with similar compatibility
problems, add a version-compatibile definition in sys/cdefs.h.  Note that
Clang defines itself to be GCC 4, so one must check for __clang__ in
addition to __GNUC__ version.  On legacy GCC 4, the macro expands to just
the __deprecated__ attribute; on modern GCC or Clang, the macro expands to
the parameterized variant with the message.

Ignoring legacy or unsupported compilers, the macro is also beneficial in
that it is a bit more ergonomic than the full
__attribute__((__deprecated__())) boilerplate.

Reported by:    CI (but not tinderbox); imp and others
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D22817
DeltaFile
+8-0sys/sys/cdefs.h
+1-1include/stdlib.h
+9-12 files

UnifiedSplitRaw