pike.git / src / stuff.c

version» Context lines:

pike.git/src/stuff.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information.   */      #include "global.h"   #include "stuff.h"   #include "bitvector.h"   #include "pike_cpulib.h" + #include "pike_memory.h"      /* Used by is8bitalnum in pike_macros.h. */   PMOD_EXPORT const char Pike_is8bitalnum_vector[] =    "0000000000000000"    "0000000000000000"    "0000000000000000"    "1111111111000000"    "0111111111111111"    "1111111111100001"    "0111111111111111"
pike.git/src/stuff.c:130:    rnd_a = 0xf1ea5eed, rnd_b = rnd_c = rnd_d = seed;    for (i=0; i<20; ++i) {    (void)ranval();    }   }      PMOD_EXPORT void my_srand(INT32 seed)   {   #if HAS___BUILTIN_IA32_RDRAND32_STEP    unsigned int ignore, cpuid_ecx; +  +  /* NOTE: some versions of valgrind falsely advertise +  * RDRAND support in cpuid. +  */ + # if defined(USE_VALGRIND) +  if (!PIKE_MEM_CHECKER()) + # endif    if( !use_rdrnd )    {    INT32 cpuid[4];    x86_get_cpuid (1, cpuid);    if( cpuid[3] & bit_RDRND_2 )    use_rdrnd = 1;    }    /* We still do the initialization here, since rdrnd might stop    working if the hardware random unit in the CPU fails (according    to intel documentation).