/[gnats]/gnats/include/objalloc.h
ViewVC logotype

Diff of /gnats/include/objalloc.h

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

revision 1.2 by jsm, Tue Oct 26 07:10:16 1999 UTC revision 1.3 by chewie, Sat Nov 13 05:14:17 2004 UTC
# Line 1  Line 1 
1  /* objalloc.h -- routines to allocate memory for objects  /* objalloc.h -- routines to allocate memory for objects
2     Copyright 1997 Free Software Foundation, Inc.     Copyright 1997, 2001 Free Software Foundation, Inc.
3     Written by Ian Lance Taylor, Cygnus Solutions.     Written by Ian Lance Taylor, Cygnus Solutions.
4    
5  This program is free software; you can redistribute it and/or modify it  This program is free software; you can redistribute it and/or modify it
# Line 56  struct objalloc_align { char x; double d Line 56  struct objalloc_align { char x; double d
56  #ifndef offsetof  #ifndef offsetof
57  #include <stddef.h>  #include <stddef.h>
58  #endif  #endif
 #define OBJALLOC_ALIGN \  
   ((ptrdiff_t) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))  
 #else  
 #define OBJALLOC_ALIGN \  
   ((long) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))  
59  #endif  #endif
60    #ifndef offsetof
61    #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
62    #endif
63    #define OBJALLOC_ALIGN offsetof (struct objalloc_align, d)
64    
65  /* Create an objalloc structure.  Returns NULL if malloc fails.  */  /* Create an objalloc structure.  Returns NULL if malloc fails.  */
66    

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