aboutsummaryrefslogtreecommitdiffstats
path: root/jnlib/xmalloc.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--jnlib/xmalloc.h (renamed from cipher/bithelp.h)30
1 files changed, 10 insertions, 20 deletions
diff --git a/cipher/bithelp.h b/jnlib/xmalloc.h
index 64209bacd..8bfa7df79 100644
--- a/cipher/bithelp.h
+++ b/jnlib/xmalloc.h
@@ -1,5 +1,5 @@
-/* bithelp.h - Some bit manipulation helpers
- * Copyright (C) 1999 Free Software Foundation, Inc.
+/* xmalloc.h
+ * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -18,25 +18,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*/
-#ifndef G10_BITHELP_H
-#define G10_BITHELP_H
+#ifndef LIBJNLIB_XMALLOC_H
+#define LIBJNLIB_XMALLOC_H
-/****************
- * Rotate a 32 bit integer by n bytes
- */
-#if defined(__GNUC__) && defined(__i386__)
-static inline u32
-rol( u32 x, int n)
-{
- __asm__("roll %%cl,%0"
- :"=r" (x)
- :"0" (x),"c" (n));
- return x;
-}
-#else
-#define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) )
-#endif
+void *xmalloc( size_t n );
+void *xrealloc( void *a, size_t n );
+void *xcalloc( size_t n, size_t m );
+char *xstrdup( const char *string );
+char *xstrcat2( const char *a, const char *b );
-#endif /*G10_BITHELP_H*/
+#endif /*LIBJNLIB_XMALLOC_H*/