build window lseek problem fixed

This commit is contained in:
tickduan 2021-07-08 18:06:35 +08:00
parent 197748bb2d
commit 3635dccb60
5 changed files with 13 additions and 12 deletions

9
deps/SZ/sz/src/sz.c vendored
View File

@ -160,15 +160,6 @@ void SZ_Finalize()
}
}
void modulePath(char *buf, int size)
{
char path[1024];
sprintf(path, "/proc/%d/exe", getpid());
readlink(path, buf, size);
char* pos = strrchr(buf, '/');
if(pos)
pos[1]=0;
}
#ifdef WINDOWS
int gettimeofday(struct timeval *tv, struct timezone *tz) {

View File

@ -33,6 +33,8 @@
#ifdef _WIN32
# include <stddef.h>
#else
# include <unistd.h>
#endif
#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32)

View File

@ -5,6 +5,12 @@
#include "gzguts.h"
#ifdef WINDOWS
#include <io.h>
#else
#include <unistd.h>
#endif
#if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__)
# define LSEEK _lseeki64
#else

View File

@ -472,7 +472,7 @@ typedef uLong FAR uLongf;
#endif
#ifndef Z_SOLO
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
//# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
# ifdef VMS
# include <unixio.h> /* for off_t */
# endif

View File

@ -40,8 +40,10 @@
#if defined(DEBUGLEVEL) && (DEBUGLEVEL>=2) && !defined(_MSC_VER)
# include <stdio.h>
# include <unistd.h>
# include <sys/times.h>
//# include <unistd.h>
//# include <sys/times.h>
# define DEBUG_PRINTHEX(l,p,n) { \
unsigned debug_u; \