summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-06-18 08:07:02 +0000
committerJim Meyering <jim@meyering.net>2003-06-18 08:07:02 +0000
commit8a615a4bf75185ebb57cbc887aaa2e9c2edf1d80 (patch)
tree5816f67da064483b5642a527592f0235eb74c1fb /lib
parentff85d09b52e554ad6a1f2029496a553a16abe741 (diff)
downloadcoreutils-8a615a4bf75185ebb57cbc887aaa2e9c2edf1d80.tar.xz
Include <stddef.h>.
Remove unnecessary parentheses.
Diffstat (limited to 'lib')
-rw-r--r--lib/xalloc.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/xalloc.h b/lib/xalloc.h
index b176ec668..b1f7386b0 100644
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -1,5 +1,7 @@
/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990-1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2003,
+ 1999, 2000, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,6 +20,8 @@
#ifndef XALLOC_H_
# define XALLOC_H_
+# include <stddef.h>
+
# ifndef __attribute__
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
# define __attribute__(x)
@@ -53,10 +57,10 @@ void *xcalloc (size_t n, size_t s);
void *xrealloc (void *p, size_t n);
char *xstrdup (const char *str);
-# define XMALLOC(Type, N_items) (xmalloc (sizeof (Type) * (N_items)))
-# define XCALLOC(Type, N_items) (xcalloc (sizeof (Type), (N_items)))
-# define XREALLOC(Ptr, Type, N_items) (xrealloc ((Ptr), \
- sizeof (Type) * (N_items)))
+# define XMALLOC(Type, N_items) xmalloc (sizeof (Type) * (N_items))
+# define XCALLOC(Type, N_items) xcalloc (sizeof (Type), (N_items))
+# define XREALLOC(Ptr, Type, N_items) xrealloc ((Ptr), \
+ sizeof (Type) * (N_items))
/* Declare and alloc memory for VAR of type TYPE. */
# define NEW(Type, Var) Type *(Var) = XMALLOC (Type, 1)