(jm_FUNC_NANOSLEEP): New file/macro.
[gnulib.git] / lib / xalloc.h
index 38ae1d0..8668e19 100644 (file)
@@ -27,7 +27,7 @@
 # endif
 
 # ifndef __attribute__
-#  if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#  if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
 #   define __attribute__(x)
 #  endif
 # endif
@@ -61,10 +61,10 @@ void *xcalloc PARAMS ((size_t n, size_t s));
 void *xrealloc PARAMS ((void *p, size_t n));
 char *xstrdup PARAMS ((const char *str));
 
-# define XMALLOC(Type, N_bytes) ((Type *) xmalloc (sizeof (Type) * (N_bytes)))
-# define XCALLOC(Type, N_bytes) ((Type *) xcalloc (sizeof (Type), (N_bytes)))
-# define XREALLOC(Ptr, Type, N_bytes) \
-  ((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_bytes)))
+# define XMALLOC(Type, N_items) ((Type *) xmalloc (sizeof (Type) * (N_items)))
+# define XCALLOC(Type, N_items) ((Type *) xcalloc (sizeof (Type), (N_items)))
+# define XREALLOC(Ptr, Type, N_items) \
+  ((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_items)))
 
 /* Declare and alloc memory for VAR of type TYPE. */
 # define NEW(Type, Var)  Type *(Var) = XMALLOC (Type, 1)