diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2017-12-24 01:24:32 +0200 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2019-09-18 23:28:44 +0300 |
commit | b2cadc1419bdc63bbca714d0d2b90b43cfe5e3e7 (patch) | |
tree | 130e226740980f39bfaeb3cdbdb53f62d1d082e3 | |
parent | b9ad82ced79163d28571a0be65196c078bd67ae6 (diff) | |
download | android_external_ntfs-3g-b2cadc1419bdc63bbca714d0d2b90b43cfe5e3e7.tar.gz android_external_ntfs-3g-b2cadc1419bdc63bbca714d0d2b90b43cfe5e3e7.tar.bz2 android_external_ntfs-3g-b2cadc1419bdc63bbca714d0d2b90b43cfe5e3e7.zip |
ntfs-3g: Add support for android builds
Change-Id: Ic5fdd9337dee3857653409730da42e7c7a225eb5
-rw-r--r-- | Android.bp | 122 | ||||
-rw-r--r-- | config.h | 447 |
2 files changed, 569 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 00000000..c397c85a --- /dev/null +++ b/Android.bp @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2018 The LineageOS Project + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +cc_defaults { + name: "ntfs-3g_defaults", + + cflags: [ + "-Wno-error", + "-D_LARGEFILE_SOURCE", + "-D_FILE_OFFSET_BITS=64", + "-DHAVE_CONFIG_H", + ], +} + +cc_library_shared { + name: "libfuse-lite", + defaults: ["ntfs-3g_defaults"], + + srcs: ["libfuse-lite/*.c"], + export_include_dirs: ["include/fuse-lite"], +} + +cc_library_shared { + name: "libntfs-3g", + defaults: ["ntfs-3g_defaults"], + + srcs: [ + "libntfs-3g/acls.c", + "libntfs-3g/attrib.c", + "libntfs-3g/attrlist.c", + "libntfs-3g/bitmap.c", + "libntfs-3g/bootsect.c", + "libntfs-3g/cache.c", + "libntfs-3g/collate.c", + "libntfs-3g/compat.c", + "libntfs-3g/compress.c", + "libntfs-3g/debug.c", + "libntfs-3g/device.c", + "libntfs-3g/dir.c", + "libntfs-3g/ea.c", + "libntfs-3g/efs.c", + "libntfs-3g/index.c", + "libntfs-3g/inode.c", + "libntfs-3g/ioctl.c", + "libntfs-3g/lcnalloc.c", + "libntfs-3g/logfile.c", + "libntfs-3g/logging.c", + "libntfs-3g/mft.c", + "libntfs-3g/misc.c", + "libntfs-3g/mst.c", + "libntfs-3g/object_id.c", + "libntfs-3g/realpath.c", + "libntfs-3g/reparse.c", + "libntfs-3g/runlist.c", + "libntfs-3g/security.c", + "libntfs-3g/unistr.c", + "libntfs-3g/unix_io.c", + "libntfs-3g/volume.c", + "libntfs-3g/xattrs.c", + ], + export_include_dirs: ["include/ntfs-3g"], +} + +cc_binary { + name: "fsck.ntfs", + defaults: ["ntfs-3g_defaults"], + + srcs: [ + "ntfsprogs/ntfsfix.c", + "ntfsprogs/utils.c", + ], + shared_libs: [ + "libfuse-lite", + "libntfs-3g", + ], +} + +cc_binary { + name: "mkfs.ntfs", + defaults: ["ntfs-3g_defaults"], + + srcs: [ + "ntfsprogs/attrdef.c", + "ntfsprogs/boot.c", + "ntfsprogs/mkntfs.c", + "ntfsprogs/sd.c", + "ntfsprogs/utils.c", + ], + shared_libs: [ + "libfuse-lite", + "libntfs-3g", + ], +} + +cc_binary { + name: "mount.ntfs", + defaults: ["ntfs-3g_defaults"], + + srcs: [ + "src/ntfs-3g.c", + "src/ntfs-3g_common.c", + ], + shared_libs: [ + "libfuse-lite", + "libntfs-3g", + ], +} diff --git a/config.h b/config.h new file mode 100644 index 00000000..33560e9a --- /dev/null +++ b/config.h @@ -0,0 +1,447 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to 1 for disabling reparse plugins */ +/* #undef DISABLE_PLUGINS */ + +/* Define this to 1 if you want to enable support of encrypted files in + libntfs and utilities. */ +/* #undef ENABLE_CRYPTO */ + +/* Define to 1 if debug should be enabled */ +/* #undef ENABLE_DEBUG */ + +/* Define this to 1 if you want to enable use of Windows compliant disk + geometry. */ +/* #undef ENABLE_HD */ + +/* Define to 1 if the nfconv patch should be enabled */ +/* #undef ENABLE_NFCONV */ + +/* Define this to 1 if you want to enable generation of DCE compliant UUIDs. + */ +/* #undef ENABLE_UUID */ + +/* Define to 1 if using internal fuse */ +#define FUSE_INTERNAL 1 + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Define to 1 if you have the `basename' function. */ +#define HAVE_BASENAME 1 + +/* Define to 1 if you have the <byteswap.h> header file. */ +#define HAVE_BYTESWAP_H 1 + +/* Define to 1 if you have the `clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the <ctype.h> header file. */ +#define HAVE_CTYPE_H 1 + +/* Define to 1 if you have the `daemon' function. */ +#define HAVE_DAEMON 1 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the `dup2' function. */ +#define HAVE_DUP2 1 + +/* Define to 1 if you have the <endian.h> header file. */ +#define HAVE_ENDIAN_H 1 + +/* Define to 1 if you have the <errno.h> header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fdatasync' function. */ +#define HAVE_FDATASYNC 1 + +/* Define to 1 if you have the <features.h> header file. */ +#define HAVE_FEATURES_H 1 + +/* Define to 1 if you have the `ffs' function. */ +#define HAVE_FFS 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `getmntent' function. */ +#define HAVE_GETMNTENT 1 + +/* Define to 1 if you have the <getopt.h> header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `hasmntopt' function. */ +#define HAVE_HASMNTOPT 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `c' library (-lc). */ +#define HAVE_LIBC 1 + +/* Define to 1 if you have the <libgen.h> header file. */ +#define HAVE_LIBGEN_H 1 + +/* Define to 1 if you have the <libintl.h> header file. */ +/* #undef HAVE_LIBINTL_H */ + +/* Define to 1 if you have the <limits.h> header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the <linux/fd.h> header file. */ +#define HAVE_LINUX_FD_H 1 + +/* Define to 1 if you have the <linux/fs.h> header file. */ +#define HAVE_LINUX_FS_H 1 + +/* Define to 1 if you have the <linux/hdreg.h> header file. */ +#define HAVE_LINUX_HDREG_H 1 + +/* Define to 1 if you have the <linux/major.h> header file. */ +#define HAVE_LINUX_MAJOR_H 1 + +/* Define to 1 if you have the <locale.h> header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the <machine/endian.h> header file. */ +/* #undef HAVE_MACHINE_ENDIAN_H */ + +/* Define to 1 if you have the <malloc.h> header file. */ +#define HAVE_MALLOC_H 1 + +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ +#define HAVE_MBRTOWC 1 + +/* Define to 1 if you have the `mbsinit' function. */ +#define HAVE_MBSINIT 1 + +/* Define to 1 if you have the `memcpy' function. */ +#define HAVE_MEMCPY 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* Define to 1 if you have the <mntent.h> header file. */ +#define HAVE_MNTENT_H 1 + +/* Define to 1 if you have the <pwd.h> header file. */ +#define HAVE_PWD_H 1 + +/* Define to 1 if you have the `random' function. */ +#define HAVE_RANDOM 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the `regcomp' function. */ +#define HAVE_REGCOMP 1 + +/* Define to 1 if you have the <regex.h> header file. */ +#define HAVE_REGEX_H 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `setxattr' function. */ +#define HAVE_SETXATTR 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if `stat' has the bug that it succeeds when given the + zero-length file name argument. */ +/* #undef HAVE_STAT_EMPTY_STRING_BUG */ + +/* Define to 1 if you have the <stdarg.h> header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if stdbool.h conforms to C99. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the <stddef.h> header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdio.h> header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the `strsep' function. */ +#define HAVE_STRSEP 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if `st_atim' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_ATIM 1 + +/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 + +/* Define to 1 if `st_atimespec' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC */ + +/* Define to 1 if `st_blocks' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 + +/* Define to 1 if `st_rdev' is a member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_RDEV 1 + +/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use + `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */ +#define HAVE_ST_BLOCKS 1 + +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the <syslog.h> header file. */ +#define HAVE_SYSLOG_H 1 + +/* Define to 1 if you have the <sys/byteorder.h> header file. */ +/* #undef HAVE_SYS_BYTEORDER_H */ + +/* Define to 1 if you have the <sys/disk.h> header file. */ +/* #undef HAVE_SYS_DISK_H */ + +/* Define to 1 if you have the <sys/endian.h> header file. */ +#define HAVE_SYS_ENDIAN_H 1 + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the <sys/mount.h> header file. */ +#define HAVE_SYS_MOUNT_H 1 + +/* Define to 1 if you have the <sys/param.h> header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the <sys/statvfs.h> header file. */ +#define HAVE_SYS_STATVFS_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <sys/vfs.h> header file. */ +#define HAVE_SYS_VFS_H 1 + +/* Define to 1 if you have the <time.h> header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `utime' function. */ +#define HAVE_UTIME 1 + +/* Define to 1 if you have the `utimensat' function. */ +#define HAVE_UTIMENSAT 1 + +/* Define to 1 if you have the <utime.h> header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */ +#define HAVE_UTIME_NULL 1 + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if you have the <wchar.h> header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if you have the <windows.h> header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if the system has the type `_Bool'. */ +#define HAVE__BOOL 1 + +/* Don't update /etc/mtab */ +#define IGNORE_MTAB 1 + +/* Define to 1 if `lstat' dereferences a symlink specified with a trailing + slash. */ +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>. + */ +/* #undef MAJOR_IN_MKDEV */ + +/* Define to 1 if `major', `minor', and `makedev' are declared in + <sysmacros.h>. */ +#define MAJOR_IN_SYSMACROS 1 + +/* Don't use default IO ops */ +/* #undef NO_NTFS_DEVICE_DEFAULT_IO_OPS */ + +/* Name of package */ +#define PACKAGE "ntfs-3g" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "ntfs-3g-devel@lists.sf.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "ntfs-3g" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "ntfs-3g 2017.3.23" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "ntfs-3g" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2017.3.23" + +/* POSIX ACL support */ +/* #undef POSIXACLS */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2017.3.23" + +/* Define to 1 if this is a Windows OS */ +/* #undef WINDOWS */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if your processor stores words with the least significant byte + first (like Intel and VAX, unlike Motorola and SPARC). */ +#define WORDS_LITTLEENDIAN 1 + +/* system extended attributes mappings */ +/* #undef XATTR_MAPPINGS */ + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#define _FILE_OFFSET_BITS 64 + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Required define if using POSIX threads */ +#define _REENTRANT 1 + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `long int' if <sys/types.h> does not define. */ +/* #undef off_t */ + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* #undef size_t */ |