fixed lots of not-thread-safe things
Most of the things I fixed here were using libc functions that are
fundamentally not thread-safe.
diff --git a/aos/common/libc/libc.gyp b/aos/common/libc/libc.gyp
new file mode 100644
index 0000000..d7fc357
--- /dev/null
+++ b/aos/common/libc/libc.gyp
@@ -0,0 +1,62 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'aos_strsignal',
+ 'type': 'static_library',
+ 'sources': [
+ 'aos_strsignal.cc',
+ ],
+ 'dependencies': [
+ '<(AOS)/build/aos.gyp:logging_interface',
+ ],
+ },
+ {
+ 'target_name': 'aos_strsignal_test',
+ 'type': 'executable',
+ 'sources': [
+ 'aos_strsignal_test.cc',
+ ],
+ 'dependencies': [
+ 'aos_strsignal',
+ '<(EXTERNALS):gtest',
+ '<(AOS)/build/aos.gyp:logging',
+ ],
+ },
+ {
+ 'target_name': 'dirname',
+ 'type': 'static_library',
+ 'sources': [
+ 'dirname.cc',
+ ],
+ },
+ {
+ 'target_name': 'dirname_test',
+ 'type': 'executable',
+ 'sources': [
+ 'dirname_test.cc',
+ ],
+ 'dependencies': [
+ 'dirname',
+ '<(EXTERNALS):gtest',
+ ],
+ },
+ {
+ 'target_name': 'aos_strerror',
+ 'type': 'static_library',
+ 'sources': [
+ 'aos_strerror.cc',
+ ],
+ },
+ {
+ 'target_name': 'aos_strerror_test',
+ 'type': 'executable',
+ 'sources': [
+ 'aos_strerror_test.cc',
+ ],
+ 'dependencies': [
+ 'aos_strerror',
+ '<(EXTERNALS):gtest',
+ ],
+ },
+ ],
+}