diff options
author | Kevin Buettner <kevinb@redhat.com> | 2000-03-24 21:07:17 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2000-03-24 21:07:17 +0000 |
commit | ad02b8822de3039a55ead25d055ad7d0322b6cfb (patch) | |
tree | 11c1af627598150a39537ba71cf73f05a4a1c944 /gdb/lin-thread.c | |
parent | d0667a250e5db0345416111f63a557072d1c1ed3 (diff) | |
download | gdb-ad02b8822de3039a55ead25d055ad7d0322b6cfb.tar.gz |
Don't do compile time comparison of TARGET_PTR_BIT and TARGET_INT_BIT.
Diffstat (limited to 'gdb/lin-thread.c')
-rw-r--r-- | gdb/lin-thread.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gdb/lin-thread.c b/gdb/lin-thread.c index a4f388dedb4..de530f68882 100644 --- a/gdb/lin-thread.c +++ b/gdb/lin-thread.c @@ -658,21 +658,19 @@ init_thread_db_library () static struct cleanup * save_inferior_pid (void) { -#if TARGET_PTR_BIT > TARGET_INT_BIT - return make_cleanup (restore_inferior_pid, (void *) ((long) inferior_pid)); -#else - return make_cleanup (restore_inferior_pid, (void *) inferior_pid); -#endif + int *saved_pid_ptr; + + saved_pid_ptr = xmalloc (sizeof (int)); + *saved_pid_ptr = inferior_pid; + return make_cleanup (restore_inferior_pid, saved_pid_ptr); } static void -restore_inferior_pid (void *saved_pid) +restore_inferior_pid (void *arg) { -#if TARGET_PTR_BIT > TARGET_INT_BIT - inferior_pid = (int) ((long) saved_pid); -#else - inferior_pid = (int) saved_pid; -#endif + int *saved_pid_ptr = arg; + inferior_pid = *saved_pid_ptr; + free (arg); } /* |