Commit ec799b2d authored by Paul Eggert's avatar Paul Eggert

obstack: port to platforms that #define __alignof__

* lib/obstack.c: Include <alignof.h> if !defined __alignof__,
not if !_LIBC.  We don't know of any platforms that #define
__alignof__, but it might be useful in tests.  Conversely,
glibc assumes GCC.
parent c564172a
2014-11-03 Paul Eggert <eggert@cs.ucla.edu>
obstack: port to platforms that #define __alignof__
* lib/obstack.c: Include <alignof.h> if !defined __alignof__,
not if !_LIBC. We don't know of any platforms that #define
__alignof__, but it might be useful in tests. Conversely,
glibc assumes GCC.
2014-11-03 Pádraig Brady <P@draigBrady.com>
linkat: don't unconditionally replace on GNU/Linux
......@@ -48,7 +48,10 @@
#endif
#ifndef _OBSTACK_ELIDE_CODE
# if !defined _LIBC && !defined __GNUC__
/* If GCC, or if an oddball (testing?) host that #defines __alignof__,
use the already-supplied __alignof__. Otherwise, this must be Gnulib
(as glibc assumes GCC); defer to Gnulib's alignof_type. */
# if !defined __GNUC__ && !defined __alignof__
# include <alignof.h>
# define __alignof__(type) alignof_type (type)
# endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment