Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 25 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
language: c

compiler:
- gcc
- clang
# - tcc

dist:
- trusty
# - precise
Expand All @@ -31,9 +26,27 @@ addons: &addons
# - tcc
# - tcc:i386

#matrix:
# include:
# - compiler: gcc
matrix:
include:
- os: linux
compiler: gcc
compiler: clang
script:
- if [ -n "$COVERITY_SCAN_TOKEN" ]; then exit 0; fi
- ./autogen.sh $TESTS
- ./configure $TESTS
- make
- if [ -n "$TESTS" ]; then ./udffsck/travis-tests.sh $TESTLEVEL; fi
- os: osx
compiler: clang
script:
- if [ -n "$COVERITY_SCAN_TOKEN" ]; then exit 0; fi
- ./autogen.sh $TESTS
- ./configure $TESTS
- cd libudffs && make
- cd ../udffsck && make
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is testing, x86/x86_64 and gcc disabled for osx? All those tests shall be run.

Keeping osx as allowed failure is good idea, since it is primarily linux package.

allow_failures:
- os: osx
# env:
# - secure: "rH+rQS0W+0U3C/W/uRqJ8E5A3KrlbWaDRpZtdT1/SO0kEMnmuG2b0UvoadcIKOEXNHnQeZ3kPQbG2Wjfo/D6up0mXGZLXAvaJZozagxdfF2QPHSpvj2NDRLM71+UaKK/ksq3auPq+o3Y74FZOc4oBr7kPpr01H0pK8/2lljxS2daINRgFfcsaRhKNshtvHBn/KLgbwa5vEB/jadKBKM+mgAYE1sFv8P3yZ3+MzxygpurJ6enU6/9JITF5QgB11ybivYCbqoEf+IhzxgsmELz0zgL+PCVzTvrrNzpCT1UZJ35vWht5Yf7/AmK3sI/rMJm7TYswFKAc7NUbn80oIw6opp7sW1oFqMEHnHNLMNSljg8BwUrbH+y6+yV7sRfG6djCTYUYGYY9ZC2Ef4r3s3ZrRwHuBujZx/DOnFj0nd0AuvETNPkMWD1996bvSQ+WkfZ4JdW335/G61GdQv7kMTutWLKrlDquqxKM1AsoP1d99vCBzpEfRKyZjDUUSmnjdvZ/QgIDidGzH3vYFO81N39HjgKZlxH+oCuoX2ak3A6BrOT7t6mgEXnGM4H9vWhoKb7hseadBsR7YnbFSRmF2FDihEoIJ/BCPykGSZWzxTF94zC3WURI1C3HL0sAHGg3M620FgFj3M4Xkf0CPsmdsjwsnZg6TgVkYwAaKKP0HI2MFs="
# addons:
Expand All @@ -48,6 +61,10 @@ addons: &addons
# branch_pattern: master

before_script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install automake libtool; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade cmake wget; fi
- cd ..
- mkdir cmocka
- cd cmocka
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[![Build Status](https://travis-ci.org/argorain/udftools.svg?branch=master)](https://travis-ci.org/argorain/udftools)
[![Build Status](https://travis-ci.org/gmerlino/udftools.svg?branch=master)](https://travis-ci.org/gmerlino/udftools)

Linux tools for UDF filesystems and DVD/CD-R(W) drives
7 changes: 7 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ AC_SYS_LARGEFILE
dnl Checks for library functions.
AC_SUBST(LTLIBOBJS)

dnl Enable Darwin extensions (AC_USE_SYSTEM_EXTENSIONS does not enable
dnl them in 2.63)
AC_CANONICAL_HOST
AS_CASE([$host_os],
[darwin*], [CPPFLAGS="${CPPFLAGS} -D_DARWIN_C_SOURCE"])

AC_CONFIG_FILES(Makefile libudffs/Makefile mkudffs/Makefile cdrwtool/Makefile pktsetup/Makefile udffsck/Makefile wrudf/Makefile doc/Makefile)

AC_ARG_ENABLE(debug,
Expand All @@ -38,6 +44,7 @@ esac],
[debug=false])

AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")

AC_ARG_ENABLE(tests,
AS_HELP_STRING([--enable-tests],
Expand Down
15 changes: 15 additions & 0 deletions include/bswap.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
#include <inttypes.h>
#include <sys/types.h>

#if defined(HAVE_MACHINE_ENDIAN_H)
#include <machine/endian.h>
#endif
#ifdef HAVE_SYS_ISA_DEFS_H
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
Expand All @@ -42,6 +45,18 @@
#endif
#endif

/* macOS */
#ifdef __APPLE__
#define __LITTLE_ENDIAN LITTLE_ENDIAN
#define __BIG_ENDIAN BIG_ENDIAN
#define __BYTE_ORDER BYTE_ORDER
#if __BYTE_ORDER == BIG_ENDIAN
#define __BIG_ENDIAN_BITFIELD
#elif __BYTE_ORDER == LITTLE_ENDIAN
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With respect to pali#14, this needs to be sorted out in same way to prevent future conflict.

#define __LITTLE_ENDIAN_BITFIELD
#endif
#endif /* __APPLE__ */

#define constant_swab16(x) \
((uint16_t)((((uint16_t)(x) & 0x00FFU) << 8) | \
(((uint16_t)(x) & 0xFF00U) >> 8)))
Expand Down
4 changes: 3 additions & 1 deletion libudffs/extent.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@

#include "config.h"

#include <malloc.h>
#ifndef __clang__
# include <malloc.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
Expand Down
4 changes: 4 additions & 0 deletions udffsck/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ sbin_PROGRAMS = udffsck
udffsck_LDADD = $(top_builddir)/libudffs/libudffs.la
udffsck_SOURCES = main.c utils.c utils.h udffsck.c udffsck.h options.c options.h log.c log.h ../include/ecma_167.h ../include/osta_udf.h ../mkudffs/mkudffs.h ../mkudffs/defaults.h ../mkudffs/file.h ../libudffs/crc.c ../include/libudffs.h ../include/udf_endian.h

if HAVE_DARWIN
SET_FEATURES = -D_DARWIN_C_SOURCE
endif

AM_CFLAGS = -I$(top_srcdir)/include
AM_LDFLAGS = -lm -ldl
#-Wl,--no-as-needed
Expand Down
9 changes: 9 additions & 0 deletions udffsck/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,19 @@
#include <sys/mman.h>
#include <limits.h>
#include <signal.h>
#ifdef __APPLE__
//#include <sys/ucred.h>
#include <sys/mount.h>
#else
#include <mntent.h>
#include <sys/vfs.h>
#endif
#include <sys/stat.h>
#ifdef __APPLE__
#include <sys/mount.h>
#else
#include <sys/vfs.h>
#endif

#include <ecma_167.h>
#include <libudffs.h>
Expand Down
4 changes: 3 additions & 1 deletion udffsck/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#ifndef __clang__
# include <malloc.h>
#endif

#include "libudffs.h"
#include "options.h"
Expand Down