麒麟系统适配问题修改,主要针对WIN32定义
This commit is contained in:
parent
b4af03971b
commit
0c0d7a2b9b
|
|
@ -1,11 +1,14 @@
|
|||
#ifndef DRAWBASE_GLOBAL_H
|
||||
#ifndef DRAWBASE_GLOBAL_H
|
||||
#define DRAWBASE_GLOBAL_H
|
||||
|
||||
#ifdef WIN32
|
||||
# ifdef DRAWBASE_LIB_EXPORT
|
||||
# define DRAWBASE_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define DRAWBASE_EXPORT __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
#define DRAWBASE_EXPORT
|
||||
#endif
|
||||
|
||||
# ifdef DRAWBASE_LIB_EXPORT
|
||||
# define DRAWBASE_EXPORT __declspec(dllexport)
|
||||
# else
|
||||
# define DRAWBASE_EXPORT __declspec(dllimport)
|
||||
# endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ INCLUDEPATH += ../../common \
|
|||
../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include\
|
||||
../../Workflow/WFWidget/include
|
||||
|
||||
# HEADERS += ../include/*.h
|
||||
HEADERS += ../include/*.h
|
||||
|
||||
SOURCES += *.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ CString MemName(CString wellname,CString Curve)
|
|||
|
||||
wchar_t* AnsiToUnicode(const char* szStr)
|
||||
{
|
||||
#ifdef WIN32
|
||||
int nLen = MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, szStr, -1, NULL, 0 );
|
||||
if (nLen == 0)
|
||||
{
|
||||
|
|
@ -51,9 +52,14 @@ wchar_t* AnsiToUnicode(const char* szStr)
|
|||
wchar_t* pResult = new wchar_t[nLen];
|
||||
MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, szStr, -1, pResult, nLen );
|
||||
return pResult;
|
||||
#else
|
||||
wchar_t* pResult = new wchar_t[1];
|
||||
return pResult;
|
||||
#endif
|
||||
}
|
||||
int IsMappingMem(const char *MemName)
|
||||
{
|
||||
#ifdef WIN32
|
||||
QString slf1=MemName;
|
||||
slf1.replace("\\","/");
|
||||
slf1.replace(".","_");
|
||||
|
|
@ -65,9 +71,13 @@ int IsMappingMem(const char *MemName)
|
|||
// (GetLastError() == ERROR_ALREADY_EXISTS);
|
||||
CloseHandle(hMapFile);
|
||||
return fInit;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
bool MappingMem(HANDLE *hHandle,LPSTR *hMem,int len,const char* name)
|
||||
{
|
||||
#ifdef WIN32
|
||||
QString slf1=name;
|
||||
slf1.replace("\\","/");
|
||||
slf1.replace(".","_");
|
||||
|
|
@ -97,12 +107,19 @@ bool MappingMem(HANDLE *hHandle,LPSTR *hMem,int len,const char* name)
|
|||
0); // default: map entire file
|
||||
if (*hMem == NULL) return FALSE;
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
void CloseView(HANDLE hMapObject,LPVOID lpvMem)
|
||||
{
|
||||
#ifdef WIN32
|
||||
if(lpvMem)UnmapViewOfFile(lpvMem);
|
||||
if(hMapObject)CloseHandle(hMapObject);
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
time_t StringToTime(char * szTime)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/**
|
||||
* @file Turtle_globle.h
|
||||
* @brief
|
||||
*
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
namespace pai{
|
||||
namespace turtle {
|
||||
|
||||
#if defined(_WINDOWS)
|
||||
#if defined(WIN32)
|
||||
#define PAI_CURRENT_FUNCTION __FUNCSIG__
|
||||
#define __func__ __FUNCTION__
|
||||
#define VARIABLE_IS_NOT_USED __attribute__ ((unused))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifdef LLToString
|
||||
#ifdef LLToString
|
||||
#undef LLToString
|
||||
#endif
|
||||
#include <QCoreApplication>
|
||||
|
|
@ -30,6 +30,7 @@ using std::endl;
|
|||
#include <netinet/in.h>
|
||||
#include <net/if.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
using namespace pai::turtle;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ HEADERS += \
|
|||
./SysUtility/utils/include/PAIConst.h \
|
||||
./SysUtility/configuration/include/Configure.h
|
||||
|
||||
HEADERS += \
|
||||
./SysUtility/utils/include/*.h
|
||||
|
||||
SOURCES += \
|
||||
./Crystal/src/GlobalUtility.cpp \
|
||||
./Crystal/src/IExtension.cpp \
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "Gradient.h"
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "math.h"
|
||||
#include <math.h>
|
||||
//extern char *GetBinDir(char *str);
|
||||
|
||||
BYTE GetRValue(COLORREF colour)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,11 @@ typedef DWORD *LPCOLORREF;
|
|||
//#define GetRValue(rgb) (LOBYTE(rgb))
|
||||
//#define GetGValue(rgb) (LOBYTE(((WORD)(rgb)) >> 8))
|
||||
//#define GetBValue(rgb) (LOBYTE((rgb)>>16))
|
||||
|
||||
typedef COLORREF (__cdecl* InterpolateFn)(COLORREF first, COLORREF second, float position, float start, float end);
|
||||
#ifdef WIN32
|
||||
typedef COLORREF (__cdecl* InterpolateFn)(COLORREF first, COLORREF second, float position, float start, float end);
|
||||
#else
|
||||
typedef COLORREF (* InterpolateFn)(COLORREF first, COLORREF second, float position, float start, float end);
|
||||
#endif
|
||||
typedef struct CPeg {
|
||||
COLORREF colour;
|
||||
float position;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user