提交 3635dccb 编写于 作者: T tickduan

build window lseek problem fixed

上级 197748bb
......@@ -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) {
......
......@@ -33,6 +33,8 @@
#ifdef _WIN32
# include <stddef.h>
#else
# include <unistd.h>
#endif
#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32)
......
......@@ -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
......
......@@ -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
......
......@@ -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; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册