mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 06:05:49 -06:00
Support compile mingw32
This commit is contained in:
parent
cc47a8ef7b
commit
e65781aa65
32 changed files with 225 additions and 128 deletions
129
CMakeLists.txt
129
CMakeLists.txt
|
|
@ -1,24 +1,71 @@
|
|||
cmake_minimum_required(VERSION 3.0.0)
|
||||
cmake_minimum_required(VERSION 3.23.0)
|
||||
#set(CMAKE_CXX_SYSROOT_FLAG_CODE "list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS cc)")
|
||||
project(pgAdmin3 VERSION 1.26.0)
|
||||
include_directories(. include include/libssh2
|
||||
)
|
||||
if(UNIX)
|
||||
include_directories(. include)
|
||||
set(PRECOMP_FILE precomp.h)
|
||||
if(NOT CROSS_COMPILE)
|
||||
include_directories(include/libssh2)
|
||||
find_package(CURL)
|
||||
if(NOT CURL_FOUND)
|
||||
add_compile_definitions(NO_WXJSON_GIT)
|
||||
else()
|
||||
include_directories(${CURL_INCLUDE_DIR})
|
||||
link_libraries(${CURL_LIBRARIES})
|
||||
endif()
|
||||
find_package(LibXslt REQUIRED)
|
||||
if(NOT LIBXSLT_FOUND)
|
||||
message(SEND_ERROR "Failed to find LibXslt")
|
||||
return()
|
||||
else()
|
||||
include_directories(${LIBXSLT_INCLUDE_DIR})
|
||||
link_libraries(${LIBXSLT_LIBRARIES})
|
||||
message(STATUS "path libxslt = ${LIBXSLT_LIBRARIES}")
|
||||
endif()
|
||||
find_package(LibXml2 REQUIRED)
|
||||
if(NOT LIBXML2_FOUND)
|
||||
message(SEND_ERROR "Failed to find LibXml2")
|
||||
return()
|
||||
else()
|
||||
include_directories(${LIBXML2_INCLUDE_DIR})
|
||||
link_libraries(${LIBXML2_LIBRARIES})
|
||||
message(STATUS "path libxml = ${LIBXML2_LIBRARIES}")
|
||||
endif()
|
||||
find_package(wxWidgets 3.2 REQUIRED stc aui base net core xrc html xml)
|
||||
if(NOT wxWidgets_FOUND)
|
||||
message(SEND_ERROR "Failed to find wxWidgets ")
|
||||
return()
|
||||
else()
|
||||
include(${wxWidgets_USE_FILE})
|
||||
include_directories(${wxWidgets_INCLUDE_DIRS})
|
||||
link_libraries(${wxWidgets_LIBRARIES})
|
||||
message(STATUS "path wxwidgets = ${wxWidgets_LIBRARIES} inclure = ${wxWidgets_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
if(NOT PostgreSQL_FOUND)
|
||||
message(SEND_ERROR "Failed to find PostgreSql")
|
||||
return()
|
||||
else()
|
||||
include_directories(${PostgreSQL_INCLUDE_DIRS})
|
||||
include_directories(${PostgreSQL_INCLUDE_DIRS}/server)
|
||||
link_libraries(${PostgreSQL_LIBRARIES})
|
||||
message(STATUS "path postgresql= ${PostgreSQL_LIBRARIES}")
|
||||
endif()
|
||||
add_compile_definitions(WX_PRECOMP)
|
||||
else()
|
||||
#windows
|
||||
|
||||
endif()
|
||||
add_compile_definitions(WX_PRECOMP)
|
||||
|
||||
|
||||
add_compile_definitions(wxUSE_UNICODE)
|
||||
add_compile_definitions(EMBED_XRC)
|
||||
add_compile_options(-Wno-narrowing
|
||||
)
|
||||
|
||||
#set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
add_compile_options(-Wno-narrowing)
|
||||
list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS c)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
file(GLOB_RECURSE SOURCES
|
||||
agent/*.c*
|
||||
ctl/*.c*
|
||||
|
|
@ -30,46 +77,38 @@ file(GLOB_RECURSE SOURCES
|
|||
)
|
||||
|
||||
##########################################################
|
||||
find_package(LibXslt REQUIRED)
|
||||
if(NOT LIBXSLT_FOUND)
|
||||
message(SEND_ERROR "Failed to find LibXslt")
|
||||
return()
|
||||
else()
|
||||
include_directories(${LIBXSLT_INCLUDE_DIR})
|
||||
link_libraries(${LIBXSLT_LIBRARIES})
|
||||
endif()
|
||||
find_package(LibXml2 REQUIRED)
|
||||
if(NOT LIBXML2_FOUND)
|
||||
message(SEND_ERROR "Failed to find LibXml2")
|
||||
return()
|
||||
else()
|
||||
include_directories(${LIBXML2_INCLUDE_DIR})
|
||||
link_libraries(${LIBXML2_LIBRARIES})
|
||||
endif()
|
||||
find_package(wxWidgets 3.2 REQUIRED stc aui base net core xrc html xml)
|
||||
if(NOT wxWidgets_FOUND)
|
||||
message(SEND_ERROR "Failed to find wxWidgets ")
|
||||
return()
|
||||
else()
|
||||
include(${wxWidgets_USE_FILE})
|
||||
include_directories(${wxWidgets_INCLUDE_DIRS})
|
||||
link_libraries(${wxWidgets_LIBRARIES})
|
||||
|
||||
add_executable(${PROJECT_NAME} )
|
||||
target_sources(${PROJECT_NAME} PUBLIC pgAdmin3.cpp ${SOURCES})
|
||||
if(CROSS_COMPILE STREQUAL "Windows")
|
||||
ENABLE_LANGUAGE(RC)
|
||||
set(CMAKE_RC_COMPILER_INIT windres)
|
||||
set(RC_FILE pgAdmin3.rc)
|
||||
SET(CMAKE_RC_COMPILE_OBJECT
|
||||
"<CMAKE_RC_COMPILER> <FLAGS> -v -O coff -I ${WXWIN}/include <DEFINES> -i <SOURCE> -o <OBJECT>")
|
||||
target_sources(${PROJECT_NAME} PRIVATE ${RC_FILE})
|
||||
message(STATUS "Use RC file ${RC_FILE}")
|
||||
endif()
|
||||
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
if(NOT PostgreSQL_FOUND)
|
||||
message(SEND_ERROR "Failed to find PostgreSql")
|
||||
return()
|
||||
else()
|
||||
include_directories(${PostgreSQL_INCLUDE_DIRS})
|
||||
include_directories(${PostgreSQL_INCLUDE_DIRS}/server)
|
||||
link_libraries(${PostgreSQL_LIBRARIES})
|
||||
if (PRECOMP_FILE)
|
||||
target_precompile_headers(${PROJECT_NAME} PUBLIC include/${PRECOMP_FILE})
|
||||
message(STATUS "Precompile header include/${PRECOMP_FILE}")
|
||||
endif()
|
||||
if(CROSS_COMPILE STREQUAL "Windows")
|
||||
#add_compile_definitions(_CRT_SECURE_NO_DEPRECATE=1 NDEBUG WIN32 _WINDOWS __WINDOWS__ __WIN95__ __WIN32__ WINVER=0x0500 STRICT __WXMSW__ WXUSINGDLL wxUSE_UNICODE=1 PG_SSL)
|
||||
add_compile_definitions(NDEBUG WIN32 WXPRECOMP WINVER=0x0600 STRICT wxUSE_UNICODE=1 PG_SSL)
|
||||
set(WXWIN /home/sergey/k/wxMSW-3.2.2 )
|
||||
set(PGDIR /home/sergey/k/pg10 )
|
||||
set(PGBUILD /home/sergey/k )
|
||||
#set(/home/sergey/k/openssl )
|
||||
#set(PROJECTDIR /home/sergey/k/openssl )
|
||||
include_directories(${WXWIN}/include ${PGDIR}/include ${PGDIR}/include/server )
|
||||
include_directories(${PGBUILD}/libxml2/include ${PGBUILD}/libxslt/include ${PGBUILD}/iconv/include )
|
||||
# include_directories(${PGBUILD}/openssl/include
|
||||
# include_directories( ./include/libssh2 ./include/libssh2/Win32 )
|
||||
endif()
|
||||
|
||||
|
||||
add_executable(pgAdmin3 pgAdmin3.cpp ${SOURCES})
|
||||
target_precompile_headers(pgAdmin3 PUBLIC include/precomp.h)
|
||||
|
||||
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
|
||||
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,12 @@ It can be taken from the Postgresql 15 sources and put in include/parser/
|
|||
There may be problems compiling the JSON parser.
|
||||
It can be eliminated (as well as the experimental part with Git) by defining NO_WXJSON_GIT as done above through CXXFLAGS.
|
||||
|
||||
Compile minGW
|
||||
-------
|
||||
rm -fR CMakeFiles CMakeCache.txt Makefile cmake_install.cmake
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../mingw-windows-x64.cmake ..
|
||||
cmake --build . --config Release --target all -j 3 --
|
||||
|
||||
|
||||
OS for assembly used "Alt Workstation" 10
|
||||
https://www.basealt.ru/alt-workstation/download#c1211
|
||||
|
|
|
|||
|
|
@ -178,8 +178,8 @@ int dlgJob::Go(bool modal)
|
|||
{
|
||||
pgaStep *step = (pgaStep *)data;
|
||||
int pos = lstSteps->AppendItem(stepFactory.GetIconId(), step->GetName(), step->GetComment());
|
||||
lstSteps->SetItem(pos, 3, NumToStr((long)step));
|
||||
previousSteps.Add(NumToStr((long)step));
|
||||
lstSteps->SetItem(pos, 3, NumToStr((long long)step));
|
||||
previousSteps.Add(NumToStr((long long)step));
|
||||
}
|
||||
item = mainForm->GetBrowser()->GetNextChild(stepsItem, cookie);
|
||||
}
|
||||
|
|
@ -201,8 +201,8 @@ int dlgJob::Go(bool modal)
|
|||
{
|
||||
pgaSchedule *schedule = (pgaSchedule *)data;
|
||||
int pos = lstSchedules->AppendItem(scheduleFactory.GetIconId(), schedule->GetName(), schedule->GetComment());
|
||||
lstSchedules->SetItem(pos, 3, NumToStr((long)schedule));
|
||||
previousSchedules.Add(NumToStr((long)schedule));
|
||||
lstSchedules->SetItem(pos, 3, NumToStr((long long)schedule));
|
||||
previousSchedules.Add(NumToStr((long long)schedule));
|
||||
}
|
||||
item = mainForm->GetBrowser()->GetNextChild(schedulesItem, cookie);
|
||||
}
|
||||
|
|
@ -278,12 +278,12 @@ void dlgJob::OnChangeStep(wxCommandEvent &ev)
|
|||
if (lstSteps->GetText(pos, 3).IsEmpty())
|
||||
{
|
||||
wxString *stepSql = new wxString(step.GetInsertSql());
|
||||
lstSteps->SetItemData(pos, (long)stepSql);
|
||||
lstSteps->SetItemData(pos, (long long)stepSql);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxString *stepSql = new wxString(step.GetUpdateSql());
|
||||
lstSteps->SetItemData(pos, (long)stepSql);
|
||||
lstSteps->SetItemData(pos, (long long)stepSql);
|
||||
}
|
||||
|
||||
CheckChange();
|
||||
|
|
@ -307,7 +307,7 @@ void dlgJob::OnAddStep(wxCommandEvent &ev)
|
|||
{
|
||||
int pos = lstSteps->AppendItem(stepFactory.GetIconId(), step.GetName(), step.GetComment());
|
||||
wxString *stepSql = new wxString(step.GetInsertSql());
|
||||
lstSteps->SetItemData(pos, (long)stepSql);
|
||||
lstSteps->SetItemData(pos, (long long)stepSql);
|
||||
CheckChange();
|
||||
}
|
||||
}
|
||||
|
|
@ -349,12 +349,12 @@ void dlgJob::OnChangeSchedule(wxCommandEvent &ev)
|
|||
if (lstSchedules->GetText(pos, 3).IsEmpty())
|
||||
{
|
||||
wxString *scheduleSql = new wxString(schedule.GetInsertSql());
|
||||
lstSchedules->SetItemData(pos, (long)scheduleSql);
|
||||
lstSchedules->SetItemData(pos, (long long)scheduleSql);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxString *scheduleSql = new wxString(schedule.GetUpdateSql());
|
||||
lstSchedules->SetItemData(pos, (long)scheduleSql);
|
||||
lstSchedules->SetItemData(pos, (long long)scheduleSql);
|
||||
}
|
||||
|
||||
CheckChange();
|
||||
|
|
@ -371,7 +371,7 @@ void dlgJob::OnAddSchedule(wxCommandEvent &ev)
|
|||
{
|
||||
int pos = lstSchedules->AppendItem(scheduleFactory.GetIconId(), schedule.GetName(), schedule.GetComment());
|
||||
wxString *scheduleSql = new wxString(schedule.GetInsertSql());
|
||||
lstSchedules->SetItemData(pos, (long)scheduleSql);
|
||||
lstSchedules->SetItemData(pos, (long long)scheduleSql);
|
||||
CheckChange();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,14 +98,14 @@ long ctlComboBoxFix::GetLongKey(int sel)
|
|||
{
|
||||
if (sel < 0)
|
||||
sel = GetSelection();
|
||||
return (long)wxItemContainer::GetClientData(sel);
|
||||
return (long)wxPtrToUInt(wxItemContainer::GetClientData(sel));
|
||||
}
|
||||
|
||||
OID ctlComboBoxFix::GetOIDKey(int sel)
|
||||
{
|
||||
if (sel < 0)
|
||||
sel = GetSelection();
|
||||
return (OID)wxItemContainer::GetClientData(sel);
|
||||
return (OID)wxPtrToUInt(wxItemContainer::GetClientData(sel));
|
||||
}
|
||||
|
||||
wxString ctlComboBoxFix::GetStringKey(int sel)
|
||||
|
|
|
|||
|
|
@ -1573,7 +1573,7 @@ void ctlSQLBox::SetCaretWidthForKeyboardLayout() {
|
|||
int newwidth = currentwidth;
|
||||
#ifdef __WXMSW__
|
||||
HKL la = GetKeyboardLayout(0);
|
||||
if (((int)la & 0xFFFF) == 0x409) {
|
||||
if (((long long)la & 0xFFFF) == 0x409) {
|
||||
//en
|
||||
newwidth = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ int dlgTable::Go(bool modal)
|
|||
column->GetName(), column->GetDefinition());
|
||||
previousColumns.Add(column->GetQuotedIdentifier()
|
||||
+ wxT(" ") + column->GetDefinition());
|
||||
lstColumns->SetItem(pos, COL_PGCOLUMN, NumToStr((long)column));
|
||||
lstColumns->SetItem(pos, COL_PGCOLUMN, NumToStr((long long)column));
|
||||
if (inherited)
|
||||
lstColumns->SetItem(pos, COL_INHERIT, column->GetInheritedTableName());
|
||||
}
|
||||
|
|
@ -1859,8 +1859,8 @@ void dlgTable::OnChangeOfType(wxCommandEvent &ev)
|
|||
void dlgTable::OnChangeCol(wxCommandEvent &ev)
|
||||
{
|
||||
long pos = lstColumns->GetSelection();
|
||||
pgColumn *column = (pgColumn *) StrToLong(lstColumns->GetText(pos, COL_PGCOLUMN));
|
||||
pgColumn *column2 = (pgColumn *) StrToLong(lstColumns->GetText(pos, COL_CHANGEDCOL));
|
||||
pgColumn *column = (pgColumn *) StrTolonglong(lstColumns->GetText(pos, COL_PGCOLUMN));
|
||||
pgColumn *column2 = (pgColumn *) StrTolonglong(lstColumns->GetText(pos, COL_CHANGEDCOL));
|
||||
|
||||
dlgColumn col(&columnFactory, mainForm, column, table);
|
||||
col.CenterOnParent();
|
||||
|
|
@ -1877,7 +1877,7 @@ void dlgTable::OnChangeCol(wxCommandEvent &ev)
|
|||
lstColumns->SetItem(pos, COL_SQLCHANGE, col.GetSql());
|
||||
lstColumns->SetItem(pos, COL_STATISTICS, col.GetStatistics());
|
||||
lstColumns->SetItem(pos, COL_COMMENTS, col.GetComment());
|
||||
lstColumns->SetItem(pos, COL_CHANGEDCOL, NumToStr((long)column2));
|
||||
lstColumns->SetItem(pos, COL_CHANGEDCOL, NumToStr((long long)column2));
|
||||
}
|
||||
CheckChange();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ public:
|
|||
}
|
||||
if (k.size() > 0) {
|
||||
key3 kk = k.at(r);
|
||||
if ((col == 0)) {
|
||||
if (col == 0) {
|
||||
long ttmp = kk.pid;
|
||||
if (kk.sum > 0) val = wxString::Format("*%ld", ttmp); // backend
|
||||
else
|
||||
|
|
@ -283,7 +283,13 @@ public:
|
|||
{
|
||||
return false;
|
||||
}
|
||||
unsigned GetRow(const wxDataViewItem& item) const wxOVERRIDE { return (unsigned long)item.GetID() - 1; } // 0 row = header
|
||||
unsigned int GetRow(const wxDataViewItem& item) const wxOVERRIDE {
|
||||
unsigned int i;
|
||||
// wxUIntToPtr()
|
||||
i=wxPtrToUInt(item.GetID());
|
||||
i=i-1;
|
||||
return i;
|
||||
} // 0 row = header
|
||||
unsigned int GetColumnCount() const wxOVERRIDE { return 0; }
|
||||
wxString GetColumnType(unsigned int) const wxOVERRIDE { return ""; }
|
||||
|
||||
|
|
@ -449,7 +455,7 @@ public:
|
|||
Bind(wxEVT_DATAVIEW_ITEM_ACTIVATED, [&](wxDataViewEvent& event) {
|
||||
int col = event.GetColumn();
|
||||
wxDataViewItem item(event.GetItem());
|
||||
long row = (long)item.GetID();
|
||||
long row = wxPtrToUInt(item.GetID());
|
||||
row--;
|
||||
if (col == 1) //qid
|
||||
{
|
||||
|
|
@ -544,7 +550,7 @@ public:
|
|||
|
||||
MyIndexListModel* m = static_cast<MyIndexListModel*>(GetModel());
|
||||
wxDataViewItem item(GetCurrentItem());
|
||||
long row = (long)item.GetID();
|
||||
long row = wxPtrToUInt(item.GetID());
|
||||
if (!(row < m->GetCount())) row = 0;
|
||||
|
||||
while (row != -1 && row < m->GetCount()) {
|
||||
|
|
@ -599,7 +605,7 @@ public:
|
|||
HitTest(mc, item, column);
|
||||
if (item != NULL && column != NULL)
|
||||
{
|
||||
int row = (long)item.GetID() - 1;
|
||||
int row = wxPtrToUInt(item.GetID()) - 1;
|
||||
int ncol = column->GetModelColumn();
|
||||
if (row >= 0) {
|
||||
if (column && column->GetModelColumn() == 2) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
// wxAUI
|
||||
#include <wx/aui/aui.h>
|
||||
|
||||
#include "schema/pgServer.h"
|
||||
#include "dlg/dlgClasses.h"
|
||||
#include "utils/factory.h"
|
||||
#include "ctl/ctlAuiNotebook.h"
|
||||
|
|
@ -90,7 +91,7 @@ class MywxAuiDefaultTabArt : public wxAuiDefaultTabArt
|
|||
{
|
||||
public:
|
||||
MywxAuiDefaultTabArt() :wxAuiDefaultTabArt(){};
|
||||
MywxAuiDefaultTabArt* Clone() {
|
||||
MywxAuiDefaultTabArt* Clone() wxOVERRIDE {
|
||||
return new MywxAuiDefaultTabArt(*this);
|
||||
}
|
||||
virtual void DrawTab(wxDC& dc,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include "frm/frmLog.h"
|
||||
#include "ctl/ctlGitPanel.h"
|
||||
#include "ctl/ctlShortCut.h"
|
||||
#include "utils/FunctionPGHelper.h";
|
||||
#include "utils/FunctionPGHelper.h"
|
||||
//
|
||||
// This number MUST be incremented if changing any of the default perspectives
|
||||
//
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
|
||||
#ifndef PGADMIN3_H
|
||||
#define PGADMIN3_H
|
||||
#include "../utils/diff_match_patch.h"
|
||||
#include "utils/FormatterSQL.h"
|
||||
|
||||
// wxWindows headers
|
||||
#include <wx/wx.h>
|
||||
|
|
@ -20,6 +18,8 @@
|
|||
#include <wx/colordlg.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include "../utils/diff_match_patch.h"
|
||||
#include "utils/FormatterSQL.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
||||
|
|
@ -167,8 +167,8 @@ WX_DECLARE_STRING_HASH_MAP(wxString, cacheMap);
|
|||
class pgAdmin3 : public wxApp
|
||||
{
|
||||
public:
|
||||
virtual bool OnInit();
|
||||
virtual int OnExit();
|
||||
virtual bool OnInit() wxOVERRIDE;
|
||||
virtual int OnExit() wxOVERRIDE;
|
||||
virtual void OnFatalException() wxOVERRIDE;
|
||||
#ifdef __WXMAC__
|
||||
void MacOpenFile(const wxString &fileName);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#ifdef WX_PRECOMP
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <wx/wxprec.h>
|
||||
#include "copyright.h"
|
||||
#include "pgAdmin3.h"
|
||||
#include "version.h"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#define PGPROJOB_H
|
||||
|
||||
#include "schema/pgServer.h"
|
||||
|
||||
#include "schema/pgDatabase.h"
|
||||
|
||||
class pgproJobFactory : public pgDatabaseObjFactory
|
||||
{
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ bool StrToBool(const wxString &value); // english
|
|||
long StrToLong(const wxString &value);
|
||||
double StrToDouble(const wxString &value);
|
||||
wxLongLong StrToLongLong(const wxString &value);
|
||||
long long StrTolonglong(const wxString &value);
|
||||
wxDateTime StrToDateTime(const wxString &value);
|
||||
OID StrToOid(const wxString &value);
|
||||
|
||||
|
|
@ -115,6 +116,7 @@ wxString generate_spaces(int length);
|
|||
// nls aware
|
||||
wxString BoolToYesNo(bool value);
|
||||
wxString NumToStr(long value);
|
||||
wxString NumToStr(long long value);
|
||||
wxString NumToStr(double value);
|
||||
wxString NumToStrHuman(wxLongLong value);
|
||||
wxString NumToStr(OID value);
|
||||
|
|
|
|||
26
mingw-windows-x64.cmake
Normal file
26
mingw-windows-x64.cmake
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# 1. Set the target system
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CROSS_COMPILE Windows)
|
||||
#set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
SET(CMAKE_FIND_ROOT_PATH /home/sergey/mingw/llvm-mingw-20231128-msvcrt-ubuntu-20.04-x86_64 )
|
||||
# 2. Specify the cross-compilers
|
||||
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
|
||||
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
|
||||
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
|
||||
set(CMAKE_RANLIB x86_64-w64-mingw32-ranlib)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-ignored-attributes ")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ")
|
||||
# 3. Configure search for external dependencies
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(WXWIN_LIB /home/sergey/wxWidgets-3.2.2.1/msw-build/lib )
|
||||
set(WXWIN /home/sergey/k/wxMSW-3.2.2 )
|
||||
set(PGDIR /home/sergey/k/pg10 )
|
||||
set(PGBUILD /home/sergey/k )
|
||||
set(wxWidgets_LIBRARIES "-L${WXWIN_LIB} -lwx_mswu_xrc-3.2-x86_64-w64-mingw32.dll -lwx_mswu_qa-3.2-x86_64-w64-mingw32.dll -lwx_baseu_net-3.2-x86_64-w64-mingw32.dll -lwx_mswu_html-3.2-x86_64-w64-mingw32.dll -lwx_mswu_core-3.2-x86_64-w64-mingw32.dll -lwx_baseu_xml-3.2-x86_64-w64-mingw32.dll -lwx_baseu-3.2-x86_64-w64-mingw32.dll -lwx_mswu_aui-3.2-x86_64-w64-mingw32.dll -lwx_baseu_xml-3.2-x86_64-w64-mingw32.dll -lwx_mswu_stc-3.2-x86_64-w64-mingw32.dll")
|
||||
set(PGLIB "-L${PGDIR}/lib -lpq -lxml2")
|
||||
set(XSLTLIB "-L${PGBUILD}/libxslt/lib -lxslt")
|
||||
set(OTHERLIB " -lws2_32")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "-static-libgcc -static-libstdc++ -Wl,--subsystem,windows -mwindows ${wxWidgets_LIBRARIES} ${PGLIB} ${XSLTLIB} ${OTHERLIB}")
|
||||
|
|
@ -537,7 +537,7 @@ bool wxXMetaFile::ReadFile(const wxChar *file)
|
|||
else style = wxPENSTYLE_SOLID;
|
||||
|
||||
wxColour colour(GetRValue(colorref), GetGValue(colorref), GetBValue(colorref));
|
||||
rec->param1 = (long)wxThePenList->FindOrCreatePen(colour, x, style);
|
||||
rec->param1 = (long long)wxThePenList->FindOrCreatePen(colour, x, style);
|
||||
metaRecords.Append(rec);
|
||||
gdiObjects.Append(rec);
|
||||
|
||||
|
|
@ -618,11 +618,11 @@ bool wxXMetaFile::ReadFile(const wxChar *file)
|
|||
wxFont *theFont =
|
||||
wxTheFontList->FindOrCreateFont(pointSize, family, style, weight, (lfUnderline != 0));
|
||||
|
||||
rec->param1 = (long) theFont;
|
||||
rec->param1 = (long long) theFont;
|
||||
metaRecords.Append(rec);
|
||||
gdiObjects.Append(rec);
|
||||
AddMetaRecordHandle(rec);
|
||||
rec->param2 = (long)(gdiObjects.GetCount() - 1);
|
||||
rec->param2 = (long long)(gdiObjects.GetCount() - 1);
|
||||
break;
|
||||
}
|
||||
case META_CREATEBRUSHINDIRECT:
|
||||
|
|
@ -675,7 +675,7 @@ bool wxXMetaFile::ReadFile(const wxChar *file)
|
|||
else style = wxPENSTYLE_SOLID;
|
||||
|
||||
wxColour colour(GetRValue(colorref), GetGValue(colorref), GetBValue(colorref));
|
||||
rec->param1 = (long)wxTheBrushList->FindOrCreateBrush(colour, style);
|
||||
rec->param1 = (long long)wxTheBrushList->FindOrCreateBrush(colour, style);
|
||||
metaRecords.Append(rec);
|
||||
gdiObjects.Append(rec);
|
||||
AddMetaRecordHandle(rec);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <wx/stdpaths.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/sysopt.h>
|
||||
#include "wx/stackwalk.h"
|
||||
#include <wx/stackwalk.h>
|
||||
|
||||
// wxOGL
|
||||
#include <ogl/ogl.h>
|
||||
|
|
@ -202,7 +202,7 @@ void frmDlgTest::OnSelect(wxCommandEvent &ev)
|
|||
dlg->Show();
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_STACKWALKER
|
||||
class MyStackWalker : public wxStackWalker
|
||||
{
|
||||
public:
|
||||
|
|
@ -262,15 +262,19 @@ void MyStackWalker::OnStackFrame(const wxStackFrame& frame)
|
|||
Rez->Append(wxString::Format("----------------\n"));
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
// The Application!
|
||||
void pgAdmin3::OnFatalException() {
|
||||
#if wxUSE_STACKWALKER
|
||||
|
||||
wxString err = "fatal error";
|
||||
MyStackWalker sw(err);
|
||||
sw.WalkFromException();
|
||||
wxLogError(err);
|
||||
wxMessageBox(err,
|
||||
"wxExcept", wxOK | wxICON_ERROR);
|
||||
#endif
|
||||
}
|
||||
bool pgAdmin3::OnInit()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -831,9 +831,9 @@ static int yy_flex_strlen (yyconst char * );
|
|||
*/
|
||||
YY_DECL
|
||||
{
|
||||
register yy_state_type yy_current_state;
|
||||
register char *yy_cp, *yy_bp;
|
||||
register int yy_act;
|
||||
yy_state_type yy_current_state;
|
||||
char *yy_cp, *yy_bp;
|
||||
int yy_act;
|
||||
|
||||
#line 74 "pgscript/pgsScanner.ll"
|
||||
|
||||
|
|
@ -888,7 +888,7 @@ YY_DECL
|
|||
yy_match:
|
||||
do
|
||||
{
|
||||
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
|
||||
YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
|
||||
if ( yy_accept[yy_current_state] )
|
||||
{
|
||||
(yy_last_accepting_state) = yy_current_state;
|
||||
|
|
@ -1989,9 +1989,9 @@ void yyFlexLexer::LexerOutput( const char* buf, int size )
|
|||
*/
|
||||
int yyFlexLexer::yy_get_next_buffer()
|
||||
{
|
||||
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
|
||||
register char *source = (yytext_ptr);
|
||||
register int number_to_move, i;
|
||||
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
|
||||
char *source = (yytext_ptr);
|
||||
int number_to_move, i;
|
||||
int ret_val;
|
||||
|
||||
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
|
||||
|
|
@ -2115,14 +2115,14 @@ int yyFlexLexer::yy_get_next_buffer()
|
|||
|
||||
yy_state_type yyFlexLexer::yy_get_previous_state()
|
||||
{
|
||||
register yy_state_type yy_current_state;
|
||||
register char *yy_cp;
|
||||
yy_state_type yy_current_state;
|
||||
char *yy_cp;
|
||||
|
||||
yy_current_state = (yy_start);
|
||||
|
||||
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
|
||||
{
|
||||
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
||||
YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
||||
if ( yy_accept[yy_current_state] )
|
||||
{
|
||||
(yy_last_accepting_state) = yy_current_state;
|
||||
|
|
@ -2147,10 +2147,10 @@ int yyFlexLexer::yy_get_next_buffer()
|
|||
*/
|
||||
yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
|
||||
{
|
||||
register int yy_is_jam;
|
||||
register char *yy_cp = (yy_c_buf_p);
|
||||
int yy_is_jam;
|
||||
char *yy_cp = (yy_c_buf_p);
|
||||
|
||||
register YY_CHAR yy_c = 1;
|
||||
YY_CHAR yy_c = 1;
|
||||
if ( yy_accept[yy_current_state] )
|
||||
{
|
||||
(yy_last_accepting_state) = yy_current_state;
|
||||
|
|
@ -2168,9 +2168,9 @@ int yyFlexLexer::yy_get_next_buffer()
|
|||
return yy_is_jam ? 0 : yy_current_state;
|
||||
}
|
||||
|
||||
void yyFlexLexer::yyunput( int c, register char* yy_bp)
|
||||
void yyFlexLexer::yyunput( int c, char* yy_bp)
|
||||
{
|
||||
register char *yy_cp;
|
||||
char *yy_cp;
|
||||
|
||||
yy_cp = (yy_c_buf_p);
|
||||
|
||||
|
|
@ -2180,10 +2180,10 @@ int yyFlexLexer::yy_get_next_buffer()
|
|||
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
||||
{ /* need to shift things up to make room */
|
||||
/* +2 for EOB chars. */
|
||||
register int number_to_move = (yy_n_chars) + 2;
|
||||
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
|
||||
int number_to_move = (yy_n_chars) + 2;
|
||||
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
|
||||
register char *source =
|
||||
char *source =
|
||||
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
|
||||
|
||||
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
||||
|
|
@ -2604,7 +2604,7 @@ void yyFlexLexer::LexerError( yyconst char msg[] )
|
|||
#ifndef yytext_ptr
|
||||
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
|
||||
{
|
||||
register int i;
|
||||
int i;
|
||||
for ( i = 0; i < n; ++i )
|
||||
s1[i] = s2[i];
|
||||
}
|
||||
|
|
@ -2613,7 +2613,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
|
|||
#ifdef YY_NEED_STRLEN
|
||||
static int yy_flex_strlen (yyconst char * s )
|
||||
{
|
||||
register int n;
|
||||
int n;
|
||||
for ( n = 0; s[n]; ++n )
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ char *M_lowercase(char *s)
|
|||
*/
|
||||
int M_strposition(char *s1, char *s2)
|
||||
{
|
||||
register char ch1, ch2;
|
||||
char ch1, ch2;
|
||||
char *p0, *p1, *p2;
|
||||
int ct;
|
||||
|
||||
|
|
|
|||
|
|
@ -891,7 +891,7 @@ void dlgRepCluster::OnOK(wxCommandEvent &ev)
|
|||
done = remoteConn->ExecuteVoid(
|
||||
wxT("SELECT ") + schemaPrefix + wxT("storepath(") +
|
||||
txtNodeID->GetValue() + wxT(", ") +
|
||||
NumToStr((long)cbAdminNode->wxItemContainer::GetClientData(cbAdminNode->GetCurrentSelection())) + wxT(", ") +
|
||||
NumToStr((long long)cbAdminNode->wxItemContainer::GetClientData(cbAdminNode->GetCurrentSelection())) + wxT(", ") +
|
||||
qtDbString(wxT("host=") + database->GetServer()->GetName() +
|
||||
wxT(" port=") + NumToStr((long)database->GetServer()->GetPort()) +
|
||||
wxT(" dbname=") + database->GetName()) + wxT(", ")
|
||||
|
|
@ -930,7 +930,7 @@ void dlgRepCluster::CheckChange()
|
|||
if (cluster)
|
||||
{
|
||||
int sel = cbAdminNode->GetCurrentSelection();
|
||||
bool changed = (sel >= 0 && (long)cbAdminNode->wxEvtHandler::GetClientData() != cluster->GetAdminNodeID());
|
||||
bool changed = (sel >= 0 && (long long)cbAdminNode->wxEvtHandler::GetClientData() != cluster->GetAdminNodeID());
|
||||
|
||||
EnableOK(changed || txtComment->GetValue() != cluster->GetComment());
|
||||
}
|
||||
|
|
@ -1039,7 +1039,7 @@ wxString dlgRepCluster::GetSql()
|
|||
int sel = cbAdminNode->GetCurrentSelection();
|
||||
if (sel >= 0)
|
||||
{
|
||||
long id = (long)cbAdminNode->wxItemContainer::GetClientData(sel);
|
||||
long id = (long long)cbAdminNode->wxItemContainer::GetClientData(sel);
|
||||
if (id != cluster->GetAdminNodeID())
|
||||
settings->WriteLong(wxT("Replication/") + cluster->GetName() + wxT("/AdminNode"), id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,9 +108,9 @@ int dlgRepListen::Go(bool modal)
|
|||
pgObject *dlgRepListen::CreateObject(pgCollection *collection)
|
||||
{
|
||||
pgObject *obj = listenFactory.CreateObjects(collection, 0,
|
||||
wxT(" WHERE li_origin = ") + NumToStr((OID)cbOrigin->wxItemContainer::GetClientData(cbOrigin->GetCurrentSelection())) +
|
||||
wxT(" WHERE li_origin = ") + NumToStr((long long)cbOrigin->wxItemContainer::GetClientData(cbOrigin->GetCurrentSelection())) +
|
||||
wxT(" AND li_receiver = ") + NumToStr(node->GetSlId()) +
|
||||
wxT(" AND li_provider = ") + NumToStr((OID)cbProvider->wxItemContainer::GetClientData(cbProvider->GetCurrentSelection()))
|
||||
wxT(" AND li_provider = ") + NumToStr((long long)cbProvider->wxItemContainer::GetClientData(cbProvider->GetCurrentSelection()))
|
||||
);
|
||||
|
||||
return obj;
|
||||
|
|
@ -150,8 +150,8 @@ wxString dlgRepListen::GetSql()
|
|||
// create mode
|
||||
|
||||
sql = wxT("SELECT ") + cluster->GetSchemaPrefix() + wxT("storelisten(")
|
||||
+ NumToStr((OID)cbOrigin->wxItemContainer::GetClientData(cbOrigin->GetCurrentSelection())) + wxT(", ")
|
||||
+ NumToStr((OID)cbProvider->wxItemContainer::GetClientData(cbProvider->GetCurrentSelection())) + wxT(", ")
|
||||
+ NumToStr((long long)cbOrigin->wxItemContainer::GetClientData(cbOrigin->GetCurrentSelection())) + wxT(", ")
|
||||
+ NumToStr((long long)cbProvider->wxItemContainer::GetClientData(cbProvider->GetCurrentSelection())) + wxT(", ")
|
||||
+ NumToStr(node->GetSlId()) + wxT(");");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ int dlgRepPath::Go(bool modal)
|
|||
pgObject *dlgRepPath::CreateObject(pgCollection *collection)
|
||||
{
|
||||
pgObject *obj = pathFactory.CreateObjects(collection, 0,
|
||||
wxT(" WHERE pa_server = ") + NumToStr((OID)cbServer->wxItemContainer::GetClientData(cbServer->GetCurrentSelection())) +
|
||||
wxT(" WHERE pa_server = ") + NumToStr((long long)cbServer->wxItemContainer::GetClientData(cbServer->GetCurrentSelection())) +
|
||||
wxT(" AND pa_client = ") + NumToStr(node->GetSlId()));
|
||||
|
||||
return obj;
|
||||
|
|
@ -145,7 +145,7 @@ wxString dlgRepPath::GetSql()
|
|||
if (sel >= 0)
|
||||
{
|
||||
sql = wxT("SELECT ") + cluster->GetSchemaPrefix() + wxT("storepath(")
|
||||
+ NumToStr((OID)cbServer->wxItemContainer::GetClientData(sel)) + wxT(", ")
|
||||
+ NumToStr((long long)cbServer->wxItemContainer::GetClientData(sel)) + wxT(", ")
|
||||
+ NumToStr(node->GetSlId()) + wxT(", ")
|
||||
+ qtDbString(txtConnInfo->GetValue()) + wxT(", ")
|
||||
+ NumToStr(StrToLong(txtConnRetry->GetValue())) + wxT(");");
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ int dlgRepSequence::Go(bool modal)
|
|||
pgObject *dlgRepSequence::CreateObject(pgCollection *collection)
|
||||
{
|
||||
pgObject *obj = slSequenceFactory.CreateObjects(collection, 0,
|
||||
wxT(" WHERE seq_reloid = ") + NumToStr((OID)cbSequence->wxItemContainer::GetClientData(cbSequence->GetGuessedSelection())));
|
||||
wxT(" WHERE seq_reloid = ") + NumToStr((long long)cbSequence->wxItemContainer::GetClientData(cbSequence->GetGuessedSelection())));
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ wxString dlgRepSetMerge::GetSql()
|
|||
{
|
||||
wxString sql;
|
||||
wxString addId = NumToStr(set->GetSlId());
|
||||
wxString toId = NumToStr((long)cbTargetID->wxItemContainer::GetClientData(cbTargetID->GetCurrentSelection()));
|
||||
wxString toId = NumToStr((long long)cbTargetID->wxItemContainer::GetClientData(cbTargetID->GetCurrentSelection()));
|
||||
wxString prefix = cluster->GetSchemaPrefix();
|
||||
|
||||
if (set->GetSubscriptionCount() > 0)
|
||||
|
|
@ -323,7 +323,7 @@ void dlgRepSetMove::CheckChange()
|
|||
|
||||
wxString dlgRepSetMove::GetSql()
|
||||
{
|
||||
wxString toId = NumToStr((long)cbTargetNode->wxItemContainer::GetClientData(cbTargetNode->GetCurrentSelection()));
|
||||
wxString toId = NumToStr((long long)cbTargetNode->wxItemContainer::GetClientData(cbTargetNode->GetCurrentSelection()));
|
||||
|
||||
wxString sql =
|
||||
wxT("SELECT ") + cluster->GetSchemaPrefix() + wxT("moveset(") +
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ void dlgRepSubscription::CheckChange()
|
|||
int sel = cbProvider->GetCurrentSelection();
|
||||
|
||||
EnableOK(sel >= 0 && (chkForward->GetValue() != subscription->GetForward()
|
||||
|| (long)cbProvider->wxItemContainer::GetClientData(sel) != subscription->GetProviderId()));
|
||||
|| (long long)cbProvider->wxItemContainer::GetClientData(sel) != subscription->GetProviderId()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -159,11 +159,11 @@ wxString dlgRepSubscription::GetSql()
|
|||
{
|
||||
// Actually, provider and receiver are exchanged here.
|
||||
sql += NumToStr(cluster->GetLocalNodeID()) + wxT(", ")
|
||||
+ NumToStr((long)cbProvider->wxItemContainer::GetClientData(cbProvider->GetCurrentSelection()));
|
||||
+ NumToStr((long long)cbProvider->wxItemContainer::GetClientData(cbProvider->GetCurrentSelection()));
|
||||
}
|
||||
else
|
||||
{
|
||||
sql += NumToStr((long)cbProvider->wxItemContainer::GetClientData(cbProvider->GetCurrentSelection())) + wxT(", ")
|
||||
sql += NumToStr((long long)cbProvider->wxItemContainer::GetClientData(cbProvider->GetCurrentSelection())) + wxT(", ")
|
||||
+ NumToStr(cluster->GetLocalNodeID());
|
||||
}
|
||||
sql += wxT(", ")
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ int dlgRepTable::Go(bool modal)
|
|||
pgObject *dlgRepTable::CreateObject(pgCollection *collection)
|
||||
{
|
||||
pgObject *obj = slTableFactory.CreateObjects(collection, 0,
|
||||
wxT(" WHERE tab_reloid = ") + NumToStr((OID)cbTable->wxItemContainer::GetClientData(cbTable->GetGuessedSelection())));
|
||||
wxT(" WHERE tab_reloid = ") + NumToStr((long long)cbTable->wxItemContainer::GetClientData(cbTable->GetGuessedSelection())));
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ void dlgRepTable::OnChangeTable(wxCommandEvent &ev)
|
|||
|
||||
if (sel >= 0)
|
||||
{
|
||||
OID relid = (OID)cbTable->wxItemContainer::GetClientData(sel);
|
||||
OID relid = (long long)cbTable->wxItemContainer::GetClientData(sel);
|
||||
|
||||
pgSet *idx = connection->ExecuteSet(
|
||||
wxT("SELECT relname\n")
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,7 @@ wxPoint FormatterSQL::align_level(int start_i, int level, int Xpos, int Ypos, in
|
|||
if ((vi->txt.Lower() == "dblink")) {
|
||||
// neededNewLine.y = -1;
|
||||
}
|
||||
if ((s == 2511)) {
|
||||
if (s == 2511) {
|
||||
p.x = p.x;
|
||||
}
|
||||
if (fl & newLineComma) {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "wx/stdpaths.h"
|
||||
#include "utils/utffile.h"
|
||||
#include "utils/json/jsonval.h"
|
||||
#include "frm/frmStatus.h"
|
||||
|
||||
void WaitSample::Init() {
|
||||
wxString clr = "h1 { \
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#endif
|
||||
|
||||
#include "pgAdmin3.h"
|
||||
|
||||
#include "utils/json/jsonreader.h"
|
||||
|
||||
#include <wx/mstream.h>
|
||||
#include <wx/sstream.h>
|
||||
|
|
@ -1847,13 +1847,13 @@ wxJSONReader::ConvertCharByChar(wxString& s, const wxMemoryBuffer& utf8Buffer)
|
|||
@param val the JSON value that will hold the memory buffer value
|
||||
@return the last char read or -1 in case of EOF
|
||||
*/
|
||||
|
||||
/*
|
||||
union byte
|
||||
{
|
||||
unsigned char c[2];
|
||||
short int b;
|
||||
};
|
||||
|
||||
*/
|
||||
int
|
||||
wxJSONReader::ReadMemoryBuff(wxInputStream& is, wxJSONValue& val)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
|
||||
#include "pgAdmin3.h"
|
||||
#include "utils/json/jsonwriter.h"
|
||||
|
||||
#include <wx/sstream.h>
|
||||
#include <wx/mstream.h>
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ void MyDataViewCtrl::OnEVT_DATAVIEW_CONTEXT_MENU(wxCommandEvent& event) {
|
|||
wxString label = mi->GetLabelText(id);
|
||||
StorageModel* m = dynamic_cast<StorageModel*>(GetModel());
|
||||
#ifdef WIN32
|
||||
int col = (int)mi->GetClientData();
|
||||
int col = (long long)mi->GetClientData();
|
||||
#else
|
||||
long nc=(long)mi->GetClientData();
|
||||
int col= nc & 0xFFFF;
|
||||
|
|
|
|||
|
|
@ -128,6 +128,12 @@ wxString NumToStr(long value)
|
|||
result.Printf(wxT("%ld"), value);
|
||||
return result;
|
||||
}
|
||||
wxString NumToStr(long long value)
|
||||
{
|
||||
wxString result;
|
||||
result.Printf(wxT("%lld"), value);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
wxString NumToStr(OID value)
|
||||
|
|
@ -142,6 +148,10 @@ long StrToLong(const wxString &value)
|
|||
{
|
||||
return atol(value.ToAscii());
|
||||
}
|
||||
long long StrTolonglong(const wxString &value)
|
||||
{
|
||||
return atoll(value.ToAscii());
|
||||
}
|
||||
|
||||
|
||||
OID StrToOid(const wxString &value)
|
||||
|
|
@ -1206,11 +1216,13 @@ int ExecProcess(const wxString &command, wxArrayString &result)
|
|||
#ifdef WIN32
|
||||
#if (_MSC_VER < 1300)
|
||||
/* _ftol2 is more than VC7. */
|
||||
/*
|
||||
extern "C" long _ftol( double );
|
||||
extern "C" long _ftol2( double dblSource )
|
||||
{
|
||||
return _ftol( dblSource );
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -12,16 +12,15 @@
|
|||
// App headers
|
||||
#include "pgAdmin3.h"
|
||||
#include <wx/dynlib.h>
|
||||
#if defined(HAVE_OPENSSL_CRYPTO) || defined(HAVE_GCRYPT)
|
||||
|
||||
#pragma comment (lib, "Ws2_32.lib")
|
||||
#undef ssize_t
|
||||
#define ssize_t long
|
||||
#include "libssh2.h"
|
||||
#include "utils/sshTunnel.h"
|
||||
#include "frm/frmMain.h"
|
||||
|
||||
#pragma comment (lib, "Ws2_32.lib")
|
||||
#if defined(HAVE_OPENSSL_CRYPTO) || defined(HAVE_GCRYPT)
|
||||
|
||||
typedef const char *(*inet_ntop_t) (int af, const void *src, char *dst, socklen_t size);
|
||||
|
||||
#ifdef WIN32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue