1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #ifndef _@GUARD_PREFIX@_MALLOC_H
18
19 #if __GNUC__ >= 3
20 @PRAGMA_SYSTEM_HEADER@
21 #endif
22 @PRAGMA_COLUMNS@
23
24
25 #if @HAVE_MALLOC_H@
26 # @INCLUDE_NEXT@ @NEXT_MALLOC_H@
27 #endif
28
29 #ifndef _@GUARD_PREFIX@_MALLOC_H
30 #define _@GUARD_PREFIX@_MALLOC_H
31
32
33
34 #include <stdlib.h>
35
36
37
38
39
40
41
42
43 #if @GNULIB_MEMALIGN@
44 # if @REPLACE_MEMALIGN@
45 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
46 # undef memalign
47 # define memalign rpl_memalign
48 # endif
49 _GL_FUNCDECL_RPL (memalign, void *,
50 (size_t alignment, size_t size)
51 _GL_ATTRIBUTE_DEALLOC_FREE);
52 _GL_CXXALIAS_RPL (memalign, void *, (size_t alignment, size_t size));
53 # else
54 # if @HAVE_MEMALIGN@
55 # if __GNUC__ >= 11
56
57 _GL_FUNCDECL_SYS (memalign, void *,
58 (size_t alignment, size_t size)
59 _GL_ATTRIBUTE_DEALLOC_FREE);
60 # endif
61 _GL_CXXALIAS_SYS (memalign, void *, (size_t alignment, size_t size));
62 # endif
63 # endif
64 # if @HAVE_MEMALIGN@
65 _GL_CXXALIASWARN (memalign);
66 # endif
67 #else
68 # if __GNUC__ >= 11 && !defined memalign
69
70 _GL_FUNCDECL_SYS (memalign, void *,
71 (size_t alignment, size_t size)
72 _GL_ATTRIBUTE_DEALLOC_FREE);
73 # endif
74 # if defined GNULIB_POSIXCHECK
75 # undef memalign
76 # if HAVE_RAW_DECL_MEMALIGN
77 _GL_WARN_ON_USE (memalign, "memalign is not portable - "
78 "use gnulib module memalign for portability");
79 # endif
80 # endif
81 #endif
82
83
84 #endif
85 #endif