mirror of
https://github.com/glest/glest-source.git
synced 2025-08-08 09:26:27 +02:00
- fixed win32 compile errors
This commit is contained in:
@@ -717,7 +717,7 @@ void MapPreview::loadFromFile(const string &path) {
|
|||||||
#else
|
#else
|
||||||
FILE *f1 = fopen(path.c_str(), "rb");
|
FILE *f1 = fopen(path.c_str(), "rb");
|
||||||
#endif
|
#endif
|
||||||
//int fileErrno = errno;
|
int fileErrno = errno;
|
||||||
if (f1 != NULL) {
|
if (f1 != NULL) {
|
||||||
|
|
||||||
//read header
|
//read header
|
||||||
|
@@ -591,7 +591,7 @@ string getNetworkInterfaceBroadcastAddress(string ipAddress)
|
|||||||
next = next->Next;
|
next = next->Next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//char buf[128];
|
char buf[128]="";
|
||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
{
|
{
|
||||||
//sprintf(buf, "unnamed-%i", i);
|
//sprintf(buf, "unnamed-%i", i);
|
||||||
|
@@ -741,6 +741,7 @@ bool fileExists(const string &path) {
|
|||||||
else {
|
else {
|
||||||
//int fileErrno = errno;
|
//int fileErrno = errno;
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
int fileErrno = errno;
|
||||||
DWORD error = GetLastError();
|
DWORD error = GetLastError();
|
||||||
string strError = "Could not open file, result: " + intToStr(error) + " - " + intToStr(fileErrno) + " " + strerror(fileErrno) + " [" + path + "]";
|
string strError = "Could not open file, result: " + intToStr(error) + " - " + intToStr(fileErrno) + " " + strerror(fileErrno) + " [" + path + "]";
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user