+2004-11-04 Bruno Haible <bruno@clisp.org>
+
+ 2004-09-11 Bruno Haible <bruno@clisp.org>
+ * allocsa.valgrind: New file.
+ 2004-02-06 Bruno Haible <bruno@clisp.org>
+ * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
+ avoid a bug of this cc on HP-UX 10.20 dealing with enums.
+ Reported by Christopher Seip <chris.seip@hp.com>.
+
2004-11-03 Paul Eggert <eggert@cs.ucla.edu>
* xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
/* Safe automatic memory allocation.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
#elif defined __cplusplus
template <class type> struct sa_alignof_helper { char __slot1; type __slot2; };
# define sa_alignof(type) offsetof (sa_alignof_helper<type>, __slot2)
+#elif defined __hpux
+ /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof
+ values. */
+# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8)
#else
# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
#endif