mirror of
https://github.com/schnaader/precomp-cpp
synced 2026-08-23 00:23:04 -04:00
commit
62df1e2c8b
3 changed files with 10 additions and 10 deletions
2
Makefile
2
Makefile
|
|
@ -3,7 +3,7 @@ BZIP2_OBJ = contrib/bzip2/blocksort.o contrib/bzip2/compress.o contrib/bzip2
|
|||
GIFLIB_OBJ = contrib/giflib/dgif_lib_gcc.o contrib/giflib/egif_lib_gcc.o contrib/giflib/gifalloc.o contrib/giflib/gif_err.o
|
||||
PACKJPG_OBJ = contrib/packjpg/aricoder.o contrib/packjpg/bitops.o contrib/packjpg/packjpg.o
|
||||
ZLIB_OBJ = contrib/zlib/adler32.o contrib/zlib/crc32.o contrib/zlib/zutil.o contrib/zlib/trees.o contrib/zlib/inftrees.o contrib/zlib/inffast.o contrib/zlib/inflate.o contrib/zlib/deflate.o
|
||||
CFLAGS = -DLINUX -D_FILE_OFFSET_BITS=64 -O2 -Wall
|
||||
CFLAGS = -DUNIX -D_FILE_OFFSET_BITS=64 -O2 -Wall
|
||||
|
||||
.PHONY: all
|
||||
all: contrib $(PROGNAME)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
OBJECTS = bitops.o aricoder.o packjpg.o
|
||||
CFLAGS = -O3 -DUNIX -DBUILD_LIB -Wall -pedantic -funroll-loops -ffast-math -fsched-spec-load -fomit-frame-pointer
|
||||
CFLAGS = -O3 -DUNIX -DBUILD_LIB -Wall -pedantic -funroll-loops -ffast-math -fomit-frame-pointer
|
||||
|
||||
.PHONY: all
|
||||
all: $(OBJECTS)
|
||||
|
|
|
|||
16
precomp.cpp
16
precomp.cpp
|
|
@ -57,7 +57,7 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef LINUX
|
||||
#ifndef UNIX
|
||||
#include <conio.h>
|
||||
#include <windows.h>
|
||||
#define PATH_DELIM '\\'
|
||||
|
|
@ -1160,7 +1160,7 @@ int init(int argc, char* argv[]) {
|
|||
printf("\n");
|
||||
exit(0);
|
||||
} else {
|
||||
#ifndef LINUX
|
||||
#ifndef UNIX
|
||||
printf("\n\n");
|
||||
#else
|
||||
printf("\n");
|
||||
|
|
@ -6161,7 +6161,7 @@ size_t own_fread(void *ptr, size_t size, size_t count, FILE* stream) {
|
|||
}
|
||||
|
||||
void seek_64(FILE* f, unsigned long long pos) {
|
||||
#ifndef LINUX
|
||||
#ifndef UNIX
|
||||
fpos_t fpt_pos = pos;
|
||||
fsetpos(f, &fpt_pos);
|
||||
#else
|
||||
|
|
@ -6170,7 +6170,7 @@ void seek_64(FILE* f, unsigned long long pos) {
|
|||
}
|
||||
|
||||
unsigned long long tell_64(FILE* f) {
|
||||
#ifndef LINUX
|
||||
#ifndef UNIX
|
||||
fpos_t fpt_pos;
|
||||
fgetpos(f, &fpt_pos);
|
||||
return fpt_pos;
|
||||
|
|
@ -8729,7 +8729,7 @@ wchar_t* convertCharArrayToLPCWSTR(const char* charArray)
|
|||
#endif
|
||||
|
||||
long long fileSize64(char* filename) {
|
||||
#ifndef LINUX
|
||||
#ifndef UNIX
|
||||
unsigned long s1 = 0, s2 = 0;
|
||||
|
||||
//HANDLE h = CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
|
@ -8758,7 +8758,7 @@ long long fileSize64(char* filename) {
|
|||
long long result=ftello(f);
|
||||
safe_fclose(&f);
|
||||
return result;
|
||||
#endif // LINUX
|
||||
#endif // UNIX
|
||||
}
|
||||
|
||||
void print64(long long i64) {
|
||||
|
|
@ -9234,7 +9234,7 @@ void denit_decompress_otf() {
|
|||
|
||||
// Get current time in ms
|
||||
long long get_time_ms() {
|
||||
#ifndef LINUX
|
||||
#ifndef UNIX
|
||||
return GetTickCount();
|
||||
#else
|
||||
timeval t;
|
||||
|
|
@ -9261,7 +9261,7 @@ void printf_time(long long t) {
|
|||
}
|
||||
|
||||
char get_char_with_echo() {
|
||||
#ifndef LINUX
|
||||
#ifndef UNIX
|
||||
return getche();
|
||||
#else
|
||||
return fgetc(stdin);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue