Changeset View
Changeset View
Standalone View
Standalone View
src/compat/glibc_compat.cpp
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
* https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html | * https://www.sourceware.org/ml/libc-alpha/2018-08/msg00003.html | ||||
* | * | ||||
* This is intended to fix a bug related to large file support on architectures | * This is intended to fix a bug related to large file support on architectures | ||||
* where off_t and off64_t are not the same underlying type. | * where off_t and off64_t are not the same underlying type. | ||||
* To remain compatible with the previous versions, the GLIBC offers a | * To remain compatible with the previous versions, the GLIBC offers a | ||||
* compatibility symbol for these architectures. We can link the new `fcntl()` | * compatibility symbol for these architectures. We can link the new `fcntl()` | ||||
* and `fcntl64()` against this symbol with the help of a wrapper. | * and `fcntl64()` against this symbol with the help of a wrapper. | ||||
*/ | */ | ||||
#if defined(HAVE_CONFIG_H) && !defined(OFF_T_EQUALS_OFF64_T) | #if defined(HAVE_CONFIG_H) && !defined(HAVE_LARGE_FILE_SUPPORT) | ||||
extern "C" int fcntl_old(int fd, int cmd, ...); | extern "C" int fcntl_old(int fd, int cmd, ...); | ||||
#ifdef __i386__ | #ifdef __i386__ | ||||
__asm(".symver fcntl_old,fcntl@GLIBC_2.0"); | __asm(".symver fcntl_old,fcntl@GLIBC_2.0"); | ||||
#elif defined(__amd64__) | #elif defined(__amd64__) | ||||
__asm(".symver fcntl_old,fcntl@GLIBC_2.2.5"); | __asm(".symver fcntl_old,fcntl@GLIBC_2.2.5"); | ||||
#elif defined(__arm__) | #elif defined(__arm__) | ||||
__asm(".symver fcntl_old,fcntl@GLIBC_2.4"); | __asm(".symver fcntl_old,fcntl@GLIBC_2.4"); | ||||
#elif defined(__aarch64__) | #elif defined(__aarch64__) | ||||
Show All 20 Lines |