aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/ChangeLog4
-rw-r--r--include/util.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index d0394ef69..cc9b2f088 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2002-10-31 David Shaw <[email protected]>
+
+ * util.h: Add wipememory() macro.
+
2002-10-21 Werner Koch <[email protected]>
* util.h [__CYGWIN32__]: Don't need the registry prototypes.
diff --git a/include/util.h b/include/util.h
index a053c68be..fb021fa79 100644
--- a/include/util.h
+++ b/include/util.h
@@ -257,6 +257,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() */