mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
1cc9d13ccf
Files moved but not modified. Changes to follow in a subsequent commit. You down with CPP? git-svn-id: https://svn.eduke32.com/eduke32@6055 1a8010ca-5511-0410-912e-c29ae57300e0
39 lines
760 B
C
39 lines
760 B
C
// Some libraries expect these functions, for which Visual Studio (pre-2013) falls down on the job.
|
|
|
|
#include <stdio.h>
|
|
#include <math.h>
|
|
|
|
#ifndef _MSC_VER
|
|
# include <stdint.h>
|
|
int64_t _ftelli64(
|
|
FILE *stream
|
|
);
|
|
int _fseeki64(
|
|
FILE *stream,
|
|
int64_t offset,
|
|
int origin
|
|
);
|
|
#endif
|
|
|
|
int fseeko(FILE *fp, off_t offset, int whence)
|
|
{
|
|
return _fseeki64(fp, (int64_t)offset, whence);
|
|
}
|
|
int fseeko64(FILE *fp, off64_t offset, int whence)
|
|
{
|
|
return _fseeki64(fp, (int64_t)offset, whence);
|
|
}
|
|
|
|
off_t ftello(FILE *stream)
|
|
{
|
|
return (off_t)_ftelli64(stream);
|
|
}
|
|
off64_t ftello64(FILE *stream)
|
|
{
|
|
return (off64_t)_ftelli64(stream);
|
|
}
|
|
|
|
long lround(double d)
|
|
{
|
|
return (long)(d > 0 ? d + 0.5 : ceil(d - 0.5));
|
|
}
|