* tsystem.h: Add the prototype of strlen.
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Nov 2003 05:17:16 +0000 (05:17 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Nov 2003 05:17:16 +0000 (05:17 +0000)
* unwind-pe.h (read_encoded_value_with_base): Add an
appropriate cast to handle a case where the pointer size is
smaller than sizeof (int).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73265 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tsystem.h
gcc/unwind-pe.h

index 6ec6477..c2c2da9 100644 (file)
@@ -1,3 +1,10 @@
+2003-11-05  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * tsystem.h: Add the prototype of strlen.
+       * unwind-pe.h (read_encoded_value_with_base): Add an
+       appropriate cast to handle a case where the pointer size is
+       smaller than sizeof (int).
+
 2003-11-04  Richard Sandiford  <rsandifo@redhat.com>
 
        * config/mips/mips-protos.h (mips_global_pic_constant_p): Delete.
index d76c1ba..f24bab7 100644 (file)
@@ -62,6 +62,10 @@ extern int atexit (void (*)(void));
 extern void abort (void) __attribute__ ((__noreturn__));
 #endif
 
+#ifndef strlen
+extern size_t strlen (const char *);
+#endif
+
 #else /* ! inhibit_libc */
 /* We disable this when inhibit_libc, so that gcc can still be built without
    needing header files first.  */
index 224ade3..e6aebd7 100644 (file)
@@ -199,7 +199,7 @@ read_encoded_value_with_base (unsigned char encoding, _Unwind_Ptr base,
       _Unwind_Internal_Ptr a = (_Unwind_Internal_Ptr) p;
       a = (a + sizeof (void *) - 1) & - sizeof(void *);
       result = *(_Unwind_Internal_Ptr *) a;
-      p = (const unsigned char *) (a + sizeof (void *));
+      p = (const unsigned char *) (_Unwind_Internal_Ptr) (a + sizeof (void *));
     }
   else
     {