/[m4]/m4/m4/system_.h
ViewVC logotype

Diff of /m4/m4/system_.h

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

revision 1.2 by gary, Tue Sep 9 17:15:35 2003 UTC revision 1.3 by gary, Wed Sep 10 17:12:02 2003 UTC
# Line 27  Line 27 
27  #ifndef M4_SYSTEM_H  #ifndef M4_SYSTEM_H
28  #define M4_SYSTEM_H 1  #define M4_SYSTEM_H 1
29    
30  /* I have yet to see a system that doesn't have these... */  #include <stdlib.h>
31  #include <stdio.h>  #include <stdio.h>
32  #include <sys/types.h>  #include <sys/types.h>
33  @INCLUDE_ERROR_H@  @INCLUDE_ERROR_H@
34  @INCLUDE_OBSTACK_H@  @INCLUDE_OBSTACK_H@
35  @INCLUDE_STDBOOL_H@  @INCLUDE_STDBOOL_H@
36    #include <m4/xalloc.h>
37    
38  /* This is okay in an installed file, because it will not change the  /* This is okay in an installed file, because it will not change the
39     behaviour of the including program whether ENABLE_NLS is defined     behaviour of the including program whether ENABLE_NLS is defined
# Line 151  BEGIN_C_DECLS Line 152  BEGIN_C_DECLS
152  #  define EXIT_FAILURE  1  #  define EXIT_FAILURE  1
153  #endif  #endif
154    
   
155    
156  /* Memory allocation.  */  /* FIXME: macros to ease transition to gnulib xalloc.h API */
157  #define XCALLOC(type, num)      ((type *) xcalloc ((num), sizeof(type)))  #undef XFREE
158  #define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))  #define XFREE(Var)      ((Var) = xfree (Var))
 #define XREALLOC(type, p, num)  ((type *) xrealloc ((p), (num) * sizeof(type)))  
 #define XFREE(p)                ((p) = xfree (p))  
   
 extern void *xcalloc  (size_t n, size_t s);  
 extern void *xmalloc  (size_t n);  
 extern void *xrealloc (void *p, size_t n);  
 extern void *xfree    (void *stale);  
159    
160  extern char *xstrdup  (const char *string);  extern void *xfree (void *stale);
161  extern char *xstrzdup (const char *string, size_t len);  extern char *xstrzdup (const char *string, size_t len);
162    
163  END_C_DECLS  END_C_DECLS

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

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