050-ARM-PR-target-68059-libgcc-should-not-use-__write-fo.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From: nsz <nsz@138bc75d-0d04-0410-961f-82ee72b054a4>
  2. Date: Mon, 23 Nov 2015 15:17:55 +0000
  3. Subject: [PATCH] [ARM] PR target/68059 libgcc should not use __write for
  4. printing fatal error
  5. libgcc/
  6. PR target/68059
  7. * config/arm/linux-atomic-64bit.c (__write): Rename to...
  8. (write): ...this and fix the return type.
  9. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230762 138bc75d-0d04-0410-961f-82ee72b054a4
  10. ---
  11. --- a/libgcc/config/arm/linux-atomic-64bit.c
  12. +++ b/libgcc/config/arm/linux-atomic-64bit.c
  13. @@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTI
  14. kernels; we check for that in an init section and bail out rather
  15. unceremoneously. */
  16. -extern unsigned int __write (int fd, const void *buf, unsigned int count);
  17. +extern int write (int fd, const void *buf, unsigned int count);
  18. extern void abort (void);
  19. /* Kernel helper for compare-and-exchange. */
  20. @@ -56,7 +56,7 @@ static void __check_for_sync8_kernelhelp
  21. for the user - I'm not sure I can rely on much else being
  22. available at this point, so do the same as generic-morestack.c
  23. write () and abort (). */
  24. - __write (2 /* stderr. */, err, sizeof (err));
  25. + write (2 /* stderr. */, err, sizeof (err));
  26. abort ();
  27. }
  28. };