|
| 1 | +/******************************************************************************\ |
| 2 | +
|
| 3 | + CAMotics is an Open-Source simulation and CAM software. |
| 4 | + Copyright (C) 2011-2022 Joseph Coffland <joseph@cauldrondevelopment.com> |
| 5 | +
|
| 6 | + This program is free software: you can redistribute it and/or modify |
| 7 | + it under the terms of the GNU General Public License as published by |
| 8 | + the Free Software Foundation, either version 2 of the License, or |
| 9 | + (at your option) any later version. |
| 10 | +
|
| 11 | + This program is distributed in the hope that it will be useful, |
| 12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | + GNU General Public License for more details. |
| 15 | +
|
| 16 | + You should have received a copy of the GNU General Public License |
| 17 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | +
|
| 19 | +\******************************************************************************/ |
| 20 | + |
| 21 | +#if defined(__GNUC__) && !defined(__clang__) && !defined(_WIN32) |
| 22 | + |
| 23 | +#include <string.h> |
| 24 | +#include <math.h> |
| 25 | + |
| 26 | +#if defined(__aarch64__) |
| 27 | +#define GLIBC_SYMVER "2.17" |
| 28 | +#else |
| 29 | +#define GLIBC_SYMVER "2.2.5" |
| 30 | +#endif |
| 31 | + |
| 32 | +__asm__(".symver log,log@GLIBC_" GLIBC_SYMVER); |
| 33 | +__asm__(".symver logf,logf@GLIBC_" GLIBC_SYMVER); |
| 34 | +__asm__(".symver exp,exp@GLIBC_" GLIBC_SYMVER); |
| 35 | +__asm__(".symver expf,expf@GLIBC_" GLIBC_SYMVER); |
| 36 | +__asm__(".symver pow,pow@GLIBC_" GLIBC_SYMVER); |
| 37 | +__asm__(".symver powf,powf@GLIBC_" GLIBC_SYMVER); |
| 38 | +__asm__(".symver memcpy,memcpy@GLIBC_" GLIBC_SYMVER); |
| 39 | + |
| 40 | +double __wrap_log(double x) {return log (x);} |
| 41 | +float __wrap_logf(float x) {return logf(x);} |
| 42 | +double __wrap_exp(double x) {return exp (x);} |
| 43 | +float __wrap_expf(float x) {return expf(x);} |
| 44 | +double __wrap_pow(double x, double y) {return pow (x, y);} |
| 45 | +float __wrap_powf(float x, float y) {return powf(x, y);} |
| 46 | + |
| 47 | + |
| 48 | +void *__wrap_memcpy(void *dst, const void *src, size_t n) { |
| 49 | + return memcpy(dst, src, n); |
| 50 | +} |
| 51 | + |
| 52 | +#endif |
0 commit comments