Hello,
I've done a package of pgadmin3 1.16.1 for Solaris 10, built using
Solaris Studio against wxWidget 2.8.12.
I had some issues because of the use of the _T() macro in several
places: that conflicts with another one on that platform.
After replacing it everywhere with wxT() (see patch below), it built fine.
Since that macro is being discouraged by the wxWidget project, I think
it should be the right way?
I hope that can help!
Thanks,
Laurent
--- a/pgadmin/ogl/basic.cpp Thu Aug 2 16:29:06 2012
+++ b/pgadmin/ogl/basic.cpp Wed Jun 19 17:56:00 2013
@@ -1631,7 +1631,7 @@
hex = wxString(_T("#")) + hex;
clause->AddAttributeValueString(_T("pen_colour"), hex);
}
- else if (penColour != _T("BLACK"))
+ else if (penColour != wxT("BLACK"))
clause->AddAttributeValueString(_T("pen_colour"), penColour);
}
@@ -1645,7 +1645,7 @@
hex = wxString(_T("#")) + hex;
clause->AddAttributeValueString(_T("brush_colour"), hex);
}
- else if (brushColour != _T("WHITE"))
+ else if (brushColour != wxT("WHITE"))
clause->AddAttributeValueString(_T("brush_colour"), brushColour);
if (m_brush->GetStyle() != wxSOLID)
@@ -1735,8 +1735,8 @@
while (node)
{
wxShapeRegion *region = (wxShapeRegion *)node->GetData();
- wxSprintf(regionNameBuf, _T("region%d"), regionNo);
- wxSprintf(textNameBuf, _T("text%d"), regionNo);
+ wxSprintf(regionNameBuf, wxT("region%d"), regionNo);
+ wxSprintf(textNameBuf, wxT("text%d"), regionNo);
// Original text and region attributes:
// region1 = (regionName regionText x y width height minWidth minHeight proportionX proportionY
@@ -1920,9 +1920,9 @@
clause->GetAttributeValue(_T("rotation"), m_rotation);
if (pen_string == wxEmptyString)
- pen_string = _T("BLACK");
+ pen_string = wxT("BLACK");
if (brush_string == wxEmptyString)
- brush_string = _T("WHITE");
+ brush_string = wxT("WHITE");
if (pen_string.GetChar(0) == '#')
{
@@ -1988,8 +1988,8 @@
wxExpr *regionExpr;
wxExpr *textExpr = NULL;
- wxSprintf(regionNameBuf, _T("region%d"), regionNo);
- wxSprintf(textNameBuf, _T("text%d"), regionNo);
+ wxSprintf(regionNameBuf, wxT("region%d"), regionNo);
+ wxSprintf(textNameBuf, wxT("text%d"), regionNo);
m_formatted = TRUE; // Assume text is formatted unless we prove otherwise
@@ -2066,7 +2066,7 @@
regionTextColour = colourExpr->StringValue();
}
else
- regionTextColour = _T("BLACK");
+ regionTextColour = wxT("BLACK");
if (penColourExpr)
penColour = penColourExpr->StringValue();
@@ -2147,8 +2147,8 @@
}
regionNo ++;
- wxSprintf(regionNameBuf, _T("region%d"), regionNo);
- wxSprintf(textNameBuf, _T("text%d"), regionNo);
+ wxSprintf(regionNameBuf, wxT("region%d"), regionNo);
+ wxSprintf(textNameBuf, wxT("text%d"), regionNo);
}
// Compatibility: check for no regions (old file).
--- a/pgadmin/ogl/composit.cpp Thu Aug 2 16:29:06 2012
+++ b/pgadmin/ogl/composit.cpp Wed Jun 19 17:56:08 2013
@@ -581,7 +581,7 @@
while (node)
{
wxOGLConstraint *constraint = (wxOGLConstraint *)node->GetData();
- wxSprintf(m_constraintNameBuf, _T("constraint%d"), constraintNo);
+ wxSprintf(m_constraintNameBuf, wxT("constraint%d"), constraintNo);
// Each constraint is stored in the form
// (type name id xspacing yspacing m_constrainingObjectId constrainedObjectIdList)
@@ -655,7 +655,7 @@
while (haveConstraints)
{
- wxSprintf(m_constraintNameBuf, _T("constraint%d"), constraintNo);
+ wxSprintf(m_constraintNameBuf, wxT("constraint%d"), constraintNo);
wxExpr *constraintExpr = NULL;
clause->GetAttributeValue(m_constraintNameBuf, &constraintExpr);
if (!constraintExpr)
--- a/pgadmin/dd/ddmodel/ddDBReverseEnginering.cpp Thu Aug 2 16:29:00 2012
+++ b/pgadmin/dd/ddDBReverseEnginering.cpp Wed Jun 19 20:37:26 2013
@@ -1535,7 +1535,7 @@
//
ddDBReverseEngineering::ddDBReverseEngineering(wxFrame *frame, ddDatabaseDesign *design, pgConn *connection, bool useSizer)
- : wxWizard(frame, wxID_ANY, _T("Import tables from schema wizard"),
+ : wxWizard(frame, wxID_ANY, wxT("Import tables from schema wizard"),
wxBitmap(*namespaces_png_bmp), wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{
@@ -1547,17 +1547,17 @@
initialPage = new wxWizardPageSimple(this);
frontText = new wxStaticText(initialPage, wxID_ANY,
- _T("Import database tables to model tables wizard.\n")
- _T("\n")
- _T("The next pages will allow you to import database tables inside a database model.")
- _T("\n\n")
- _T("\nSome restrictions apply:\n\n")
- _T("1. Columns that belong to more than one unique constraint aren't supported.\n\n")
- _T("2. Relationships are imported only if both tables (source and destination) are imported.\n\n")
- _T("3. User defined datatypes aren't supported.\n\n")
- _T("4. No indexes, views, sequences and others objects different from tables/relationships can be imported.\n\n")
- _T("5. Tables with same name cannot be imported.\n\n")
- _T("6. Inherited tables cannot be imported.\n\n")
+ wxT("Import database tables to model tables wizard.\n")
+ wxT("\n")
+ wxT("The next pages will allow you to import database tables inside a database model.")
+ wxT("\n\n")
+ wxT("\nSome restrictions apply:\n\n")
+ wxT("1. Columns that belong to more than one unique constraint aren't supported.\n\n")
+ wxT("2. Relationships are imported only if both tables (source and destination) are imported.\n\n")
+ wxT("3. User defined datatypes aren't supported.\n\n")
+ wxT("4. No indexes, views, sequences and others objects different from tables/relationships can be imported.\n\n")
+ wxT("5. Tables with same name cannot be imported.\n\n")
+ wxT("6. Inherited tables cannot be imported.\n\n")
, wxPoint(5, 5)
);
--- a/pgadmin/dd/ddmodel/ddGenerationWizard.cpp Thu Aug 2 16:29:00 2012
+++ b/pgadmin/dd/ddmodel/ddGenerationWizard.cpp Wed Jun 19 20:37:31 2013
@@ -52,7 +52,7 @@
END_EVENT_TABLE()
ddGenerationWizard::ddGenerationWizard(wxFrame *frame, ddDatabaseDesign *design, pgConn *connection, bool useSizer)
- : wxWizard(frame, wxID_ANY, _T("Generate DDL from model"),
+ : wxWizard(frame, wxID_ANY, wxT("Generate DDL from model"),
wxBitmap(*continue_png_bmp), wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{
@@ -63,16 +63,16 @@
initialPage = new wxWizardPageSimple(this);
frontText = new wxStaticText(initialPage, wxID_ANY,
- _T("Build DDL from model tables.\n")
- _T("\n")
- _T("The next pages will allow the built of DDL of the current database designer model.")
- _T("\n\n")
- _T("Restrictions apply when using experimental function ALTER TABLE instead of DROP/CREATE:\n\n")
- _T("1. Database connection is required to check differences with existing tables.\n\n")
- _T("2. Only changes done in the design will be applied to the db, not otherwise.\n\n")
- _T("3. Rename of columns or tables is not (yet) supported.\n\n")
- _T("4. Rename of constraints generate a drop and create, except for primary key constraints.\n\n")
- _T("5. All constraints should have a defined name.\n\n")
+ wxT("Build DDL from model tables.\n")
+ wxT("\n")
+ wxT("The next pages will allow the built of DDL of the current database designer model.")
+ wxT("\n\n")
+ wxT("Restrictions apply when using experimental function ALTER TABLE instead of DROP/CREATE:\n\n")
+ wxT("1. Database connection is required to check differences with existing tables.\n\n")
+ wxT("2. Only changes done in the design will be applied to the db, not otherwise.\n\n")
+ wxT("3. Rename of columns or tables is not (yet) supported.\n\n")
+ wxT("4. Rename of constraints generate a drop and create, except for primary key constraints.\n\n")
+ wxT("5. All constraints should have a defined name.\n\n")
, wxPoint(5, 5)
);
--- a/pgadmin/ogl/drawn.cpp Thu Aug 2 16:29:06 2012
+++ b/pgadmin/ogl/drawn.cpp Wed Jun 19 17:56:15 2013
@@ -1279,8 +1279,8 @@
#if 0
static char hexArray[] =
{
- _T('0'), _T('1'), _T('2'), _T('3'), _T('4'), _T('5'), _T('6'), _T('7'),
- _T('8'), _T('9'), _T('A'), _T('B'), _T('C'), _T('D'), _T('E'), _T('F')
+ wxT('0'), wxT('1'), wxT('2'), wxT('3'), wxT('4'), wxT('5'), wxT('6'), wxT('7'),
+ wxT('8'), wxT('9'), wxT('A'), wxT('B'), wxT('C'), wxT('D'), wxT('E'), wxT('F')
};
// Convert unsigned 16-bit integer to 4-character hex string
@@ -1305,37 +1305,37 @@
{
switch (hex)
{
- case _T('0'):
+ case wxT('0'):
return 0;
- case _T('1'):
+ case wxT('1'):
return 1;
- case _T('2'):
+ case wxT('2'):
return 2;
- case _T('3'):
+ case wxT('3'):
return 3;
- case _T('4'):
+ case wxT('4'):
return 4;
- case _T('5'):
+ case wxT('5'):
return 5;
- case _T('6'):
+ case wxT('6'):
return 6;
- case _T('7'):
+ case wxT('7'):
return 7;
- case _T('8'):
+ case wxT('8'):
return 8;
- case _T('9'):
+ case wxT('9'):
return 9;
- case _T('A'):
+ case wxT('A'):
return 10;
- case _T('B'):
+ case wxT('B'):
return 11;
- case _T('C'):
+ case wxT('C'):
return 12;
- case _T('D'):
+ case wxT('D'):
return 13;
- case _T('E'):
+ case wxT('E'):
return 14;
- case _T('F'):
+ case wxT('F'):
return 15;
#if 0
// handling this default outside switch removes warning under Borland
@@ -1482,7 +1482,7 @@
wxNode *node = m_gdiObjects.GetFirst();
while (node)
{
- wxSprintf(buf, _T("gdi%d_%d"), whichAngle, i);
+ wxSprintf(buf, wxT("gdi%d_%d"), whichAngle, i);
wxObject *obj = (wxObject *)node->GetData();
wxExpr *expr = NULL;
if (obj)
@@ -1540,7 +1540,7 @@
node = m_ops.GetFirst();
while (node)
{
- wxSprintf(buf, _T("op%d_%d"), whichAngle, i);
+ wxSprintf(buf, wxT("op%d_%d"), whichAngle, i);
wxDrawOp *op = (wxDrawOp *)node->GetData();
wxExpr *expr = op->WriteExpr(this);
if (expr)
@@ -1611,7 +1611,7 @@
bool keepGoing = TRUE;
while (keepGoing)
{
- wxSprintf(buf, _T("gdi%d_%d"), whichAngle, i);
+ wxSprintf(buf, wxT("gdi%d_%d"), whichAngle, i);
wxExpr *expr = NULL;
clause->GetAttributeValue(buf, &expr);
if (!expr)
@@ -1677,7 +1677,7 @@
i = 1;
while (keepGoing)
{
- wxSprintf(buf, _T("op%d_%d"), whichAngle, i);
+ wxSprintf(buf, wxT("op%d_%d"), whichAngle, i);
wxExpr *expr = NULL;
clause->GetAttributeValue(buf, &expr);
if (!expr)
--- a/pgadmin/ogl/ogldiag.cpp Thu Aug 2 16:29:06 2012
+++ b/pgadmin/ogl/ogldiag.cpp Wed Jun 19 17:56:19 2013
@@ -281,7 +281,7 @@
{
wxBeginBusyCursor();
- wxExprDatabase database(wxExprInteger, _T("id"));
+ wxExprDatabase database(wxExprInteger, wxT("id"));
if (!database.Read(filename))
{
wxEndBusyCursor();
--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support