Skip to content

Instantly share code, notes, and snippets.

@petrosagg
Created June 29, 2017 02:54
Show Gist options
  • Save petrosagg/14739c716907ec4a6cdc547af597591c to your computer and use it in GitHub Desktop.
Save petrosagg/14739c716907ec4a6cdc547af597591c to your computer and use it in GitHub Desktop.
libext2fs emscripten
  1. Copy config.h to node-ext2fs/config/emscripten/config.h
  2. Copy Makefile to node-ext2fs/deps/e2fsprogs/lib/ext2fs/Makefile
  3. Go to node-ext2fs/deps/e2fsprogs/lib/ext2fs and run emmake make
/* lib/config.h. Generated from config.h.in by configure. */
/* lib/config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define to 1 if debugging the blkid library */
/* #undef CONFIG_BLKID_DEBUG */
/* Define to 1 to compile findfs */
#define CONFIG_BUILD_FINDFS 1
/* Define to 1 if debugging ext3/4 journal code */
/* #undef CONFIG_JBD_DEBUG */
/* Define to 1 to enable mmp support */
#define CONFIG_MMP 1
/* Define to 1 to enable tdb support */
#define CONFIG_TDB 1
/* Define to 1 if the testio I/O manager should be enabled */
#define CONFIG_TESTIO_DEBUG 1
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
/* #undef CRAY_STACKSEG_END */
/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */
/* Define to 1 to disable use of backtrace */
/* #undef DISABLE_BACKTRACE */
/* Define to 1 to enable bitmap stats. */
#define ENABLE_BMAP_STATS 1
/* Define to 1 to enable bitmap stats. */
/* #undef ENABLE_BMAP_STATS_OPS */
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#define ENABLE_NLS 1
/* Define to 1 if you have the `add_key' function. */
/* #undef HAVE_ADD_KEY */
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#define HAVE_ALLOCA_H 1
/* Define to 1 if you have the `argz_count' function. */
/* #undef HAVE_ARGZ_COUNT */
/* Define to 1 if you have the <argz.h> header file. */
/* #undef HAVE_ARGZ_H */
/* Define to 1 if you have the `argz_next' function. */
/* #undef HAVE_ARGZ_NEXT */
/* Define to 1 if you have the `argz_stringify' function. */
/* #undef HAVE_ARGZ_STRINGIFY */
/* Define to 1 if you have the `asprintf' function. */
#define HAVE_ASPRINTF 1
/* Define to 1 if you have the <attr/xattr.h> header file. */
/* #undef HAVE_ATTR_XATTR_H */
/* Define to 1 if you have the `backtrace' function. */
/* #undef HAVE_BACKTRACE */
/* Define to 1 if you have the `blkid_probe_enable_partitions' function. */
/* #undef HAVE_BLKID_PROBE_ENABLE_PARTITIONS */
/* Define to 1 if you have the `blkid_probe_get_topology' function. */
/* #undef HAVE_BLKID_PROBE_GET_TOPOLOGY */
/* Define to 1 if the compiler understands __builtin_expect. */
#define HAVE_BUILTIN_EXPECT 1
/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
/* #undef HAVE_CFLOCALECOPYCURRENT */
/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
/* Define to 1 if you have the `chflags' function. */
/* #undef HAVE_CHFLAGS */
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
/* #undef HAVE_DCGETTEXT */
/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
don't. */
#define HAVE_DECL_FEOF_UNLOCKED 1
/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
you don't. */
#define HAVE_DECL_FGETS_UNLOCKED 1
/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
don't. */
#define HAVE_DECL_GETC_UNLOCKED 1
/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
don't. */
#define HAVE_DECL__SNPRINTF 0
/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
don't. */
#define HAVE_DECL__SNWPRINTF 0
/* Define to 1 if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define to 1 if you have the `dlopen' function. */
/* #undef HAVE_DLOPEN */
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */
/* Define to 1 if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
/* Define to 1 if you have the <execinfo.h> header file. */
/* #undef HAVE_EXECINFO_H */
/* Define to 1 if Ext2 ioctls present */
#define HAVE_EXT2_IOCTLS 1
/* Define to 1 if you have the `fadvise64' function. */
/* #undef HAVE_FADVISE64 */
/* Define to 1 if you have the `fallocate' function. */
/* #undef HAVE_FALLOCATE */
/* Define to 1 if you have the `fallocate64' function. */
/* #undef HAVE_FALLOCATE64 */
/* Define to 1 if you have the `fchown' function. */
#define HAVE_FCHOWN 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 `fstat64' function. */
#define HAVE_FSTAT64 1
/* Define to 1 if you have the `ftruncate64' function. */
#define HAVE_FTRUNCATE64 1
/* Define to 1 if you have the <fuse.h> header file. */
/* #undef HAVE_FUSE_H */
/* Define to 1 if you have the `futimes' function. */
/* #undef HAVE_FUTIMES */
/* Define to 1 if you have the `fwprintf' function. */
#define HAVE_FWPRINTF 1
/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1
/* Define to 1 if you have the `getdtablesize' function. */
/* #undef HAVE_GETDTABLESIZE */
/* Define to 1 if you have the `getegid' function. */
#define HAVE_GETEGID 1
/* Define to 1 if you have the `geteuid' function. */
#define HAVE_GETEUID 1
/* Define to 1 if you have the `getgid' function. */
#define HAVE_GETGID 1
/* Define to 1 if you have the `getmntinfo' function. */
/* #undef HAVE_GETMNTINFO */
/* Define to 1 if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getpwuid_r' function. */
/* #undef HAVE_GETPWUID_R */
/* Define to 1 if you have the `getrlimit' function. */
#define HAVE_GETRLIMIT 1
/* Define to 1 if you have the `getrusage' function. */
#define HAVE_GETRUSAGE 1
/* Define if the GNU gettext() function is already present or preinstalled. */
/* #undef HAVE_GETTEXT */
/* Define to 1 if you have the `getuid' function. */
#define HAVE_GETUID 1
/* Define if you have the iconv() function and it works. */
#define HAVE_ICONV 1
/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
#define HAVE_INTMAX_T 1
/* Define to 1 if the system has the type `intptr_t'. */
#define HAVE_INTPTR_T 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
declares uintmax_t. */
#define HAVE_INTTYPES_H_WITH_UINTMAX 1
/* Define to 1 if you have the `jrand48' function. */
#define HAVE_JRAND48 1
/* Define to 1 if you have the `keyctl' function. */
/* #undef HAVE_KEYCTL */
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#define HAVE_LANGINFO_CODESET 1
/* Define if your <locale.h> file defines LC_MESSAGES. */
#define HAVE_LC_MESSAGES 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <linux/falloc.h> header file. */
/* #undef HAVE_LINUX_FALLOC_H */
/* Define to 1 if you have the <linux/fd.h> header file. */
/* #undef HAVE_LINUX_FD_H */
/* Define to 1 if you have the <linux/loop.h> header file. */
/* #undef HAVE_LINUX_LOOP_H */
/* Define to 1 if you have the <linux/major.h> header file. */
/* #undef HAVE_LINUX_MAJOR_H */
/* Define to 1 if you have the `llistxattr' function. */
/* #undef HAVE_LLISTXATTR */
/* Define to 1 if you have the `llseek' function. */
/* #undef HAVE_LLSEEK */
/* Define to 1 if llseek declared in unistd.h */
/* #undef HAVE_LLSEEK_PROTOTYPE */
/* Define to 1 if the system has the type 'long long int'. */
#define HAVE_LONG_LONG_INT 1
/* Define to 1 if you have the `lseek64' function. */
#define HAVE_LSEEK64 1
/* Define to 1 if lseek64 declared in unistd.h */
#define HAVE_LSEEK64_PROTOTYPE 1
/* Define to 1 if you have the <magic.h> header file. */
/* #undef HAVE_MAGIC_H */
/* Define to 1 if you have the `mallinfo' function. */
#define HAVE_MALLINFO 1
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the `mbrtowc' function. */
#define HAVE_MBRTOWC 1
/* Define to 1 if you have the `mbstowcs' function. */
#define HAVE_MBSTOWCS 1
/* Define to 1 if you have the `memalign' function. */
#define HAVE_MEMALIGN 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mempcpy' function. */
#define HAVE_MEMPCPY 1
/* Define to 1 if you have the `mmap' function. */
#define HAVE_MMAP 1
/* Define to 1 if you have the <mntent.h> header file. */
#define HAVE_MNTENT_H 1
/* Define to 1 if you have the `msync' function. */
#define HAVE_MSYNC 1
/* Define to 1 if you have the `munmap' function. */
#define HAVE_MUNMAP 1
/* Define to 1 if you have the `nanosleep' function. */
#define HAVE_NANOSLEEP 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <net/if_dl.h> header file. */
/* #undef HAVE_NET_IF_DL_H */
/* Define to 1 if you have the <net/if.h> header file. */
#define HAVE_NET_IF_H 1
/* Define to 1 if you have the `newlocale' function. */
#define HAVE_NEWLOCALE 1
/* Define to 1 if you have the `open64' function. */
#define HAVE_OPEN64 1
/* Define to 1 if optreset for getopt is present */
/* #undef HAVE_OPTRESET */
/* Define to 1 if you have the `pathconf' function. */
#define HAVE_PATHCONF 1
/* Define to 1 if you have the <paths.h> header file. */
#define HAVE_PATHS_H 1
/* Define to 1 if you have the `posix_fadvise' function. */
#define HAVE_POSIX_FADVISE 1
/* Define to 1 if you have the `posix_fadvise64' function. */
#define HAVE_POSIX_FADVISE64 1
/* Define to 1 if you have the `posix_memalign' function. */
#define HAVE_POSIX_MEMALIGN 1
/* Define if your printf() function supports format strings with positions. */
#define HAVE_POSIX_PRINTF 1
/* Define to 1 if you have the `prctl' function. */
/* #undef HAVE_PRCTL */
/* Define to 1 if you have the `pread' function. */
#define HAVE_PREAD 1
/* Define to 1 if you have the `pread64' function. */
#define HAVE_PREAD64 1
/* Define to 1 if you have the <pthread.h> header file. */
#define HAVE_PTHREAD_H 1
/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
#define HAVE_PTHREAD_MUTEX_RECURSIVE 1
/* Define if the POSIX multithreading library has read/write locks. */
#define HAVE_PTHREAD_RWLOCK 1
/* Define to 1 if you have the `putenv' function. */
#define HAVE_PUTENV 1
/* Define to 1 if you have the `pwrite' function. */
#define HAVE_PWRITE 1
/* Define to 1 if you have the `pwrite64' function. */
#define HAVE_PWRITE64 1
/* Define to 1 if dirent has d_reclen */
#define HAVE_RECLEN_DIRENT 1
/* Define to 1 if if struct sockaddr contains sa_len */
/* #undef HAVE_SA_LEN */
/* Define to 1 if you have the `secure_getenv' function. */
/* #undef HAVE_SECURE_GETENV */
/* Define to 1 if you have the <semaphore.h> header file. */
#define HAVE_SEMAPHORE_H 1
/* Define to 1 if sem_init() exists */
/* #undef HAVE_SEM_INIT */
/* Define to 1 if you have the `setenv' function. */
#define HAVE_SETENV 1
/* Define to 1 if you have the <setjmp.h> header file. */
#define HAVE_SETJMP_H 1
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the `setmntent' function. */
#define HAVE_SETMNTENT 1
/* Define to 1 if you have the `setresgid' function. */
#define HAVE_SETRESGID 1
/* Define to 1 if you have the `setresuid' function. */
#define HAVE_SETRESUID 1
/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
/* Define to 1 if you have the `srandom' function. */
#define HAVE_SRANDOM 1
/* Define to 1 if struct stat has st_flags */
/* #undef HAVE_STAT_FLAGS */
/* Define to 1 if you have the <stdarg.h> header file. */
#define HAVE_STDARG_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 if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
uintmax_t. */
#define HAVE_STDINT_H_WITH_UINTMAX 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `stpcpy' function. */
#define HAVE_STPCPY 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 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 `strptime' function. */
#define HAVE_STRPTIME 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if you have the `strtoull' function. */
#define HAVE_STRTOULL 1
/* Define to 1 if `st_atim' is a member of `struct stat'. */
#define HAVE_STRUCT_STAT_ST_ATIM 1
/* Define to 1 if you have the `symlink' function. */
#define HAVE_SYMLINK 1
/* Define to 1 if you have the `sync_file_range' function. */
/* #undef HAVE_SYNC_FILE_RANGE */
/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1
/* Define to 1 if you have the <sys/acl.h> header file. */
/* #undef HAVE_SYS_ACL_H */
/* Define to 1 if you have the <sys/disklabel.h> header file. */
/* #undef HAVE_SYS_DISKLABEL_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/file.h> header file. */
#define HAVE_SYS_FILE_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/key.h> header file. */
/* #undef HAVE_SYS_KEY_H */
/* Define to 1 if you have the <sys/mkdev.h> header file. */
/* #undef HAVE_SYS_MKDEV_H */
/* Define to 1 if you have the <sys/mman.h> header file. */
#define HAVE_SYS_MMAN_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/prctl.h> header file. */
#define HAVE_SYS_PRCTL_H 1
/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/sockio.h> header file. */
/* #undef HAVE_SYS_SOCKIO_H */
/* 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/syscall.h> header file. */
#define HAVE_SYS_SYSCALL_H 1
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#define HAVE_SYS_SYSCTL_H 1
/* Define to 1 if you have the <sys/sysmacros.h> header file. */
#define HAVE_SYS_SYSMACROS_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_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/un.h> header file. */
#define HAVE_SYS_UN_H 1
/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define to 1 if you have the <termio.h> header file. */
/* #undef HAVE_TERMIO_H */
/* Define to 1 if you have the `tsearch' function. */
/* #undef HAVE_TSEARCH */
/* Define to 1 if ssize_t declared */
#define HAVE_TYPE_SSIZE_T 1
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
#define HAVE_UINTMAX_T 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if the system has the type 'unsigned long long int'. */
#define HAVE_UNSIGNED_LONG_LONG_INT 1
/* Define to 1 if you have the `uselocale' function. */
#define HAVE_USELOCALE 1
/* Define to 1 if you have the `usleep' function. */
#define HAVE_USLEEP 1
/* Define to 1 if you have the `utime' function. */
/* #undef HAVE_UTIME */
/* Define to 1 if you have the `utimes' function. */
/* #undef HAVE_UTIMES */
/* Define to 1 if you have the <utime.h> header file. */
#define HAVE_UTIME_H 1
/* Define to 1 if you have the `valloc' function. */
#define HAVE_VALLOC 1
/* Define to 1 or 0, depending whether the compiler supports simple visibility
declarations. */
#define HAVE_VISIBILITY 1
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define if you have the 'wchar_t' type. */
#define HAVE_WCHAR_T 1
/* Define to 1 if you have the `wcrtomb' function. */
#define HAVE_WCRTOMB 1
/* Define to 1 if you have the `wcslen' function. */
#define HAVE_WCSLEN 1
/* Define to 1 if you have the `wcsnlen' function. */
#define HAVE_WCSNLEN 1
/* Define if you have the 'wint_t' type. */
#define HAVE_WINT_T 1
/* Define to 1 if O_NOATIME works. */
#define HAVE_WORKING_O_NOATIME 0
/* Define to 1 if O_NOFOLLOW works. */
#define HAVE_WORKING_O_NOFOLLOW 0
/* Define to 1 if you have the `__fsetlocking' function. */
#define HAVE___FSETLOCKING 1
/* Define to 1 if you have the `__secure_getenv' function. */
/* #undef HAVE___SECURE_GETENV */
/* Define as const if the declaration of iconv() needs const. */
#define ICONV_CONST
/* Define if integer division by zero raises signal SIGFPE. */
#define INTDIV0_RAISES_SIGFPE 0
/* package name for gettext */
#define PACKAGE "e2fsprogs"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
/* #undef PRI_MACROS_BROKEN */
/* Define if the pthread_in_use() detection is hard. */
/* #undef PTHREAD_IN_USE_DETECTION_HARD */
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
/* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 4
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
/* The size of `time_t', as computed by sizeof. */
#define SIZEOF_TIME_T 8
/* Define as the maximum value of type 'size_t', if the system doesn't define
it. */
#ifndef SIZE_MAX
/* # undef SIZE_MAX */
#endif
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* If the compiler supports a TLS storage class define it to that here */
#define TLS __thread
/* Define if the POSIX multithreading library can be used. */
#define USE_POSIX_THREADS 1
/* Define if references to the POSIX multithreading library should be made
weak. */
/* #undef USE_POSIX_THREADS_WEAK */
/* Define if the GNU Pth multithreading library can be used. */
/* #undef USE_PTH_THREADS */
/* Define if references to the GNU Pth multithreading library should be made
weak. */
/* #undef USE_PTH_THREADS_WEAK */
/* Define if the old Solaris multithreading library can be used. */
/* #undef USE_SOLARIS_THREADS */
/* Define if references to the old Solaris multithreading library should be
made weak. */
/* #undef USE_SOLARIS_THREADS_WEAK */
/* 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
/* Define to 1 to build uuidd */
#define USE_UUIDD 1
/* Define if the native Windows multithreading API can be used. */
/* #undef USE_WINDOWS_THREADS */
/* version for gettext */
#define VERSION "0.14.1"
/* 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 Apple Darwin libintl workaround is needed */
/* #undef _INTL_REDIRECT_MACROS */
/* 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 */
/* Please see the Gnulib manual for how to use these macros.
Suppress extern inline with HP-UX cc, as it appears to be broken; see
<http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
Suppress extern inline with Sun C in standards-conformance mode, as it
mishandles inline functions that call each other. E.g., for 'inline void f
(void) { } inline void g (void) { f (); }', c99 incorrectly complains
'reference to static identifier "f" in extern inline function'.
This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
Suppress the use of extern inline on Apple's platforms, as Libc at least
through Libc-825.26 (2013-04-09) is incompatible with it; see, e.g.,
<http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
Perhaps Apple will fix this some day. */
#if ((__GNUC__ \
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
: (199901L <= __STDC_VERSION__ \
&& !defined __HP_cc \
&& !(defined __SUNPRO_C && __STDC__))) \
&& !defined __APPLE__)
# define _GL_INLINE inline
# define _GL_EXTERN_INLINE extern inline
#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
&& !defined __APPLE__)
# if __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
# else
# define _GL_INLINE extern inline
# endif
# define _GL_EXTERN_INLINE extern
#else
# define _GL_INLINE static _GL_UNUSED
# define _GL_EXTERN_INLINE static _GL_UNUSED
#endif
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
# define _GL_INLINE_HEADER_CONST_PRAGMA
# else
# define _GL_INLINE_HEADER_CONST_PRAGMA \
_Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
# endif
/* Suppress GCC's bogus "no previous prototype for 'FOO'"
and "no previous declaration for 'FOO'" diagnostics,
when FOO is an inline function in the header; see
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. */
# define _GL_INLINE_HEADER_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
_Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
_GL_INLINE_HEADER_CONST_PRAGMA
# define _GL_INLINE_HEADER_END \
_Pragma ("GCC diagnostic pop")
#else
# define _GL_INLINE_HEADER_BEGIN
# define _GL_INLINE_HEADER_END
#endif
/* 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 as the type of the result of subtracting two pointers, if the system
doesn't define it. */
/* #undef ptrdiff_t */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to unsigned long or unsigned long long if <stdint.h> and
<inttypes.h> don't define. */
/* #undef uintmax_t */
#include <dirpaths.h>
#define __libc_lock_t gl_lock_t
#define __libc_lock_define gl_lock_define
#define __libc_lock_define_initialized gl_lock_define_initialized
#define __libc_lock_init gl_lock_init
#define __libc_lock_lock gl_lock_lock
#define __libc_lock_unlock gl_lock_unlock
#define __libc_lock_recursive_t gl_recursive_lock_t
#define __libc_lock_define_recursive gl_recursive_lock_define
#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized
#define __libc_lock_init_recursive gl_recursive_lock_init
#define __libc_lock_lock_recursive gl_recursive_lock_lock
#define __libc_lock_unlock_recursive gl_recursive_lock_unlock
#define glthread_in_use libintl_thread_in_use
#define glthread_lock_init_func libintl_lock_init_func
#define glthread_lock_lock_func libintl_lock_lock_func
#define glthread_lock_unlock_func libintl_lock_unlock_func
#define glthread_lock_destroy_func libintl_lock_destroy_func
#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded
#define glthread_rwlock_init_func libintl_rwlock_init_func
#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded
#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func
#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded
#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func
#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded
#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func
#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded
#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func
#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded
#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func
#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded
#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func
#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded
#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func
#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded
#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func
#define glthread_once_func libintl_once_func
#define glthread_once_singlethreaded libintl_once_singlethreaded
#define glthread_once_multithreaded libintl_once_multithreaded
V =
ifeq ($(strip $(V)),)
E = @echo
Q = @
else
E = @echo
Q =
endif
srcdir=../..
top_srcdir=../../../..
AR ?= ar
CC ?= gcc
CFLAGS = -DHAVE_CONFIG_H \
-I$(srcdir)/lib \
-I$(top_srcdir)/config/common \
-I$(top_srcdir)/config/emscripten
OBJS= alloc.o \
alloc_sb.o \
alloc_stats.o \
alloc_tables.o \
atexit.o \
badblocks.o \
bb_inode.o \
bitmaps.o \
bitops.o \
blkmap64_ba.o \
blkmap64_rb.o \
blknum.o \
block.o \
bmap.o \
check_desc.o \
closefs.o \
crc16.o \
crc32c.o \
csum.o \
dblist.o \
dblist_dir.o \
dir_iterate.o \
dirblock.o \
dirhash.o \
expanddir.o \
ext_attr.o \
extent.o \
fallocate.o \
fileio.o \
finddev.o \
flushb.o \
freefs.o \
gen_bitmap.o \
gen_bitmap64.o \
get_num_dirs.o \
get_pathname.o \
getsectsize.o \
getsize.o \
i_block.o \
icount.o \
ind_block.o \
initialize.o \
inline.o \
inline_data.o \
inode.o \
io_manager.o \
ismounted.o \
link.o \
llseek.o \
lookup.o \
mkdir.o \
mkjournal.o \
mmp.o \
namei.o \
native.o \
newdir.o \
openfs.o \
progress.o \
punch.o \
rbtree.o \
read_bb.o \
read_bb_file.o \
res_gdt.o \
rw_bitmaps.o \
sha512.o \
swapfs.o \
symlink.o \
unlink.o \
valid_blk.o \
version.o
all: libext2fs.js
libext2fs.js: libext2fs.a
$(E) " JSGEN $<"
$(Q) $(CC) $(CFLAGS) -s EXPORTED_FUNCTIONS="['_ext2fs_block_alloc_stats']" $< -o $@
libext2fs.a: $(OBJS)
$(E) " GEN_LIB $@"
$(Q) $(AR) rc $@ $(OBJS)
%.o: %.c
$(E) " CC $<"
$(Q) $(CC) $(CFLAGS) -c $< -o $@
@zvin
Copy link

zvin commented Jun 29, 2017

We need adding the following to the OBJS list in the Makefile so com_err is defined:

	../et/error_message.o \
	../et/et_name.o \
	../et/init_et.o \
	../et/com_err.o \
	../et/com_right.o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment