aboutsummaryrefslogtreecommitdiffstats
path: root/unwind_prot.h
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>2001-04-06 19:14:31 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:53 +0000
commit28ef6c316f1aff914bb95ac09787a3c83c1815fd (patch)
tree2812fe7ffc9beec4f99856906ddfcafda54cf16a /unwind_prot.h
parentbb70624e964126b7ac4ff085ba163a9c35ffa18f (diff)
downloadandroid_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.tar.gz
android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.tar.bz2
android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.zip
Imported from ../bash-2.05.tar.gz.
Diffstat (limited to 'unwind_prot.h')
-rw-r--r--unwind_prot.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/unwind_prot.h b/unwind_prot.h
index a321f0e..8814fde 100644
--- a/unwind_prot.h
+++ b/unwind_prot.h
@@ -29,6 +29,7 @@ extern void add_unwind_protect ();
extern void remove_unwind_protect ();
extern void run_unwind_protects ();
extern void unwind_protect_var ();
+extern void clear_unwind_protect_list ();
/* Try to force correct alignment on machines where pointers and ints
differ in size. */
@@ -55,7 +56,9 @@ typedef union {
/* How to protect a pointer to a string. */
#define unwind_protect_string(X) \
- unwind_protect_var ((int *)&(X), (X), sizeof (char *))
+ unwind_protect_var ((int *)&(X), \
+ ((sizeof (char *) == sizeof (int)) ? (char *) (X) : (char *) &(X)), \
+ sizeof (char *))
/* How to protect any old pointer. */
#define unwind_protect_pointer(X) unwind_protect_string (X)