ports/databases/glom/files/patch-glom_main.cc
2009-01-19 10:34:16 +00:00

32 lines
748 B
C++

--- glom/main.cc.orig 2008-08-22 16:36:46.000000000 +0200
+++ glom/main.cc 2008-09-13 21:23:46.000000000 +0200
@@ -89,18 +89,19 @@
} //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)
@@ -108,6 +109,7 @@
std::cerr << "Failed to initialize WinSock: " << errcode << std::endl;
return -1;
}
+# endif
#endif
// TODO: I am not sure why, but this does not work. PYTHONPATH is set