/[m4]/m4/gnulib/m4/xalloc.h
ViewVC logotype

Diff of /m4/gnulib/m4/xalloc.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by gary, Wed Sep 10 17:12:02 2003 UTC revision 1.2 by gary, Thu Sep 11 16:38:12 2003 UTC
# Line 21  Line 21 
21  # define XALLOC_H_  # define XALLOC_H_
22    
23  # include <stddef.h>  # include <stddef.h>
24    # include <stdlib.h>
25    
26  # ifndef __attribute__  # ifndef __attribute__
27  #  if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__  #  if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
# Line 61  char *xstrdup (const char *str); Line 62  char *xstrdup (const char *str);
62  # define NEW(Type, Var)  Type *(Var) = XMALLOC (Type, 1)  # define NEW(Type, Var)  Type *(Var) = XMALLOC (Type, 1)
63    
64  /* Free VAR only if non NULL. */  /* Free VAR only if non NULL. */
65  # define XFREE(Var)     \  # define XFREE(Var)     xfree (Var)
66     do {                 \  static inline void
67        if (Var)          \  xfree (void *p)
68          free (Var);     \  {
69     } while (0)    if (p)
70        free (p);
71    }
72    
73  /* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */  /* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */
74  # define CCLONE(Src, Num) \  # define CCLONE(Src, Num) \

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26