Clean up bionic_macros.h a bit.
Use <android-base/macros.h> instead where possible, and move the bionic
macros out of the way of the libbase ones. Yes, there are folks who manage
to end up with both included at once (thanks OpenGL!), and cleaning that
up doesn't seem nearly as practical as just making this change.
Bug: N/A
Test: builds
Change-Id: I23fc544f39d5addf81dc61471771a5438778895b
diff --git a/libc/bionic/grp_pwd_file.h b/libc/bionic/grp_pwd_file.h
index 29d75f4..9004c4e 100644
--- a/libc/bionic/grp_pwd_file.h
+++ b/libc/bionic/grp_pwd_file.h
@@ -45,7 +45,7 @@
bool FindByName(const char* name, Line* line);
void Unmap();
- DISALLOW_COPY_AND_ASSIGN(MmapFile);
+ BIONIC_DISALLOW_IMPLICIT_CONSTRUCTORS(MmapFile);
private:
enum class FileStatus {
@@ -78,7 +78,7 @@
mmap_file_.Unmap();
}
- DISALLOW_COPY_AND_ASSIGN(PasswdFile);
+ BIONIC_DISALLOW_IMPLICIT_CONSTRUCTORS(PasswdFile);
private:
MmapFile mmap_file_;
@@ -94,7 +94,7 @@
mmap_file_.Unmap();
}
- DISALLOW_COPY_AND_ASSIGN(GroupFile);
+ BIONIC_DISALLOW_IMPLICIT_CONSTRUCTORS(GroupFile);
private:
MmapFile mmap_file_;
diff --git a/libc/bionic/locale.cpp b/libc/bionic/locale.cpp
index 2a5bcab..8358fb0 100644
--- a/libc/bionic/locale.cpp
+++ b/libc/bionic/locale.cpp
@@ -66,7 +66,7 @@
}
}
- DISALLOW_COPY_AND_ASSIGN(__locale_t);
+ BIONIC_DISALLOW_IMPLICIT_CONSTRUCTORS(__locale_t);
};
size_t __ctype_get_mb_cur_max() {
diff --git a/libc/bionic/malloc_info.cpp b/libc/bionic/malloc_info.cpp
index 99caedb..9c8a4bf 100644
--- a/libc/bionic/malloc_info.cpp
+++ b/libc/bionic/malloc_info.cpp
@@ -53,7 +53,7 @@
FILE* fp;
const char* name;
- DISALLOW_COPY_AND_ASSIGN(Elem);
+ BIONIC_DISALLOW_IMPLICIT_CONSTRUCTORS(Elem);
};
int malloc_info(int options, FILE* fp) {
diff --git a/libc/bionic/pthread_atfork.cpp b/libc/bionic/pthread_atfork.cpp
index 84e511c..fb12a3b 100644
--- a/libc/bionic/pthread_atfork.cpp
+++ b/libc/bionic/pthread_atfork.cpp
@@ -107,7 +107,7 @@
atfork_t* first_;
atfork_t* last_;
- DISALLOW_COPY_AND_ASSIGN(atfork_list_t);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(atfork_list_t);
};
static pthread_mutex_t g_atfork_list_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
@@ -180,4 +180,3 @@
});
pthread_mutex_unlock(&g_atfork_list_mutex);
}
-
diff --git a/libc/bionic/pthread_internal.cpp b/libc/bionic/pthread_internal.cpp
index 829194c..92786fe 100644
--- a/libc/bionic/pthread_internal.cpp
+++ b/libc/bionic/pthread_internal.cpp
@@ -54,7 +54,7 @@
private:
pthread_rwlock_t* rwlock_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedRWLock);
+ BIONIC_DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedRWLock);
};
typedef ScopedRWLock<true> ScopedWriteLock;
diff --git a/libc/bionic/scandir.cpp b/libc/bionic/scandir.cpp
index e55be42..0b39049 100644
--- a/libc/bionic/scandir.cpp
+++ b/libc/bionic/scandir.cpp
@@ -90,7 +90,7 @@
return copy;
}
- DISALLOW_COPY_AND_ASSIGN(ScandirResult);
+ BIONIC_DISALLOW_COPY_AND_ASSIGN(ScandirResult);
};
int scandirat(int parent_fd, const char* dir_name, dirent*** name_list,
diff --git a/libc/bionic/system_property_set.cpp b/libc/bionic/system_property_set.cpp
index a70a376..bc3ba76 100644
--- a/libc/bionic/system_property_set.cpp
+++ b/libc/bionic/system_property_set.cpp
@@ -170,7 +170,7 @@
uint32_t uint_buf_[kUintBufSize];
size_t uint_buf_index_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(SocketWriter);
+ BIONIC_DISALLOW_IMPLICIT_CONSTRUCTORS(SocketWriter);
};
struct prop_msg {