Hi

Starting from revisions 5097 (for 1.4) and 5096 (trunk) the OSX build failes for me. Seems like ::GetLastError() is undefined when using
wxMac 2.6.2. Any ideas?

---------------------- diff -------------------------------------------
Index: src/frm/frmQuery.cpp
===================================================================
--- src/frm/frmQuery.cpp        (revision 5095)
+++ src/frm/frmQuery.cpp        (revision 5096)
@@ -537,7 +537,10 @@
_("Log files (*.log)|*.log|All files (*.*)|*.*"), wxSAVE|wxOVERWRITE_PROMPT);
     if (dlg->ShowModal() == wxID_OK)
     {
-        FileWrite(dlg->GetPath(), msgHistory->GetValue(), false);
+        if (!FileWrite(dlg->GetPath(), msgHistory->GetValue(), false))
+        {
+ wxLogError(__("Could not write the file %s: Errcode=%d."), dlg->GetPath().c_str(), ::GetLastError());
+        }
     }
     delete dlg;

@@ -938,6 +941,10 @@
         setExtendedTitle();
         UpdateRecentFiles();
     }
+    else
+    {
+ wxLogError(__("Could not write the file %s: Errcode=%d."), lastPath.c_str(), ::GetLastError());
+    }
 }


@@ -978,6 +985,10 @@
             UpdateRecentFiles();
fileMenu->Enable(MNU_RECENT, (recentFileMenu->GetMenuItemCount() > 0));
         }
+        else
+        {
+ wxLogError(__("Could not write the file %s: Errcode=%d."), lastPath.c_str(), ::GetLastError());
+        }
     }
     delete dlg;
 }
--------------------------------------------------------

--------------------- Output -------------------------------------------
f g++ -DHAVE_CONFIG_H -I. -I. -I.. -Wall -Wno-non-virtual-dtor -I../src/include -I../src/agent/include -I../src/slony/include -I/Users/pgadmin3/Installs/PostgreSQL/8.1.3/include -DSSL -I/Users/pgadmin3/Installs/wxMac/2.6.2/lib/wx/include/mac-unicode-release-static-2.6 -I/Users/pgadmin3/Installs/wxMac/2.6.2/include/wx-2.6 -D__WXMAC__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -O2 -no-cpp-precomp -fno-rtti -I/Users/pgadmin3/Installs/libxml2/2.6.23/include/libxml2 -Wall -Wno-non-virtual-dtor -I../src/include -I../src/agent/include -I../src/slony/include -MT frmPgpassConfig.o -MD -MP -MF ".deps/frmPgpassConfig.Tpo" -c -o frmPgpassConfig.o `test -f './frm/frmPgpassConfig.cpp' || echo './'`./frm/frmPgpassConfig.cpp; \ then mv -f ".deps/frmPgpassConfig.Tpo" ".deps/frmPgpassConfig.Po"; else rm -f ".deps/frmPgpassConfig.Tpo"; exit 1; fi if g++ -DHAVE_CONFIG_H -I. -I. -I.. -Wall -Wno-non-virtual-dtor -I../src/include -I../src/agent/include -I../src/slony/include -I/Users/pgadmin3/Installs/PostgreSQL/8.1.3/include -DSSL -I/Users/pgadmin3/Installs/wxMac/2.6.2/lib/wx/include/mac-unicode-release-static-2.6 -I/Users/pgadmin3/Installs/wxMac/2.6.2/include/wx-2.6 -D__WXMAC__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -O2 -no-cpp-precomp -fno-rtti -I/Users/pgadmin3/Installs/libxml2/2.6.23/include/libxml2 -Wall -Wno-non-virtual-dtor -I../src/include -I../src/agent/include -I../src/slony/include -MT frmQuery.o -MD -MP -MF ".deps/frmQuery.Tpo" -c -o frmQuery.o `test -f './frm/frmQuery.cpp' || echo './'`./frm/frmQuery.cpp; \ then mv -f ".deps/frmQuery.Tpo" ".deps/frmQuery.Po"; else rm -f ".deps/frmQuery.Tpo"; exit 1; fi
frm/frmQuery.cpp: In member function `void
   frmQuery::OnSaveHistory(wxCommandEvent&)':
frm/frmQuery.cpp:542: error: `::GetLastError' undeclared (first use here)
make[2]: *** [frmQuery.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
-----------------------------------------------------------

greetings, Florian Pflug

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to