- fixed win32 compile errors

This commit is contained in:
Mark Vejvoda 2011-09-02 04:22:04 +00:00
parent 8d8996c0ee
commit ba35e3cc9f
3 changed files with 3 additions and 2 deletions

View File

@ -717,7 +717,7 @@ void MapPreview::loadFromFile(const string &path) {
#else
FILE *f1 = fopen(path.c_str(), "rb");
#endif
//int fileErrno = errno;
int fileErrno = errno;
if (f1 != NULL) {
//read header

View File

@ -591,7 +591,7 @@ string getNetworkInterfaceBroadcastAddress(string ipAddress)
next = next->Next;
}
}
//char buf[128];
char buf[128]="";
if (name == NULL)
{
//sprintf(buf, "unnamed-%i", i);

View File

@ -741,6 +741,7 @@ bool fileExists(const string &path) {
else {
//int fileErrno = errno;
#ifdef WIN32
int fileErrno = errno;
DWORD error = GetLastError();
string strError = "Could not open file, result: " + intToStr(error) + " - " + intToStr(fileErrno) + " " + strerror(fileErrno) + " [" + path + "]";
#endif