mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-13 21:30:09 +00:00
Revert "fix Mac OSX build (and remove 'weak link' warning)"
This reverts commit 146bbefc03
.
This commit is contained in:
parent
146bbefc03
commit
2a87706114
@ -98,6 +98,23 @@ static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, in
|
||||
return file;
|
||||
}
|
||||
|
||||
static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode)
|
||||
{
|
||||
FILE* file = NULL;
|
||||
const char* mode_fopen = NULL;
|
||||
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
|
||||
mode_fopen = "rb";
|
||||
else
|
||||
if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
|
||||
mode_fopen = "r+b";
|
||||
else
|
||||
if (mode & ZLIB_FILEFUNC_MODE_CREATE)
|
||||
mode_fopen = "wb";
|
||||
|
||||
if ((filename!=NULL) && (mode_fopen != NULL))
|
||||
file = fopen64((const char*)filename, mode_fopen);
|
||||
return file;
|
||||
}
|
||||
|
||||
|
||||
static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size)
|
||||
@ -205,3 +222,14 @@ void fill_fopen_filefunc (pzlib_filefunc_def)
|
||||
pzlib_filefunc_def->opaque = NULL;
|
||||
}
|
||||
|
||||
void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def)
|
||||
{
|
||||
pzlib_filefunc_def->zopen64_file = fopen64_file_func;
|
||||
pzlib_filefunc_def->zread_file = fread_file_func;
|
||||
pzlib_filefunc_def->zwrite_file = fwrite_file_func;
|
||||
pzlib_filefunc_def->ztell64_file = ftell64_file_func;
|
||||
pzlib_filefunc_def->zseek64_file = fseek64_file_func;
|
||||
pzlib_filefunc_def->zclose_file = fclose_file_func;
|
||||
pzlib_filefunc_def->zerror_file = ferror_file_func;
|
||||
pzlib_filefunc_def->opaque = NULL;
|
||||
}
|
||||
|
@ -605,9 +605,9 @@ local unzFile unzOpenInternal (const void *path,
|
||||
|
||||
us.z_filefunc.zseek32_file = NULL;
|
||||
us.z_filefunc.ztell32_file = NULL;
|
||||
// if (pzlib_filefunc64_32_def==NULL)
|
||||
// fill_fopen64_filefunc(&us.z_filefunc.zfile_func64);
|
||||
//else
|
||||
if (pzlib_filefunc64_32_def==NULL)
|
||||
fill_fopen64_filefunc(&us.z_filefunc.zfile_func64);
|
||||
else
|
||||
us.z_filefunc = *pzlib_filefunc64_32_def;
|
||||
us.is64bitOpenFunction = is64bitOpenFunction;
|
||||
|
||||
|
@ -854,9 +854,9 @@ extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* gl
|
||||
|
||||
ziinit.z_filefunc.zseek32_file = NULL;
|
||||
ziinit.z_filefunc.ztell32_file = NULL;
|
||||
// if (pzlib_filefunc64_32_def==NULL)
|
||||
// fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64);
|
||||
// else
|
||||
if (pzlib_filefunc64_32_def==NULL)
|
||||
fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64);
|
||||
else
|
||||
ziinit.z_filefunc = *pzlib_filefunc64_32_def;
|
||||
|
||||
ziinit.filestream = ZOPEN64(ziinit.z_filefunc,
|
||||
|
@ -73,7 +73,7 @@ extern "C" {
|
||||
#define CL_CALLBACK
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE1__
|
||||
#ifdef __APPLE__
|
||||
#define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))
|
||||
#define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
|
||||
|
Loading…
Reference in New Issue
Block a user