summaryrefslogtreecommitdiffstats
path: root/Utilities/cmtar
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-28 20:31:20 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-28 20:31:20 (GMT)
commitc622641ac1aec22c881a57e8aca9e6050b11f701 (patch)
treeefa018d5f63a49ccfddcd0b89b0fbad5729e2363 /Utilities/cmtar
parent1f18c369cf4b833eed0f29edacd5f1a8f89f99e3 (diff)
downloadCMake-c622641ac1aec22c881a57e8aca9e6050b11f701.zip
CMake-c622641ac1aec22c881a57e8aca9e6050b11f701.tar.gz
CMake-c622641ac1aec22c881a57e8aca9e6050b11f701.tar.bz2
COMP: Remove more warnings and rename library to cmtar
Diffstat (limited to 'Utilities/cmtar')
-rw-r--r--Utilities/cmtar/CMakeLists.txt14
-rw-r--r--Utilities/cmtar/compat/compat.h14
-rw-r--r--Utilities/cmtar/config.h.in6
-rw-r--r--Utilities/cmtar/handle.c1
4 files changed, 11 insertions, 24 deletions
diff --git a/Utilities/cmtar/CMakeLists.txt b/Utilities/cmtar/CMakeLists.txt
index 7ffe0e1..fc3a887 100644
--- a/Utilities/cmtar/CMakeLists.txt
+++ b/Utilities/cmtar/CMakeLists.txt
@@ -140,14 +140,6 @@ ELSE(HAVE_SIZEOF_UINT64_T)
SET (uint64_t "long long")
ENDIF(HAVE_SIZEOF_UINT64_T)
-CHECK_TYPE_SIZE("socklen_t" SIZEOF_SOCKLEN_T)
-IF(HAVE_SIZEOF_SOCKLEN_T)
- SET (HAVE_SOCKLEN_T 1)
-ELSE(HAVE_SIZEOF_SOCKLEN_T)
- SET (HAVE_SOCKLEN_T 0)
- SET (socklen_t "unsigned long")
-ENDIF(HAVE_SIZEOF_SOCKLEN_T)
-
CHECK_TYPE_SIZE("gid_t" SIZEOF_GID_T)
IF(HAVE_SIZEOF_GID_T)
SET (HAVE_GID_T 1)
@@ -211,7 +203,6 @@ SET (HAVE_LIBZ 1)
#SET (HAVE_MINOR_T 0)
#SET (HAVE_NLINK_T 1)
#SET (HAVE_SNPRINTF 1)
-#SET (HAVE_SOCKLEN_T 1)
#SET (HAVE_STDINT_H 1)
#SET (HAVE_STDLIB_H 1)
#SET (HAVE_STRDUP 1)
@@ -254,7 +245,6 @@ SET (const 0)
#SET (nlink_t 0)
#SET (off_t 0)
#SET (size_t 0)
-#SET (socklen_t 0)
#SET (uid_t 0)
#SET (uint64_t 0)
SET (LISTHASH_PREFIX "libtar")
@@ -357,7 +347,7 @@ ENDIF(NOT HAVE_FNMATCH)
CONFIGURE_FILE(${LIBTAR_SOURCE_DIR}/config.h.in
${LIBTAR_BINARY_DIR}/libtar/config.h)
-ADD_LIBRARY(tar STATIC ${libtar_SRC})
+ADD_LIBRARY(cmtar STATIC ${libtar_SRC})
ADD_EXECUTABLE(tartest libtar.c)
-TARGET_LINK_LIBRARIES(tartest tar ${CMAKE_ZLIB_LIBRARIES})
+TARGET_LINK_LIBRARIES(tartest cmtar ${CMAKE_ZLIB_LIBRARIES})
diff --git a/Utilities/cmtar/compat/compat.h b/Utilities/cmtar/compat/compat.h
index f308b99..ae46f36 100644
--- a/Utilities/cmtar/compat/compat.h
+++ b/Utilities/cmtar/compat/compat.h
@@ -313,11 +313,13 @@ char *strsep(register char **, register const char *);
#define S_ISFIFO(m) (((m)&S_IFFIFO)==S_IFFIFO)
#endif
-#if defined(PATH_MAX)
-# define TAR_MAXPATHLEN PATH_MAX
-#elif defined(MAXPATHLEN)
-# define TAR_MAXPATHLEN MAXPATHLEN
-#else
-# define TAR_MAXPATHLEN 16384
+#if !defined(TAR_MAXPATHLEN)
+# if defined(PATH_MAX)
+# define TAR_MAXPATHLEN PATH_MAX
+# elif defined(MAXPATHLEN)
+# define TAR_MAXPATHLEN MAXPATHLEN
+# else
+# define TAR_MAXPATHLEN 16384
+# endif
#endif
diff --git a/Utilities/cmtar/config.h.in b/Utilities/cmtar/config.h.in
index b22bfac..6702238 100644
--- a/Utilities/cmtar/config.h.in
+++ b/Utilities/cmtar/config.h.in
@@ -45,9 +45,6 @@
/* Define if your system has a working snprintf */
#cmakedefine HAVE_SNPRINTF @HAVE_SNPRINTF@
-/* Define to 1 if the system has the type `socklen_t'. */
-#cmakedefine HAVE_SOCKLEN_T @HAVE_SOCKLEN_T@
-
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H @HAVE_STDINT_H@
@@ -183,9 +180,6 @@
/* Define to `int' if <sys/types.h> does not define. */
#cmakedefine ssize_t @size_t@
-/* Define to `unsigned long' if not defined in system header files. */
-#cmakedefine socklen_t @socklen_t@
-
/* Define to `int' if <sys/types.h> doesn't define. */
#cmakedefine uid_t @uid_t@
diff --git a/Utilities/cmtar/handle.c b/Utilities/cmtar/handle.c
index 5238e03..3bf4c28 100644
--- a/Utilities/cmtar/handle.c
+++ b/Utilities/cmtar/handle.c
@@ -56,6 +56,7 @@ static int
tar_init(TAR **t, char *pathname, tartype_t *type,
int oflags, int mode, int options)
{
+ (void)mode;
if ((oflags & O_ACCMODE) == O_RDWR)
{
errno = EINVAL;