[svn] gcry - r1128 - trunk/src

svn author mo cvs at cvs.gnupg.org
Sun Oct 16 10:45:41 CEST 2005


Author: mo
Date: 2005-10-16 10:45:41 +0200 (Sun, 16 Oct 2005)
New Revision: 1128

Modified:
   trunk/src/g10lib.h
   trunk/src/secmem.h
   trunk/src/stdmem.h
Log:
2005-10-16  Moritz Schulte  <moritz at g10code.com>

	* g10lib.h: Removed GCC_ATTR_PURE macro definitions, since
	gcrypt.h does already contain such a macro named
	_GCRY_GCC_ATTR_PURE, which we can use here as well.

	Likewise for GCC_ATTR_MALLOC and _GCRY_GCC_ATTR_MALLOC.

	* stdmem.h: Use _GCRY_GCC_ATTR_MALLOC instead of GCC_ATTR_MALLOC.
	* secmem.h: Likewise.



Modified: trunk/src/g10lib.h
===================================================================
--- trunk/src/g10lib.h	2005-10-16 08:12:19 UTC (rev 1127)
+++ trunk/src/g10lib.h	2005-10-16 08:45:41 UTC (rev 1128)
@@ -55,19 +55,6 @@
 #define GCC_ATTR_NORETURN 
 #endif
 
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96 )
-#define GCC_ATTR_PURE  __attribute__ ((__pure__))
-#else
-#define GCC_ATTR_PURE
-#endif
-
-/* (The malloc attribute might be defined prior to 3.2 - I am just not sure) */
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2 )
-#define GCC_ATTR_MALLOC    __attribute__ ((__malloc__))
-#else
-#define GCC_ATTR_MALLOC
-#endif
-
 /* Gettext macros.  */
 
 #define _(a)  _gcry_gettext(a)
@@ -142,7 +129,7 @@
 char *stpcpy (char *a, const char *b);
 #endif
 #ifndef HAVE_STRCASECMP
-int strcasecmp (const char *a, const char *b) GCC_ATTR_PURE;
+int strcasecmp (const char *a, const char *b) _GCRY_GCC_ATTR_PURE;
 #endif
 
 /* macros used to rename missing functions */
@@ -204,7 +191,8 @@
 {
   struct gcry_module *next;     /* List pointers.      */
   struct gcry_module **prevp;
-  void *spec;			/* The acctual specs.  */
+  void *spec;			/* Pointer to the subsystem-specific
+				   specification structure.  */
   int flags;			/* Associated flags.   */
   int counter;			/* Use counter.        */
   unsigned int mod_id;		/* ID of this module.  */

Modified: trunk/src/secmem.h
===================================================================
--- trunk/src/secmem.h	2005-10-16 08:12:19 UTC (rev 1127)
+++ trunk/src/secmem.h	2005-10-16 08:45:41 UTC (rev 1128)
@@ -23,7 +23,7 @@
 
 void _gcry_secmem_init (size_t npool);
 void _gcry_secmem_term (void);
-void *_gcry_secmem_malloc (size_t size) GCC_ATTR_MALLOC;
+void *_gcry_secmem_malloc (size_t size) _GCRY_GCC_ATTR_MALLOC;
 void *_gcry_secmem_realloc (void *a, size_t newsize);
 void _gcry_secmem_free (void *a);
 void _gcry_secmem_dump_stats (void);

Modified: trunk/src/stdmem.h
===================================================================
--- trunk/src/stdmem.h	2005-10-16 08:12:19 UTC (rev 1127)
+++ trunk/src/stdmem.h	2005-10-16 08:45:41 UTC (rev 1128)
@@ -1,5 +1,5 @@
 /* stdmem.h -  internal definitions for stdmem
- *	Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+ *	Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
  *
  * This file is part of Libgcrypt.
  *
@@ -23,8 +23,8 @@
 
 void _gcry_private_enable_m_guard(void);
 
-void *_gcry_private_malloc (size_t n) GCC_ATTR_MALLOC;
-void *_gcry_private_malloc_secure (size_t n) GCC_ATTR_MALLOC;
+void *_gcry_private_malloc (size_t n) _GCRY_GCC_ATTR_MALLOC;
+void *_gcry_private_malloc_secure (size_t n) _GCRY_GCC_ATTR_MALLOC;
 void *_gcry_private_realloc (void *a, size_t n);
 void _gcry_private_check_heap (const void *a);
 void _gcry_private_free (void *a);




More information about the Gnupg-commits mailing list