]> git.notmuchmail.org Git - notmuch/blobdiff - compat/function-attributes.h
Use https instead of http where possible
[notmuch] / compat / function-attributes.h
index 18f90903905ef17ff8a97a30577b6f4aafd195c0..1945b5bf1bed7ea6f20c12398a7c82948b68fbdd 100644 (file)
@@ -14,7 +14,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see http://www.gnu.org/licenses/ .
+ * along with this program.  If not, see https://www.gnu.org/licenses/ .
  */
 
 #ifndef FUNCTION_ATTRIBUTES_H
 #define __has_attribute(x) 0
 #endif
 
+/* Provide a NORETURN_ATTRIBUTE macro similar to PRINTF_ATTRIBUTE from
+ * talloc.
+ *
+ * This attribute is understood by gcc since version 2.5. clang
+ * provides support for testing for function attributes.
+ */
+#ifndef NORETURN_ATTRIBUTE
+#if (__GNUC__ >= 3 ||                          \
+     (__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || \
+     __has_attribute (noreturn))
+#define NORETURN_ATTRIBUTE __attribute__ ((noreturn))
+#else
+#define NORETURN_ATTRIBUTE
+#endif
+#endif
+
 #endif