• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Révision6bd2c2c435217d4de9b7b64ce419fb6a2caa9dd5 (tree)
l'heure2005-06-09 16:39:08
AuteurMark Mitchell <mark@code...>
CommiterMark Mitchell

Message de Log

* bfd/opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.

Change Summary

Modification

--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,5 +1,9 @@
11 2005-06-08 Mark Mitchell <mark@codesourcery.com>
22
3+ * bfd/opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
4+
5+2005-06-08 Mark Mitchell <mark@codesourcery.com>
6+
37 Revert:
48 2005-03-28 Mark Mitchell <mark@codesourcery.com>
59 * readline/display.c (insert_some_chars): Likewise.
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -144,6 +144,8 @@ DESCRIPTION
144144 Calls <<bfd_find_target>>, so @var{target} is interpreted as by
145145 that function.
146146
147+ The new BFD is marked as cacheable iff @var{fd} is -1.
148+
147149 If <<NULL>> is returned then an error has occured. Possible errors
148150 are <<bfd_error_no_memory>>, <<bfd_error_invalid_target>> or
149151 <<system_call>> error.
@@ -198,6 +200,12 @@ bfd_fopen (const char *filename, const char *target, const char *mode, int fd)
198200 return NULL;
199201 }
200202 nbfd->opened_once = TRUE;
203+ /* If we opened the file by name, mark it cacheable; we can close it
204+ and reopen it later. However, if a file descriptor was provided,
205+ then it may have been opened with special flags that make it
206+ unsafe to close and reopen the file. */
207+ if (fd == -1)
208+ bfd_set_cacheable (nbfd, TRUE);
201209
202210 return nbfd;
203211 }