]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
merge from gcc
authorDJ Delorie <dj@redhat.com>
Tue, 10 Apr 2012 17:07:35 +0000 (17:07 +0000)
committerDJ Delorie <dj@redhat.com>
Tue, 10 Apr 2012 17:07:35 +0000 (17:07 +0000)
include/ChangeLog
include/splay-tree.h
libiberty/ChangeLog
libiberty/pex-unix.c

index 495c0c8910aad07397d76e28127a7595804a5176..e14f707b5e6f972b4e8d6dc221734cdf08389c59 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-10  Tristan Gingold  <gingold@adacore.com>
+
+       * splay-tree.h: Conditionnaly includes stdint.h and inttypes.h
+       (libi_uhostptr_t, libi_shostptr_t): Remove, replaced by uintptr_t.
+
 2012-04-09  Roland McGrath  <mcgrathr@google.com>
 
        * bfdlink.h (struct bfd_link_info): Add new member user_phdrs.
index 480b2c43e7d4d654e971ce77a6ac67dc860ebfcc..a26135a099de4e672856385640ccce1fbb8aeb2d 100644 (file)
@@ -37,18 +37,11 @@ extern "C" {
 
 #include "ansidecl.h"
 
-#ifndef _WIN64
-  typedef unsigned long int libi_uhostptr_t;
-  typedef long int libi_shostptr_t;
-#else
-#ifdef __GNUC__
-  __extension__
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
 #endif
-  typedef unsigned long long libi_uhostptr_t;
-#ifdef __GNUC__
-  __extension__
-#endif
-  typedef long long libi_shostptr_t;
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
 #endif
 
 #ifndef GTY
@@ -59,8 +52,8 @@ extern "C" {
    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 libi_uhostptr_t splay_tree_key;
-typedef libi_uhostptr_t splay_tree_value;
+typedef uintptr_t splay_tree_key;
+typedef uintptr_t splay_tree_value;
 
 /* Forward declaration for a node in the tree.  */
 typedef struct splay_tree_node_s *splay_tree_node;
index 4a3f8034892f6c84bdc6c038c01357709686fef7..4f8bc3f2888c5f734358431361ebbaa822737250 100644 (file)
@@ -1,3 +1,7 @@
+2012-04-04  Tristan Gingold  <gingold@adacore.com>
+
+       * pex-unix.c (to_ptr32): Fix style.
+
 2012-04-02  Tristan Gingold  <gingold@adacore.com>
 
        * stack-limit.c: Includes ansidecl.h.
index 8d5145c523e6950bcdae209d4c6933eed284daa5..addf8ee23dfa82bce2a172ce6b40eb15689dd0ca 100644 (file)
@@ -85,13 +85,15 @@ to_ptr32 (char **ptr64)
   int argc;
   __char_ptr_char_ptr32 short_argv;
 
-  for (argc=0; ptr64[argc]; argc++);
+  /* Count number of arguments.  */
+  for (argc = 0; ptr64[argc] != NULL; argc++)
+    ;
 
   /* Reallocate argv with 32 bit pointers.  */
   short_argv = (__char_ptr_char_ptr32) decc$malloc
     (sizeof (__char_ptr32) * (argc + 1));
 
-  for (argc=0; ptr64[argc]; argc++)
+  for (argc = 0; ptr64[argc] != NULL; argc++)
     short_argv[argc] = (__char_ptr32) decc$strdup (ptr64[argc]);
 
   short_argv[argc] = (__char_ptr32) 0;