Skip to content

Commit

Permalink
2019-01-22 Nidal Faour <nidal.faour@wdc.com>
Browse files Browse the repository at this point in the history
	PR lto/88422
	* simple-object.c (O_BINARY): Define if not already defined.
	(simple_object_copy_lto_debug_sections): Create file in binary
	mode.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268141 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
rguenth committed Jan 22, 2019
1 parent 8167e4b commit 090bd8b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions libiberty/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2019-01-22 Nidal Faour <nidal.faour@wdc.com>

PR lto/88422
* simple-object.c (O_BINARY): Define if not already defined.
(simple_object_copy_lto_debug_sections): Create file in binary
mode.

2019-01-21 Tom Tromey <tom@tromey.com>

* splay-tree.c (splay_tree_remove): Delete the key if necessary.
Expand Down
6 changes: 5 additions & 1 deletion libiberty/simple-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ Boston, MA 02110-1301, USA. */
#define SEEK_SET 0
#endif

#ifndef O_BINARY
#define O_BINARY 0
#endif

#include "simple-object-common.h"

/* The known object file formats. */
Expand Down Expand Up @@ -349,7 +353,7 @@ simple_object_copy_lto_debug_sections (simple_object_read *sobj,
return errmsg;
}

outfd = creat (dest, 00777);
outfd = open (dest, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY, 00777);
if (outfd == -1)
{
*err = errno;
Expand Down

0 comments on commit 090bd8b

Please sign in to comment.