[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/11016] New: PAGE_SIZE redefined in dlltool.c

From: jerker dot back at gmail dot com
Subject: [Bug binutils/11016] New: PAGE_SIZE redefined in dlltool.c
Date: 24 Nov 2009 21:23:45 -0000

dlltool.c(244) defines PAGE_SIZE

The PAGE_SIZE symbol is/should be defined in limits.h on a POSIX system (see
http://www.opengroup.org). NT POSIX subsystem (SUA) defines it to 0x10000
(10*0x1000). In my headers PAGE_SIZE is defined as an enum and dlltool.c
generates a compiler error due to PAGE_SIZE is defined before including system

I need advise how to fix this. 
Assuming setting PAGE_SIZE to 0x1000 is preferable, we can let dlltool.c set an
explicit value after including the system headers, like this:

Index: dlltool.c
RCS file: /cvs/src/src/binutils/dlltool.c,v
retrieving revision 1.97
diff -d -u -p -r1.97 dlltool.c
--- dlltool.c   28 Oct 2009 17:21:36 -0000      1.97
+++ dlltool.c   24 Nov 2009 17:27:50 -0000
@@ -241,9 +241,6 @@
 #define show_allnames 0
-#define PAGE_SIZE ((bfd_vma) 4096)
-#define PAGE_MASK ((bfd_vma) (-4096))
 #include "sysdep.h"
 #include "bfd.h"
 #include "libiberty.h"
@@ -259,6 +256,9 @@
 #include <stdarg.h>
 #include <assert.h>
+#define PAGE_SIZE ((bfd_vma) 4096)
+#define PAGE_MASK ((bfd_vma) (-4096))

           Summary: PAGE_SIZE redefined in dlltool.c
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: jerker dot back at gmail dot com
                CC: bug-binutils at gnu dot org
 GCC build triplet: x86_64-unknown-interix6.1
  GCC host triplet: x86_64-unknown-interix6.1
GCC target triplet: x86_64-unknown-interix6.1


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]