OpenLibm/include/openlibm_defs.h
Phillip Johnston 0418324ca4 Refactor: OLM_DLLEXPORT definition now lives in a standalone header.
On x86_64, openlibm_fenv.h is silently coupled to openlibm_complex.h due to the inclusion of math_private.h inside of openlibm_fenv_amd64.h. The math_private.h header was included to gain access to the OLM_DLLEXPORT macro. However, this macro is redefined, since it is originally defined in openlibm_math.h. This inclusion also exposes math_private.h to public clients, which is undesirable.

Instead, a standalone header is created to contain the OLM_DLLEXPORT definition. This header is used included in the appropriate files. openlibm_fenv_amd64.h is no longer coupled to math_private.h.
2020-06-10 15:57:08 -07:00

14 lines
298 B
C

#ifndef OPENLIBM_DEFS_H_
#define OPENLIBM_DEFS_H_
#ifdef _WIN32
# ifdef IMPORT_EXPORTS
# define OLM_DLLEXPORT __declspec(dllimport)
# else
# define OLM_DLLEXPORT __declspec(dllexport)
# endif
#else
#define OLM_DLLEXPORT __attribute__ ((visibility("default")))
#endif
#endif // OPENLIBM_DEFS_H_