s/size_t/std::size_t/g - for compatibility with other builds

For compatibility with the Google3 build system, use std::size_t instead
of gnu size_t.

Change-Id: Ie361de9c507119aa7db93d24b6e199547bd123af
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/internal/sys.cpp b/internal/sys.cpp
index f6a686e..b99a2f2 100644
--- a/internal/sys.cpp
+++ b/internal/sys.cpp
@@ -34,13 +34,13 @@
     return ::close(fd);
 }
 
-void* SysImpl::mmap(void* addr, size_t length, int prot, int flags, int fd,
+void* SysImpl::mmap(void* addr, std::size_t length, int prot, int flags, int fd,
                     off_t offset) const
 {
     return ::mmap(addr, length, prot, flags, fd, offset);
 }
 
-int SysImpl::munmap(void* addr, size_t length) const
+int SysImpl::munmap(void* addr, std::size_t length) const
 {
     return ::munmap(addr, length);
 }
diff --git a/internal/sys.hpp b/internal/sys.hpp
index 98221c3..98b6e5c 100644
--- a/internal/sys.hpp
+++ b/internal/sys.hpp
@@ -27,9 +27,9 @@
 
     virtual int open(const char* pathname, int flags) const = 0;
     virtual int close(int fd) const = 0;
-    virtual void* mmap(void* addr, size_t length, int prot, int flags, int fd,
-                       off_t offset) const = 0;
-    virtual int munmap(void* addr, size_t length) const = 0;
+    virtual void* mmap(void* addr, std::size_t length, int prot, int flags,
+                       int fd, off_t offset) const = 0;
+    virtual int munmap(void* addr, std::size_t length) const = 0;
     virtual int getpagesize() const = 0;
     virtual int ioctl(int fd, unsigned long request, void* param) const = 0;
     virtual int poll(struct pollfd* fds, nfds_t nfds, int timeout) const = 0;
@@ -45,9 +45,9 @@
   public:
     int open(const char* pathname, int flags) const override;
     int close(int fd) const override;
-    void* mmap(void* addr, size_t length, int prot, int flags, int fd,
+    void* mmap(void* addr, std::size_t length, int prot, int flags, int fd,
                off_t offset) const override;
-    int munmap(void* addr, size_t length) const override;
+    int munmap(void* addr, std::size_t length) const override;
     int getpagesize() const override;
     int ioctl(int fd, unsigned long request, void* param) const override;
     int poll(struct pollfd* fds, nfds_t nfds, int timeout) const override;
diff --git a/lpc_aspeed.cpp b/lpc_aspeed.cpp
index 63147c4..120ac76 100644
--- a/lpc_aspeed.cpp
+++ b/lpc_aspeed.cpp
@@ -31,7 +31,7 @@
 {
 
 std::unique_ptr<LpcMapperInterface>
-    LpcMapperAspeed::createAspeedMapper(size_t regionSize)
+    LpcMapperAspeed::createAspeedMapper(std::size_t regionSize)
 {
     /* NOTE: considered using a joint factory to create one or the other, for
      * now, separate factories.
diff --git a/lpc_aspeed.hpp b/lpc_aspeed.hpp
index 1c4481a..98e7a72 100644
--- a/lpc_aspeed.hpp
+++ b/lpc_aspeed.hpp
@@ -12,9 +12,9 @@
 {
   public:
     static std::unique_ptr<LpcMapperInterface>
-        createAspeedMapper(size_t regionSize);
+        createAspeedMapper(std::size_t regionSize);
 
-    LpcMapperAspeed(size_t regionSize,
+    LpcMapperAspeed(std::size_t regionSize,
                     const internal::Sys* sys = &internal::sys_impl) :
         regionSize(regionSize),
         sys(sys){};
@@ -23,7 +23,7 @@
         mapWindow(std::uint32_t address, std::uint32_t length) override;
 
   private:
-    size_t regionSize;
+    std::size_t regionSize;
     const internal::Sys* sys;
 };
 
diff --git a/main.cpp b/main.cpp
index 29587ec..f8700b1 100644
--- a/main.cpp
+++ b/main.cpp
@@ -39,7 +39,7 @@
 FileHandler ubitarballHandler(TARBALL_STAGED_NAME);
 
 /* The maximum external buffer size we expect is 64KB. */
-static constexpr size_t memoryRegionSize = 64 * 1024UL;
+static constexpr std::size_t memoryRegionSize = 64 * 1024UL;
 
 #ifdef ENABLE_LPC_BRIDGE
 #if defined(ASPEED_LPC)
diff --git a/test/internal_sys_mock.hpp b/test/internal_sys_mock.hpp
index 8424723..63c0b0c 100644
--- a/test/internal_sys_mock.hpp
+++ b/test/internal_sys_mock.hpp
@@ -16,8 +16,8 @@
 
     MOCK_CONST_METHOD2(open, int(const char*, int));
     MOCK_CONST_METHOD1(close, int(int));
-    MOCK_CONST_METHOD6(mmap, void*(void*, size_t, int, int, int, off_t));
-    MOCK_CONST_METHOD2(munmap, int(void*, size_t));
+    MOCK_CONST_METHOD6(mmap, void*(void*, std::size_t, int, int, int, off_t));
+    MOCK_CONST_METHOD2(munmap, int(void*, std::size_t));
     MOCK_CONST_METHOD0(getpagesize, int());
     MOCK_CONST_METHOD3(ioctl, int(int, unsigned long, void*));
     MOCK_CONST_METHOD3(poll, int(struct pollfd*, nfds_t, int));
diff --git a/tools/blob_handler.cpp b/tools/blob_handler.cpp
index 42098cc..486f133 100644
--- a/tools/blob_handler.cpp
+++ b/tools/blob_handler.cpp
@@ -73,7 +73,7 @@
         return reply;
     }
 
-    size_t headerSize = ipmiPhosphorOen.size() + sizeof(std::uint16_t);
+    std::size_t headerSize = ipmiPhosphorOen.size() + sizeof(std::uint16_t);
 
     /* This cannot be a response because it's smaller than the smallest
      * response.
diff --git a/tools/crc.cpp b/tools/crc.cpp
index e8083eb..d6f59ef 100644
--- a/tools/crc.cpp
+++ b/tools/crc.cpp
@@ -15,9 +15,9 @@
     const int kExtraRounds = 2;
     const std::uint8_t* bytes = data.data();
     std::uint16_t crc = 0xFFFF;
-    size_t i;
-    size_t j;
-    size_t size = data.size();
+    std::size_t i;
+    std::size_t j;
+    std::size_t size = data.size();
 
     for (i = 0; i < size + kExtraRounds; ++i)
     {