Dash:
[t2.git] / package / develop / motor / no-exceptions.patch
blobd43bf7bf353eae08fbeadec264a8133c29003a25
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../motor/no-exceptions.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 #
8 # More information can be found in the files COPYING and README.
9 #
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
15 # version.
16 # --- T2-COPYRIGHT-NOTE-END ---
18 --- ./src/Makefile.in.orig 2002-12-12 19:03:33.000000000 +0200
19 +++ ./src/Makefile.in 2002-12-15 11:58:56.000000000 +0200
20 @@ -101,7 +101,7 @@
21 CPPFLAGS = -DSHARE_DIR=\"$(pkgdatadir)\" -DLOCALE_DIR=\"$(datadir)/locale\"
23 bin_PROGRAMS = motor
24 -motor_SOURCES = main.cc motormisc.cc
25 +motor_SOURCES = main.cc motormisc.cc motorcommon.cc
27 EXTRA_DIST = motorcommon.h motormisc.h
29 @@ -122,7 +122,7 @@
30 DEFS = @DEFS@ -I. -I$(srcdir) -I..
31 LDFLAGS = @LDFLAGS@
32 LIBS = @LIBS@
33 -motor_OBJECTS = main.o motormisc.o
34 +motor_OBJECTS = main.o motormisc.o motorcommon.o
35 motor_DEPENDENCIES = project/libproject.a debugger/libdebugger.a \
36 executor/libexecutor.a configuration/libconfiguration.a \
37 manager/libmanager.a ui/ncurses/libncursesui.a ui/libui.a \
38 --- ./src/motorcommon.cc.orig 2002-12-15 14:10:28.000000000 +0200
39 +++ ./src/motorcommon.cc 2002-12-15 11:58:56.000000000 +0200
40 @@ -0,0 +1,7 @@
41 +#include "motorcommon.h"
43 +#ifndef MOTOR_USE_EXCEPTIONS
44 +__MOTOR_BEGIN_NAMESPACE
45 +jmp_buf motor_jump;
46 +__MOTOR_END_NAMESPACE
47 +#endif
48 --- ./src/motorcommon.h.orig 2001-11-02 09:43:51.000000000 +0200
49 +++ ./src/motorcommon.h 2002-12-15 11:58:56.000000000 +0200
50 @@ -60,4 +60,38 @@
52 #endif
54 +#ifdef __STL_USE_EXCEPTIONS
55 +#define MOTOR_USE_EXCEPTIONS
56 +#endif
58 +#ifndef MOTOR_USE_EXCEPTIONS
60 +#ifdef __THROW
61 +#undef __THROW
62 +#define __THROW
63 +#endif
65 +#include <setjmp.h>
67 +__MOTOR_BEGIN_NAMESPACE
68 +extern jmp_buf motor_jump;
69 +__MOTOR_END_NAMESPACE
71 +#ifdef try
72 +#undef try
73 +#endif
74 +#define try if(!setjmp(motor_jump))
76 +#ifdef throw
77 +#undef throw
78 +#endif
79 +#define throw(val) longjmp(motor_jump, (val))
81 +#ifdef catch
82 +#undef catch
83 +#endif
84 +#define catch(val) else
86 +#endif
88 #endif