summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2011-07-05 04:31:37 -0700
committerVicent Martí <tanoku@gmail.com>2011-07-05 04:31:37 -0700
commitf12aa9dc5ed04cfe92f1d536314eb03185f67f7d (patch)
treeb720325beef678f7d132280d8f2644277a4e7d86 /src/util.h
parent7d69f78897fc079a58059d9a84ab5928161d78cb (diff)
parent0ac2726fdf945792028e59105d8630a91c5d3663 (diff)
downloadlibgit2-f12aa9dc5ed04cfe92f1d536314eb03185f67f7d.tar.gz
Merge pull request #300 from carlosmn/gsoc2011/master
A bit of networking
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index eac615141..0faf7f69c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -4,6 +4,9 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
#define bitsizeof(x) (CHAR_BIT * sizeof(x))
#define MSB(x, bits) ((x) & (~0ULL << (bitsizeof(x) - (bits))))
+#ifndef min
+# define min(a,b) ((a) < (b) ? (a) : (b))
+#endif
/*
* Custom memory allocation wrappers
@@ -94,6 +97,8 @@ extern void git__strtolower(char *str);
#define GIT_OID_LINE_LENGTH(header) (STRLEN(header) + 1 + GIT_OID_HEXSZ + 1)
+extern int git__fnmatch(const char *pattern, const char *name, int flags);
+
/*
* Realloc the buffer pointed at by variable 'x' so that it can hold
* at least 'nr' entries; the number of entries currently allocated