diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
commit | 0871bffae307e0553e0c5186336189e8b55cf6a6 (patch) | |
tree | 4571d1563fe33a53a57fea1c35fb668b9d33265f /src/misc/util/util_hack.h | |
parent | f936cc0680c98ffe51b3a1716c996072d5dbf76c (diff) | |
download | abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.gz abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.bz2 abc-0871bffae307e0553e0c5186336189e8b55cf6a6.zip |
Version abc90215
Diffstat (limited to 'src/misc/util/util_hack.h')
-rw-r--r-- | src/misc/util/util_hack.h | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/src/misc/util/util_hack.h b/src/misc/util/util_hack.h index 3fdb7ffb..825c8bee 100644 --- a/src/misc/util/util_hack.h +++ b/src/misc/util/util_hack.h @@ -21,16 +21,17 @@ #ifndef __UTIL_HACK_H__ #define __UTIL_HACK_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <time.h> #include <math.h> +#include "abc_global.h" + +#ifdef __cplusplus +extern "C" { +#endif #ifndef EXTERN #define EXTERN extern @@ -60,24 +61,6 @@ extern "C" { # endif #endif -#ifndef ABS -# define ABS(a) ((a) < 0 ? -(a) : (a)) -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#define ALLOC(type, num) ((type *) malloc(sizeof(type) * (num))) -#define FREE(obj) ((obj) ? (free((char *) (obj)), (obj) = 0) : 0) -#define REALLOC(type, obj, num) \ - ((obj) ? ((type *) realloc((char *)(obj), sizeof(type) * (num))) : \ - ((type *) malloc(sizeof(type) * (num)))) - extern long Extra_CpuTime(); extern int Extra_GetSoftDataLimit(); extern void Extra_UtilGetoptReset(); |