summaryrefslogtreecommitdiff
path: root/tests/xalloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/xalloc.h')
-rw-r--r--tests/xalloc.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/xalloc.h b/tests/xalloc.h
index 01a9eec8..75a5db30 100644
--- a/tests/xalloc.h
+++ b/tests/xalloc.h
@@ -1,6 +1,6 @@
/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,6 +18,13 @@
#ifndef XALLOC_H_
#define XALLOC_H_
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _Noreturn,
+ _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_MALLOC,
+ _GL_ATTRIBUTE_RETURNS_NONNULL. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stddef.h>
#include <stdlib.h>
@@ -25,9 +32,6 @@
# include "idx.h"
#endif
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef XALLOC_INLINE
# define XALLOC_INLINE _GL_INLINE
@@ -46,7 +50,7 @@ extern "C" {
or by using gnulib's xalloc-die module. This is the
function to call when one wants the program to die because of a
memory allocation failure. */
-/*extern*/ _Noreturn void xalloc_die (void);
+_Noreturn void xalloc_die (void);
#endif /* GNULIB_XALLOC_DIE */