ReactOS  0.4.14-dev-358-gbef841c
abi_align.h
Go to the documentation of this file.
1 /*
2  abi_align: An attempt to avoid breakage because of mixing
3  compilers with different alignment.
4 
5  copyright 1995-2015 by the mpg123 project
6  free software under the terms of the LGPL 2.1
7  see COPYING and AUTHORS files in distribution or http://mpg123.org
8 
9  There used to be code that checks alignment, but it did not really
10  work anyway. The only straw we have is putting that alignment
11  attribute to API functions.
12 */
13 
14 #ifndef MPG123_H_ABI_ALIGN
15 #define MPG123_H_ABI_ALIGN
16 
17 #include "config.h"
18 
19 /* ABI conformance for other compilers.
20  mpg123 needs 16byte-aligned (or more) stack for SSE and friends.
21  gcc provides that, but others don't necessarily. */
22 #ifdef ABI_ALIGN_FUN
23 
24 #ifndef attribute_align_arg
25 
26 #if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__>1)
27 # define attribute_align_arg __attribute__((force_align_arg_pointer))
28 /* The gcc that can align the stack does not need the check... nor does it work with gcc 4.3+, anyway. */
29 #else
30 # define attribute_align_arg
31 #endif
32 
33 #endif /* attribute_align_arg */
34 
35 #else /* ABI_ALIGN_FUN */
36 
37 #define attribute_align_arg
38 
39 #endif /* ABI_ALIGN_FUN */
40 
41 #endif /* MPG123_H_ABI_ALIGN */