Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions include/openlibm_defs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#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_
3 changes: 1 addition & 2 deletions include/openlibm_fenv_amd64.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@
#ifndef _FENV_H_
#define _FENV_H_

#include <openlibm_defs.h>
#include "cdefs-compat.h"
#include "types-compat.h"

#include "math_private.h"

#ifndef __fenv_static
#define __fenv_static static
#endif
Expand Down
12 changes: 2 additions & 10 deletions include/openlibm_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <math.h>
#else /* !OPENLIBM_USE_HOST_MATH_H */

#include <openlibm_defs.h>

#ifndef OPENLIBM_MATH_H
#define OPENLIBM_MATH_H

Expand All @@ -33,16 +35,6 @@
#define __pure2
#endif

#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

/*
* ANSI/POSIX
*/
Expand Down
14 changes: 1 addition & 13 deletions src/math_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define _MATH_PRIVATE_H_

#include <openlibm_complex.h>

#include <openlibm_defs.h>
#include "cdefs-compat.h"
#include "types-compat.h"
#include "fpmath.h"
Expand Down Expand Up @@ -355,16 +355,4 @@ long double __kernel_sinl(long double, long double, int);
long double __kernel_cosl(long double, long double);
long double __kernel_tanl(long double, long double, int);

#undef OLM_DLLEXPORT
#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 /* !_MATH_PRIVATE_H_ */