anisette is done, how to sign?
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
#include "c.h"
|
||||
#include "ld.h"
|
||||
#include "tier1/utlstring.h"
|
||||
#include "tier1/commandline.h"
|
||||
|
||||
CUtlVector<CUtlString> tier0_CompiledFiles = {
|
||||
"lib.cpp",
|
||||
"mem.cpp",
|
||||
"platform.cpp",
|
||||
"network.cpp",
|
||||
"commandline.cpp"
|
||||
"commandline.cpp",
|
||||
"rand.cpp",
|
||||
};
|
||||
|
||||
DECLARE_BUILD_STAGE(tier0)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "tier1/commandline.h"
|
||||
#include "tier0/commandline.h"
|
||||
#include "tier1/utlvector.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "tier0/network.h"
|
||||
#include "tier1/commandline.h"
|
||||
|
||||
void Net_Init()
|
||||
{
|
||||
|
||||
29
tier0/rand.cpp
Normal file
29
tier0/rand.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "tier0/rand.h"
|
||||
#include "tier0/lib.h"
|
||||
|
||||
static bool b_sIsRandInit = false;
|
||||
static FILE *s_pURandom = NULL;
|
||||
|
||||
PLATFORM_INTERFACE void Plat_InitRandom()
|
||||
{
|
||||
if (b_sIsRandInit)
|
||||
return;
|
||||
s_pURandom = V_fopen("/dev/urandom","rb");
|
||||
if (!s_pURandom)
|
||||
Plat_FatalErrorFunc("/dev/urandom wasn't found somehow\n");
|
||||
b_sIsRandInit = true;
|
||||
}
|
||||
|
||||
PLATFORM_INTERFACE void Plat_ShutdownRandom()
|
||||
{
|
||||
b_sIsRandInit = false;
|
||||
}
|
||||
|
||||
PLATFORM_INTERFACE void Plat_URandom( size_t uBufferSize, uint8_t *szBuffer )
|
||||
{
|
||||
if (!b_sIsRandInit)
|
||||
Plat_InitRandom();
|
||||
|
||||
V_fread(szBuffer, 1, uBufferSize, s_pURandom);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user