kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
9ba2b4502c
commit
b7503986ea
|
@ -28,6 +28,28 @@
|
|||
#include "password.h"
|
||||
#include "../src/misc.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
// gmtime_r can be defined by mingw
|
||||
#ifndef gmtime_r
|
||||
static struct tm *gmtime_r(const time_t *t, struct tm *r)
|
||||
{
|
||||
// gmtime is threadsafe in windows because it uses TLS
|
||||
struct tm *theTm = gmtime(t);
|
||||
|
||||
if (theTm)
|
||||
{
|
||||
*r = *theTm;
|
||||
return r;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif // gmtime_r
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
// using tv_usec with a sleep gives a fairly good random number
|
||||
static int my_rand(int max)
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue