From: Michihiro NAKAJIMA Date: Mon, 9 Feb 2009 12:57:08 +0000 (-0500) Subject: On Windows, remove compiling option that eliminate POSIX X-Git-Tag: v2.7.0~303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63bbbfa2f5084d6126d82dc3dccedef7dd4185fb;p=thirdparty%2Flibarchive.git On Windows, remove compiling option that eliminate POSIX deprecation warnings by. SVN-Revision: 601 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 58acf7297..06bd7ee3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -624,7 +624,7 @@ ENDIF(WIN32) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libarchive) # IF(MSVC) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) ENDIF(MSVC) # Libarchive is a library ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) diff --git a/libarchive/archive_windows.h b/libarchive/archive_windows.h index 02455d91c..fc95d58bc 100644 --- a/libarchive/archive_windows.h +++ b/libarchive/archive_windows.h @@ -36,6 +36,7 @@ #define set_errno(val) ((errno)=val) #include #include //brings in NULL +#include #include #include #include @@ -60,7 +61,6 @@ /* TODO: Fix the code, don't suppress the warnings. */ #pragma warning(disable:4244) /* 'conversion' conversion from 'type1' to 'type2', possible loss of data */ #pragma warning(disable:4146) /* unary minus operator applied to unsigned type, result still unsigned */ -//#pragma warning(disable:4996) /* 'function': was declared deprecated */ //#pragma warning(disable:4267) /* Conversion, possible loss of data */ #endif @@ -78,11 +78,13 @@ #define makedev(maj,min) ((0xff00 & ((maj)<<8))|(0xffff00ff & (min))) /* Alias the Windows _function to the POSIX equivalent. */ +#define access _access #define chdir la_chdir #define chmod la_chmod #define close _close -//#define fileno _fileno +#define fileno _fileno #define fstat la_fstat +#define getcwd _getcwd #define lseek la_lseek #define lstat la_stat #define open la_open diff --git a/libarchive/test/main.c b/libarchive/test/main.c index 13fd5f444..85cb00916 100644 --- a/libarchive/test/main.c +++ b/libarchive/test/main.c @@ -902,7 +902,6 @@ get_refdir(void) char *pwd, *p; /* Get the current dir. */ - /* XXX Visual C++ uses _getcwd() XXX */ pwd = getcwd(NULL, 0); while (pwd[strlen(pwd) - 1] == '\n') pwd[strlen(pwd) - 1] = '\0';