/*1abi_align: ABI and alignment stuff for library builds.23Original use was the definitions for avoiding breakage because of mixing4compilers with different alignment. Then, the switchery for building5DLLs got lumped in.67copyright 1995-2023 by the mpg123 project8free software under the terms of the LGPL 2.19see COPYING and AUTHORS files in distribution or http://mpg123.org1011There used to be code that checks alignment, but it did not really12work anyway. The only straw we have is putting that alignment13attribute to API functions.14*/1516#ifndef MPG123_H_ABI_ALIGN17#define MPG123_H_ABI_ALIGN1819#include "config.h"2021// Building any of our libs on/for Windows needs this before22// including the main API header (define MPG123_EXPORT).23#if defined(WIN32) && defined(DYNAMIC_BUILD)24#define BUILD_MPG123_DLL25#endif2627/* ABI conformance for other compilers.28mpg123 needs 16byte-aligned (or more) stack for SSE and friends.29gcc provides that, but others don't necessarily. */30#ifdef ABI_ALIGN_FUN3132#ifndef attribute_align_arg3334#if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__>1)35# define attribute_align_arg __attribute__((force_align_arg_pointer))36/* The gcc that can align the stack does not need the check... nor does it work with gcc 4.3+, anyway. */37#else38# define attribute_align_arg39#endif4041#endif /* attribute_align_arg */4243#else /* ABI_ALIGN_FUN */4445#define attribute_align_arg4647#endif /* ABI_ALIGN_FUN */4849#endif /* MPG123_H_ABI_ALIGN */505152