Move make_cleanup_close to common code
authorGary Benson <gbenson@redhat.com>
Wed, 10 Jun 2015 13:28:43 +0000 (14:28 +0100)
committerGary Benson <gbenson@redhat.com>
Wed, 10 Jun 2015 13:28:43 +0000 (14:28 +0100)
commitca09583623ab77362186a9fd1ae260c38dcab470
tree17f292e5f5d0ff93490f5b5ebbd2da663520d672
parent5d9c55d355c8e5c688caa3fe43c0d95d538daf35
Move make_cleanup_close to common code

This commit moves the function make_cleanup_close from gdb/utils.[ch]
to gdb/common/filestuff.[ch] to make it usable from common code.

gdb/ChangeLog:

* utils.h (make_cleanup_close): Moved to common/filestuff.h.
* utils.c (do_close_cleanup): Moved to common/filestuff.c.
(make_cleanup_close): Likewise.
* common/filestuff.h (make_cleanup_close): Moved from utils.h.
* common/filestuff.c (do_close_cleanup): Moved from utils.c.
(make_cleanup_close): Likewise.
gdb/ChangeLog
gdb/common/filestuff.c
gdb/common/filestuff.h
gdb/utils.c
gdb/utils.h