Convert things from AOS logging to glog

This is necessary so ceres (which includes glog) can be included in more
places.

Change-Id: Ie0a54dc6a9e21e0c2f11899d08c87d08c5c0e028
diff --git a/aos/scoped/BUILD b/aos/scoped/BUILD
index 002026e..f5b3832 100644
--- a/aos/scoped/BUILD
+++ b/aos/scoped/BUILD
@@ -2,6 +2,9 @@
 
 cc_library(
     name = "scoped_fd",
+    srcs = [
+        "scoped_fd.cc",
+    ],
     hdrs = [
         "scoped_fd.h",
     ],
diff --git a/aos/scoped/scoped_fd.cc b/aos/scoped/scoped_fd.cc
new file mode 100644
index 0000000..a570df0
--- /dev/null
+++ b/aos/scoped/scoped_fd.cc
@@ -0,0 +1,15 @@
+#include "aos/scoped/scoped_fd.h"
+
+#include "aos/logging/logging.h"
+
+namespace aos {
+
+void ScopedFD::Close() {
+  if (fd_ != -1) {
+    if (close(fd_) == -1) {
+      PLOG(WARNING, "close(%d) failed", fd_);
+    }
+  }
+}
+
+}  // namespace aos
diff --git a/aos/scoped/scoped_fd.h b/aos/scoped/scoped_fd.h
index 696cf3b..e098d2c 100644
--- a/aos/scoped/scoped_fd.h
+++ b/aos/scoped/scoped_fd.h
@@ -1,9 +1,8 @@
-#ifndef _AOS_SCOPED_FD_
-#define _AOS_SCOPED_FD_
+#ifndef AOS_SCOPED_SCOPED_FD_H_
+#define AOS_SCOPED_SCOPED_FD_H_
 
 #include <unistd.h>
 
-#include "aos/logging/logging.h"
 #include "aos/macros.h"
 
 namespace aos {
@@ -29,16 +28,10 @@
 
  private:
   int fd_;
-  void Close() {
-    if (fd_ != -1) {
-      if (close(fd_) == -1) {
-        PLOG(WARNING, "close(%d) failed", fd_);
-      }
-    }
-  }
+  void Close();
   DISALLOW_COPY_AND_ASSIGN(ScopedFD);
 };
 
 }  // namespace aos
 
-#endif  // _AOS_SCOPED_FD_
+#endif  // AOS_SCOPED_SCOPED_FD_H_