From 7b5931685caf55b7b974cb759e5018dbcf1a75c9 Mon Sep 17 00:00:00 2001
From: open-license-manager <rillf@maildrop.cc>
Date: 周一, 04 8月 2014 06:01:22 +0800
Subject: [PATCH] windows

---
 src/library/base/base.h |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/library/base/base.h b/src/library/base/base.h
index eccdb76..5656315 100644
--- a/src/library/base/base.h
+++ b/src/library/base/base.h
@@ -7,16 +7,30 @@
 #endif
 
 #ifdef __unix__
+
 #include <limits.h>
 #define DllExport
-#define MAX_PATH PATH_MAX
-#else
+#ifndef MAX_PATH
+	#define MAX_PATH PATH_MAX
+#endif
+
+#else //windows
 #include <windows.h>
 #define DllExport  __declspec( dllexport )
 #endif
 
-#define _DEBUG
+/* #define _DEBUG */
+/*
+#define cmax(a,b) \
+   ({ __typeof__ (a) _a = (a); \
+       __typeof__ (b) _b = (b); \
+     _a > _b ? _a : _b; })
 
+#define cmin(a,b) \
+   ({ __typeof__ (a) _a = (a); \
+       __typeof__ (b) _b = (b); \
+     _a < _b ? _a : _b; })
+*/
 typedef enum  {
 	OK, NOOK, ERROR, BUFFER_TOO_SMALL
 } FUNCTION_RETURN;

--
Gitblit v1.9.1