summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-12-16 23:10:19 +0100
committerCorinna Vinschen <corinna@vinschen.de>2016-12-16 23:10:19 +0100
commit4e75d7f504b61ef031d14e4283fc5842cf126357 (patch)
treea138169ee4c393cb4255fcf8296e93f6c4e3dc15 /winsup/cygwin/include
parentf46f501471dc3505b0c920a61b14ec9551df40c7 (diff)
downloadcygnal-4e75d7f504b61ef031d14e4283fc5842cf126357.tar.gz
cygnal-4e75d7f504b61ef031d14e4283fc5842cf126357.tar.bz2
cygnal-4e75d7f504b61ef031d14e4283fc5842cf126357.zip
Export getentropy and getrandom calls
getentropy per OpenBSD http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2 getrandom per Linux http://man7.org/linux/man-pages/man2/getrandom.2.html Note that GRND_NONBLOCK is not handled
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r--winsup/cygwin/include/cygwin/version.h7
-rw-r--r--winsup/cygwin/include/sys/random.h29
2 files changed, 33 insertions, 3 deletions
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index 6ba602efb..0da3d370a 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -10,8 +10,8 @@ details. */
the Cygwin shared library". This version is used to track important
changes to the DLL and is mainly informative in nature. */
-#define CYGWIN_VERSION_DLL_MAJOR 2006
-#define CYGWIN_VERSION_DLL_MINOR 1
+#define CYGWIN_VERSION_DLL_MAJOR 2007
+#define CYGWIN_VERSION_DLL_MINOR 0
/* Major numbers before CYGWIN_VERSION_DLL_EPOCH are incompatible. */
@@ -470,12 +470,13 @@ details. */
303: Export pthread_getname_np, pthread_setname_np.
304: Export strerror_l, strptime_l, wcsftime_l.
305: [f]pathconf flag _PC_CASE_INSENSITIVE added.
+ 306: Export getentropy, getrandom.
Note that we forgot to bump the api for ualarm, strtoll, strtoull,
sigaltstack, sethostname. */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 305
+#define CYGWIN_VERSION_API_MINOR 306
/* There is also a compatibity version number associated with the shared memory
regions. It is incremented when incompatible changes are made to the shared
diff --git a/winsup/cygwin/include/sys/random.h b/winsup/cygwin/include/sys/random.h
new file mode 100644
index 000000000..5422718a5
--- /dev/null
+++ b/winsup/cygwin/include/sys/random.h
@@ -0,0 +1,29 @@
+/* sys/random.h header file for Cygwin.
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */
+
+#ifndef _SYS_RANDOM_H
+#define _SYS_RANDOM_H
+
+#include <_ansi.h>
+#include <sys/types.h>
+
+/* getrandom flags */
+#define GRND_NONBLOCK 1
+#define GRND_RANDOM 2
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ssize_t getrandom (void *__ptr, size_t __len, unsigned int __flags);
+int getentropy (void *__ptr, size_t __len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SYS_RANDOM_H */