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

build window lseek problem fixed

上级 197748bb
...@@ -160,15 +160,6 @@ void SZ_Finalize() ...@@ -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 #ifdef WINDOWS
int gettimeofday(struct timeval *tv, struct timezone *tz) { int gettimeofday(struct timeval *tv, struct timezone *tz) {
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#ifdef _WIN32 #ifdef _WIN32
# include <stddef.h> # include <stddef.h>
#else
# include <unistd.h>
#endif #endif
#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) #if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32)
......
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
#include "gzguts.h" #include "gzguts.h"
#ifdef WINDOWS
#include <io.h>
#else
#include <unistd.h>
#endif
#if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__) #if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__)
# define LSEEK _lseeki64 # define LSEEK _lseeki64
#else #else
......
...@@ -472,7 +472,7 @@ typedef uLong FAR uLongf; ...@@ -472,7 +472,7 @@ typedef uLong FAR uLongf;
#endif #endif
#ifndef Z_SOLO #ifndef Z_SOLO
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) # 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 # ifdef VMS
# include <unixio.h> /* for off_t */ # include <unixio.h> /* for off_t */
# endif # endif
......
...@@ -40,8 +40,10 @@ ...@@ -40,8 +40,10 @@
#if defined(DEBUGLEVEL) && (DEBUGLEVEL>=2) && !defined(_MSC_VER) #if defined(DEBUGLEVEL) && (DEBUGLEVEL>=2) && !defined(_MSC_VER)
# include <stdio.h> # include <stdio.h>
# include <unistd.h>
# include <sys/times.h> //# include <unistd.h>
//# include <sys/times.h>
# define DEBUG_PRINTHEX(l,p,n) { \ # define DEBUG_PRINTHEX(l,p,n) { \
unsigned debug_u; \ unsigned debug_u; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册