openbsd-ports/x11/explorer/patches/patch-main_expl_cpp

35 lines
773 B
Plaintext
Raw Normal View History

$OpenBSD: patch-main_expl_cpp,v 1.1 2004/01/01 16:23:56 espie Exp $
--- main_expl.cpp.orig 2004-01-01 17:15:17.000000000 +0100
+++ main_expl.cpp 2004-01-01 17:16:32.000000000 +0100
@@ -70,6 +70,10 @@ static const char rcs_id[] = "$Id: main_
#include <stdlib.h>
+#if defined(__GNUC__) && __GNUC__ >= 3
+#include <new>
+
+#else
#ifdef HAVE_NEW_H
#include <new.h>
#else
@@ -79,6 +83,7 @@ extern "C" new_handler set_new_handler (
}
#endif
+#endif
#include <qmsgbox.h>
@@ -102,7 +107,11 @@ int main(int argc, char **argv)
int c;
char *env=NULL, *bgname=NULL;
+#if defined(__GNUC__) && __GNUC__ >= 3
+ std::set_new_handler(&lowmem_handler);
+#else
set_new_handler(&lowmem_handler);
+#endif
while ((c = getopt(argc,argv,szOpts)) != EOF)
{