COMP: Remove more warnings and rename library to cmtar
This commit is contained in:
parent
1f18c369cf
commit
c622641ac1
|
@ -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})
|
||||
|
||||
|
|
|
@ -313,6 +313,7 @@ char *strsep(register char **, register const char *);
|
|||
#define S_ISFIFO(m) (((m)&S_IFFIFO)==S_IFFIFO)
|
||||
#endif
|
||||
|
||||
#if !defined(TAR_MAXPATHLEN)
|
||||
# if defined(PATH_MAX)
|
||||
# define TAR_MAXPATHLEN PATH_MAX
|
||||
# elif defined(MAXPATHLEN)
|
||||
|
@ -320,4 +321,5 @@ char *strsep(register char **, register const char *);
|
|||
# else
|
||||
# define TAR_MAXPATHLEN 16384
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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@
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue