OSDN Git Service

Remove `volatile` from the `__errno` declaration.
authorElliott Hughes <enh@google.com>
Tue, 13 Jun 2017 21:43:53 +0000 (14:43 -0700)
committerElliott Hughes <enh@google.com>
Tue, 13 Jun 2017 23:02:07 +0000 (16:02 -0700)
commite452cb1ff30b3539dc66a18e9b59fe5e8d337ecc
tree60593768f5b380f5a3a45caa026ea9cb208876c0
parent15eaaddef9fffda1209e9cc576b47b0f6e0cb379
Remove `volatile` from the `__errno` declaration.

This breaks code that declares `errno` itself for whatever crazy reason:

  b.c:22:12: error: conflicting types for '__errno'
  extern int errno;
             ^
  /usr/local/google/ndkports/toolchain/bin/../sysroot/usr/include/errno.h:47:20: note: expanded from macro 'errno'
  #define  errno   (*__errno())
                     ^
  /usr/local/google/ndkports/toolchain/bin/../sysroot/usr/include/errno.h:44:15: note: previous declaration is here
  volatile int* __errno(void) __attribute_const__;
                ^

Bug: N/A
Test: built various bits of GNU source
Change-Id: I27c03bf3bde419a001f98f1ea6c267c847f31271
libc/bionic/__errno.cpp
libc/include/errno.h
tests/Android.bp
tests/errno_test.cpp [new file with mode: 0644]