Merge "Reserve some AIDs for OEMs"
diff --git a/include/utils/FileMap.h b/include/utils/FileMap.h
index dfe6d51..02cb7df 100644
--- a/include/utils/FileMap.h
+++ b/include/utils/FileMap.h
@@ -25,6 +25,10 @@
 #include <utils/Compat.h>
 
 #ifdef HAVE_WIN32_FILEMAP
+// Ensure that we always pull in winsock2.h before windows.h
+#ifdef HAVE_WINSOCK
+#include <winsock2.h>
+#endif
 #include <windows.h>
 #endif
 
diff --git a/include/utils/Unicode.h b/include/utils/Unicode.h
index 5b98de2..aaf951b 100644
--- a/include/utils/Unicode.h
+++ b/include/utils/Unicode.h
@@ -24,8 +24,8 @@
 
 // Definitions exist in C++11
 #if defined __cplusplus && __cplusplus < 201103L
-typedef uint32_t char32_t;
-typedef uint16_t char16_t;
+typedef unsigned int   char32_t;
+typedef unsigned short char16_t;
 #endif
 
 // Standard string functions on char16_t strings.
diff --git a/libcutils/open_memstream.c b/libcutils/open_memstream.c
index 1c37321..9183266 100644
--- a/libcutils/open_memstream.c
+++ b/libcutils/open_memstream.c
@@ -59,8 +59,6 @@
 # define DBUG(x) ((void)0)
 #endif
 
-#ifdef HAVE_FUNOPEN
-
 /*
  * Definition of a seekable, write-only memory stream.
  */
@@ -251,12 +249,6 @@
     return fp;
 }
 
-#else /*not HAVE_FUNOPEN*/
-FILE* open_memstream(char** bufp, size_t* sizep)
-{
-    abort();
-}
-#endif /*HAVE_FUNOPEN*/