Re: [Bug binutils/6449] objdump -S and DOS-style line-endings

2008-04-28 Thread Nick Clifton

Hi Guys,


There are so many

#ifndef O_BINARY
#ifdef _O_BINARY
#define O_BINARY _O_BINARY
#define setmode _setmode
#else
#define O_BINARY 0
#endif
#endif

in binutils sources. It should go into sysdep.h.


H.J. is right, so I have applied the attached patch to fix the PR and 
move the definition of O_BINARY into sysdep.h.


Cheers
  Nick

binutils/ChangeLog
2008-04-28  M Thomas  <[EMAIL PROTECTED]>
Nick Clifton  <[EMAIL PROTECTED]>

PR binutils/6449
* objdump.c (slurp_file): Open the file in binary mode.
* ar.c: Remove conditional definition of O_BINARY.
* bin2.c: Likewise.
* rename.c: Likewise.
* strings.c: Likewise.
* sysdep.h: Add conditional definition of O_BINARY.


Index: binutils/ar.c
===
RCS file: /cvs/src/src/binutils/ar.c,v
retrieving revision 1.55
diff -c -3 -p -r1.55 ar.c
*** binutils/ar.c	28 Mar 2008 06:49:44 -	1.55
--- binutils/ar.c	28 Apr 2008 08:04:47 -
***
*** 45,56 
  #define EXT_NAME_LEN 6		/* Ditto for *NIX.  */
  #endif
  
- /* We need to open files in binary modes on system where that makes a
-difference.  */
- #ifndef O_BINARY
- #define O_BINARY 0
- #endif
- 
  /* Kludge declaration from BFD!  This is ugly!  FIXME!  XXX  */
  
  struct ar_hdr *
--- 45,50 
Index: binutils/bin2c.c
===
RCS file: /cvs/src/src/binutils/bin2c.c,v
retrieving revision 1.3
diff -c -3 -p -r1.3 bin2c.c
***
*** 22,30 
  #include "bfd.h"
  #include "bucomm.h"
  
! #if !defined O_BINARY && defined _O_BINARY
/* For MSC-compatible compilers.  */
- # define O_BINARY _O_BINARY
  # define O_TEXT _O_TEXT
  #endif
  
--- 22,29 
  #include "bfd.h"
  #include "bucomm.h"
  
! #if !defined O_TEXT && defined _O_TEXT
/* For MSC-compatible compilers.  */
  # define O_TEXT _O_TEXT
  #endif
  
Index: binutils/objdump.c
===
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.139
diff -c -3 -p -r1.139 objdump.c
*** binutils/objdump.c	1 Mar 2008 07:19:06 -	1.139
--- binutils/objdump.c	28 Apr 2008 08:04:47 -
*** slurp_file (const char *fn, size_t *size
*** 975,981 
  #endif
const char *map;
struct stat st;
!   int fd = open (fn, O_RDONLY);
  
if (fd < 0)
  return NULL;
--- 975,981 
  #endif
const char *map;
struct stat st;
!   int fd = open (fn, O_RDONLY | O_BINARY);
  
if (fd < 0)
  return NULL;
Index: binutils/rename.c
===
RCS file: /cvs/src/src/binutils/rename.c,v
retrieving revision 1.12
diff -c -3 -p -r1.12 rename.c
*** binutils/rename.c	5 Jul 2007 16:54:45 -	1.12
--- binutils/rename.c	28 Apr 2008 08:04:47 -
***
*** 32,43 
  #endif /* HAVE_UTIMES */
  #endif /* ! HAVE_GOOD_UTIME_H */
  
- /* We need to open the file in binary modes on system where that makes
-a difference.  */
- #ifndef O_BINARY
- #define O_BINARY 0
- #endif
- 
  #if ! defined (_WIN32) || defined (__CYGWIN32__)
  static int simple_copy (const char *, const char *);
  
--- 32,37 
Index: binutils/strings.c
===
RCS file: /cvs/src/src/binutils/strings.c,v
retrieving revision 1.40
diff -c -3 -p -r1.40 strings.c
*** binutils/strings.c	15 Feb 2008 10:20:09 -	1.40
--- binutils/strings.c	28 Apr 2008 08:04:48 -
***
*** 69,85 
  /* Some platforms need to put stdin into binary mode, to read
  binary files.  */
  #ifdef HAVE_SETMODE
- #ifndef O_BINARY
  #ifdef _O_BINARY
- #define O_BINARY _O_BINARY
  #define setmode _setmode
- #else
- #define O_BINARY 0
- #endif
  #endif
  #if O_BINARY
  #include 
! #define SET_BINARY(f) do { if (!isatty (f)) setmode (f,O_BINARY); } while (0)
  #endif
  #endif
  
--- 69,80 
  /* Some platforms need to put stdin into binary mode, to read
  binary files.  */
  #ifdef HAVE_SETMODE
  #ifdef _O_BINARY
  #define setmode _setmode
  #endif
  #if O_BINARY
  #include 
! #define SET_BINARY(f) do { if (!isatty (f)) setmode (f, O_BINARY); } while (0)
  #endif
  #endif
  
Index: binutils/sysdep.h
===
RCS file: /cvs/src/src/binutils/sysdep.h,v
retrieving revision 1.3
diff -c -3 -p -r1.3 sysdep.h
*** binutils/sysdep.h	31 Aug 2007 15:06:11 -	1.3
--- binutils/sysdep.h	28 Apr 2008 08:04:48 -
***
*** 36,41 
--- 36,49 
  #include "fopen-same.h"
  #endif
  
+ #ifndef O_BINARY
+ #ifdef  _O_BINARY
+ #define O_BINARY _O_BINARY
+ #else
+ #define O_BINARY 0
+ #endif
+ #endif
+ 
  #include 
  #ifndef errno
  extern int errno;
___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


Re: [Bug binutils/6460] New: ld - bfd_emul_get_maxpagesize bug

2008-04-28 Thread Nick Clifton

Hi aric81,


When i compile Newton SDK on a 64 bit machine with the
-m32 option and the GNUTARGET=i386 variable, it says to me:

/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.18.0.20080103 internal error,
aborting at ../../bfd/bfd.c line 1607 in bfd_emul_get_maxpagesize


Would it be possible for you to provide us with a cut-down test case and 
command line that we can use to reproduce this problem please ?


Cheers
  Nick




___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


bug 5717 does not exists?

2008-04-28 Thread Németh Márton
Hi,

I searched for bugs:

http://sourceware.org/bugzilla/buglist.cgi?query_format=&short_desc_type=allwordssubstr&short_desc=pow+486sx&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&gcchost_type=allwordssubstr&gcchost=&gcctarget_type=allwordssubstr&gcctarget=&gccbuild_type=allwordssubstr&gccbuild=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=

then I clicked on bug number 5717. The error message was:

> Invalid Bug ID
> Bug #5717 does not exist.

Regards,

Márton Németh


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


not possible to enter new bug?

2008-04-28 Thread Németh Márton
Hi,

I was not able to enter new bug in

http://sourceware.org/bugzilla/enter_bug.cgi?product=binutils
Version: 2.16
Component: binutils
Priority: P2
Severity: enhancement
Assigned to: (left blank)
Summary: filled
Description: filled

The error message was:

Invalid Username

> The name bug-binutils@gnu.org is not a valid username. Either you misspelled 
> it,
> or the person has not registered for a Bugzilla account.

Regards,

Márton Németh


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


Re: localization of binutils to Hungarian

2008-04-28 Thread Daniel Jacobowitz
On Mon, Apr 28, 2008 at 09:20:45PM +0200, Németh Márton wrote:
> Hi,
> 
> I crated a localization of binutils to Hungarian two years ago. Now I found
> this file again, and I send it, I hope it will be useful for someone. The
> localization was made for version 2.16.1.

If you send this to the GNU Translation Project robot, it will
automatically be picked up for binutils once it's included.

-- 
Daniel Jacobowitz
CodeSourcery


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils