add Martin Thomas' patch for DOS line endings in objdump -S

fix libsysbase linking
This commit is contained in:
Dave Murphy 2008-05-01 08:46:33 +00:00
parent efbfd48603
commit 58ddf64ca4
2 changed files with 47 additions and 9 deletions

View File

@ -0,0 +1,26 @@
--- binutils-2.18.50_org/binutils/objdump.c Sat Mar 1 07:19:06 2008
+++ binutils-2.18.50/binutils/objdump.c Thu Mar 13 12:29:47 2008
@@ -70,6 +70,14 @@
#include <sys/stat.h>
+#ifndef O_BINARY
+#ifdef _O_BINARY
+#define O_BINARY _O_BINARY
+#else
+#define O_BINARY 0
+#endif
+#endif
+
/* Internal headers for the ELF .stab-dump code - sorry. */
#define BYTES_IN_WORD 32
#include "aout/aout64.h"
@@ -975,7 +983,7 @@
#endif
const char *map;
struct stat st;
- int fd = open (fn, O_RDONLY);
+ int fd = open (fn, O_RDONLY | O_BINARY);
if (fd < 0)
return NULL;

View File

@ -5311,7 +5311,7 @@ diff -Nbaur newlib-1.16.0/libgloss/libsysbase/open.c newlib-1.16.0-arm/libgloss/
+} +}
diff -Nbaur newlib-1.16.0/libgloss/libsysbase/read.c newlib-1.16.0-arm/libgloss/libsysbase/read.c diff -Nbaur newlib-1.16.0/libgloss/libsysbase/read.c newlib-1.16.0-arm/libgloss/libsysbase/read.c
--- newlib-1.16.0/libgloss/libsysbase/read.c Thu Jan 1 00:00:00 1970 --- newlib-1.16.0/libgloss/libsysbase/read.c Thu Jan 1 00:00:00 1970
+++ newlib-1.16.0-arm/libgloss/libsysbase/read.c Sat Apr 26 01:51:19 2008 +++ newlib-1.16.0-arm/libgloss/libsysbase/read.c Wed Apr 30 03:24:57 2008
@@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
+#include <_ansi.h> +#include <_ansi.h>
+#include <_syslist.h> +#include <_syslist.h>
@ -5362,15 +5362,27 @@ diff -Nbaur newlib-1.16.0/libgloss/libsysbase/read.c newlib-1.16.0-arm/libgloss/
+ +
diff -Nbaur newlib-1.16.0/libgloss/libsysbase/rename.c newlib-1.16.0-arm/libgloss/libsysbase/rename.c diff -Nbaur newlib-1.16.0/libgloss/libsysbase/rename.c newlib-1.16.0-arm/libgloss/libsysbase/rename.c
--- newlib-1.16.0/libgloss/libsysbase/rename.c Thu Jan 1 00:00:00 1970 --- newlib-1.16.0/libgloss/libsysbase/rename.c Thu Jan 1 00:00:00 1970
+++ newlib-1.16.0-arm/libgloss/libsysbase/rename.c Sat Apr 26 01:36:06 2008 +++ newlib-1.16.0-arm/libgloss/libsysbase/rename.c Wed Apr 30 03:20:55 2008
@@ -0,0 +1,25 @@ @@ -0,0 +1,37 @@
+#include <reent.h> +#include <reent.h>
+#include <sys/iosupport.h> +#include <sys/iosupport.h>
+#include <errno.h> +#include <errno.h>
+ +
+int _rename (const char *existing, const char *newName) { +#ifdef REENTRANT_SYSCALLS_PROVIDED
+ struct _reent *r = _REENT; +int
+ +_DEFUN (_rename_r, (ptr, existing, newName),
+ struct _reent *ptr _AND
+ _CONST char *existing _AND
+ _CONST char *newName)
+{
+#else
+int
+_DEFUN(rename, (existing, newName),
+ _CONST char *existing _AND
+ _CONST char *newName)
+{
+ struct _reent *ptr = _REENT;
+#endif
+ int ret; + int ret;
+ int sourceDev = FindDevice(existing); + int sourceDev = FindDevice(existing);
+ int destDev = FindDevice(newName); + int destDev = FindDevice(newName);
@ -5379,12 +5391,12 @@ diff -Nbaur newlib-1.16.0/libgloss/libsysbase/rename.c newlib-1.16.0-arm/libglos
+ +
+ if ( sourceDev == destDev) { + if ( sourceDev == destDev) {
+ if (devoptab_list[destDev]->rename_r) { + if (devoptab_list[destDev]->rename_r) {
+ ret = devoptab_list[destDev]->rename_r( r, existing, newName); + ret = devoptab_list[destDev]->rename_r( ptr, existing, newName);
+ } else { + } else {
+ r->_errno = ENOSYS; + ptr->_errno = ENOSYS;
+ } + }
+ } else { + } else {
+ r->_errno = EXDEV; + ptr->_errno = EXDEV;
+ } + }
+ +
+ return ret; + return ret;