public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: w64 native support
@ 2007-04-10 16:06 Kai Tietz
  2007-04-10 16:13 ` H. J. Lu
  0 siblings, 1 reply; 22+ messages in thread
From: Kai Tietz @ 2007-04-10 16:06 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 2166 bytes --]

Hello,

trying to build libbfd and the other binutils tools native for x86_64 
mingw, I noticed some bugs in libbfd and other places, where the type 
"long" was used instead of the bfd_vma type for may pointer values. Also I 
introduced for libiberty "splay-tree.h" a necessary patch about 
pointer/long sizes.

ChangeLogs:

For bfd:

2007-04-10 Kai Tietz  <kai.tietz@onevision.com>

        * bfd/coffcode.h: Replace use of long by bfd_vma.
        * bfd/coffgen.c: Likewise.
        * bfd/elf-eh-frame.c: Likewise.
        * bfd/peicode.h: Likewise.

For binutils:

2007-04-10 Kai Tietz  <kai.tietz@onevision.com>

        * binutils/resres.c: Cast sizeof explicit to type "long".

For gas:

2007-04-10 Kai Tietz  <kai.tietz@onevision.com>

        * gas/symbols.c: Replace use of long by bfd_vma and
          print via fprintf_vma.
        * gas/write.c: Likewise.

For gprof:

2007-04-10 Kai Tietz  <kai.tietz@onevision.com>

        * gprof/cg_print.c: Explict cast sizeof to long.
        * gprof/hist.c: Likewise.

For include:

2007-04-10 Kai Tietz  <kai.tietz@onevision.com>

        * include/splay-tree.h: (libi_uhostptr_t): New type.
        (libi_shostptr_t): New type.
        (splay_tree_key, splay_tree_value): Use libi_uhostptr_t type.
        * include/coff/internal.h: (_n_zeroes, _n_offset): Type vma_bfd.


For libiberty:

2007-04-10 Kai Tietz  <kai.tietz@onevision.com>

        * libiberty/strerror.c: Undefine sys_nerr and sys_errlist for w64 
sake.

Regards,
 i.A. Kai Tietz



------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger

[-- Attachment #2: bfd-w64-native.txt --]
[-- Type: text/plain, Size: 12393 bytes --]

Index: bfd/coffcode.h
===================================================================
RCS file: /cvs/src/src/bfd/coffcode.h,v
retrieving revision 1.136
diff -b -u -r1.136 coffcode.h
--- bfd/coffcode.h	26 Mar 2007 12:22:59 -0000	1.136
+++ bfd/coffcode.h	10 Apr 2007 15:48:23 -0000
@@ -4380,7 +4380,7 @@
 
 	  dst->symbol.name = (char *) (src->u.syment._n._n_n._n_offset);
 	  /* We use the native name field to point to the cached field.  */
-	  src->u.syment._n._n_n._n_zeroes = (long) dst;
+	  src->u.syment._n._n_n._n_zeroes = (bfd_vma) dst;
 	  dst->symbol.section = coff_section_from_bfd_index (abfd,
 						     src->u.syment.n_scnum);
 	  dst->symbol.flags = 0;
Index: bfd/coffgen.c
===================================================================
RCS file: /cvs/src/src/bfd/coffgen.c,v
retrieving revision 1.56
diff -b -u -r1.56 coffgen.c
--- bfd/coffgen.c	2 Apr 2007 16:51:13 -0000	1.56
+++ bfd/coffgen.c	10 Apr 2007 15:48:24 -0000
@@ -726,7 +726,7 @@
 	      /* FIXME: We should use a union here.  */
 	      s->u.syment.n_value =
 		(bfd_vma)((combined_entry_type *)
-			  ((unsigned long) s->u.syment.n_value))->offset;
+			  ((bfd_vma) s->u.syment.n_value))->offset;
 	      s->fix_value = 0;
 	    }
 	  if (s->fix_line)
@@ -1640,7 +1640,7 @@
 		}
 
 	      internal_ptr->u.syment._n._n_n._n_offset =
-		((long)
+		((bfd_vma)
 		 (string_table
 		  + (internal_ptr + 1)->u.auxent.x_file.x_n.x_offset));
 	    }
@@ -1652,13 +1652,13 @@
 	      if (internal_ptr->u.syment.n_numaux > 1
 		  && coff_data (abfd)->pe)
 		internal_ptr->u.syment._n._n_n._n_offset =
-		  ((long)
+		  ((bfd_vma)
 		   copy_name (abfd,
 			      (internal_ptr + 1)->u.auxent.x_file.x_fname,
 			      internal_ptr->u.syment.n_numaux * symesz));
 	      else
 		internal_ptr->u.syment._n._n_n._n_offset =
-		  ((long)
+		  ((bfd_vma)
 		   copy_name (abfd,
 			      (internal_ptr + 1)->u.auxent.x_file.x_fname,
 			      (size_t) bfd_coff_filnmlen (abfd)));
@@ -1682,11 +1682,11 @@
 	      if (newstring == NULL)
 		return NULL;
 	      strncpy (newstring, internal_ptr->u.syment._n._n_name, i);
-	      internal_ptr->u.syment._n._n_n._n_offset = (long int) newstring;
+	      internal_ptr->u.syment._n._n_n._n_offset = (bfd_vma) newstring;
 	      internal_ptr->u.syment._n._n_n._n_zeroes = 0;
 	    }
 	  else if (internal_ptr->u.syment._n._n_n._n_offset == 0)
-	    internal_ptr->u.syment._n._n_n._n_offset = (long int) "";
+	    internal_ptr->u.syment._n._n_n._n_offset = (bfd_vma) "";
 	  else if (!bfd_coff_symname_in_debug (abfd, &internal_ptr->u.syment))
 	    {
 	      /* Long name already.  Point symbol at the string in the
@@ -1698,7 +1698,7 @@
 		    return NULL;
 		}
 	      internal_ptr->u.syment._n._n_n._n_offset =
-		((long int)
+		((bfd_vma)
 		 (string_table
 		  + internal_ptr->u.syment._n._n_n._n_offset));
 	    }
@@ -1707,7 +1707,7 @@
 	      /* Long name in debug section.  Very similar.  */
 	      if (debug_section == NULL)
 		debug_section = build_debug_section (abfd);
-	      internal_ptr->u.syment._n._n_n._n_offset = (long int)
+	      internal_ptr->u.syment._n._n_n._n_offset = (bfd_vma)
 		(debug_section + internal_ptr->u.syment._n._n_n._n_offset);
 	    }
 	}
@@ -1784,7 +1784,7 @@
   if (coffsymbol (symbol)->native != NULL
       && coffsymbol (symbol)->native->fix_value)
     ret->value = coffsymbol (symbol)->native->u.syment.n_value -
-      (unsigned long) obj_raw_syments (abfd);
+      (bfd_vma) obj_raw_syments (abfd);
 }
 
 /* Return the COFF syment for a symbol.  */
@@ -1807,7 +1807,7 @@
 
   if (csym->native->fix_value)
     psyment->n_value = psyment->n_value -
-      (unsigned long) obj_raw_syments (abfd);
+      (bfd_vma) obj_raw_syments (abfd);
 
   /* FIXME: We should handle fix_line here.  */
 
@@ -1893,7 +1893,7 @@
 	  if (! combined->fix_value)
 	    val = (bfd_vma) combined->u.syment.n_value;
 	  else
-	    val = combined->u.syment.n_value - (unsigned long) root;
+	    val = combined->u.syment.n_value - (bfd_vma) root;
 
 	  fprintf (file, "(sec %2d)(fl 0x%02x)(ty %3x)(scl %3d) (nx %d) 0x",
 		   combined->u.syment.n_scnum,
Index: bfd/elf-eh-frame.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-eh-frame.c,v
retrieving revision 1.54
diff -b -u -r1.54 elf-eh-frame.c
--- bfd/elf-eh-frame.c	4 Jan 2007 13:30:39 -0000	1.54
+++ bfd/elf-eh-frame.c	10 Apr 2007 15:48:25 -0000
@@ -917,7 +917,7 @@
       {
 	if (!ent->cie)
 	  {
-	    ecie = ecies + (unsigned long) ent->cie_inf;
+	    ecie = ecies + (bfd_vma) ent->cie_inf;
 	    ent->cie_inf = ecie->cie.cie_inf;
 	  }
 	ent->new_offset = offset;
Index: bfd/peicode.h
===================================================================
RCS file: /cvs/src/src/bfd/peicode.h,v
retrieving revision 1.50
diff -b -u -r1.50 peicode.h
--- bfd/peicode.h	20 Sep 2006 11:35:07 -0000	1.50
+++ bfd/peicode.h	10 Apr 2007 15:48:26 -0000
@@ -565,7 +565,7 @@
   /* Initialise the internal symbol structure.  */
   ent->u.syment.n_sclass          = sclass;
   ent->u.syment.n_scnum           = section->target_index;
-  ent->u.syment._n._n_n._n_offset = (long) sym;
+  ent->u.syment._n._n_n._n_offset = (bfd_vma) sym;
 
   sym->symbol.the_bfd = vars->abfd;
   sym->symbol.name    = vars->string_ptr;
Index: binutils/resres.c
===================================================================
RCS file: /cvs/src/src/binutils/resres.c,v
retrieving revision 1.7
diff -b -u -r1.7 resres.c
--- binutils/resres.c	16 Jun 2005 09:18:19 -0000	1.7
+++ binutils/resres.c	10 Apr 2007 15:48:27 -0000
@@ -475,7 +475,7 @@
   else
     /* named id */
     {
-      if (fseek (fres, -sizeof (ord), SEEK_CUR) != 0)
+      if (fseek (fres, - ((long) sizeof (ord)), SEEK_CUR) != 0)
 	fatal ("%s: %s: could not seek in file", program_name, filename);
       id_s = read_unistring (&len);
       id->named = 1;
Index: gas/symbols.c
===================================================================
RCS file: /cvs/src/src/gas/symbols.c,v
retrieving revision 1.83
diff -b -u -r1.83 symbols.c
--- gas/symbols.c	15 Mar 2007 12:11:49 -0000	1.83
+++ gas/symbols.c	10 Apr 2007 15:48:29 -0000
@@ -2728,14 +2728,20 @@
   const char *name = S_GET_NAME (sym);
   if (!name || !name[0])
     name = "(unnamed)";
-  fprintf (file, "sym %lx %s", (unsigned long) sym, name);
+
+  fprintf (file, "sym ");
+  fprintf_vma (file, (bfd_vma) sym);
+  fprintf (file, " %s", name);
 
   if (LOCAL_SYMBOL_CHECK (sym))
     {
       struct local_symbol *locsym = (struct local_symbol *) sym;
       if (local_symbol_get_frag (locsym) != &zero_address_frag
 	  && local_symbol_get_frag (locsym) != NULL)
-	fprintf (file, " frag %lx", (long) local_symbol_get_frag (locsym));
+        {
+	  fprintf (file, " frag ");
+	  fprintf_vma (file, (bfd_vma) local_symbol_get_frag (locsym));
+        }
       if (local_symbol_resolved_p (locsym))
 	fprintf (file, " resolved");
       fprintf (file, " local");
@@ -2743,7 +2749,10 @@
   else
     {
       if (sym->sy_frag != &zero_address_frag)
-	fprintf (file, " frag %lx", (long) sym->sy_frag);
+        {
+	  fprintf (file, " frag ");
+	  fprintf_vma (file, (bfd_vma) sym->sy_frag);
+        }
       if (sym->written)
 	fprintf (file, " written");
       if (sym->sy_resolved)
@@ -2817,7 +2826,9 @@
 void
 print_expr_1 (FILE *file, expressionS *exp)
 {
-  fprintf (file, "expr %lx ", (long) exp);
+  fprintf (file, "expr ");
+  fprintf_vma (file,(bfd_vma) exp);
+  fprintf (file, " ");
   switch (exp->X_op)
     {
     case O_illegal:
Index: gas/write.c
===================================================================
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.112
diff -b -u -r1.112 write.c
--- gas/write.c	26 Mar 2007 12:23:48 -0000	1.112
+++ gas/write.c	10 Apr 2007 15:48:31 -0000
@@ -2486,7 +2486,9 @@
 print_fixup (fixS *fixp)
 {
   indent_level = 1;
-  fprintf (stderr, "fix %lx %s:%d", (long) fixp, fixp->fx_file, fixp->fx_line);
+  fprintf (stderr, "fix ");
+  fprintf_vma (stderr, (bfd_vma) fixp);
+  fprintf (stderr, " %s:%d", fixp->fx_file, fixp->fx_line);
   if (fixp->fx_pcrel)
     fprintf (stderr, " pcrel");
   if (fixp->fx_pcrel_adjust)
@@ -2503,8 +2505,11 @@
     fprintf (stderr, " tcbit");
   if (fixp->fx_done)
     fprintf (stderr, " done");
-  fprintf (stderr, "\n    size=%d frag=%lx where=%ld offset=%lx addnumber=%lx",
-	   fixp->fx_size, (long) fixp->fx_frag, (long) fixp->fx_where,
+  fprintf (stderr, "\n    size=%d frag=",
+	   fixp->fx_size);
+  fprintf_vma (stderr, (bfd_vma) fixp->fx_frag);
+  fprintf (stderr, " where=%ld offset=%lx addnumber=%lx",
+	   (long) fixp->fx_where,
 	   (long) fixp->fx_offset, (long) fixp->fx_addnumber);
   fprintf (stderr, "\n    %s (%d)", bfd_get_reloc_code_name (fixp->fx_r_type),
 	   fixp->fx_r_type);
Index: gprof/cg_print.c
===================================================================
RCS file: /cvs/src/src/gprof/cg_print.c,v
retrieving revision 1.12
diff -b -u -r1.12 cg_print.c
--- gprof/cg_print.c	9 May 2005 06:55:24 -0000	1.12
+++ gprof/cg_print.c	10 Apr 2007 15:48:40 -0000
@@ -76,7 +76,7 @@
     }
 
   printf (_("\ngranularity: each sample hit covers %ld byte(s)"),
-	  (long) hist_scale * sizeof (UNIT));
+	  (long) hist_scale * (long) sizeof (UNIT));
 
   if (print_time > 0.0)
     printf (_(" for %.2f%% of %.2f seconds\n\n"),
Index: gprof/hist.c
===================================================================
RCS file: /cvs/src/src/gprof/hist.c,v
retrieving revision 1.17
diff -b -u -r1.17 hist.c
--- gprof/hist.c	10 Apr 2007 08:47:50 -0000	1.17
+++ gprof/hist.c	10 Apr 2007 15:48:40 -0000
@@ -464,7 +464,7 @@
   if (bsd_style_output)
     {
       printf (_("\ngranularity: each sample hit covers %ld byte(s)"),
-	      (long) hist_scale * sizeof (UNIT));
+	      (long) hist_scale * (long) sizeof (UNIT));
       if (total_time > 0.0)
 	{
 	  printf (_(" for %.2f%% of %.2f %s\n\n"),
Index: include/splay-tree.h
===================================================================
RCS file: /cvs/src/src/include/splay-tree.h,v
retrieving revision 1.13
diff -b -u -r1.13 splay-tree.h
--- include/splay-tree.h	10 May 2005 10:21:08 -0000	1.13
+++ include/splay-tree.h	10 Apr 2007 15:48:40 -0000
@@ -36,6 +36,14 @@
 
 #include "ansidecl.h"
 
+#ifndef _WIN64
+  typedef unsigned long int libi_uhostptr_t;
+  typedef long int libi_shostptr_t;
+#else
+  typedef unsigned long long libi_uhostptr_t;
+  typedef long long libi_shostptr_t;
+#endif
+
 #ifndef GTY
 #define GTY(X)
 #endif
@@ -44,8 +52,8 @@
    these types, if necessary.  These types should be sufficiently wide
    that any pointer or scalar can be cast to these types, and then
    cast back, without loss of precision.  */
-typedef unsigned long int splay_tree_key;
-typedef unsigned long int splay_tree_value;
+typedef libi_uhostptr_t splay_tree_key;
+typedef libi_uhostptr_t splay_tree_value;
 
 /* Forward declaration for a node in the tree.  */
 typedef struct splay_tree_node_s *splay_tree_node;
Index: include/coff/internal.h
===================================================================
RCS file: /cvs/src/src/include/coff/internal.h,v
retrieving revision 1.21
diff -b -u -r1.21 internal.h
--- include/coff/internal.h	19 Mar 2007 23:06:06 -0000	1.21
+++ include/coff/internal.h	10 Apr 2007 15:48:40 -0000
@@ -419,8 +419,8 @@
     char _n_name[SYMNMLEN];	/* old COFF version	*/
     struct
     {
-      long _n_zeroes;		/* new == 0		*/
-      long _n_offset;		/* offset into string table */
+      bfd_vma _n_zeroes;		/* new == 0		*/
+      bfd_vma _n_offset;		/* offset into string table */
     }      _n_n;
     char *_n_nptr[2];		/* allows for overlaying	*/
   }     _n;
Index: libiberty/strerror.c
===================================================================
RCS file: /cvs/src/src/libiberty/strerror.c,v
retrieving revision 1.12
diff -b -u -r1.12 strerror.c
--- libiberty/strerror.c	28 Mar 2005 02:09:01 -0000	1.12
+++ libiberty/strerror.c	10 Apr 2007 15:48:44 -0000
@@ -469,6 +469,9 @@
 
 #else
 
+#undef sys_nerr
+#undef sys_errlist
+
 extern int sys_nerr;
 extern char *sys_errlist[];
 
=

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-10 16:06 PATCH: w64 native support Kai Tietz
@ 2007-04-10 16:13 ` H. J. Lu
  2007-04-10 16:23   ` Kai Tietz
  2007-04-10 17:01   ` Kai Tietz
  0 siblings, 2 replies; 22+ messages in thread
From: H. J. Lu @ 2007-04-10 16:13 UTC (permalink / raw)
  To: Kai Tietz; +Cc: binutils

On Tue, Apr 10, 2007 at 06:05:35PM +0200, Kai Tietz wrote:
> Hello,
> 
> trying to build libbfd and the other binutils tools native for x86_64 
> mingw, I noticed some bugs in libbfd and other places, where the type 
> "long" was used instead of the bfd_vma type for may pointer values. Also I 
> introduced for libiberty "splay-tree.h" a necessary patch about 
> pointer/long sizes.
> 

Have you looked at

http://sources.redhat.com/bugzilla/show_bug.cgi?id=2737

Does windres work for x64?


H.J.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-10 16:13 ` H. J. Lu
@ 2007-04-10 16:23   ` Kai Tietz
  2007-04-10 17:01   ` Kai Tietz
  1 sibling, 0 replies; 22+ messages in thread
From: Kai Tietz @ 2007-04-10 16:23 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

binutils-owner@sourceware.org wrote on 10.04.2007 18:12:45:

> On Tue, Apr 10, 2007 at 06:05:35PM +0200, Kai Tietz wrote:
> > Hello,
> > 
> > trying to build libbfd and the other binutils tools native for x86_64 
> > mingw, I noticed some bugs in libbfd and other places, where the type 
> > "long" was used instead of the bfd_vma type for may pointer values. 
Also I 
> > introduced for libiberty "splay-tree.h" a necessary patch about 
> > pointer/long sizes.
> > 
> 
> Have you looked at
> 
> http://sources.redhat.com/bugzilla/show_bug.cgi?id=2737
> 
> Does windres work for x64?

For x64 mingw yes, because the type long remains 32-bit in MS ABI. This 
bug seems to be more a bug of mingw headers for x64 linux. Because on x64 
linux the long becomes 64-bit wide, but for MS abi this isn't true. May 
the types of this defines as DWORD should be retyped as "unsigned int" ? 
On MS Abi there is a new type DWORD64 for 64-bit width.

Regards,
 i.A. Kai Tietz

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-10 16:13 ` H. J. Lu
  2007-04-10 16:23   ` Kai Tietz
@ 2007-04-10 17:01   ` Kai Tietz
  2007-04-10 17:18     ` H. J. Lu
  1 sibling, 1 reply; 22+ messages in thread
From: Kai Tietz @ 2007-04-10 17:01 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

"H. J. Lu" <hjl@lucon.org> wrote on 10.04.2007 18:12:45:

> Have you looked at
> 
> http://sources.redhat.com/bugzilla/show_bug.cgi?id=2737
> 
> Does windres work for x64?


I replaced in all structures of windres.h the type "unsigned long" by 
"unsigned int" for test and patched the dependent files to use not long 
type-specifier in printf methods. It works that way, but I am not certain, 
if this would break an other target, where "int" isn't 4 bytes long ? 

Regards,
 i.A. Kai Tietz

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-10 17:01   ` Kai Tietz
@ 2007-04-10 17:18     ` H. J. Lu
  2007-04-10 17:52       ` Kai Tietz
  2007-04-10 20:55       ` Paul Koning
  0 siblings, 2 replies; 22+ messages in thread
From: H. J. Lu @ 2007-04-10 17:18 UTC (permalink / raw)
  To: Kai Tietz; +Cc: binutils

On Tue, Apr 10, 2007 at 07:00:14PM +0200, Kai Tietz wrote:
> "H. J. Lu" <hjl@lucon.org> wrote on 10.04.2007 18:12:45:
> 
> > Have you looked at
> > 
> > http://sources.redhat.com/bugzilla/show_bug.cgi?id=2737
> > 
> > Does windres work for x64?
> 
> 
> I replaced in all structures of windres.h the type "unsigned long" by 
> "unsigned int" for test and patched the dependent files to use not long 
> type-specifier in printf methods. It works that way, but I am not certain, 
> if this would break an other target, where "int" isn't 4 bytes long ? 
			       ^^^^^
			       It should be host, not target.

It is better than what we have today. You can add

	assert (sizeof (int) == 4);

somewhere.


H.J.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-10 17:18     ` H. J. Lu
@ 2007-04-10 17:52       ` Kai Tietz
  2007-04-10 19:35         ` H. J. Lu
  2007-04-10 20:55       ` Paul Koning
  1 sibling, 1 reply; 22+ messages in thread
From: Kai Tietz @ 2007-04-10 17:52 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

"H. J. Lu" <hjl@lucon.org> wrote on 10.04.2007 19:18:28:

> On Tue, Apr 10, 2007 at 07:00:14PM +0200, Kai Tietz wrote:
> > "H. J. Lu" <hjl@lucon.org> wrote on 10.04.2007 18:12:45:
> > 
> > > Have you looked at
> > > 
> > > http://sources.redhat.com/bugzilla/show_bug.cgi?id=2737
> > > 
> > > Does windres work for x64?
> > 
> > 
> > I replaced in all structures of windres.h the type "unsigned long" by 
> > "unsigned int" for test and patched the dependent files to use not 
long 
> > type-specifier in printf methods. It works that way, but I am not 
certain, 
> > if this would break an other target, where "int" isn't 4 bytes long ? 
>                 ^^^^^
>                 It should be host, not target.
> 
> It is better than what we have today. You can add
> 
>    assert (sizeof (int) == 4);
> 
> somewhere.

Ok, I on that.

But I noticed, while bootstrap my patch on it on cygwin, that the 
replacement of long to bfd_vma does not work as explected for 32-bit hosts 
and using --enable-64-bit-bfd. Gcc claims, that pointer size and integer 
size are not fitting.
I think, we have to introduce a type bfd_hostptr_t or something like that 
to solve this problem ?

Regards,
 i.A. Kai Tietz

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-10 17:52       ` Kai Tietz
@ 2007-04-10 19:35         ` H. J. Lu
  2007-04-11  3:40           ` H. J. Lu
  0 siblings, 1 reply; 22+ messages in thread
From: H. J. Lu @ 2007-04-10 19:35 UTC (permalink / raw)
  To: Kai Tietz; +Cc: binutils

On Tue, Apr 10, 2007 at 07:51:21PM +0200, Kai Tietz wrote:
> "H. J. Lu" <hjl@lucon.org> wrote on 10.04.2007 19:18:28:
> 
> > On Tue, Apr 10, 2007 at 07:00:14PM +0200, Kai Tietz wrote:
> > > "H. J. Lu" <hjl@lucon.org> wrote on 10.04.2007 18:12:45:
> > > 
> > > > Have you looked at
> > > > 
> > > > http://sources.redhat.com/bugzilla/show_bug.cgi?id=2737
> > > > 
> > > > Does windres work for x64?
> > > 
> > > 
> > > I replaced in all structures of windres.h the type "unsigned long" by 
> > > "unsigned int" for test and patched the dependent files to use not 
> long 
> > > type-specifier in printf methods. It works that way, but I am not 
> certain, 
> > > if this would break an other target, where "int" isn't 4 bytes long ? 
> >                 ^^^^^
> >                 It should be host, not target.
> > 
> > It is better than what we have today. You can add
> > 
> >    assert (sizeof (int) == 4);
> > 
> > somewhere.
> 
> Ok, I on that.
> 
> But I noticed, while bootstrap my patch on it on cygwin, that the 
> replacement of long to bfd_vma does not work as explected for 32-bit hosts 
> and using --enable-64-bit-bfd. Gcc claims, that pointer size and integer 
> size are not fitting.
> I think, we have to introduce a type bfd_hostptr_t or something like that 
> to solve this problem ?
> 

I don't think it is needed. --enable-64-bit-bfd works fine for
Linux/x86. If --enable-64-bit-bfd doesn't work for cygwin, it
should be fixed.


H.J.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-10 17:18     ` H. J. Lu
  2007-04-10 17:52       ` Kai Tietz
@ 2007-04-10 20:55       ` Paul Koning
  1 sibling, 0 replies; 22+ messages in thread
From: Paul Koning @ 2007-04-10 20:55 UTC (permalink / raw)
  To: hjl; +Cc: binutils

>>>>> "H" == H J Lu <hjl@lucon.org> writes:

 H> On Tue, Apr 10, 2007 at 07:00:14PM +0200, Kai Tietz wrote:
 >> "H. J. Lu" <hjl@lucon.org> wrote on 10.04.2007 18:12:45:
 >> 
 >> > Have you looked at
 >> > 
 >> > http://sources.redhat.com/bugzilla/show_bug.cgi?id=2737
 >> > 
 >> > Does windres work for x64?
 >> 
 >> 
 >> I replaced in all structures of windres.h the type "unsigned long"
 >> by "unsigned int" for test and patched the dependent files to use
 >> not long type-specifier in printf methods. It works that way, but
 >> I am not certain, if this would break an other target, where "int"
 >> isn't 4 bytes long ?
 H> ^^^^^ It should be host, not target.

 H> It is better than what we have today. You can add

 H> assert (sizeof (int) == 4);

Ok, I'll ask a dump question.

Isn't this the sort of platform specific type stuff that "configure"
was invented for?

    paul

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-10 19:35         ` H. J. Lu
@ 2007-04-11  3:40           ` H. J. Lu
  0 siblings, 0 replies; 22+ messages in thread
From: H. J. Lu @ 2007-04-11  3:40 UTC (permalink / raw)
  To: Kai Tietz; +Cc: binutils

On Tue, Apr 10, 2007 at 12:35:08PM -0700, H. J. Lu wrote:
> On Tue, Apr 10, 2007 at 07:51:21PM +0200, Kai Tietz wrote:
> > "H. J. Lu" <hjl@lucon.org> wrote on 10.04.2007 19:18:28:
> > 
> > > On Tue, Apr 10, 2007 at 07:00:14PM +0200, Kai Tietz wrote:
> > > > "H. J. Lu" <hjl@lucon.org> wrote on 10.04.2007 18:12:45:
> > > > 
> > > > > Have you looked at
> > > > > 
> > > > > http://sources.redhat.com/bugzilla/show_bug.cgi?id=2737
> > > > > 
> > > > > Does windres work for x64?
> > > > 
> > > > 
> > > > I replaced in all structures of windres.h the type "unsigned long" by 
> > > > "unsigned int" for test and patched the dependent files to use not 
> > long 
> > > > type-specifier in printf methods. It works that way, but I am not 
> > certain, 
> > > > if this would break an other target, where "int" isn't 4 bytes long ? 
> > >                 ^^^^^
> > >                 It should be host, not target.
> > > 
> > > It is better than what we have today. You can add
> > > 
> > >    assert (sizeof (int) == 4);
> > > 
> > > somewhere.
> > 
> > Ok, I on that.
> > 
> > But I noticed, while bootstrap my patch on it on cygwin, that the 
> > replacement of long to bfd_vma does not work as explected for 32-bit hosts 
> > and using --enable-64-bit-bfd. Gcc claims, that pointer size and integer 
> > size are not fitting.
> > I think, we have to introduce a type bfd_hostptr_t or something like that 
> > to solve this problem ?
> > 
> 
> I don't think it is needed. --enable-64-bit-bfd works fine for
> Linux/x86. If --enable-64-bit-bfd doesn't work for cygwin, it
> should be fixed.

I think the main problem of the PE port may be there is no clear
line bewteen internal and external data structure so that it is very
hard to cross compile a PE target on a differnt endian or 64bit host.


H.J.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-07-12  7:30       ` Nick Clifton
@ 2007-07-24  8:00         ` NightStrike
  0 siblings, 0 replies; 22+ messages in thread
From: NightStrike @ 2007-07-24  8:00 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Kai Tietz, H. J. Lu, binutils

On 7/12/07, Nick Clifton <nickc@redhat.com> wrote:
> Hi Kai,
>
>   In the better late than never category we have...
>
> > 2007-04-18  Kai Tietz   <kai.tietz@onevision.com>
> >
> >         * bfd/bfd-in.h: (BFD_HOST_64BIT_LONG_LONG): New
> >         as equivalent for BFD_HOST_64BIT_LONG.
> >         (BFD_HOSTPTR_T): Host pointer type for casting a
> >         pointer to an integer type.
> >         (bfd_hostptr_t): The typedef of BFD_HOSTPTR_T.
> >         (sprintf_vma, fprintf_vma): Add support for long long prints.
> >         * bfd/bfd-in2.h: Regenerate.
> >         * bfd/configure.in: (BFD_HOST_64BIT_LONG_LONG): New
> >         as equivalent for BFD_HOST_64BIT_LONG.
> >         (BFD_HOSTPTR_T): Host pointer type for casting a
> >         pointer to an integer type. Defauls is "unsigned long".
> >         (AC_CHECK_SIZEOF(void *)): New.
> >         (host64): Set it if the pointer size is 8.
> >         * bfd/configure: Regenerate.
> >         * bfd/config.in: Add macro SIZEOF_VOID_P.
> >         * bfd/coffcode.h: Replace host ptr type assuming "long" to
> >         bfd_hostptr_t type.
> >         * bfd/coffgen.c: Likewise.
> >         * bfd/elf-eh-frame.c: Likewise.
> >         * bfd/peicode.h: Likewise.
> >         * gas/symbols.c: Print bfd_hostptr_t to file via fprintf_vma.
> >         * gas/write.c: Likewise.
> >         * gprof/cg_print.c: Force cast of sizeof to be a long.
> >         * gprof/hist.c: Likewise.
> >         * include/splay-tree.h: New type libi_uhostptr_t needed for
> >         w64 when a long is not wide enought for a pointer for
> >         splay_tree_key and splay_tree_value..
> >         (splay_tree_key, splay_tree_value): As above, see comment.
> >         * include/coff/internal.h:  Replace host ptr type assuming "long"
> >         to bfd_hostptr_t type.
> >         * libiberty/strerror.c: Undefine sys_nerr and sys_errlist if
> >         allready defined in front by runtime headers.
>
> I have now checked all of this patch in, apart from the change to
> libiberty.  You will need to submit that one separately to the libiberty
> maintainers.
>
> Cheers
>   Nick
>

Does anyone know if this made it into libiberty?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-18 11:59     ` Kai Tietz
  2007-06-29  5:37       ` NightStrike
@ 2007-07-12  7:30       ` Nick Clifton
  2007-07-24  8:00         ` NightStrike
  1 sibling, 1 reply; 22+ messages in thread
From: Nick Clifton @ 2007-07-12  7:30 UTC (permalink / raw)
  To: Kai Tietz; +Cc: H. J. Lu, binutils

Hi Kai,

   In the better late than never category we have...

> 2007-04-18  Kai Tietz   <kai.tietz@onevision.com>
> 
>         * bfd/bfd-in.h: (BFD_HOST_64BIT_LONG_LONG): New
>         as equivalent for BFD_HOST_64BIT_LONG.
>         (BFD_HOSTPTR_T): Host pointer type for casting a
>         pointer to an integer type.
>         (bfd_hostptr_t): The typedef of BFD_HOSTPTR_T.
>         (sprintf_vma, fprintf_vma): Add support for long long prints.
>         * bfd/bfd-in2.h: Regenerate.
>         * bfd/configure.in: (BFD_HOST_64BIT_LONG_LONG): New
>         as equivalent for BFD_HOST_64BIT_LONG.
>         (BFD_HOSTPTR_T): Host pointer type for casting a
>         pointer to an integer type. Defauls is "unsigned long".
>         (AC_CHECK_SIZEOF(void *)): New.
>         (host64): Set it if the pointer size is 8.
>         * bfd/configure: Regenerate.
>         * bfd/config.in: Add macro SIZEOF_VOID_P.
>         * bfd/coffcode.h: Replace host ptr type assuming "long" to
>         bfd_hostptr_t type.
>         * bfd/coffgen.c: Likewise.
>         * bfd/elf-eh-frame.c: Likewise.
>         * bfd/peicode.h: Likewise.
>         * gas/symbols.c: Print bfd_hostptr_t to file via fprintf_vma.
>         * gas/write.c: Likewise.
>         * gprof/cg_print.c: Force cast of sizeof to be a long.
>         * gprof/hist.c: Likewise.
>         * include/splay-tree.h: New type libi_uhostptr_t needed for
>         w64 when a long is not wide enought for a pointer for
>         splay_tree_key and splay_tree_value..
>         (splay_tree_key, splay_tree_value): As above, see comment.
>         * include/coff/internal.h:  Replace host ptr type assuming "long"
>         to bfd_hostptr_t type.
>         * libiberty/strerror.c: Undefine sys_nerr and sys_errlist if
>         allready defined in front by runtime headers.

I have now checked all of this patch in, apart from the change to 
libiberty.  You will need to submit that one separately to the libiberty 
maintainers.

Cheers
   Nick

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-18 11:59     ` Kai Tietz
@ 2007-06-29  5:37       ` NightStrike
  2007-07-12  7:30       ` Nick Clifton
  1 sibling, 0 replies; 22+ messages in thread
From: NightStrike @ 2007-06-29  5:37 UTC (permalink / raw)
  To: Kai Tietz; +Cc: H. J. Lu, binutils

On 4/18/07, Kai Tietz <Kai.Tietz@onevision.com> wrote:
> "H. J. Lu" <hjl@lucon.org> wrote on 11.04.2007 16:07:40:
>
> > We do need a new type when casting from pointer to integer. But
> > it should be determined in autoconf. You can use AC_CHECK_SIZEOF.
>
> I adjust my patch not using the printf macro and using configure.in in bfd
> to find the proper type for bfd_hostptr_t. Also I adjust the autodetection
> of 64 bit in configure by using the size of a "void *" == 8 for detection.
>
> ChangeLog:
>
> 2007-04-18  Kai Tietz   <kai.tietz@onevision.com>
>
>        * bfd/bfd-in.h: (BFD_HOST_64BIT_LONG_LONG): New
>        as equivalent for BFD_HOST_64BIT_LONG.
>        (BFD_HOSTPTR_T): Host pointer type for casting a
>        pointer to an integer type.
>        (bfd_hostptr_t): The typedef of BFD_HOSTPTR_T.
>        (sprintf_vma, fprintf_vma): Add support for long long prints.
>        * bfd/bfd-in2.h: Regenerate.
>        * bfd/configure.in: (BFD_HOST_64BIT_LONG_LONG): New
>        as equivalent for BFD_HOST_64BIT_LONG.
>        (BFD_HOSTPTR_T): Host pointer type for casting a
>        pointer to an integer type. Defauls is "unsigned long".
>        (AC_CHECK_SIZEOF(void *)): New.
>        (host64): Set it if the pointer size is 8.
>        * bfd/configure: Regenerate.
>        * bfd/config.in: Add macro SIZEOF_VOID_P.
>        * bfd/coffcode.h: Replace host ptr type assuming "long" to
>        bfd_hostptr_t type.
>        * bfd/coffgen.c: Likewise.
>        * bfd/elf-eh-frame.c: Likewise.
>        * bfd/peicode.h: Likewise.
>        * gas/symbols.c: Print bfd_hostptr_t to file via fprintf_vma.
>        * gas/write.c: Likewise.
>        * gprof/cg_print.c: Force cast of sizeof to be a long.
>        * gprof/hist.c: Likewise.
>        * include/splay-tree.h: New type libi_uhostptr_t needed for
>        w64 when a long is not wide enought for a pointer for
>        splay_tree_key and splay_tree_value..
>        (splay_tree_key, splay_tree_value): As above, see comment.
>        * include/coff/internal.h:  Replace host ptr type assuming "long"
>        to bfd_hostptr_t type.
>        * libiberty/strerror.c: Undefine sys_nerr and sys_errlist if
>        allready defined in front by runtime headers.
>
> Regards,
>  i.A. Kai Tietz

Please correct me if I am wrong, but it appears that this was never
committed.  Is it going to be?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-11 14:07   ` H. J. Lu
@ 2007-04-18 11:59     ` Kai Tietz
  2007-06-29  5:37       ` NightStrike
  2007-07-12  7:30       ` Nick Clifton
  0 siblings, 2 replies; 22+ messages in thread
From: Kai Tietz @ 2007-04-18 11:59 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

[-- Attachment #1: Type: text/plain, Size: 2806 bytes --]

"H. J. Lu" <hjl@lucon.org> wrote on 11.04.2007 16:07:40:

> We do need a new type when casting from pointer to integer. But
> it should be determined in autoconf. You can use AC_CHECK_SIZEOF.

I adjust my patch not using the printf macro and using configure.in in bfd 
to find the proper type for bfd_hostptr_t. Also I adjust the autodetection 
of 64 bit in configure by using the size of a "void *" == 8 for detection.

ChangeLog:

2007-04-18  Kai Tietz   <kai.tietz@onevision.com>

        * bfd/bfd-in.h: (BFD_HOST_64BIT_LONG_LONG): New
        as equivalent for BFD_HOST_64BIT_LONG.
        (BFD_HOSTPTR_T): Host pointer type for casting a
        pointer to an integer type.
        (bfd_hostptr_t): The typedef of BFD_HOSTPTR_T.
        (sprintf_vma, fprintf_vma): Add support for long long prints.
        * bfd/bfd-in2.h: Regenerate.
        * bfd/configure.in: (BFD_HOST_64BIT_LONG_LONG): New
        as equivalent for BFD_HOST_64BIT_LONG.
        (BFD_HOSTPTR_T): Host pointer type for casting a
        pointer to an integer type. Defauls is "unsigned long".
        (AC_CHECK_SIZEOF(void *)): New.
        (host64): Set it if the pointer size is 8.
        * bfd/configure: Regenerate.
        * bfd/config.in: Add macro SIZEOF_VOID_P.
        * bfd/coffcode.h: Replace host ptr type assuming "long" to
        bfd_hostptr_t type.
        * bfd/coffgen.c: Likewise.
        * bfd/elf-eh-frame.c: Likewise.
        * bfd/peicode.h: Likewise.
        * gas/symbols.c: Print bfd_hostptr_t to file via fprintf_vma.
        * gas/write.c: Likewise.
        * gprof/cg_print.c: Force cast of sizeof to be a long.
        * gprof/hist.c: Likewise.
        * include/splay-tree.h: New type libi_uhostptr_t needed for
        w64 when a long is not wide enought for a pointer for
        splay_tree_key and splay_tree_value..
        (splay_tree_key, splay_tree_value): As above, see comment.
        * include/coff/internal.h:  Replace host ptr type assuming "long"
        to bfd_hostptr_t type.
        * libiberty/strerror.c: Undefine sys_nerr and sys_errlist if
        allready defined in front by runtime headers.

Regards,
 i.A. Kai Tietz


------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger



[-- Attachment #2: nativew64.txt --]
[-- Type: text/plain, Size: 15639 bytes --]

Index: bfd/bfd-in.h
===================================================================
RCS file: /cvs/src/src/bfd/bfd-in.h,v
retrieving revision 1.126
diff -b -u -r1.126 bfd-in.h
--- bfd/bfd-in.h	20 Mar 2007 20:19:07 -0000	1.126
+++ bfd/bfd-in.h	18 Apr 2007 09:14:53 -0000
@@ -76,6 +76,7 @@
 #define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
 
 #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
+#define BFD_HOST_64BIT_LONG_LONG @BFD_HOST_64BIT_LONG_LONG@
 #define BFD_HOST_LONG_LONG @BFD_HOST_LONG_LONG@
 #if @BFD_HOST_64_BIT_DEFINED@
 #define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
@@ -96,6 +97,10 @@
 #endif
 #endif
 
+/* Declaring a type wide enough to hold a host long and a host pointer.  */
+#define BFD_HOSTPTR_T	@BFD_HOSTPTR_T@
+typedef BFD_HOSTPTR_T bfd_hostptr_t;
+
 /* Forward declaration.  */
 typedef struct bfd bfd;
 
@@ -129,6 +134,9 @@
 #if BFD_HOST_64BIT_LONG
 #define sprintf_vma(s,x) sprintf (s, "%016lx", x)
 #define fprintf_vma(f,x) fprintf (f, "%016lx", x)
+#elif BFD_HOST_64BIT_LONG_LONG
+#define sprintf_vma(s,x) sprintf (s, "%016llx", x)
+#define fprintf_vma(f,x) fprintf (f, "%016llx", x)
 #else
 #define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
 #define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
Index: bfd/coffcode.h
===================================================================
RCS file: /cvs/src/src/bfd/coffcode.h,v
retrieving revision 1.136
diff -b -u -r1.136 coffcode.h
--- bfd/coffcode.h	26 Mar 2007 12:22:59 -0000	1.136
+++ bfd/coffcode.h	18 Apr 2007 09:15:01 -0000
@@ -4380,7 +4380,7 @@
 
 	  dst->symbol.name = (char *) (src->u.syment._n._n_n._n_offset);
 	  /* We use the native name field to point to the cached field.  */
-	  src->u.syment._n._n_n._n_zeroes = (long) dst;
+	  src->u.syment._n._n_n._n_zeroes = (bfd_hostptr_t) dst;
 	  dst->symbol.section = coff_section_from_bfd_index (abfd,
 						     src->u.syment.n_scnum);
 	  dst->symbol.flags = 0;
Index: bfd/coffgen.c
===================================================================
RCS file: /cvs/src/src/bfd/coffgen.c,v
retrieving revision 1.56
diff -b -u -r1.56 coffgen.c
--- bfd/coffgen.c	2 Apr 2007 16:51:13 -0000	1.56
+++ bfd/coffgen.c	18 Apr 2007 09:15:04 -0000
@@ -725,8 +725,8 @@
 	    {
 	      /* FIXME: We should use a union here.  */
 	      s->u.syment.n_value =
-		(bfd_vma)((combined_entry_type *)
-			  ((unsigned long) s->u.syment.n_value))->offset;
+		(bfd_hostptr_t) ((combined_entry_type *)
+			  ((bfd_hostptr_t) s->u.syment.n_value))->offset;
 	      s->fix_value = 0;
 	    }
 	  if (s->fix_line)
@@ -1640,7 +1640,7 @@
 		}
 
 	      internal_ptr->u.syment._n._n_n._n_offset =
-		((long)
+		((bfd_hostptr_t)
 		 (string_table
 		  + (internal_ptr + 1)->u.auxent.x_file.x_n.x_offset));
 	    }
@@ -1652,13 +1652,13 @@
 	      if (internal_ptr->u.syment.n_numaux > 1
 		  && coff_data (abfd)->pe)
 		internal_ptr->u.syment._n._n_n._n_offset =
-		  ((long)
+		  ((bfd_hostptr_t)
 		   copy_name (abfd,
 			      (internal_ptr + 1)->u.auxent.x_file.x_fname,
 			      internal_ptr->u.syment.n_numaux * symesz));
 	      else
 		internal_ptr->u.syment._n._n_n._n_offset =
-		  ((long)
+		  ((bfd_hostptr_t)
 		   copy_name (abfd,
 			      (internal_ptr + 1)->u.auxent.x_file.x_fname,
 			      (size_t) bfd_coff_filnmlen (abfd)));
@@ -1682,11 +1682,11 @@
 	      if (newstring == NULL)
 		return NULL;
 	      strncpy (newstring, internal_ptr->u.syment._n._n_name, i);
-	      internal_ptr->u.syment._n._n_n._n_offset = (long int) newstring;
+	      internal_ptr->u.syment._n._n_n._n_offset = (bfd_hostptr_t) newstring;
 	      internal_ptr->u.syment._n._n_n._n_zeroes = 0;
 	    }
 	  else if (internal_ptr->u.syment._n._n_n._n_offset == 0)
-	    internal_ptr->u.syment._n._n_n._n_offset = (long int) "";
+	    internal_ptr->u.syment._n._n_n._n_offset = (bfd_vma) "";
 	  else if (!bfd_coff_symname_in_debug (abfd, &internal_ptr->u.syment))
 	    {
 	      /* Long name already.  Point symbol at the string in the
@@ -1698,7 +1698,7 @@
 		    return NULL;
 		}
 	      internal_ptr->u.syment._n._n_n._n_offset =
-		((long int)
+		((bfd_hostptr_t)
 		 (string_table
 		  + internal_ptr->u.syment._n._n_n._n_offset));
 	    }
@@ -1707,7 +1707,7 @@
 	      /* Long name in debug section.  Very similar.  */
 	      if (debug_section == NULL)
 		debug_section = build_debug_section (abfd);
-	      internal_ptr->u.syment._n._n_n._n_offset = (long int)
+	      internal_ptr->u.syment._n._n_n._n_offset = (bfd_hostptr_t)
 		(debug_section + internal_ptr->u.syment._n._n_n._n_offset);
 	    }
 	}
@@ -1784,7 +1784,7 @@
   if (coffsymbol (symbol)->native != NULL
       && coffsymbol (symbol)->native->fix_value)
     ret->value = coffsymbol (symbol)->native->u.syment.n_value -
-      (unsigned long) obj_raw_syments (abfd);
+      (bfd_hostptr_t) obj_raw_syments (abfd);
 }
 
 /* Return the COFF syment for a symbol.  */
@@ -1807,7 +1807,7 @@
 
   if (csym->native->fix_value)
     psyment->n_value = psyment->n_value -
-      (unsigned long) obj_raw_syments (abfd);
+      (bfd_hostptr_t) obj_raw_syments (abfd);
 
   /* FIXME: We should handle fix_line here.  */
 
@@ -1893,7 +1893,7 @@
 	  if (! combined->fix_value)
 	    val = (bfd_vma) combined->u.syment.n_value;
 	  else
-	    val = combined->u.syment.n_value - (unsigned long) root;
+	    val = combined->u.syment.n_value - (bfd_hostptr_t) root;
 
 	  fprintf (file, "(sec %2d)(fl 0x%02x)(ty %3x)(scl %3d) (nx %d) 0x",
 		   combined->u.syment.n_scnum,
Index: bfd/config.in
===================================================================
RCS file: /cvs/src/src/bfd/config.in,v
retrieving revision 1.32
diff -b -u -r1.32 config.in
--- bfd/config.in	5 Jun 2006 12:25:49 -0000	1.32
+++ bfd/config.in	18 Apr 2007 09:15:04 -0000
@@ -245,6 +245,9 @@
 /* The size of a `off_t', as computed by sizeof. */
 #undef SIZEOF_OFF_T
 
+/* The sizeof of a 'void *', as computed by sizeof. */
+#undef SIZEOF_VOID_P
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
Index: bfd/configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.227
diff -b -u -r1.227 configure.in
--- bfd/configure.in	14 Apr 2007 20:36:56 -0000	1.227
+++ bfd/configure.in	18 Apr 2007 09:15:14 -0000
@@ -99,10 +99,12 @@
 AC_PROG_INSTALL
 
 BFD_HOST_64BIT_LONG=0
+BFD_HOST_64BIT_LONG_LONG=0
 BFD_HOST_LONG_LONG=0
 BFD_HOST_64_BIT_DEFINED=0
 BFD_HOST_64_BIT=
 BFD_HOST_U_64_BIT=
+BFD_HOSTPTR_T = "unsigned long"
 
 AC_MSG_CHECKING([for long long])
 AC_CACHE_VAL(bfd_cv_has_long_long,
@@ -113,12 +115,21 @@
   AC_CHECK_SIZEOF(long long)
 fi
 
+AC_CHECK_SIZEOF(void *)
 AC_CHECK_SIZEOF(long)
-if test "x${ac_cv_sizeof_long}" = "x8"; then
+
+if test "x${ac_cv_sizeof_void_p}" = "x8"; then
   host64=true
+  if test "x${ac_cv_sizeof_long}" = "x8"; then
   BFD_HOST_64BIT_LONG=1
   test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
   test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
+  elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
+    BFD_HOST_64BIT_LONG_LONG=1
+    test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
+    test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
+    BFD_HOSTPTR_T="unsigned long long"
+  fi
 elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
   test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
   test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
@@ -131,10 +142,12 @@
 fi
 
 AC_SUBST(BFD_HOST_64BIT_LONG)
+AC_SUBST(BFD_HOST_64BIT_LONG_LONG)
 AC_SUBST(BFD_HOST_LONG_LONG)
 AC_SUBST(BFD_HOST_64_BIT_DEFINED)
 AC_SUBST(BFD_HOST_64_BIT)
 AC_SUBST(BFD_HOST_U_64_BIT)
+AC_SUBST(BFD_HOSTPTR_T)
 
 BFD_CC_FOR_BUILD
 
Index: bfd/elf-eh-frame.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-eh-frame.c,v
retrieving revision 1.54
diff -b -u -r1.54 elf-eh-frame.c
--- bfd/elf-eh-frame.c	4 Jan 2007 13:30:39 -0000	1.54
+++ bfd/elf-eh-frame.c	18 Apr 2007 09:15:16 -0000
@@ -917,7 +917,7 @@
       {
 	if (!ent->cie)
 	  {
-	    ecie = ecies + (unsigned long) ent->cie_inf;
+	    ecie = ecies + (bfd_hostptr_t) ent->cie_inf;
 	    ent->cie_inf = ecie->cie.cie_inf;
 	  }
 	ent->new_offset = offset;
Index: bfd/peicode.h
===================================================================
RCS file: /cvs/src/src/bfd/peicode.h,v
retrieving revision 1.50
diff -b -u -r1.50 peicode.h
--- bfd/peicode.h	20 Sep 2006 11:35:07 -0000	1.50
+++ bfd/peicode.h	18 Apr 2007 09:15:17 -0000
@@ -565,7 +565,7 @@
   /* Initialise the internal symbol structure.  */
   ent->u.syment.n_sclass          = sclass;
   ent->u.syment.n_scnum           = section->target_index;
-  ent->u.syment._n._n_n._n_offset = (long) sym;
+  ent->u.syment._n._n_n._n_offset = (bfd_hostptr_t) sym;
 
   sym->symbol.the_bfd = vars->abfd;
   sym->symbol.name    = vars->string_ptr;
Index: gas/symbols.c
===================================================================
RCS file: /cvs/src/src/gas/symbols.c,v
retrieving revision 1.83
diff -b -u -r1.83 symbols.c
--- gas/symbols.c	15 Mar 2007 12:11:49 -0000	1.83
+++ gas/symbols.c	18 Apr 2007 09:15:27 -0000
@@ -2728,14 +2728,19 @@
   const char *name = S_GET_NAME (sym);
   if (!name || !name[0])
     name = "(unnamed)";
-  fprintf (file, "sym %lx %s", (unsigned long) sym, name);
+  fprintf (file, "sym ");
+  fprintf_vma (file, (bfd_vma) ((bfd_hostptr_t) sym));
+  fprintf (file, " %s", name);
 
   if (LOCAL_SYMBOL_CHECK (sym))
     {
       struct local_symbol *locsym = (struct local_symbol *) sym;
       if (local_symbol_get_frag (locsym) != &zero_address_frag
 	  && local_symbol_get_frag (locsym) != NULL)
-	fprintf (file, " frag %lx", (long) local_symbol_get_frag (locsym));
+	{
+	  fprintf (file, " frag ");
+	  fprintf_vma (file, (bfd_vma) ((bfd_hostptr_t) local_symbol_get_frag (locsym)));
+        }
       if (local_symbol_resolved_p (locsym))
 	fprintf (file, " resolved");
       fprintf (file, " local");
@@ -2743,7 +2748,10 @@
   else
     {
       if (sym->sy_frag != &zero_address_frag)
-	fprintf (file, " frag %lx", (long) sym->sy_frag);
+	{
+	  fprintf (file, " frag ");
+	  fprintf_vma (file, (bfd_vma) ((bfd_hostptr_t) sym->sy_frag));
+	}
       if (sym->written)
 	fprintf (file, " written");
       if (sym->sy_resolved)
@@ -2817,7 +2825,9 @@
 void
 print_expr_1 (FILE *file, expressionS *exp)
 {
-  fprintf (file, "expr %lx ", (long) exp);
+  fprintf (file, "expr ");
+  fprintf_vma (file, (bfd_vma) ((bfd_hostptr_t) exp));
+  fprintf (file, " ");
   switch (exp->X_op)
     {
     case O_illegal:
Index: gas/write.c
===================================================================
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.112
diff -b -u -r1.112 write.c
--- gas/write.c	26 Mar 2007 12:23:48 -0000	1.112
+++ gas/write.c	18 Apr 2007 09:15:29 -0000
@@ -2486,7 +2486,9 @@
 print_fixup (fixS *fixp)
 {
   indent_level = 1;
-  fprintf (stderr, "fix %lx %s:%d", (long) fixp, fixp->fx_file, fixp->fx_line);
+  fprintf (stderr, "fix ");
+  fprintf_vma (stderr, (bfd_vma)((bfd_hostptr_t) fixp));
+  fprintf (stderr, " %s:%d",fixp->fx_file, fixp->fx_line);
   if (fixp->fx_pcrel)
     fprintf (stderr, " pcrel");
   if (fixp->fx_pcrel_adjust)
@@ -2503,8 +2505,10 @@
     fprintf (stderr, " tcbit");
   if (fixp->fx_done)
     fprintf (stderr, " done");
-  fprintf (stderr, "\n    size=%d frag=%lx where=%ld offset=%lx addnumber=%lx",
-	   fixp->fx_size, (long) fixp->fx_frag, (long) fixp->fx_where,
+  fprintf (stderr, "\n    size=%d frag=", fixp->fx_size);
+  fprintf_vma (stderr, (bfd_vma) ((bfd_hostptr_t) fixp->fx_frag));
+  fprintf (stderr, " where=%ld offset=%lx addnumber=%lx",
+	   (long) fixp->fx_where,
 	   (long) fixp->fx_offset, (long) fixp->fx_addnumber);
   fprintf (stderr, "\n    %s (%d)", bfd_get_reloc_code_name (fixp->fx_r_type),
 	   fixp->fx_r_type);
Index: gprof/cg_print.c
===================================================================
RCS file: /cvs/src/src/gprof/cg_print.c,v
retrieving revision 1.12
diff -b -u -r1.12 cg_print.c
--- gprof/cg_print.c	9 May 2005 06:55:24 -0000	1.12
+++ gprof/cg_print.c	18 Apr 2007 09:15:42 -0000
@@ -76,7 +76,7 @@
     }
 
   printf (_("\ngranularity: each sample hit covers %ld byte(s)"),
-	  (long) hist_scale * sizeof (UNIT));
+	  (long) hist_scale * (long) sizeof (UNIT));
 
   if (print_time > 0.0)
     printf (_(" for %.2f%% of %.2f seconds\n\n"),
Index: gprof/hist.c
===================================================================
RCS file: /cvs/src/src/gprof/hist.c,v
retrieving revision 1.17
diff -b -u -r1.17 hist.c
--- gprof/hist.c	10 Apr 2007 08:47:50 -0000	1.17
+++ gprof/hist.c	18 Apr 2007 09:15:43 -0000
@@ -464,7 +464,7 @@
   if (bsd_style_output)
     {
       printf (_("\ngranularity: each sample hit covers %ld byte(s)"),
-	      (long) hist_scale * sizeof (UNIT));
+	      (long) hist_scale * (long) sizeof (UNIT));
       if (total_time > 0.0)
 	{
 	  printf (_(" for %.2f%% of %.2f %s\n\n"),
Index: include/splay-tree.h
===================================================================
RCS file: /cvs/src/src/include/splay-tree.h,v
retrieving revision 1.13
diff -b -u -r1.13 splay-tree.h
--- include/splay-tree.h	10 May 2005 10:21:08 -0000	1.13
+++ include/splay-tree.h	18 Apr 2007 09:15:43 -0000
@@ -36,6 +36,14 @@
 
 #include "ansidecl.h"
 
+#ifndef _WIN64
+  typedef unsigned long int libi_uhostptr_t;
+  typedef long int libi_shostptr_t;
+#else
+  typedef unsigned long long libi_uhostptr_t;
+  typedef long long libi_shostptr_t;
+#endif
+
 #ifndef GTY
 #define GTY(X)
 #endif
@@ -44,8 +52,8 @@
    these types, if necessary.  These types should be sufficiently wide
    that any pointer or scalar can be cast to these types, and then
    cast back, without loss of precision.  */
-typedef unsigned long int splay_tree_key;
-typedef unsigned long int splay_tree_value;
+typedef libi_uhostptr_t splay_tree_key;
+typedef libi_uhostptr_t splay_tree_value;
 
 /* Forward declaration for a node in the tree.  */
 typedef struct splay_tree_node_s *splay_tree_node;
Index: include/coff/internal.h
===================================================================
RCS file: /cvs/src/src/include/coff/internal.h,v
retrieving revision 1.21
diff -b -u -r1.21 internal.h
--- include/coff/internal.h	19 Mar 2007 23:06:06 -0000	1.21
+++ include/coff/internal.h	18 Apr 2007 09:15:45 -0000
@@ -419,8 +419,8 @@
     char _n_name[SYMNMLEN];	/* old COFF version	*/
     struct
     {
-      long _n_zeroes;		/* new == 0		*/
-      long _n_offset;		/* offset into string table */
+      bfd_hostptr_t _n_zeroes;		/* new == 0		*/
+      bfd_hostptr_t _n_offset;		/* offset into string table */
     }      _n_n;
     char *_n_nptr[2];		/* allows for overlaying	*/
   }     _n;
Index: libiberty/strerror.c
===================================================================
RCS file: /cvs/src/src/libiberty/strerror.c,v
retrieving revision 1.12
diff -b -u -r1.12 strerror.c
--- libiberty/strerror.c	28 Mar 2005 02:09:01 -0000	1.12
+++ libiberty/strerror.c	18 Apr 2007 09:15:55 -0000
@@ -469,6 +469,9 @@
 
 #else
 
+#undef sys_nerr
+#undef sys_errlist
+
 extern int sys_nerr;
 extern char *sys_errlist[];
 
=

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-11 15:49           ` Kai Tietz
@ 2007-04-11 17:34             ` Daniel Jacobowitz
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Jacobowitz @ 2007-04-11 17:34 UTC (permalink / raw)
  To: Kai Tietz; +Cc: binutils, H. J. Lu

On Wed, Apr 11, 2007 at 05:42:19PM +0200, Kai Tietz wrote:
> I didn't missed your point, but what is needed would be something like a 
> longptr_t

Why?  Do you need something that can hold either a long or a pointer?
You were complaining, in the message I replied to, about warnings on
casts.  You can solve that by casting through intptr_t.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-11 15:43         ` Daniel Jacobowitz
@ 2007-04-11 15:49           ` Kai Tietz
  2007-04-11 17:34             ` Daniel Jacobowitz
  0 siblings, 1 reply; 22+ messages in thread
From: Kai Tietz @ 2007-04-11 15:49 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: binutils, H. J. Lu

Daniel Jacobowitz <drow@false.org> wrote on 11.04.2007 17:24:04:

> On Wed, Apr 11, 2007 at 05:21:14PM +0200, Kai Tietz wrote:
> > Yes, ice ages ... It seems that on every project and library the same 
old 
> > story reappears ;)
> > But as I learned, not on every c-runtime necessarily an stdint header 
is 
> > present and/or want to be included ;()
> > 
> > Re-inventing the wheel, may this patch could work (beside the 
> > BFD_HOSTPTR_T_PRT_X).
> 
> Please read my message a second time, since you missed my point :-)
> If the OS is missing a usable intptr_t we already have autoconf macros
> to create it.

I didn't missed your point, but what is needed would be something like a 
longptr_t (which is not part of C99 AFAIK). The same discussion I had in 
the past about the subject "splay-tree.h" header. Not on all platforms is 
a long less or equal to a pointer.

Regards,
 i.A. Kai Tietz

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-11 15:24       ` Kai Tietz
@ 2007-04-11 15:43         ` Daniel Jacobowitz
  2007-04-11 15:49           ` Kai Tietz
  0 siblings, 1 reply; 22+ messages in thread
From: Daniel Jacobowitz @ 2007-04-11 15:43 UTC (permalink / raw)
  To: Kai Tietz; +Cc: binutils, H. J. Lu

On Wed, Apr 11, 2007 at 05:21:14PM +0200, Kai Tietz wrote:
> Yes, ice ages ... It seems that on every project and library the same old 
> story reappears ;)
> But as I learned, not on every c-runtime necessarily an stdint header is 
> present and/or want to be included ;()
> 
> Re-inventing the wheel, may this patch could work (beside the 
> BFD_HOSTPTR_T_PRT_X).

Please read my message a second time, since you missed my point :-)
If the OS is missing a usable intptr_t we already have autoconf macros
to create it.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-11 15:17     ` Daniel Jacobowitz
@ 2007-04-11 15:24       ` Kai Tietz
  2007-04-11 15:43         ` Daniel Jacobowitz
  0 siblings, 1 reply; 22+ messages in thread
From: Kai Tietz @ 2007-04-11 15:24 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: binutils, H. J. Lu

[-- Attachment #1: Type: text/plain, Size: 1506 bytes --]

Daniel Jacobowitz <drow@false.org> wrote on 11.04.2007 17:00:31:

> On Wed, Apr 11, 2007 at 04:17:40PM +0200, Kai Tietz wrote:
> > The "long long" would work, if there would not be the -Werror 
parameter 
> > for gcc. The gcc bubbles a warning also for the case, that the integer 

> > casted to/from a pointer is bigger :(. This would break an cross from 
> > 32-bit to 64-bit.
> 
> We already have an autoconf macro in the tree to generate a stdint.h.
> Gnulib also has one that we can import.
> 
> It's long past time to start assuming intptr_t.

Yes, ice ages ... It seems that on every project and library the same old 
story reappears ;)
But as I learned, not on every c-runtime necessarily an stdint header is 
present and/or want to be included ;()

Re-inventing the wheel, may this patch could work (beside the 
BFD_HOSTPTR_T_PRT_X).

Regards,
i.A. Kai Tietz

 


------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger



[-- Attachment #2: bfd_config.txt --]
[-- Type: text/plain, Size: 2997 bytes --]

Index: configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.226
diff -b -u -r1.226 configure.in
--- configure.in	23 Mar 2007 02:51:30 -0000	1.226
+++ configure.in	11 Apr 2007 15:15:56 -0000
@@ -99,6 +99,7 @@
 AC_PROG_INSTALL
 
 BFD_HOST_64BIT_LONG=0
+BFD_HOST_64BIT_LONG_LONG=0
 BFD_HOST_LONG_LONG=0
 BFD_HOST_64_BIT_DEFINED=0
 BFD_HOST_64_BIT=
@@ -114,11 +115,20 @@
 fi
 
 AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(void *)
 if test "x${ac_cv_sizeof_long}" = "x8"; then
   host64=true
   BFD_HOST_64BIT_LONG=1
+  if test "x${ac_cv_sizeof_void_p}" = "x${ac_cv_sizeof_long_long}"; then
+    BFD_HOST_64BIT_LONG_LONG=1
+  fi
   test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
   test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
+elif test "x${ac_cv_sizeof_void_p}" = "x${ac_cv_sizeof_long_long}"; then
+  host64=true
+  BFD_HOST_64BIT_LONG_LONG=1
+  test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
+  test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
 elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
   test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
   test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
@@ -131,6 +141,7 @@
 fi
 
 AC_SUBST(BFD_HOST_64BIT_LONG)
+AC_SUBST(BFD_HOST_64BIT_LONG_LONG)
 AC_SUBST(BFD_HOST_LONG_LONG)
 AC_SUBST(BFD_HOST_64_BIT_DEFINED)
 AC_SUBST(BFD_HOST_64_BIT)
Index: bfd-in.h
===================================================================
RCS file: /cvs/src/src/bfd/bfd-in.h,v
retrieving revision 1.126
diff -b -u -r1.126 bfd-in.h
--- bfd-in.h	20 Mar 2007 20:19:07 -0000	1.126
+++ bfd-in.h	11 Apr 2007 15:16:10 -0000
@@ -76,6 +76,7 @@
 #define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
 
 #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
+#define BFD_HOST_64BIT_LONG_LONG @BFD_HOST_64BIT_LONG_LONG@
 #define BFD_HOST_LONG_LONG @BFD_HOST_LONG_LONG@
 #if @BFD_HOST_64_BIT_DEFINED@
 #define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
@@ -96,6 +97,16 @@
 #endif
 #endif
 
+/* Declaring a type wide enough to hold a host long and a host pointer.  */
+#if BFD_HOST_64BIT_LONG_LONG == 1 && BFD_HOST_64BIT_LONG == 0
+#undef BFD_HOSTPTR_T_PRINT
+typedef unsigned long long bfd_hostptr_t;
+#define BFD_HOSTPTR_T_PRT_X	"%llx"
+#else
+typedef unsigned long bfd_hostptr_t;
+#define BFD_HOSTPTR_T_PRT_X	"%lx"
+#endif
+
 /* Forward declaration.  */
 typedef struct bfd bfd;
 
@@ -129,6 +140,9 @@
 #if BFD_HOST_64BIT_LONG
 #define sprintf_vma(s,x) sprintf (s, "%016lx", x)
 #define fprintf_vma(f,x) fprintf (f, "%016lx", x)
+#elif BFD_HOST_64BIT_LONG_LONG
+#define sprintf_vma(s,x) sprintf (s, "%016llx", x)
+#define fprintf_vma(f,x) fprintf (f, "%016llx", x)
 #else
 #define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
 #define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
=

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-11 14:57   ` Kai Tietz
@ 2007-04-11 15:17     ` Daniel Jacobowitz
  2007-04-11 15:24       ` Kai Tietz
  0 siblings, 1 reply; 22+ messages in thread
From: Daniel Jacobowitz @ 2007-04-11 15:17 UTC (permalink / raw)
  To: Kai Tietz; +Cc: H. J. Lu, binutils

On Wed, Apr 11, 2007 at 04:17:40PM +0200, Kai Tietz wrote:
> The "long long" would work, if there would not be the -Werror parameter 
> for gcc. The gcc bubbles a warning also for the case, that the integer 
> casted to/from a pointer is bigger :(. This would break an cross from 
> 32-bit to 64-bit.

We already have an autoconf macro in the tree to generate a stdint.h.
Gnulib also has one that we can import.

It's long past time to start assuming intptr_t.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-11 13:58 ` H. J. Lu
  2007-04-11 14:07   ` H. J. Lu
@ 2007-04-11 14:57   ` Kai Tietz
  2007-04-11 15:17     ` Daniel Jacobowitz
  1 sibling, 1 reply; 22+ messages in thread
From: Kai Tietz @ 2007-04-11 14:57 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

"H. J. Lu" <hjl@lucon.org> wrote on 11.04.2007 15:58:37:

> On Wed, Apr 11, 2007 at 03:42:31PM +0200, Kai Tietz wrote:
> > Hello,
> > 
> > I did the windres.h patch changing the long to int types, so that 
problem 
> > #2737 seems to be solved.
> 
> No, it doesn't work on big endian host. You should array of char
> in external data structures.

Ok, I take a look for big-endian hosts and the external data structures.

> > Additionally I introduced in bfd-in.h the type "bfd_hostptr_t" and its 

> > hexadeicmal printf representation in macro "BFD_HOSTPTR_T_PRT_X". For 
now, 
> > AFAIS, only WIN64 has a long type lesser than a pointer, therefore I 
made 
> > the define dependent on the definiton of _WIN64. The modification in 
> 
> I don't believe we need BFD_HOSTPTR_T_PRT_X. As I said before, the
> PE problem is there is no clear line between external and internal
> data structues.  You should be able to use long long, even in big
> endian, internally to hold any PE data type. You just need to convert
> it to the proper size in proper endian when you write it out. You
> shouldn't have any problem when it is done peoperly.

The "long long" would work, if there would not be the -Werror parameter 
for gcc. The gcc bubbles a warning also for the case, that the integer 
casted to/from a pointer is bigger :(. This would break an cross from 
32-bit to 64-bit.
The helper macro BFD_HOSTPTR_T_PTR_X is for sure not coercively, but 
simplivies the readability AFAICS. 

Regards,
 i.A. Kai Tietz

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-11 13:58 ` H. J. Lu
@ 2007-04-11 14:07   ` H. J. Lu
  2007-04-18 11:59     ` Kai Tietz
  2007-04-11 14:57   ` Kai Tietz
  1 sibling, 1 reply; 22+ messages in thread
From: H. J. Lu @ 2007-04-11 14:07 UTC (permalink / raw)
  To: Kai Tietz; +Cc: binutils

On Wed, Apr 11, 2007 at 06:58:37AM -0700, H. J. Lu wrote:
> On Wed, Apr 11, 2007 at 03:42:31PM +0200, Kai Tietz wrote:
> > Hello,
> > 
> > I did the windres.h patch changing the long to int types, so that problem 
> > #2737 seems to be solved.
> 
> No, it doesn't work on big endian host. You should array of char
> in external data structures.
> 
> > Additionally I introduced in bfd-in.h the type "bfd_hostptr_t" and its 
> > hexadeicmal printf representation in macro "BFD_HOSTPTR_T_PRT_X". For now, 
> > AFAIS, only WIN64 has a long type lesser than a pointer, therefore I made 
> > the define dependent on the definiton of _WIN64. The modification in 
> 
> I don't believe we need BFD_HOSTPTR_T_PRT_X. As I said before, the
> PE problem is there is no clear line between external and internal
> data structues.  You should be able to use long long, even in big
> endian, internally to hold any PE data type. You just need to convert
> it to the proper size in proper endian when you write it out. You
> shouldn't have any problem when it is done peoperly.

We do need a new type when casting from pointer to integer. But
it should be determined in autoconf. You can use AC_CHECK_SIZEOF.


H.J.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
  2007-04-11 13:43 Kai Tietz
@ 2007-04-11 13:58 ` H. J. Lu
  2007-04-11 14:07   ` H. J. Lu
  2007-04-11 14:57   ` Kai Tietz
  0 siblings, 2 replies; 22+ messages in thread
From: H. J. Lu @ 2007-04-11 13:58 UTC (permalink / raw)
  To: Kai Tietz; +Cc: binutils

On Wed, Apr 11, 2007 at 03:42:31PM +0200, Kai Tietz wrote:
> Hello,
> 
> I did the windres.h patch changing the long to int types, so that problem 
> #2737 seems to be solved.

No, it doesn't work on big endian host. You should array of char
in external data structures.

> Additionally I introduced in bfd-in.h the type "bfd_hostptr_t" and its 
> hexadeicmal printf representation in macro "BFD_HOSTPTR_T_PRT_X". For now, 
> AFAIS, only WIN64 has a long type lesser than a pointer, therefore I made 
> the define dependent on the definiton of _WIN64. The modification in 

I don't believe we need BFD_HOSTPTR_T_PRT_X. As I said before, the
PE problem is there is no clear line between external and internal
data structues.  You should be able to use long long, even in big
endian, internally to hold any PE data type. You just need to convert
it to the proper size in proper endian when you write it out. You
shouldn't have any problem when it is done peoperly.


H.J.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: PATCH: w64 native support
@ 2007-04-11 13:43 Kai Tietz
  2007-04-11 13:58 ` H. J. Lu
  0 siblings, 1 reply; 22+ messages in thread
From: Kai Tietz @ 2007-04-11 13:43 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

[-- Attachment #1: Type: text/plain, Size: 2777 bytes --]

Hello,

I did the windres.h patch changing the long to int types, so that problem 
#2737 seems to be solved.
Additionally I introduced in bfd-in.h the type "bfd_hostptr_t" and its 
hexadeicmal printf representation in macro "BFD_HOSTPTR_T_PRT_X". For now, 
AFAIS, only WIN64 has a long type lesser than a pointer, therefore I made 
the define dependent on the definiton of _WIN64. The modification in 
splay-tree.h header has the same reason.

ChangeLogs:

For bfd:

2007-04-11 Kai Tietz  <kai.tietz@onevision.com>

        * bfd/bfd-in.h: (bfd_hostptr_t): New type for max(long,void *) 
width.
        (BFD_HOSTPTR_T_PRT_X): Printf a bfd_hostptr_t type.
        * bfd/bfd-in2.h: Regenerate.
        * bfd/coffcode.h: Replace use of long by bfd_hostptr_t.
        * bfd/coffgen.c: Likewise.
        * bfd/elf-eh-frame.c: Likewise.
        * bfd/peicode.h: Likewise.

For binutils:

2007-04-10 Kai Tietz  <kai.tietz@onevision.com>

        * binutils/resres.c: Cast sizeof explicit to type "long".
        * binutils/resrc.c: Adjust printf formatter for ints.
        * binutils/windres.c: (main): Assert if sizeof(int) not 4 bytes.
        * binutils/windres.h: Changed windows structure to use
        int type instead of long type.

For gas:

2007-04-10 Kai Tietz  <kai.tietz@onevision.com>

        * gas/symbols.c: Replace use of long by bfd_hostptr_t and
          print via BFD_HOSTPTR_T_PRT_X.
        * gas/write.c: Likewise.

For gprof:

2007-04-10 Kai Tietz  <kai.tietz@onevision.com>

        * gprof/cg_print.c: Explict cast sizeof to long.
        * gprof/hist.c: Likewise.

For include:

2007-04-10 Kai Tietz  <kai.tietz@onevision.com>

        * include/splay-tree.h: (libi_uhostptr_t): New type.
        (libi_shostptr_t): New type.
        (splay_tree_key, splay_tree_value): Use libi_uhostptr_t type.
        * include/coff/internal.h: (_n_zeroes, _n_offset): Type as 
bfd_hostptr_t
        instead of long.


For libiberty:

2007-04-10 Kai Tietz  <kai.tietz@onevision.com>

        * libiberty/strerror.c: Undefine sys_nerr and sys_errlist for w64 
sake.

Regards,
 i.A. Kai Tietz



------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger

[-- Attachment #2: bfd-w64-native-2.txt --]
[-- Type: text/plain, Size: 28950 bytes --]

Index: bfd/bfd-in.h
===================================================================
RCS file: /cvs/src/src/bfd/bfd-in.h,v
retrieving revision 1.126
diff -b -u -r1.126 bfd-in.h
--- bfd/bfd-in.h	20 Mar 2007 20:19:07 -0000	1.126
+++ bfd/bfd-in.h	11 Apr 2007 13:25:21 -0000
@@ -96,6 +96,19 @@
 #endif
 #endif
 
+/* Declaring a type wide enough to hold a host long and a host pointer.  */
+#ifndef BFD_HOSTPTR_T
+#define BFD_HOSTPTR_T
+#undef BFD_HOSTPTR_T_PRINT
+#ifdef _WIN64
+typedef unsigned long long bfd_hostptr_t;
+#define BFD_HOSTPTR_T_PRT_X	"%llx"
+#else
+typedef unsigned long bfd_hostptr_t;
+#define BFD_HOSTPTR_T_PRT_X	"%lx"
+#endif
+#endif
+
 /* Forward declaration.  */
 typedef struct bfd bfd;
 
Index: bfd/bfd-in2.h
===================================================================
RCS file: /cvs/src/src/bfd/bfd-in2.h,v
retrieving revision 1.418
diff -b -u -r1.418 bfd-in2.h
--- bfd/bfd-in2.h	26 Mar 2007 12:23:03 -0000	1.418
+++ bfd/bfd-in2.h	11 Apr 2007 13:25:25 -0000
@@ -103,6 +103,19 @@
 #endif
 #endif
 
+/* Declaring a type wide enough to hold a host long and a host pointer.  */
+#ifndef BFD_HOSTPTR_T
+#define BFD_HOSTPTR_T
+#undef BFD_HOSTPTR_T_PRINT
+#ifdef _WIN64
+typedef unsigned long long bfd_hostptr_t;
+#define BFD_HOSTPTR_T_PRT_X	"%llx"
+#else
+typedef unsigned long bfd_hostptr_t;
+#define BFD_HOSTPTR_T_PRT_X	"%lx"
+#endif
+#endif
+
 /* Forward declaration.  */
 typedef struct bfd bfd;
 
Index: bfd/coffcode.h
===================================================================
RCS file: /cvs/src/src/bfd/coffcode.h,v
retrieving revision 1.136
diff -b -u -r1.136 coffcode.h
--- bfd/coffcode.h	26 Mar 2007 12:22:59 -0000	1.136
+++ bfd/coffcode.h	11 Apr 2007 13:25:29 -0000
@@ -4380,7 +4380,7 @@
 
 	  dst->symbol.name = (char *) (src->u.syment._n._n_n._n_offset);
 	  /* We use the native name field to point to the cached field.  */
-	  src->u.syment._n._n_n._n_zeroes = (long) dst;
+	  src->u.syment._n._n_n._n_zeroes = (bfd_hostptr_t) dst;
 	  dst->symbol.section = coff_section_from_bfd_index (abfd,
 						     src->u.syment.n_scnum);
 	  dst->symbol.flags = 0;
Index: bfd/coffgen.c
===================================================================
RCS file: /cvs/src/src/bfd/coffgen.c,v
retrieving revision 1.56
diff -b -u -r1.56 coffgen.c
--- bfd/coffgen.c	2 Apr 2007 16:51:13 -0000	1.56
+++ bfd/coffgen.c	11 Apr 2007 13:25:31 -0000
@@ -725,8 +725,8 @@
 	    {
 	      /* FIXME: We should use a union here.  */
 	      s->u.syment.n_value =
-		(bfd_vma)((combined_entry_type *)
-			  ((unsigned long) s->u.syment.n_value))->offset;
+		(bfd_hostptr_t) ((combined_entry_type *)
+			  ((bfd_hostptr_t) s->u.syment.n_value))->offset;
 	      s->fix_value = 0;
 	    }
 	  if (s->fix_line)
@@ -1640,7 +1640,7 @@
 		}
 
 	      internal_ptr->u.syment._n._n_n._n_offset =
-		((long)
+		((bfd_hostptr_t)
 		 (string_table
 		  + (internal_ptr + 1)->u.auxent.x_file.x_n.x_offset));
 	    }
@@ -1652,13 +1652,13 @@
 	      if (internal_ptr->u.syment.n_numaux > 1
 		  && coff_data (abfd)->pe)
 		internal_ptr->u.syment._n._n_n._n_offset =
-		  ((long)
+		  ((bfd_hostptr_t)
 		   copy_name (abfd,
 			      (internal_ptr + 1)->u.auxent.x_file.x_fname,
 			      internal_ptr->u.syment.n_numaux * symesz));
 	      else
 		internal_ptr->u.syment._n._n_n._n_offset =
-		  ((long)
+		  ((bfd_hostptr_t)
 		   copy_name (abfd,
 			      (internal_ptr + 1)->u.auxent.x_file.x_fname,
 			      (size_t) bfd_coff_filnmlen (abfd)));
@@ -1682,11 +1682,11 @@
 	      if (newstring == NULL)
 		return NULL;
 	      strncpy (newstring, internal_ptr->u.syment._n._n_name, i);
-	      internal_ptr->u.syment._n._n_n._n_offset = (long int) newstring;
+	      internal_ptr->u.syment._n._n_n._n_offset = (bfd_hostptr_t) newstring;
 	      internal_ptr->u.syment._n._n_n._n_zeroes = 0;
 	    }
 	  else if (internal_ptr->u.syment._n._n_n._n_offset == 0)
-	    internal_ptr->u.syment._n._n_n._n_offset = (long int) "";
+	    internal_ptr->u.syment._n._n_n._n_offset = (bfd_vma) "";
 	  else if (!bfd_coff_symname_in_debug (abfd, &internal_ptr->u.syment))
 	    {
 	      /* Long name already.  Point symbol at the string in the
@@ -1698,7 +1698,7 @@
 		    return NULL;
 		}
 	      internal_ptr->u.syment._n._n_n._n_offset =
-		((long int)
+		((bfd_hostptr_t)
 		 (string_table
 		  + internal_ptr->u.syment._n._n_n._n_offset));
 	    }
@@ -1707,7 +1707,7 @@
 	      /* Long name in debug section.  Very similar.  */
 	      if (debug_section == NULL)
 		debug_section = build_debug_section (abfd);
-	      internal_ptr->u.syment._n._n_n._n_offset = (long int)
+	      internal_ptr->u.syment._n._n_n._n_offset = (bfd_hostptr_t)
 		(debug_section + internal_ptr->u.syment._n._n_n._n_offset);
 	    }
 	}
@@ -1784,7 +1784,7 @@
   if (coffsymbol (symbol)->native != NULL
       && coffsymbol (symbol)->native->fix_value)
     ret->value = coffsymbol (symbol)->native->u.syment.n_value -
-      (unsigned long) obj_raw_syments (abfd);
+      (bfd_hostptr_t) obj_raw_syments (abfd);
 }
 
 /* Return the COFF syment for a symbol.  */
@@ -1807,7 +1807,7 @@
 
   if (csym->native->fix_value)
     psyment->n_value = psyment->n_value -
-      (unsigned long) obj_raw_syments (abfd);
+      (bfd_hostptr_t) obj_raw_syments (abfd);
 
   /* FIXME: We should handle fix_line here.  */
 
@@ -1893,7 +1893,7 @@
 	  if (! combined->fix_value)
 	    val = (bfd_vma) combined->u.syment.n_value;
 	  else
-	    val = combined->u.syment.n_value - (unsigned long) root;
+	    val = combined->u.syment.n_value - (bfd_hostptr_t) root;
 
 	  fprintf (file, "(sec %2d)(fl 0x%02x)(ty %3x)(scl %3d) (nx %d) 0x",
 		   combined->u.syment.n_scnum,
Index: bfd/elf-eh-frame.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-eh-frame.c,v
retrieving revision 1.54
diff -b -u -r1.54 elf-eh-frame.c
--- bfd/elf-eh-frame.c	4 Jan 2007 13:30:39 -0000	1.54
+++ bfd/elf-eh-frame.c	11 Apr 2007 13:25:32 -0000
@@ -917,7 +917,7 @@
       {
 	if (!ent->cie)
 	  {
-	    ecie = ecies + (unsigned long) ent->cie_inf;
+	    ecie = ecies + (bfd_hostptr_t) ent->cie_inf;
 	    ent->cie_inf = ecie->cie.cie_inf;
 	  }
 	ent->new_offset = offset;
Index: bfd/peicode.h
===================================================================
RCS file: /cvs/src/src/bfd/peicode.h,v
retrieving revision 1.50
diff -b -u -r1.50 peicode.h
--- bfd/peicode.h	20 Sep 2006 11:35:07 -0000	1.50
+++ bfd/peicode.h	11 Apr 2007 13:25:34 -0000
@@ -565,7 +565,7 @@
   /* Initialise the internal symbol structure.  */
   ent->u.syment.n_sclass          = sclass;
   ent->u.syment.n_scnum           = section->target_index;
-  ent->u.syment._n._n_n._n_offset = (long) sym;
+  ent->u.syment._n._n_n._n_offset = (bfd_hostptr_t) sym;
 
   sym->symbol.the_bfd = vars->abfd;
   sym->symbol.name    = vars->string_ptr;
Index: binutils/resrc.c
===================================================================
RCS file: /cvs/src/src/binutils/resrc.c,v
retrieving revision 1.27
diff -b -u -r1.27 resrc.c
--- binutils/resrc.c	8 May 2005 14:17:39 -0000	1.27
+++ binutils/resrc.c	11 Apr 2007 13:25:35 -0000
@@ -1515,9 +1515,9 @@
   /* Print out some COFF information that rc files can't represent.  */
 
   if (rd->time != 0)
-    fprintf (e, "// Time stamp: %lu\n", rd->time);
+    fprintf (e, "// Time stamp: %u\n", rd->time);
   if (rd->characteristics != 0)
-    fprintf (e, "// Characteristics: %lu\n", rd->characteristics);
+    fprintf (e, "// Characteristics: %u\n", rd->characteristics);
   if (rd->major != 0 || rd->minor != 0)
     fprintf (e, "// Version: %d %d\n", rd->major, rd->minor);
 
@@ -1546,7 +1546,7 @@
 	      && re->id.u.id != (unsigned long) (unsigned int) *language
 	      && (re->id.u.id & 0xffff) == re->id.u.id)
 	    {
-	      fprintf (e, "LANGUAGE %lu, %lu\n",
+	      fprintf (e, "LANGUAGE %u, %u\n",
 		       re->id.u.id & ((1 << SUBLANG_SHIFT) - 1),
 		       (re->id.u.id >> SUBLANG_SHIFT) & 0xff);
 	      *language = re->id.u.id;
@@ -1774,9 +1774,9 @@
     }
 
   if (res->coff_info.codepage != 0)
-    fprintf (e, "// Code page: %lu\n", res->coff_info.codepage);
+    fprintf (e, "// Code page: %u\n", res->coff_info.codepage);
   if (res->coff_info.reserved != 0)
-    fprintf (e, "// COFF reserved value: %lu\n", res->coff_info.reserved);
+    fprintf (e, "// COFF reserved value: %u\n", res->coff_info.reserved);
 
   if (name != NULL)
     res_id_print (e, *name, 0);
@@ -1809,7 +1809,7 @@
 	       res->u.dialog->width, res->u.dialog->height);
       if (res->u.dialog->ex != NULL
 	  && res->u.dialog->ex->help != 0)
-	fprintf (e, ", %lu", res->u.dialog->ex->help);
+	fprintf (e, ", %u", res->u.dialog->ex->help);
     }
 
   fprintf (e, "\n");
@@ -1841,11 +1841,11 @@
 		 res->res_info.language & ((1<<SUBLANG_SHIFT)-1),
 		 (res->res_info.language >> SUBLANG_SHIFT) & 0xff);
       if (res->res_info.characteristics != 0)
-	fprintf (e, "%sCHARACTERISTICS %lu\n",
+	fprintf (e, "%sCHARACTERISTICS %u\n",
 		 modifiers ? "// " : "",
 		 res->res_info.characteristics);
       if (res->res_info.version != 0)
-	fprintf (e, "%sVERSION %lu\n",
+	fprintf (e, "%sVERSION %u\n",
 		 modifiers ? "// " : "",
 		 res->res_info.version);
     }
@@ -1981,7 +1981,7 @@
     {
       fprintf (e, "// width: %d; height %d; planes %d; bits %d\n",
 	     gc->width, gc->height, gc->planes, gc->bits);
-      fprintf (e, "// data bytes: %lu; index: %d\n",
+      fprintf (e, "// data bytes: %u; index: %d\n",
 	       gc->bytes, gc->index);
     }
 }
@@ -1993,10 +1993,10 @@
 {
   const struct dialog_control *control;
 
-  fprintf (e, "STYLE 0x%lx\n", dialog->style);
+  fprintf (e, "STYLE 0x%x\n", dialog->style);
 
   if (dialog->exstyle != 0)
-    fprintf (e, "EXSTYLE 0x%lx\n", dialog->exstyle);
+    fprintf (e, "EXSTYLE 0x%x\n", dialog->exstyle);
 
   if ((dialog->class.named && dialog->class.u.n.length > 0)
       || dialog->class.u.id != 0)
@@ -2121,7 +2121,7 @@
       res_id_print (e, control->class, 0);
       if (control->class.named)
 	fprintf (e, "\"");
-      fprintf (e, ", 0x%lx, ", control->style);
+      fprintf (e, ", 0x%x, ", control->style);
     }
 
   fprintf (e, "%d, %d", control->x, control->y);
@@ -2137,10 +2137,10 @@
       /* FIXME: We don't need to print the style if it is the default.
 	 More importantly, in certain cases we actually need to turn
 	 off parts of the forced style, by using NOT.  */
-      fprintf (e, ", 0x%lx", control->style);
+      fprintf (e, ", 0x%x", control->style);
 
       if (control->exstyle != 0 || control->help != 0)
-	fprintf (e, ", 0x%lx, %lu", control->exstyle, control->help);
+	fprintf (e, ", 0x%x, %u", control->exstyle, control->help);
     }
 
   fprintf (e, "\n");
@@ -2176,7 +2176,7 @@
     {
       fprintf (e, "// width: %d; height %d; colors: %d; planes %d; bits %d\n",
 	       gi->width, gi->height, gi->colors, gi->planes, gi->bits);
-      fprintf (e, "// data bytes: %lu; index: %d\n",
+      fprintf (e, "// data bytes: %u; index: %d\n",
 	       gi->bytes, gi->index);
     }
 }
@@ -2187,7 +2187,7 @@
 write_rc_menu (FILE *e, const struct menu *menu, int menuex)
 {
   if (menu->help != 0)
-    fprintf (e, "// Help ID: %lu\n", menu->help);
+    fprintf (e, "// Help ID: %u\n", menu->help);
   write_rc_menuitems (e, menu->items, menuex, 0);
 }
 
@@ -2255,12 +2255,12 @@
 	      fprintf (e, ", %d", mi->id);
 	      if (mi->type != 0 || mi->state != 0 || mi->help != 0)
 		{
-		  fprintf (e, ", %lu", mi->type);
+		  fprintf (e, ", %u", mi->type);
 		  if (mi->state != 0 || mi->help != 0)
 		    {
-		      fprintf (e, ", %lu", mi->state);
+		      fprintf (e, ", %u", mi->state);
 		      if (mi->help != 0)
-			fprintf (e, ", %lu", mi->help);
+			fprintf (e, ", %u", mi->help);
 		    }
 		}
 	    }
@@ -2304,7 +2304,7 @@
 	  break;
 
 	case RCDATA_DWORD:
-	  fprintf (e, "%luL", ri->u.dword);
+	  fprintf (e, "%uL", ri->u.dword);
 	  break;
 
 	case RCDATA_STRING:
@@ -2486,29 +2486,29 @@
 
   f = versioninfo->fixed;
   if (f->file_version_ms != 0 || f->file_version_ls != 0)
-    fprintf (e, " FILEVERSION %lu, %lu, %lu, %lu\n",
+    fprintf (e, " FILEVERSION %u, %u, %u, %u\n",
 	     (f->file_version_ms >> 16) & 0xffff,
 	     f->file_version_ms & 0xffff,
 	     (f->file_version_ls >> 16) & 0xffff,
 	     f->file_version_ls & 0xffff);
   if (f->product_version_ms != 0 || f->product_version_ls != 0)
-    fprintf (e, " PRODUCTVERSION %lu, %lu, %lu, %lu\n",
+    fprintf (e, " PRODUCTVERSION %u, %u, %u, %u\n",
 	     (f->product_version_ms >> 16) & 0xffff,
 	     f->product_version_ms & 0xffff,
 	     (f->product_version_ls >> 16) & 0xffff,
 	     f->product_version_ls & 0xffff);
   if (f->file_flags_mask != 0)
-    fprintf (e, " FILEFLAGSMASK 0x%lx\n", f->file_flags_mask);
+    fprintf (e, " FILEFLAGSMASK 0x%x\n", f->file_flags_mask);
   if (f->file_flags != 0)
-    fprintf (e, " FILEFLAGS 0x%lx\n", f->file_flags);
+    fprintf (e, " FILEFLAGS 0x%x\n", f->file_flags);
   if (f->file_os != 0)
-    fprintf (e, " FILEOS 0x%lx\n", f->file_os);
+    fprintf (e, " FILEOS 0x%x\n", f->file_os);
   if (f->file_type != 0)
-    fprintf (e, " FILETYPE 0x%lx\n", f->file_type);
+    fprintf (e, " FILETYPE 0x%x\n", f->file_type);
   if (f->file_subtype != 0)
-    fprintf (e, " FILESUBTYPE 0x%lx\n", f->file_subtype);
+    fprintf (e, " FILESUBTYPE 0x%x\n", f->file_subtype);
   if (f->file_date_ms != 0 || f->file_date_ls != 0)
-    fprintf (e, "// Date: %lu, %lu\n", f->file_date_ms, f->file_date_ls);
+    fprintf (e, "// Date: %u, %u\n", f->file_date_ms, f->file_date_ls);
 
   fprintf (e, "BEGIN\n");
 
Index: binutils/resres.c
===================================================================
RCS file: /cvs/src/src/binutils/resres.c,v
retrieving revision 1.7
diff -b -u -r1.7 resres.c
--- binutils/resres.c	16 Jun 2005 09:18:19 -0000	1.7
+++ binutils/resres.c	11 Apr 2007 13:25:36 -0000
@@ -475,7 +475,7 @@
   else
     /* named id */
     {
-      if (fseek (fres, -sizeof (ord), SEEK_CUR) != 0)
+      if (fseek (fres, - ((long) sizeof (ord)), SEEK_CUR) != 0)
 	fatal ("%s: %s: could not seek in file", program_name, filename);
       id_s = read_unistring (&len);
       id->named = 1;
Index: binutils/windres.c
===================================================================
RCS file: /cvs/src/src/binutils/windres.c,v
retrieving revision 1.28
diff -b -u -r1.28 windres.c
--- binutils/windres.c	17 Feb 2007 13:33:54 -0000	1.28
+++ binutils/windres.c	11 Apr 2007 13:25:36 -0000
@@ -263,7 +263,7 @@
 res_id_print (FILE *stream, struct res_id id, int quote)
 {
   if (! id.named)
-    fprintf (stream, "%lu", id.u.id);
+    fprintf (stream, "%u", id.u.id);
   else
     {
       if (quote)
@@ -320,12 +320,12 @@
 
       if (*resources == NULL)
 	{
-	  static unsigned long timeval;
+	  static unsigned int timeval;
 
 	  /* Use the same timestamp for every resource created in a
              single run.  */
 	  if (timeval == 0)
-	    timeval = time (NULL);
+	    timeval = (unsigned int) time (NULL);
 
 	  *resources = ((struct res_directory *)
 			res_alloc (sizeof **resources));
@@ -756,6 +756,9 @@
   struct res_directory *resources;
   int use_temp_file;
 
+  /* Check, that the type int has a size of 4 bytes, otherwise fail.  */
+  assert (sizeof (int) == 4);
+
 #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
   setlocale (LC_MESSAGES, "");
 #endif
Index: binutils/windres.h
===================================================================
RCS file: /cvs/src/src/binutils/windres.h,v
retrieving revision 1.14
diff -b -u -r1.14 windres.h
--- binutils/windres.h	8 May 2005 14:17:39 -0000	1.14
+++ binutils/windres.h	11 Apr 2007 13:25:38 -0000
@@ -35,9 +35,9 @@
 {
   /* Resource flags.  According to the MS docs, this is currently
      always zero.  */
-  unsigned long characteristics;
+  unsigned int characteristics;
   /* Time/date stamp.  */
-  unsigned long time;
+  unsigned int time;
   /* Major version number.  */
   unsigned short major;
   /* Minor version number.  */
@@ -63,7 +63,7 @@
       unichar *name;
     } n;
     /* If the named field is zero, this is the ID.  */
-    unsigned long id;
+    unsigned int id;
   } u;
 };
 
@@ -127,11 +127,11 @@
      COFF file, the res_directory structure has a characteristics
      field, but I don't know if it's related to the one in the res
      file.  */
-  unsigned long characteristics;
+  unsigned int characteristics;
   /* Version of the resource.  Entirely user defined.  In a COFF file,
      the res_directory structure has a characteristics field, but I
      don't know if it's related to the one in the res file.  */
-  unsigned long version;
+  unsigned int version;
   /* Memory flags.  This is a combination of the MEMFLAG values
      defined below.  Most of these values are historical, and are not
      meaningful for win32.  I don't think there is any way to store
@@ -146,11 +146,11 @@
 {
   /* The code page used for the data.  I don't really know what this
      should be.  */
-  unsigned long codepage;
+  unsigned int codepage;
   /* A resource entry in a COFF file has a reserved field, which we
      record here when reading a COFF file.  When writing a COFF file,
      we set this field to zero.  */
-  unsigned long reserved;
+  unsigned int reserved;
 };
 
 /* Resource data is stored in a res_resource structure.  */
@@ -164,7 +164,7 @@
   {
     struct
     {
-      unsigned long length;
+      unsigned int length;
       const unsigned char *data;
     } data;
     struct accelerator *acc;
@@ -250,7 +250,7 @@
   /* Y coordinate of hotspot.  */
   short yhotspot;
   /* Length of bitmap data.  */
-  unsigned long length;
+  unsigned int length;
   /* Data.  */
   const unsigned char *data;
 };
@@ -270,7 +270,7 @@
   /* Bits per pixel.  */
   unsigned short bits;
   /* Number of bytes in cursor resource.  */
-  unsigned long bytes;
+  unsigned int bytes;
   /* Index of cursor resource.  */
   unsigned short index;
 };
@@ -280,9 +280,9 @@
 struct dialog
 {
   /* Basic window style.  */
-  unsigned long style;
+  unsigned int style;
   /* Extended window style.  */
-  unsigned long exstyle;
+  unsigned int exstyle;
   /* X coordinate.  */
   unsigned short x;
   /* Y coordinate.  */
@@ -312,7 +312,7 @@
 struct dialog_ex
 {
   /* Help ID.  */
-  unsigned long help;
+  unsigned int help;
   /* Font weight.  */
   unsigned short weight;
   /* Whether the font is italic.  */
@@ -482,9 +482,9 @@
   /* ID.  */
   unsigned short id;
   /* Style.  */
-  unsigned long style;
+  unsigned int style;
   /* Extended style.  */
-  unsigned long exstyle;
+  unsigned int exstyle;
   /* X coordinate.  */
   unsigned short x;
   /* Y coordinate.  */
@@ -500,7 +500,7 @@
   /* Extra data for the window procedure.  */
   struct rcdata_item *data;
   /* Help ID.  Only used in an extended dialog.  */
-  unsigned long help;
+  unsigned int help;
 };
 
 /* Control classes.  These can be used as the ID field in a struct
@@ -521,7 +521,7 @@
   /* Index of font entry.  */
   short index;
   /* Length of font information.  */
-  unsigned long length;
+  unsigned int length;
   /* Font information.  */
   const unsigned char *data;
 };
@@ -543,7 +543,7 @@
   /* Bits per pixel.  */
   unsigned short bits;
   /* Number of bytes in cursor resource.  */
-  unsigned long bytes;
+  unsigned int bytes;
   /* Index of cursor resource.  */
   unsigned short index;
 };
@@ -556,7 +556,7 @@
   struct menuitem *items;
   /* Help ID.  I don't think there is any way to set this in an rc
      file, but it can appear in the binary format.  */
-  unsigned long help;
+  unsigned int help;
 };
 
 /* A menu resource is a list of menuitem structures.  */
@@ -567,9 +567,9 @@
   struct menuitem *next;
   /* Type.  In a normal menu, rather than a menuex, this is the flags
      field.  */
-  unsigned long type;
+  unsigned int type;
   /* State.  This is only used in a menuex.  */
-  unsigned long state;
+  unsigned int state;
   /* Id.  */
   unsigned short id;
   /* Unicode text.  */
@@ -577,7 +577,7 @@
   /* Popup menu items for a popup.  */
   struct menuitem *popup;
   /* Help ID.  This is only used in a menuex.  */
-  unsigned long help;
+  unsigned int help;
 };
 
 /* Menu item flags.  These can appear in the flags field of a struct
@@ -613,20 +613,20 @@
   union
   {
     unsigned int word;
-    unsigned long dword;
+    unsigned int dword;
     struct
     {
-      unsigned long length;
+      unsigned int length;
       const char *s;
     } string;
     struct
     {
-      unsigned long length;
+      unsigned int length;
       const unichar *w;
     } wstring;
     struct
     {
-      unsigned long length;
+      unsigned int length;
       const unsigned char *data;
     } buffer;
   } u;
@@ -661,24 +661,24 @@
 struct fixed_versioninfo
 {
   /* The file version, which is two 32 bit integers.  */
-  unsigned long file_version_ms;
-  unsigned long file_version_ls;
+  unsigned int file_version_ms;
+  unsigned int file_version_ls;
   /* The product version, which is two 32 bit integers.  */
-  unsigned long product_version_ms;
-  unsigned long product_version_ls;
+  unsigned int product_version_ms;
+  unsigned int product_version_ls;
   /* The file flags mask.  */
-  unsigned long file_flags_mask;
+  unsigned int file_flags_mask;
   /* The file flags.  */
-  unsigned long file_flags;
+  unsigned int file_flags;
   /* The OS type.  */
-  unsigned long file_os;
+  unsigned int file_os;
   /* The file type.  */
-  unsigned long file_type;
+  unsigned int file_type;
   /* The file subtype.  */
-  unsigned long file_subtype;
+  unsigned int file_subtype;
   /* The date, which in Windows is two 32 bit integers.  */
-  unsigned long file_date_ms;
-  unsigned long file_date_ls;
+  unsigned int file_date_ms;
+  unsigned int file_date_ls;
 };
 
 /* A list of variable version information.  */
@@ -742,7 +742,7 @@
   /* Next data.  */
   struct bindata *next;
   /* Length of data.  */
-  unsigned long length;
+  unsigned int length;
   /* Data.  */
   unsigned char *data;
 };
Index: gas/symbols.c
===================================================================
RCS file: /cvs/src/src/gas/symbols.c,v
retrieving revision 1.83
diff -b -u -r1.83 symbols.c
--- gas/symbols.c	15 Mar 2007 12:11:49 -0000	1.83
+++ gas/symbols.c	11 Apr 2007 13:25:42 -0000
@@ -2728,14 +2728,15 @@
   const char *name = S_GET_NAME (sym);
   if (!name || !name[0])
     name = "(unnamed)";
-  fprintf (file, "sym %lx %s", (unsigned long) sym, name);
+  fprintf (file, "sym " BFD_HOSTPTR_T_PRT_X " %s", (bfd_hostptr_t) sym, name);
 
   if (LOCAL_SYMBOL_CHECK (sym))
     {
       struct local_symbol *locsym = (struct local_symbol *) sym;
       if (local_symbol_get_frag (locsym) != &zero_address_frag
 	  && local_symbol_get_frag (locsym) != NULL)
-	fprintf (file, " frag %lx", (long) local_symbol_get_frag (locsym));
+        fprintf (file, " frag " BFD_HOSTPTR_T_PRT_X,
+        	 (bfd_hostptr_t) local_symbol_get_frag (locsym));
       if (local_symbol_resolved_p (locsym))
 	fprintf (file, " resolved");
       fprintf (file, " local");
@@ -2743,7 +2744,7 @@
   else
     {
       if (sym->sy_frag != &zero_address_frag)
-	fprintf (file, " frag %lx", (long) sym->sy_frag);
+        fprintf (file, " frag "BFD_HOSTPTR_T_PRT_X, (bfd_hostptr_t) sym->sy_frag);
       if (sym->written)
 	fprintf (file, " written");
       if (sym->sy_resolved)
@@ -2817,7 +2818,7 @@
 void
 print_expr_1 (FILE *file, expressionS *exp)
 {
-  fprintf (file, "expr %lx ", (long) exp);
+  fprintf (file, "expr " BFD_HOSTPTR_T_PRT_X " ", (bfd_hostptr_t) exp);
   switch (exp->X_op)
     {
     case O_illegal:
Index: gas/write.c
===================================================================
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.112
diff -b -u -r1.112 write.c
--- gas/write.c	26 Mar 2007 12:23:48 -0000	1.112
+++ gas/write.c	11 Apr 2007 13:25:44 -0000
@@ -2486,7 +2486,8 @@
 print_fixup (fixS *fixp)
 {
   indent_level = 1;
-  fprintf (stderr, "fix %lx %s:%d", (long) fixp, fixp->fx_file, fixp->fx_line);
+  fprintf (stderr, "fix " BFD_HOSTPTR_T_PRT_X " %s:%d",
+  	   (bfd_hostptr_t) fixp, fixp->fx_file, fixp->fx_line);
   if (fixp->fx_pcrel)
     fprintf (stderr, " pcrel");
   if (fixp->fx_pcrel_adjust)
@@ -2503,8 +2504,8 @@
     fprintf (stderr, " tcbit");
   if (fixp->fx_done)
     fprintf (stderr, " done");
-  fprintf (stderr, "\n    size=%d frag=%lx where=%ld offset=%lx addnumber=%lx",
-	   fixp->fx_size, (long) fixp->fx_frag, (long) fixp->fx_where,
+  fprintf (stderr, "\n    size=%d frag=" BFD_HOSTPTR_T_PRT_X " where=%ld offset=%lx addnumber=%lx",
+	   fixp->fx_size, (bfd_hostptr_t) fixp->fx_frag, (long) fixp->fx_where,
 	   (long) fixp->fx_offset, (long) fixp->fx_addnumber);
   fprintf (stderr, "\n    %s (%d)", bfd_get_reloc_code_name (fixp->fx_r_type),
 	   fixp->fx_r_type);
Index: gprof/cg_print.c
===================================================================
RCS file: /cvs/src/src/gprof/cg_print.c,v
retrieving revision 1.12
diff -b -u -r1.12 cg_print.c
--- gprof/cg_print.c	9 May 2005 06:55:24 -0000	1.12
+++ gprof/cg_print.c	11 Apr 2007 13:26:04 -0000
@@ -76,7 +76,7 @@
     }
 
   printf (_("\ngranularity: each sample hit covers %ld byte(s)"),
-	  (long) hist_scale * sizeof (UNIT));
+	  (long) hist_scale * (long) sizeof (UNIT));
 
   if (print_time > 0.0)
     printf (_(" for %.2f%% of %.2f seconds\n\n"),
Index: gprof/hist.c
===================================================================
RCS file: /cvs/src/src/gprof/hist.c,v
retrieving revision 1.17
diff -b -u -r1.17 hist.c
--- gprof/hist.c	10 Apr 2007 08:47:50 -0000	1.17
+++ gprof/hist.c	11 Apr 2007 13:26:04 -0000
@@ -464,7 +464,7 @@
   if (bsd_style_output)
     {
       printf (_("\ngranularity: each sample hit covers %ld byte(s)"),
-	      (long) hist_scale * sizeof (UNIT));
+	      (long) hist_scale * (long) sizeof (UNIT));
       if (total_time > 0.0)
 	{
 	  printf (_(" for %.2f%% of %.2f %s\n\n"),
Index: include/splay-tree.h
===================================================================
RCS file: /cvs/src/src/include/splay-tree.h,v
retrieving revision 1.13
diff -b -u -r1.13 splay-tree.h
--- include/splay-tree.h	10 May 2005 10:21:08 -0000	1.13
+++ include/splay-tree.h	11 Apr 2007 13:26:05 -0000
@@ -36,6 +36,14 @@
 
 #include "ansidecl.h"
 
+#ifndef _WIN64
+  typedef unsigned long int libi_uhostptr_t;
+  typedef long int libi_shostptr_t;
+#else
+  typedef unsigned long long libi_uhostptr_t;
+  typedef long long libi_shostptr_t;
+#endif
+
 #ifndef GTY
 #define GTY(X)
 #endif
@@ -44,8 +52,8 @@
    these types, if necessary.  These types should be sufficiently wide
    that any pointer or scalar can be cast to these types, and then
    cast back, without loss of precision.  */
-typedef unsigned long int splay_tree_key;
-typedef unsigned long int splay_tree_value;
+typedef libi_uhostptr_t splay_tree_key;
+typedef libi_uhostptr_t splay_tree_value;
 
 /* Forward declaration for a node in the tree.  */
 typedef struct splay_tree_node_s *splay_tree_node;
Index: include/coff/internal.h
===================================================================
RCS file: /cvs/src/src/include/coff/internal.h,v
retrieving revision 1.21
diff -b -u -r1.21 internal.h
--- include/coff/internal.h	19 Mar 2007 23:06:06 -0000	1.21
+++ include/coff/internal.h	11 Apr 2007 13:26:06 -0000
@@ -419,8 +419,8 @@
     char _n_name[SYMNMLEN];	/* old COFF version	*/
     struct
     {
-      long _n_zeroes;		/* new == 0		*/
-      long _n_offset;		/* offset into string table */
+      bfd_hostptr_t _n_zeroes;		/* new == 0		*/
+      bfd_hostptr_t _n_offset;		/* offset into string table */
     }      _n_n;
     char *_n_nptr[2];		/* allows for overlaying	*/
   }     _n;
Index: libiberty/strerror.c
===================================================================
RCS file: /cvs/src/src/libiberty/strerror.c,v
retrieving revision 1.12
diff -b -u -r1.12 strerror.c
--- libiberty/strerror.c	28 Mar 2005 02:09:01 -0000	1.12
+++ libiberty/strerror.c	11 Apr 2007 13:26:17 -0000
@@ -469,6 +469,9 @@
 
 #else
 
+#undef sys_nerr
+#undef sys_errlist
+
 extern int sys_nerr;
 extern char *sys_errlist[];
 
=

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2007-07-24  4:22 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-10 16:06 PATCH: w64 native support Kai Tietz
2007-04-10 16:13 ` H. J. Lu
2007-04-10 16:23   ` Kai Tietz
2007-04-10 17:01   ` Kai Tietz
2007-04-10 17:18     ` H. J. Lu
2007-04-10 17:52       ` Kai Tietz
2007-04-10 19:35         ` H. J. Lu
2007-04-11  3:40           ` H. J. Lu
2007-04-10 20:55       ` Paul Koning
2007-04-11 13:43 Kai Tietz
2007-04-11 13:58 ` H. J. Lu
2007-04-11 14:07   ` H. J. Lu
2007-04-18 11:59     ` Kai Tietz
2007-06-29  5:37       ` NightStrike
2007-07-12  7:30       ` Nick Clifton
2007-07-24  8:00         ` NightStrike
2007-04-11 14:57   ` Kai Tietz
2007-04-11 15:17     ` Daniel Jacobowitz
2007-04-11 15:24       ` Kai Tietz
2007-04-11 15:43         ` Daniel Jacobowitz
2007-04-11 15:49           ` Kai Tietz
2007-04-11 17:34             ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).