diff --git a/include/ChangeLog b/include/ChangeLog index eabc078d5..7ff6a80f7 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2002-10-31 David Shaw + + * util.h: Add wipememory() macro. + 2002-10-29 Stefan Bellon * util.h: Added parameter argument to make_basename() needed for diff --git a/include/util.h b/include/util.h index de56cbeae..9b9e0141c 100644 --- a/include/util.h +++ b/include/util.h @@ -261,6 +261,8 @@ int vasprintf ( char **result, const char *format, va_list args); #define DIM(v) (sizeof(v)/sizeof((v)[0])) #define DIMof(type,member) DIM(((type *)0)->member) +#define wipememory(_ptr,_len) do { volatile char *_vptr=(volatile char *)(_ptr); size_t _vlen=(_len); while(_vlen) { *_vptr=0; _vptr++; _vlen--; } } while(0) + /******* RISC OS stuff ***********/ #ifdef __riscos__ /* needed for strcasecmp() */