1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 # if __GNUC__ >= 3
18 @PRAGMA_SYSTEM_HEADER@
19 # endif
20 @PRAGMA_COLUMNS@
21
22 #ifndef _@GUARD_PREFIX@_SYS_RANDOM_H
23
24 #if @HAVE_SYS_RANDOM_H@
25
26
27
28
29 # ifndef __GLIBC__
30 # include <stddef.h>
31 # endif
32
33
34
35 # if defined __APPLE__ && defined __MACH__
36 # include <sys/types.h>
37 # include <stdlib.h>
38 # endif
39
40
41 # @INCLUDE_NEXT@ @NEXT_SYS_RANDOM_H@
42
43 #endif
44
45 #ifndef _@GUARD_PREFIX@_SYS_RANDOM_H
46 #define _@GUARD_PREFIX@_SYS_RANDOM_H
47
48 #include <sys/types.h>
49
50
51 #ifndef GRND_NONBLOCK
52 # define GRND_NONBLOCK 1
53 # define GRND_RANDOM 2
54 #endif
55
56
57
58
59
60
61
62
63
64
65
66 #if @GNULIB_GETRANDOM@
67
68 # if @REPLACE_GETRANDOM@
69 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
70 # undef getrandom
71 # define getrandom rpl_getrandom
72 # endif
73 _GL_FUNCDECL_RPL (getrandom, ssize_t,
74 (void *buffer, size_t length, unsigned int flags)
75 _GL_ARG_NONNULL ((1)));
76 _GL_CXXALIAS_RPL (getrandom, ssize_t,
77 (void *buffer, size_t length, unsigned int flags));
78 # else
79 # if !@HAVE_GETRANDOM@
80 _GL_FUNCDECL_SYS (getrandom, ssize_t,
81 (void *buffer, size_t length, unsigned int flags)
82 _GL_ARG_NONNULL ((1)));
83 # endif
84 _GL_CXXALIAS_SYS (getrandom, ssize_t,
85 (void *buffer, size_t length, unsigned int flags));
86 # endif
87 _GL_CXXALIASWARN (getrandom);
88 #elif defined GNULIB_POSIXCHECK
89 # undef getrandom
90 # if HAVE_RAW_DECL_GETRANDOM
91 _GL_WARN_ON_USE (getrandom, "getrandom is unportable - "
92 "use gnulib module getrandom for portability");
93 # endif
94 #endif
95
96
97 #endif
98 #endif