42 lines
592 B
C++
42 lines
592 B
C++
//
|
|
// Created by 29019 on 2019/5/2.
|
|
//
|
|
|
|
#ifndef CUTILS_UTILS_H
|
|
#define CUTILS_UTILS_H
|
|
|
|
#include "utils.h"
|
|
#include <string>
|
|
#include "debug.h"
|
|
#include <sys/types.h>
|
|
|
|
using namespace std;
|
|
|
|
|
|
typedef enum {
|
|
ENV_WINDOWS = 1,
|
|
ENV_LINUX,
|
|
ENV_UNIX,
|
|
ENV_NONE,
|
|
}ENV_SYS;
|
|
|
|
typedef enum{
|
|
GCC = 1,
|
|
CLANG = 2,
|
|
CL = 3,
|
|
UNKNOWN
|
|
}ENV_COMPILER;
|
|
inline ENV_SYS CurrentEnvSys();
|
|
inline ENV_COMPILER CurrentEnvCompiler();
|
|
|
|
#define RELEASE_MEMORY(x) \
|
|
if(nullptr == x) \
|
|
{ \
|
|
delete(x); \
|
|
x = nullptr;\
|
|
}
|
|
string itos(int x);
|
|
|
|
|
|
#endif //CUTILS_UTILS_H
|