~pac72/ubuntu/lucid/ddd/devel

« back to all changes in this revision

Viewing changes to include/objalloc.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Schepler
  • Date: 2004-07-22 03:49:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040722034937-cysl08t1jvba4jrx
Tags: 1:3.3.9-3
USERINFO has been renamed to USERINFO.txt; adjust debian/rules code
to match, to get correct information on the About DDD dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* objalloc.h -- routines to allocate memory for objects
2
 
   Copyright 1997 Free Software Foundation, Inc.
 
2
   Copyright 1997, 2001 Free Software Foundation, Inc.
3
3
   Written by Ian Lance Taylor, Cygnus Solutions.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it
56
56
#ifndef offsetof
57
57
#include <stddef.h>
58
58
#endif
59
 
#define OBJALLOC_ALIGN \
60
 
  ((ptrdiff_t) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
61
 
#else
62
 
#define OBJALLOC_ALIGN \
63
 
  ((long) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
64
 
#endif
 
59
#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)
65
64
 
66
65
/* Create an objalloc structure.  Returns NULL if malloc fails.  */
67
66