2010-03-26 Richard Henderson <rth@redhat.com>
+ * sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Define for !PIC too.
+ (PTR_DEMANGLE): Likewise.
+
+2010-03-26 Richard Henderson <rth@redhat.com>
+
* sysdeps/unix/alpha/sysdep.h (INTERNAL_SYSCALL_ERROR_P,
INTERNAL_SYSCALL_ERRNO): "Use" the "other" variable in each macro.
# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
# else
-extern uintptr_t __pointer_chk_guard attribute_relro;
+extern const uintptr_t __pointer_chk_guard attribute_relro;
# define PTR_MANGLE(var) \
- (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
+ (var) = (__typeof(var)) ((uintptr_t) (var) ^ __pointer_chk_guard)
# define PTR_DEMANGLE(var) PTR_MANGLE(var)
# endif
+#else
+/* There exists generic C code that assumes that PTR_MANGLE is always
+ defined. When generating code for the static libc, we don't have
+ __pointer_chk_guard defined. Nor is there any place that would
+ initialize it if it were defined, so there's little point in doing
+ anything more than nothing. */
+# ifndef __ASSEMBLER__
+# define PTR_MANGLE(var)
+# define PTR_DEMANGLE(var)
+# endif
#endif
#endif /* ASSEMBLER */