ports/databases/glom/files/patch-glom_main.cc
Joe Marcus Clarke ae52bc8089 Presenting GNOME 2.26 for FreeBSD. See
http://library.gnome.org/misc/release-notes/2.26/ for a list of what's new.
On the FreeBSD front, we introduced a port of libxul 1.9 as an alternative
for Firefox 2.0 as a Gecko provider.  Almost all of the Gecko consumers
can make use of this provider by setting:

WITH_GECKO=libxul

The GNOME 2.26 port was done by ahze, kwm, marcus, and mezz with
contributions by Joseph S. Atkinson, Peter Wemm, Eric L. Chen,
Martin Matuska, Craig Butler, and Pawel Worach.
2009-04-10 05:56:28 +00:00

32 lines
890 B
C++

--- glom/main.cc.orig 2009-03-16 14:53:55.000000000 +0100
+++ glom/main.cc 2009-03-17 16:22:01.000000000 +0100
@@ -100,18 +100,19 @@ OptionGroup::OptionGroup()
} //namespace Glom
-#ifndef G_OS_WIN32
+#ifdef __linux
extern "C" void __libc_freeres(void);
#endif
int
main(int argc, char* argv[])
{
-#ifndef G_OS_WIN32
+#ifdef __linux
//Force some cleanup at exit,
//to help valgrind to detect memory leaks:
atexit(__libc_freeres);
#else
+# ifdef G_OS_WIN32
WSADATA data;
int errcode = WSAStartup(MAKEWORD(2, 0), &data);
if(errcode != 0)
@@ -123,6 +124,7 @@ main(int argc, char* argv[])
gchar* installation_dir_c = g_win32_get_package_installation_directory_of_module(NULL);
const std::string installation_dir(installation_dir_c);
g_free(installation_dir_c);
+# endif
#endif
// TODO: I am not sure why, but this does not work. PYTHONPATH is set