`errno` is reserved; use `errorno`
authorBert Belder <bertbelder@gmail.com>
Wed, 24 Nov 2010 23:45:11 +0000 (00:45 +0100)
committerBert Belder <bertbelder@gmail.com>
Mon, 20 Dec 2010 22:50:29 +0000 (23:50 +0100)
src/platform_cygwin.cc
src/platform_win32.cc

index 4fcade8..d6ad3e1 100644 (file)
@@ -14,11 +14,11 @@ static char *process_title = NULL;
 
 // Does the about the same as perror(), but for windows api functions
 static void _winapi_perror(const char* prefix = NULL) {
-  DWORD errno = GetLastError();
+  DWORD errorno = GetLastError();
   char *errmsg;
 
   FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
-                NULL, errno, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&errmsg, 0, NULL);
+                NULL, errorno, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&errmsg, 0, NULL);
 
   // FormatMessage messages include a newline character
 
index 11659e0..b828cc5 100644 (file)
@@ -15,11 +15,11 @@ static char *process_title = NULL;
 
 // Does the about the same as perror(), but for windows api functions
 void winapi_perror(const char* prefix = NULL) {
-  DWORD errno = GetLastError();
+  DWORD errorno = GetLastError();
   char *errmsg;
 
   FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
-                NULL, errno, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&errmsg, 0, NULL);
+                NULL, errorno, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&errmsg, 0, NULL);
 
   // FormatMessage messages include a newline character