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 # if defined __UCLIBC__
28 # include <stddef.h>
29 # endif
30
31
32
33 # if defined __APPLE__ && defined __MACH__
34 # include <sys/types.h>
35 # include <stdlib.h>
36 # endif
37
38
39 # @INCLUDE_NEXT@ @NEXT_SYS_RANDOM_H@
40
41 #endif
42
43 #ifndef _@GUARD_PREFIX@_SYS_RANDOM_H
44 #define _@GUARD_PREFIX@_SYS_RANDOM_H
45
46 #include <sys/types.h>
47
48
49 #ifndef GRND_NONBLOCK
50 # define GRND_NONBLOCK 1
51 # define GRND_RANDOM 2
52 #endif
53
54
55
56
57
58
59
60
61
62
63
64 #if @GNULIB_GETRANDOM@
65
66 # if @REPLACE_GETRANDOM@
67 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
68 # undef getrandom
69 # define getrandom rpl_getrandom
70 # endif
71 _GL_FUNCDECL_RPL (getrandom, ssize_t,
72 (void *buffer, size_t length, unsigned int flags)
73 _GL_ARG_NONNULL ((1)));
74 _GL_CXXALIAS_RPL (getrandom, ssize_t,
75 (void *buffer, size_t length, unsigned int flags));
76 # else
77 # if !@HAVE_GETRANDOM@
78 _GL_FUNCDECL_SYS (getrandom, ssize_t,
79 (void *buffer, size_t length, unsigned int flags)
80 _GL_ARG_NONNULL ((1)));
81 # endif
82 _GL_CXXALIAS_SYS (getrandom, ssize_t,
83 (void *buffer, size_t length, unsigned int flags));
84 # endif
85 _GL_CXXALIASWARN (getrandom);
86 #elif defined GNULIB_POSIXCHECK
87 # undef getrandom
88 # if HAVE_RAW_DECL_GETRANDOM
89 _GL_WARN_ON_USE (getrandom, "getrandom is unportable - "
90 "use gnulib module getrandom for portability");
91 # endif
92 #endif
93
94
95 #endif
96 #endif