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.

89 lines
2.4 KiB

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