Remove unnecessary hacks since we no longer static link libx264

This commit is contained in:
Richard Stanway 2013-07-07 20:34:32 -04:00
parent eb47e18fa5
commit 1db3c97f09

View File

@ -18,68 +18,8 @@
#include "Main.h"
//the following hacks are used to get x264 static link working.
#include <sys/stat.h>
#include <sys/timeb.h>
#include <process.h>
#undef _ftime
#undef _fstat
extern "C"
{
int _fstat(int fd, struct stat *sb)
{
return fstat(fd, sb);
}
void _ftime(struct timeb *timeptr)
{
ftime(timeptr);
}
void blablablaHack1() //forces linkage to the pthreads thing
{
_endthreadex(0);
}
int __imp__fstat64(int fd, struct _stat64 *sb)
{
return _fstat64(fd, sb);
}
int snprintf(
char *buffer,
size_t count,
const char *format, ...
)
{
va_list arglist;
va_start(arglist, format);
return _vsnprintf(buffer, count, format, arglist);
}
int fseeko64(FILE *stream, __int64 offset, int origin)
{
return _fseeki64(stream, offset, origin);
}
double __strtod(const char *nptr, char **endptr)
{
return strtod(nptr, endptr);
}
size_t ftello(FILE *stream)
{
#ifdef _WIN64
return _ftelli64(stream);
#else
return ftell(stream);
#endif
}
double round(double val)
{
if(!_isnan(val) || !_finite(val))
@ -90,10 +30,4 @@ extern "C"
else
return floor(val-0.5);
}
float log2f(float val)
{
return logf(val) / logf(2.0f);
}
}