From cd53d13fd12f8dd86514b2894e62ee6612566975 Mon Sep 17 00:00:00 2001 From: open-license-manager <rillf@maildrop.cc> Date: 周一, 04 8月 2014 00:38:17 +0800 Subject: [PATCH] linux tests ok --- 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