forked from OSchip/llvm-project
[libc++][NFC] Reformatting in random_device.h and random.cpp
This commit is contained in:
parent
9c49f8d705
commit
e03ce65190
|
@ -27,7 +27,7 @@ class _LIBCPP_TYPE_VIS random_device
|
||||||
{
|
{
|
||||||
#ifdef _LIBCPP_USING_DEV_RANDOM
|
#ifdef _LIBCPP_USING_DEV_RANDOM
|
||||||
int __f_;
|
int __f_;
|
||||||
#endif // defined(_LIBCPP_USING_DEV_RANDOM)
|
#endif
|
||||||
public:
|
public:
|
||||||
// types
|
// types
|
||||||
typedef unsigned result_type;
|
typedef unsigned result_type;
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
#include <__config>
|
#include <__config>
|
||||||
|
|
||||||
#if defined(_LIBCPP_USING_WIN32_RANDOM)
|
#if defined(_LIBCPP_USING_WIN32_RANDOM)
|
||||||
// Must be defined before including stdlib.h to enable rand_s().
|
// Must be defined before including stdlib.h to enable rand_s().
|
||||||
#define _CRT_RAND_S
|
# define _CRT_RAND_S
|
||||||
#endif // defined(_LIBCPP_USING_WIN32_RANDOM)
|
#endif // defined(_LIBCPP_USING_WIN32_RANDOM)
|
||||||
|
|
||||||
#include "limits"
|
#include "limits"
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
#include "system_error"
|
#include "system_error"
|
||||||
|
|
||||||
#if defined(__sun__)
|
#if defined(__sun__)
|
||||||
#define rename solaris_headers_are_broken
|
# define rename solaris_headers_are_broken
|
||||||
#endif // defined(__sun__)
|
#endif // defined(__sun__)
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -26,16 +26,16 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#if defined(_LIBCPP_USING_GETENTROPY)
|
#if defined(_LIBCPP_USING_GETENTROPY)
|
||||||
#include <sys/random.h>
|
# include <sys/random.h>
|
||||||
#elif defined(_LIBCPP_USING_DEV_RANDOM)
|
#elif defined(_LIBCPP_USING_DEV_RANDOM)
|
||||||
#include <fcntl.h>
|
# include <fcntl.h>
|
||||||
#include <unistd.h>
|
# include <unistd.h>
|
||||||
#if __has_include(<sys/ioctl.h>) && __has_include(<linux/random.h>)
|
# if __has_include(<sys/ioctl.h>) && __has_include(<linux/random.h>)
|
||||||
#include <sys/ioctl.h>
|
# include <sys/ioctl.h>
|
||||||
#include <linux/random.h>
|
# include <linux/random.h>
|
||||||
#endif
|
# endif
|
||||||
#elif defined(_LIBCPP_USING_NACL_RANDOM)
|
#elif defined(_LIBCPP_USING_NACL_RANDOM)
|
||||||
#include <nacl/nacl_random.h>
|
# include <nacl/nacl_random.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue