You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

89 lines
2.4 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../motor/no-exceptions.patch
# Copyright (C) 2008 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2003 Clifford Wolf
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- ./src/Makefile.in.orig 2002-12-12 19:03:33.000000000 +0200
+++ ./src/Makefile.in 2002-12-15 11:58:56.000000000 +0200
@@ -101,7 +101,7 @@
CPPFLAGS = -DSHARE_DIR=\"$(pkgdatadir)\" -DLOCALE_DIR=\"$(datadir)/locale\"
bin_PROGRAMS = motor
-motor_SOURCES = main.cc motormisc.cc
+motor_SOURCES = main.cc motormisc.cc motorcommon.cc
EXTRA_DIST = motorcommon.h motormisc.h
@@ -122,7 +122,7 @@
DEFS = @DEFS@ -I. -I$(srcdir) -I..
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-motor_OBJECTS = main.o motormisc.o
+motor_OBJECTS = main.o motormisc.o motorcommon.o
motor_DEPENDENCIES = project/libproject.a debugger/libdebugger.a \
executor/libexecutor.a configuration/libconfiguration.a \
manager/libmanager.a ui/ncurses/libncursesui.a ui/libui.a \
--- ./src/motorcommon.cc.orig 2002-12-15 14:10:28.000000000 +0200
+++ ./src/motorcommon.cc 2002-12-15 11:58:56.000000000 +0200
@@ -0,0 +1,7 @@
+#include "motorcommon.h"
+
+#ifndef MOTOR_USE_EXCEPTIONS
+__MOTOR_BEGIN_NAMESPACE
+jmp_buf motor_jump;
+__MOTOR_END_NAMESPACE
+#endif
--- ./src/motorcommon.h.orig 2001-11-02 09:43:51.000000000 +0200
+++ ./src/motorcommon.h 2002-12-15 11:58:56.000000000 +0200
@@ -60,4 +60,38 @@
#endif
+#ifdef __STL_USE_EXCEPTIONS
+#define MOTOR_USE_EXCEPTIONS
+#endif
+
+#ifndef MOTOR_USE_EXCEPTIONS
+
+#ifdef __THROW
+#undef __THROW
+#define __THROW
+#endif
+
+#include <setjmp.h>
+
+__MOTOR_BEGIN_NAMESPACE
+extern jmp_buf motor_jump;
+__MOTOR_END_NAMESPACE
+
+#ifdef try
+#undef try
+#endif
+#define try if(!setjmp(motor_jump))
+
+#ifdef throw
+#undef throw
+#endif
+#define throw(val) longjmp(motor_jump, (val))
+
+#ifdef catch
+#undef catch
+#endif
+#define catch(val) else
+
+#endif
+
#endif