From 4150ba45f73e3ae0ba3ee6a4006acedf7709c8e7 Mon Sep 17 00:00:00 2001 From: open-license-manager <rillf@maildrop.cc> Date: 周二, 29 7月 2014 07:52:19 +0800 Subject: [PATCH] valgrind --- 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