1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00
freebsd-ports/games/zhlt/files/patch-common_cmdlib.cpp
Alexey Dokuchaev 7f023fbfdc Add a port of Zoner's Half-Life compile tools, which offer many improvements
over the original map compiling tools for Half-Life.

WWW: http://zhlt.info/
2016-03-30 06:41:55 +00:00

31 lines
641 B
C++

--- common/cmdlib.cpp.orig 2016-03-30 06:24:01 UTC
+++ common/cmdlib.cpp
@@ -13,6 +13,9 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
@@ -21,6 +24,8 @@
#endif
#endif
+#include <algorithm>
+
#define PATHSEPARATOR(c) ((c) == '\\' || (c) == '/')
/*
@@ -128,7 +133,7 @@ inline void getFilePositions(char* path,
else
{ *extension_position = ptr - path; }
- ptr = max(strrchr(path,'/'),strrchr(path,'\\'));
+ ptr = std::max(strrchr(path,'/'),strrchr(path,'\\'));
if(ptr == 0)
{ *directory_position = -1; }
else