diff options
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index 8e2c5c5..6f5264a 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -216,6 +216,19 @@ make_cleanup_bfd_close (bfd *abfd) } static void +do_close_cleanup (void *arg) +{ + close ((int) arg); +} + +struct cleanup * +make_cleanup_close (int fd) +{ + /* int into void*. Outch!! */ + return make_cleanup (do_close_cleanup, (void *) fd); +} + +static void do_ui_file_delete (void *arg) { ui_file_delete (arg); |