Skip to content

Commit d7447ef

Browse files
committed
Common: added defines utime for Linux build
xrCore: hidden under define functions of file dialogs
1 parent 51f9706 commit d7447ef

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/Common/PlatformLinux.inl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ inline int _filelength(int fd)
238238
#undef max
239239
#define __max(a, b) std::max(a, b)
240240
#define __min(a, b) std::min(a, b)
241+
#define _utime utime
242+
#define _utimbuf utimbuf
241243

242244
#define xr_itoa SDL_itoa
243245

src/xrCore/FileSystem.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ bool EFS_Utils::GetOpenNameInternal(
122122
LPCSTR initial, LPSTR buffer, int sz_buf, bool bMulti, LPCSTR offset, int start_flt_ext)
123123
{
124124
VERIFY(buffer && (sz_buf > 0));
125+
#if defined(WINDOWS)
125126
FS_Path& P = *FS.get_path(initial);
126127
string1024 flt;
127128
MakeFilter(flt, P.m_FilterCaption ? P.m_FilterCaption : "", P.m_DefExt);
@@ -179,6 +180,7 @@ bool EFS_Utils::GetOpenNameInternal(
179180
case FNERR_BUFFERTOOSMALL: Log("Too many files selected."); break;
180181
}
181182
}
183+
182184
if (bRes && bMulti)
183185
{
184186
Log("buff=", buffer);
@@ -206,13 +208,16 @@ bool EFS_Utils::GetOpenNameInternal(
206208
}
207209
xr_strlwr(buffer);
208210
return bRes;
211+
#else
212+
return true;
213+
#endif
209214
}
210215

211216
bool EFS_Utils::GetSaveName(LPCSTR initial, string_path& buffer, LPCSTR offset, int start_flt_ext)
212217
{
213218
// unsigned int dwVersion = GetVersion();
214219
// unsigned int dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
215-
220+
#if defined(WINDOWS)
216221
FS_Path& P = *FS.get_path(initial);
217222
string1024 flt;
218223

@@ -269,6 +274,9 @@ bool EFS_Utils::GetSaveName(LPCSTR initial, string_path& buffer, LPCSTR offset,
269274
}
270275
xr_strlwr(buffer);
271276
return bRes;
277+
#else
278+
return true;
279+
#endif
272280
}
273281
//----------------------------------------------------
274282
LPCSTR EFS_Utils::AppendFolderToName(LPSTR tex_name, u32 const tex_name_size, int depth, BOOL full_name)

0 commit comments

Comments
 (0)