1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
emacs/nt/inc/stdalign.h
Paul Eggert 8661f40ce4 Remove unnecessary stdalign.in.h
* lib/stdalign.in.h: Remove.  This file was already removed in
commit b429274c5b (2023-02-04)
but was brought back mistakenly by a merge from emacs-29 in
commit ecf08f0621 (2024-01-02).
* nt/inc/stdalign.h: Don’t mention removed file in comment.
2025-01-18 11:27:48 -08:00

22 lines
559 B
C++

#ifndef _NT_STDALIGN_H_
#define _NT_STDALIGN_H_
#include <stddef.h>
#if defined __cplusplus
template <class __t> struct __alignof_helper { char __a; __t __b; };
# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
#else
# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
#endif
#define alignof _Alignof
#if __GNUC__
# define _Alignas(a) __attribute__ ((__aligned__ (a)))
#elif 1300 <= _MSC_VER
# define _Alignas(a) __declspec (align (a))
#endif
#ifdef _Alignas
# define alignas _Alignas
#endif
#endif /* _NT_STDALIGN_H_ */