remove global_define.h and adjust platform header includes

- Remove unused MRMutex
- Remove unused generate_key
This commit is contained in:
brainiac
2025-12-18 00:40:06 -08:00
committed by Alex
parent b95016c92f
commit c191ec02d4
59 changed files with 37 additions and 330 deletions
-21
View File
@@ -1,6 +1,5 @@
#include "misc.h"
#include "common/global_define.h"
#include "common/strings.h"
#include "common/types.h"
@@ -12,9 +11,6 @@
#include <stdlib.h>
#include <string>
#include <time.h>
#ifndef WIN32
#include <sys/time.h>
#endif
std::map<int,std::string> DBFieldNames;
@@ -341,23 +337,6 @@ char *bptr;
return (bptr-buffer);
}
std::string generate_key(int length)
{
std::string key;
//TODO: write this for win32...
#ifndef WIN32
int i;
timeval now;
static const char *chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
for(i=0;i<length;i++) {
gettimeofday(&now,nullptr);
srand(now.tv_sec^now.tv_usec);
key+=(char)chars[(int) (36.0*rand()/(RAND_MAX+1.0))];
}
#endif
return key;
}
void print_hex(const char *data, unsigned long length) {
char buffer[80];
uint32 offset;