OpenSDE Packages Database (without history before r20070)
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.

88 lines
2.4 KiB

  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 - 2006 The T2 SDE Project
  6. # Copyright (C) 1998 - 2003 Clifford Wolf
  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 ---
  17. --- ./src/Makefile.in.orig 2002-12-12 19:03:33.000000000 +0200
  18. +++ ./src/Makefile.in 2002-12-15 11:58:56.000000000 +0200
  19. @@ -101,7 +101,7 @@
  20. CPPFLAGS = -DSHARE_DIR=\"$(pkgdatadir)\" -DLOCALE_DIR=\"$(datadir)/locale\"
  21. bin_PROGRAMS = motor
  22. -motor_SOURCES = main.cc motormisc.cc
  23. +motor_SOURCES = main.cc motormisc.cc motorcommon.cc
  24. EXTRA_DIST = motorcommon.h motormisc.h
  25. @@ -122,7 +122,7 @@
  26. DEFS = @DEFS@ -I. -I$(srcdir) -I..
  27. LDFLAGS = @LDFLAGS@
  28. LIBS = @LIBS@
  29. -motor_OBJECTS = main.o motormisc.o
  30. +motor_OBJECTS = main.o motormisc.o motorcommon.o
  31. motor_DEPENDENCIES = project/libproject.a debugger/libdebugger.a \
  32. executor/libexecutor.a configuration/libconfiguration.a \
  33. manager/libmanager.a ui/ncurses/libncursesui.a ui/libui.a \
  34. --- ./src/motorcommon.cc.orig 2002-12-15 14:10:28.000000000 +0200
  35. +++ ./src/motorcommon.cc 2002-12-15 11:58:56.000000000 +0200
  36. @@ -0,0 +1,7 @@
  37. +#include "motorcommon.h"
  38. +
  39. +#ifndef MOTOR_USE_EXCEPTIONS
  40. +__MOTOR_BEGIN_NAMESPACE
  41. +jmp_buf motor_jump;
  42. +__MOTOR_END_NAMESPACE
  43. +#endif
  44. --- ./src/motorcommon.h.orig 2001-11-02 09:43:51.000000000 +0200
  45. +++ ./src/motorcommon.h 2002-12-15 11:58:56.000000000 +0200
  46. @@ -60,4 +60,38 @@
  47. #endif
  48. +#ifdef __STL_USE_EXCEPTIONS
  49. +#define MOTOR_USE_EXCEPTIONS
  50. +#endif
  51. +
  52. +#ifndef MOTOR_USE_EXCEPTIONS
  53. +
  54. +#ifdef __THROW
  55. +#undef __THROW
  56. +#define __THROW
  57. +#endif
  58. +
  59. +#include <setjmp.h>
  60. +
  61. +__MOTOR_BEGIN_NAMESPACE
  62. +extern jmp_buf motor_jump;
  63. +__MOTOR_END_NAMESPACE
  64. +
  65. +#ifdef try
  66. +#undef try
  67. +#endif
  68. +#define try if(!setjmp(motor_jump))
  69. +
  70. +#ifdef throw
  71. +#undef throw
  72. +#endif
  73. +#define throw(val) longjmp(motor_jump, (val))
  74. +
  75. +#ifdef catch
  76. +#undef catch
  77. +#endif
  78. +#define catch(val) else
  79. +
  80. +#endif
  81. +
  82. #endif