]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
On Windows, remove compiling option that eliminate POSIX
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 9 Feb 2009 12:57:08 +0000 (07:57 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 9 Feb 2009 12:57:08 +0000 (07:57 -0500)
deprecation warnings by.

SVN-Revision: 601

CMakeLists.txt
libarchive/archive_windows.h
libarchive/test/main.c

index 58acf7297ed6fe092bf64303039f98c04374776f..06bd7ee3ab65f6661a619cb9796674dd47846ccc 100644 (file)
@@ -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})
index 02455d91ccc56506905460657cc67c7defdf5b4f..fc95d58bc08a07d88f0213c8735c5dc33befaf2c 100644 (file)
@@ -36,6 +36,7 @@
 #define        set_errno(val)  ((errno)=val)
 #include <io.h>
 #include <stdlib.h>   //brings in NULL
+#include <stdio.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <process.h>
@@ -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
 
 #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
index 13fd5f444551d4445b8967f7b70a0fcfbed478b6..85cb0091601ca021e53642b56270bb2bfe1cf6b0 100644 (file)
@@ -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';