summaryrefslogtreecommitdiff
path: root/src/common/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/utils.h')
-rw-r--r--src/common/utils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/utils.h b/src/common/utils.h
index a0590db7f..3e0d73e40 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -31,6 +31,14 @@
/* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */
#define HCACHE_KEY 'k'
+#ifndef MAX_DIR_PATH
+#ifdef WIN32
+#define MAX_DIR_PATH MAX_PATH
+#else
+#define MAX_DIR_PATH 2048
+#endif
+#endif
+
//Caps values to min/max
#define cap_value(a, min, max) (((a) >= (max)) ? (max) : ((a) <= (min)) ? (min) : (a))
@@ -40,6 +48,7 @@ void WriteDump(FILE* fp, const void* buffer, size_t length);
void ShowDump(const void* buffer, size_t length);
void findfile(const char *p, const char *pat, void (func)(const char *, void *), void *context);
+bool is_file(const char *path);
bool exists(const char* filename);
/// calculates the value of A / B, in percent (rounded down)