| diff --git a/configure.in b/configure.in |
| --- a/configure.in |
| +++ b/configure.in |
| @@ -7,13 +7,8 @@ AC_LANG_C |
| AC_PROG_CC |
| AM_PROG_LIBTOOL |
| |
| -AC_CHECK_HEADERS(fuse.h, AC_CHECK_LIB(fuse, fuse_main, [], |
| - [ AC_MSG_ERROR([libfuse is required]) ]), |
| - [ AC_MSG_ERROR([libfuse is required]) ], |
| -[ |
| #ifndef _FILE_OFFSET_BITS |
| #define _FILE_OFFSET_BITS 64 |
| #endif |
| -]) |
| |
| AC_OUTPUT(Makefile src/Makefile zAppRun/Makefile) |
| diff --git a/linux/iso_fs.h b/linux/iso_fs.h |
| --- a/linux/iso_fs.h |
| +++ b/linux/iso_fs.h |
| @@ -11,7 +11,10 @@ |
| #ifndef _ISOFS_FS_H |
| #define _ISOFS_FS_H |
| |
| +#if !defined(__native_client__) |
| #include <linux/types.h> |
| +#endif |
| + |
| /* |
| * The isofs filesystem constants/structures |
| */ |
| diff --git a/src/Makefile.am b/src/Makefile.am |
| deleted file mode 100644 |
| --- a/src/Makefile.am |
| +++ /dev/null |
| @@ -1,12 +0,0 @@ |
| -bin_PROGRAMS = fuseiso |
| -fuseiso_SOURCES = fuseiso.c isofs.c |
| - |
| -# set the include path found by configure |
| -INCLUDES= $(all_includes) |
| - |
| -# the library search path. |
| -fuseiso_LDFLAGS = $(all_libraries) |
| -noinst_HEADERS = isofs.h |
| - |
| -AM_CFLAGS = -D_FILE_OFFSET_BITS=64 `pkg-config --cflags fuse glib-2.0` -Wall |
| -AM_LDFLAGS = `pkg-config --libs fuse glib-2.0` -lz |
| diff --git a/src/Makefile.in b/src/Makefile.in |
| --- a/src/Makefile.in |
| +++ b/src/Makefile.in |
| @@ -1,461 +1,65 @@ |
| -# Makefile.in generated by automake 1.9.6 from Makefile.am. |
| -# @configure_input@ |
| - |
| -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
| -# 2003, 2004, 2005 Free Software Foundation, Inc. |
| -# This Makefile.in is free software; the Free Software Foundation |
| -# gives unlimited permission to copy and/or distribute it, |
| -# with or without modifications, as long as this notice is preserved. |
| - |
| -# This program is distributed in the hope that it will be useful, |
| -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
| -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| -# PARTICULAR PURPOSE. |
| - |
| -@SET_MAKE@ |
| - |
| - |
| -srcdir = @srcdir@ |
| -top_srcdir = @top_srcdir@ |
| -VPATH = @srcdir@ |
| -pkgdatadir = $(datadir)/@PACKAGE@ |
| -pkglibdir = $(libdir)/@PACKAGE@ |
| -pkgincludedir = $(includedir)/@PACKAGE@ |
| -top_builddir = .. |
| -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd |
| -INSTALL = @INSTALL@ |
| -install_sh_DATA = $(install_sh) -c -m 644 |
| -install_sh_PROGRAM = $(install_sh) -c |
| -install_sh_SCRIPT = $(install_sh) -c |
| -INSTALL_HEADER = $(INSTALL_DATA) |
| -transform = $(program_transform_name) |
| -NORMAL_INSTALL = : |
| -PRE_INSTALL = : |
| -POST_INSTALL = : |
| -NORMAL_UNINSTALL = : |
| -PRE_UNINSTALL = : |
| -POST_UNINSTALL = : |
| -build_triplet = @build@ |
| -host_triplet = @host@ |
| -bin_PROGRAMS = fuseiso$(EXEEXT) |
| -subdir = src |
| -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ |
| - $(srcdir)/Makefile.in |
| -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
| -am__aclocal_m4_deps = $(top_srcdir)/configure.in |
| -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
| - $(ACLOCAL_M4) |
| -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs |
| -CONFIG_HEADER = $(top_builddir)/config.h |
| -CONFIG_CLEAN_FILES = |
| -am__installdirs = "$(DESTDIR)$(bindir)" |
| -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) |
| -PROGRAMS = $(bin_PROGRAMS) |
| -am_fuseiso_OBJECTS = fuseiso.$(OBJEXT) isofs.$(OBJEXT) |
| -fuseiso_OBJECTS = $(am_fuseiso_OBJECTS) |
| -fuseiso_LDADD = $(LDADD) |
| -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) |
| -depcomp = $(SHELL) $(top_srcdir)/depcomp |
| -am__depfiles_maybe = depfiles |
| -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ |
| - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) |
| -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ |
| - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ |
| - $(AM_CFLAGS) $(CFLAGS) |
| -CCLD = $(CC) |
| -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ |
| - $(AM_LDFLAGS) $(LDFLAGS) -o $@ |
| -SOURCES = $(fuseiso_SOURCES) |
| -DIST_SOURCES = $(fuseiso_SOURCES) |
| -HEADERS = $(noinst_HEADERS) |
| -ETAGS = etags |
| -CTAGS = ctags |
| -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
| -ACLOCAL = @ACLOCAL@ |
| -AMDEP_FALSE = @AMDEP_FALSE@ |
| -AMDEP_TRUE = @AMDEP_TRUE@ |
| -AMTAR = @AMTAR@ |
| -AR = @AR@ |
| -AUTOCONF = @AUTOCONF@ |
| -AUTOHEADER = @AUTOHEADER@ |
| -AUTOMAKE = @AUTOMAKE@ |
| -AWK = @AWK@ |
| +prefix = /webports-dummydir |
| +exec_prefix = ${prefix} |
| +bindir = ${exec_prefix}/bin |
| +libdir = ${exec_prefix}/lib |
| +includedir = ${prefix}/include |
| + |
| +# source files. |
| +SRC = fuseiso.c isofs.c |
| + |
| +OBJ = fuseiso.o isofs.o |
| + |
| +OUT = libfuseiso.a |
| + |
| +# include directories |
| +INCLUDES = -I. -I.. @CFLAGS@ |
| + |
| +# CCFLAGS |
| +CCFLAGS = -DHAVE_CONFIG_H -Wall -DNDEBUG |
| + |
| +# compiler |
| CC = @CC@ |
| -CCDEPMODE = @CCDEPMODE@ |
| -CFLAGS = @CFLAGS@ |
| -CPP = @CPP@ |
| -CPPFLAGS = @CPPFLAGS@ |
| -CXX = @CXX@ |
| -CXXCPP = @CXXCPP@ |
| -CXXDEPMODE = @CXXDEPMODE@ |
| -CXXFLAGS = @CXXFLAGS@ |
| -CYGPATH_W = @CYGPATH_W@ |
| -DEFS = @DEFS@ |
| -DEPDIR = @DEPDIR@ |
| -ECHO = @ECHO@ |
| -ECHO_C = @ECHO_C@ |
| -ECHO_N = @ECHO_N@ |
| -ECHO_T = @ECHO_T@ |
| -EGREP = @EGREP@ |
| -EXEEXT = @EXEEXT@ |
| -F77 = @F77@ |
| -FFLAGS = @FFLAGS@ |
| -GREP = @GREP@ |
| -INSTALL_DATA = @INSTALL_DATA@ |
| -INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
| -INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
| -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
| + |
| +# library paths |
| +LIBS = |
| + |
| +# compile flags |
| LDFLAGS = @LDFLAGS@ |
| -LIBOBJS = @LIBOBJS@ |
| -LIBS = @LIBS@ |
| -LIBTOOL = @LIBTOOL@ |
| -LN_S = @LN_S@ |
| -LTLIBOBJS = @LTLIBOBJS@ |
| -MAKEINFO = @MAKEINFO@ |
| -OBJEXT = @OBJEXT@ |
| -PACKAGE = @PACKAGE@ |
| -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ |
| -PACKAGE_NAME = @PACKAGE_NAME@ |
| -PACKAGE_STRING = @PACKAGE_STRING@ |
| -PACKAGE_TARNAME = @PACKAGE_TARNAME@ |
| -PACKAGE_VERSION = @PACKAGE_VERSION@ |
| -PATH_SEPARATOR = @PATH_SEPARATOR@ |
| -RANLIB = @RANLIB@ |
| -SED = @SED@ |
| -SET_MAKE = @SET_MAKE@ |
| -SHELL = @SHELL@ |
| -STRIP = @STRIP@ |
| -VERSION = @VERSION@ |
| -ac_ct_CC = @ac_ct_CC@ |
| -ac_ct_CXX = @ac_ct_CXX@ |
| -ac_ct_F77 = @ac_ct_F77@ |
| -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ |
| -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ |
| -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ |
| -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ |
| -am__include = @am__include@ |
| -am__leading_dot = @am__leading_dot@ |
| -am__quote = @am__quote@ |
| -am__tar = @am__tar@ |
| -am__untar = @am__untar@ |
| -bindir = @bindir@ |
| -build = @build@ |
| -build_alias = @build_alias@ |
| -build_cpu = @build_cpu@ |
| -build_os = @build_os@ |
| -build_vendor = @build_vendor@ |
| -datadir = @datadir@ |
| -datarootdir = @datarootdir@ |
| -docdir = @docdir@ |
| -dvidir = @dvidir@ |
| -exec_prefix = @exec_prefix@ |
| -host = @host@ |
| -host_alias = @host_alias@ |
| -host_cpu = @host_cpu@ |
| -host_os = @host_os@ |
| -host_vendor = @host_vendor@ |
| -htmldir = @htmldir@ |
| -includedir = @includedir@ |
| -infodir = @infodir@ |
| -install_sh = @install_sh@ |
| -libdir = @libdir@ |
| -libexecdir = @libexecdir@ |
| -localedir = @localedir@ |
| -localstatedir = @localstatedir@ |
| -mandir = @mandir@ |
| -mkdir_p = @mkdir_p@ |
| -oldincludedir = @oldincludedir@ |
| -pdfdir = @pdfdir@ |
| -prefix = @prefix@ |
| -program_transform_name = @program_transform_name@ |
| -psdir = @psdir@ |
| -sbindir = @sbindir@ |
| -sharedstatedir = @sharedstatedir@ |
| -sysconfdir = @sysconfdir@ |
| -target_alias = @target_alias@ |
| -fuseiso_SOURCES = fuseiso.c isofs.c |
| - |
| -# set the include path found by configure |
| -INCLUDES = $(all_includes) |
| + |
| +RANLIB = @RANLIB@ |
| |
| -# the library search path. |
| -fuseiso_LDFLAGS = $(all_libraries) |
| -noinst_HEADERS = isofs.h |
| -AM_CFLAGS = -D_FILE_OFFSET_BITS=64 `pkg-config --cflags fuse glib-2.0` -Wall |
| -AM_LDFLAGS = `pkg-config --libs fuse glib-2.0` -lz |
| -all: all-am |
| +### Installation programs and flags |
| +INSTALL = /usr/bin/install -c |
| +INSTALL_PROGRAM = ${INSTALL} |
| +INSTALL_DATA = ${INSTALL} -m 644 |
| +LN_S = ln -s |
| +MKDIR = mkdir -p -m 755 |
| |
| -.SUFFIXES: |
| -.SUFFIXES: .c .lo .o .obj |
| -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) |
| - @for dep in $?; do \ |
| - case '$(am__configure_deps)' in \ |
| - *$$dep*) \ |
| - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ |
| - && exit 0; \ |
| - exit 1;; \ |
| - esac; \ |
| - done; \ |
| - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ |
| - cd $(top_srcdir) && \ |
| - $(AUTOMAKE) --gnu src/Makefile |
| -.PRECIOUS: Makefile |
| -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
| - @case '$?' in \ |
| - *config.status*) \ |
| - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ |
| - *) \ |
| - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ |
| - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ |
| - esac; |
| |
| -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
| - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
| +LIBFUSEISO_OBJS = fuseiso.o isofs.o |
| |
| -$(top_srcdir)/configure: $(am__configure_deps) |
| - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
| -$(ACLOCAL_M4): $(am__aclocal_m4_deps) |
| - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
| -install-binPROGRAMS: $(bin_PROGRAMS) |
| - @$(NORMAL_INSTALL) |
| - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" |
| - @list='$(bin_PROGRAMS)'; for p in $$list; do \ |
| - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ |
| - if test -f $$p \ |
| - || test -f $$p1 \ |
| - ; then \ |
| - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ |
| - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ |
| - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ |
| - else :; fi; \ |
| - done |
| +LIBFUSEISO_HDRS = |
| |
| -uninstall-binPROGRAMS: |
| - @$(NORMAL_UNINSTALL) |
| - @list='$(bin_PROGRAMS)'; for p in $$list; do \ |
| - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ |
| - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ |
| - rm -f "$(DESTDIR)$(bindir)/$$f"; \ |
| - done |
| +LIBFUSEISO_LIBS = libfuseiso.a |
| |
| -clean-binPROGRAMS: |
| - @list='$(bin_PROGRAMS)'; for p in $$list; do \ |
| - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ |
| - echo " rm -f $$p $$f"; \ |
| - rm -f $$p $$f ; \ |
| - done |
| -fuseiso$(EXEEXT): $(fuseiso_OBJECTS) $(fuseiso_DEPENDENCIES) |
| - @rm -f fuseiso$(EXEEXT) |
| - $(LINK) $(fuseiso_LDFLAGS) $(fuseiso_OBJECTS) $(fuseiso_LDADD) $(LIBS) |
| +ALL = libfuseiso.a |
| |
| -mostlyclean-compile: |
| - -rm -f *.$(OBJEXT) |
| +all: $(ALL) |
| +default: $(OUT) |
| + |
| +.PHONY: clean distclean install |
| |
| -distclean-compile: |
| - -rm -f *.tab.c |
| +libfuseiso.a: ${LIBFUSEISO_OBJS} ${LIBFUSEISO_OBJS} |
| + ${AR} rc libfuseiso.a ${LIBFUSEISO_OBJS} |
| + ${RANLIB} libfuseiso.a |
| |
| -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fuseiso.Po@am__quote@ |
| -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isofs.Po@am__quote@ |
| |
| .c.o: |
| -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ |
| -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi |
| -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ |
| -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
| -@am__fastdepCC_FALSE@ $(COMPILE) -c $< |
| - |
| -.c.obj: |
| -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ |
| -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi |
| -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ |
| -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
| -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` |
| - |
| -.c.lo: |
| -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ |
| -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi |
| -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ |
| -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
| -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< |
| - |
| -mostlyclean-libtool: |
| - -rm -f *.lo |
| - |
| -clean-libtool: |
| - -rm -rf .libs _libs |
| - |
| -distclean-libtool: |
| - -rm -f libtool |
| -uninstall-info-am: |
| - |
| -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) |
| - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
| - unique=`for i in $$list; do \ |
| - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
| - done | \ |
| - $(AWK) ' { files[$$0] = 1; } \ |
| - END { for (i in files) print i; }'`; \ |
| - mkid -fID $$unique |
| -tags: TAGS |
| - |
| -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ |
| - $(TAGS_FILES) $(LISP) |
| - tags=; \ |
| - here=`pwd`; \ |
| - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
| - unique=`for i in $$list; do \ |
| - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
| - done | \ |
| - $(AWK) ' { files[$$0] = 1; } \ |
| - END { for (i in files) print i; }'`; \ |
| - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ |
| - test -n "$$unique" || unique=$$empty_fix; \ |
| - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ |
| - $$tags $$unique; \ |
| - fi |
| -ctags: CTAGS |
| -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ |
| - $(TAGS_FILES) $(LISP) |
| - tags=; \ |
| - here=`pwd`; \ |
| - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ |
| - unique=`for i in $$list; do \ |
| - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ |
| - done | \ |
| - $(AWK) ' { files[$$0] = 1; } \ |
| - END { for (i in files) print i; }'`; \ |
| - test -z "$(CTAGS_ARGS)$$tags$$unique" \ |
| - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ |
| - $$tags $$unique |
| - |
| -GTAGS: |
| - here=`$(am__cd) $(top_builddir) && pwd` \ |
| - && cd $(top_srcdir) \ |
| - && gtags -i $(GTAGS_ARGS) $$here |
| - |
| -distclean-tags: |
| - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
| - |
| -distdir: $(DISTFILES) |
| - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ |
| - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ |
| - list='$(DISTFILES)'; for file in $$list; do \ |
| - case $$file in \ |
| - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ |
| - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ |
| - esac; \ |
| - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ |
| - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ |
| - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ |
| - dir="/$$dir"; \ |
| - $(mkdir_p) "$(distdir)$$dir"; \ |
| - else \ |
| - dir=''; \ |
| - fi; \ |
| - if test -d $$d/$$file; then \ |
| - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ |
| - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ |
| - fi; \ |
| - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ |
| - else \ |
| - test -f $(distdir)/$$file \ |
| - || cp -p $$d/$$file $(distdir)/$$file \ |
| - || exit 1; \ |
| - fi; \ |
| - done |
| -check-am: all-am |
| -check: check-am |
| -all-am: Makefile $(PROGRAMS) $(HEADERS) |
| -installdirs: |
| - for dir in "$(DESTDIR)$(bindir)"; do \ |
| - test -z "$$dir" || $(mkdir_p) "$$dir"; \ |
| - done |
| -install: install-am |
| -install-exec: install-exec-am |
| -install-data: install-data-am |
| -uninstall: uninstall-am |
| - |
| -install-am: all-am |
| - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am |
| - |
| -installcheck: installcheck-am |
| -install-strip: |
| - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ |
| - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ |
| - `test -z '$(STRIP)' || \ |
| - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install |
| -mostlyclean-generic: |
| - |
| -clean-generic: |
| - |
| -distclean-generic: |
| - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) |
| - |
| -maintainer-clean-generic: |
| - @echo "This command is intended for maintainers to use" |
| - @echo "it deletes files that may require special tools to rebuild." |
| -clean: clean-am |
| - |
| -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am |
| - |
| -distclean: distclean-am |
| - -rm -rf ./$(DEPDIR) |
| - -rm -f Makefile |
| -distclean-am: clean-am distclean-compile distclean-generic \ |
| - distclean-libtool distclean-tags |
| - |
| -dvi: dvi-am |
| - |
| -dvi-am: |
| - |
| -html: html-am |
| - |
| -info: info-am |
| - |
| -info-am: |
| - |
| -install-data-am: |
| - |
| -install-exec-am: install-binPROGRAMS |
| - |
| -install-info: install-info-am |
| - |
| -install-man: |
| - |
| -installcheck-am: |
| - |
| -maintainer-clean: maintainer-clean-am |
| - -rm -rf ./$(DEPDIR) |
| - -rm -f Makefile |
| -maintainer-clean-am: distclean-am maintainer-clean-generic |
| - |
| -mostlyclean: mostlyclean-am |
| - |
| -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ |
| - mostlyclean-libtool |
| - |
| -pdf: pdf-am |
| - |
| -pdf-am: |
| - |
| -ps: ps-am |
| - |
| -ps-am: |
| - |
| -uninstall-am: uninstall-binPROGRAMS uninstall-info-am |
| - |
| -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ |
| - clean-generic clean-libtool ctags distclean distclean-compile \ |
| - distclean-generic distclean-libtool distclean-tags distdir dvi \ |
| - dvi-am html html-am info info-am install install-am \ |
| - install-binPROGRAMS install-data install-data-am install-exec \ |
| - install-exec-am install-info install-info-am install-man \ |
| - install-strip installcheck installcheck-am installdirs \ |
| - maintainer-clean maintainer-clean-generic mostlyclean \ |
| - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ |
| - pdf pdf-am ps ps-am tags uninstall uninstall-am \ |
| - uninstall-binPROGRAMS uninstall-info-am |
| - |
| -# Tell versions [3.59,3.63) of GNU make to not export all variables. |
| -# Otherwise a system limit (for SysV at least) may be exceeded. |
| -.NOEXPORT: |
| + $(CC) $(INCLUDES) $(CCFLAGS) -c $< -o $@ |
| + |
| +clean: |
| + rm -f $(OBJ) $(ALL) |
| + |
| +install: ${ALL} |
| + ${MKDIR} ${DESTDIR}${libdir} |
| + ${INSTALL_DATA} libfuseiso.a ${DESTDIR}${libdir} |
| \ No newline at end of file |
| diff --git a/src/fuseiso.c b/src/fuseiso.c |
| --- a/src/fuseiso.c |
| +++ b/src/fuseiso.c |
| @@ -18,7 +18,7 @@ |
| * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
| ***************************************************************************/ |
| |
| - |
| +#if !defined(__native_client__) |
| #ifdef HAVE_CONFIG_H |
| #include <config.h> |
| #endif |
| @@ -46,6 +46,17 @@ |
| #include <langinfo.h> |
| |
| #include "isofs.h" |
| +#endif |
| + |
| +#if defined(__native_client__) |
| +#define FUSE_USE_VERSION 26 |
| + |
| +#include <fcntl.h> |
| +#include "isofs.h" |
| +#include "nacl_io/fuse.h" |
| +#include "nacl_io/nacl_io.h" |
| +#include <stdio.h> |
| +#endif |
| |
| #ifdef __GNUC__ |
| # define UNUSED(x) x __attribute__((unused)) |
| @@ -53,6 +64,7 @@ |
| # define UNUSED(x) x |
| #endif |
| |
| +#if !defined(__native_client__) |
| static char *imagefile = NULL; |
| static char *mount_point = NULL; |
| static int image_fd = -1; |
| @@ -213,6 +225,7 @@ int del_mtab_record() { |
| free(mtab_path); |
| return 0; |
| }; |
| +#endif |
| |
| static int isofs_getattr(const char *path, struct stat *stbuf) |
| { |
| @@ -239,6 +252,7 @@ static int isofs_flush(const char *UNUSED(path), struct fuse_file_info *UNUSED(f |
| }; |
| |
| static void* isofs_init() { |
| +#if !defined(__native_client__) |
| int rc; |
| if(maintain_mtab) { |
| rc = add_mtab_record(); |
| @@ -246,13 +260,16 @@ static void* isofs_init() { |
| exit(EXIT_FAILURE); |
| }; |
| }; |
| +#endif |
| return isofs_real_init(); |
| }; |
| |
| static void isofs_destroy(void* param) { |
| +#if !defined(__native_client__) |
| if(maintain_mtab) { |
| del_mtab_record(); |
| }; |
| +#endif |
| return; |
| }; |
| |
| @@ -267,7 +284,12 @@ static int isofs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, of |
| |
| static int isofs_statfs(const char *UNUSED(path), struct statfs *stbuf) |
| { |
| +// TODO change statfs to statvfs in isofs.c |
| +#if !defined(__native_client__) |
| return isofs_real_statfs(stbuf); |
| +#else |
| + return 0; |
| +#endif |
| } |
| |
| static struct fuse_operations isofs_oper = { |
| @@ -283,6 +305,7 @@ static struct fuse_operations isofs_oper = { |
| .statfs = isofs_statfs, |
| }; |
| |
| +#if !defined(__native_client__) |
| void usage(const char* prog) { |
| printf("Version: %s\nUsage: %s [-n] [-p] [-c <iocharset>] [-h] <isofs_image_file> <mount_point> [<FUSE library options>]\n" |
| "Where options are:\n" |
| @@ -419,3 +442,13 @@ int main(int argc, char *argv[]) |
| |
| return fuse_main(nargc, nargv, &isofs_oper); |
| }; |
| +#endif |
| + |
| +#if defined(__native_client__) |
| +int nacl_fuseiso_lib_init(char *iso_path, char *mount_point, char *fs_name) { |
| + nacl_io_register_fs_type(fs_name, &isofs_oper); |
| + int iso_fd = open(iso_path, O_RDONLY); |
| + isofs_real_preinit(iso_path, iso_fd); |
| + return mount("", mount_point, fs_name, 0, NULL); |
| +}; |
| +#endif |
| \ No newline at end of file |
| diff --git a/src/isofs.c b/src/isofs.c |
| --- a/src/isofs.c |
| +++ b/src/isofs.c |
| @@ -20,6 +20,9 @@ |
| |
| // for struct tm->tm_gmtoff |
| #define _BSD_SOURCE |
| +#if defined(__native_client__) |
| +#define __TM_GMTOFF tm_gmtoff |
| +#endif |
| |
| #include <stdio.h> |
| #include <fcntl.h> |
| @@ -32,11 +35,19 @@ |
| #include <zlib.h> |
| #include <dirent.h> |
| #include <pthread.h> |
| + |
| +#if !defined(__native_client__) |
| #include <sys/statfs.h> |
| +#endif |
| + |
| #include <iconv.h> |
| |
| #include "isofs.h" |
| |
| +#if defined(__native_client__) && defined(_NEWLIB_VERSION) |
| +#include <bits/limits.h> |
| +#endif |
| + |
| static isofs_context context; |
| static GHashTable *lookup_table; |
| static GHashTable *negative_lookup_table; |
| @@ -46,7 +57,12 @@ static pthread_mutex_t fd_mutex = PTHREAD_MUTEX_INITIALIZER; |
| static int isofs_check_rr(struct iso_directory_record *root_record); |
| static int isofs_read_raw_block(int block, char *buf); |
| |
| +// leave the charset as NULL for now |
| +#if defined(__native_client__) |
| +static char* iocharset = NULL; |
| +#else |
| extern char* iocharset; |
| +#endif |
| |
| // locally implement g_strv_length, this is missing in glib2 for rhel3/rhel4 |
| // -- Chandan Dutta Chowdhury 2007-07-06 |
| @@ -1806,6 +1822,7 @@ int isofs_real_read(const char *path, char *out_buf, size_t size, off_t offset) |
| return total_size; |
| }; |
| |
| +#if !defined(__native_client__) |
| int isofs_real_statfs(struct statfs *stbuf) { |
| stbuf->f_type = ISOFS_SUPER_MAGIC; |
| stbuf->f_bsize = context.data_size; // or PAGE_CACHE_SIZE? |
| @@ -1817,3 +1834,4 @@ int isofs_real_statfs(struct statfs *stbuf) { |
| stbuf->f_namelen = NAME_MAX - 1; // ? not sure.. |
| return 0; |
| }; |
| +#endif |
| diff --git a/src/isofs.h b/src/isofs.h |
| --- a/src/isofs.h |
| +++ b/src/isofs.h |
| @@ -25,6 +25,18 @@ |
| #include <linux/iso_fs.h> |
| #include <linux/rock.h> |
| |
| +#if defined(__native_client__) |
| +#include <sys/types.h> |
| +#endif |
| + |
| +#if defined(__native_client__) && defined(_NEWLIB_VERSION) |
| +#include <sys/endian.h> |
| +#endif |
| + |
| +#if !defined(__native_client__) || !defined(_NEWLIB_VERSION) |
| +#include <byteswap.h> |
| +#endif |
| + |
| typedef int (*isofs_dir_fill_t) (void *buf, const char *name, |
| const struct stat *stat, off_t off); |
| |
| @@ -97,7 +109,9 @@ typedef struct _zf_file_header { |
| /* Number conversion inlines, named after the section in ISO 9660 |
| they correspond to. */ |
| |
| +#if !defined(__native_client__) || !defined(_NEWLIB_VERSION) |
| #include <byteswap.h> |
| +#endif |
| |
| static inline int isonum_711(unsigned char *p) |
| { |
| @@ -111,6 +125,8 @@ static inline unsigned int isonum_721(char *p) |
| { |
| #if defined(WORDS_BIGENDIAN) |
| return *(unsigned short *)p; |
| +#elif defined(__native_client__) |
| + return __byte_swap_16(*(unsigned short *)p); |
| #else |
| return bswap_16(*(unsigned short *)p); |
| #endif |
| @@ -159,6 +175,8 @@ int isofs_real_getattr(const char *path, struct stat *stbuf); |
| int isofs_real_readlink(const char *path, char *target, size_t size); |
| int isofs_real_open(const char *path); |
| int isofs_real_read(const char *path, char *out_buf, size_t size, off_t offset); |
| +#if !defined(__native_client__) |
| int isofs_real_statfs(struct statfs *stbuf); |
| +#endif |
| |
| #endif // _ISOFS_H |