diff options
author | Theodore Ts'o <tytso@mit.edu> | 2003-04-13 00:44:19 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2003-04-13 00:44:19 -0400 |
commit | fff45483ede7fe38a31b3364a9c07e2418776dee (patch) | |
tree | 4208ea0e5998cb0988b4543fe30ef00b091ddcf6 /configure.in | |
parent | 61de7f84fbdfac5460b7037feb9633d4ab7ef513 (diff) | |
download | e2fsprogs-fff45483ede7fe38a31b3364a9c07e2418776dee.tar.gz |
Add portability enhancements for Cygwin32 environment.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 368fc4c5..01e82900 100644 --- a/configure.in +++ b/configure.in @@ -531,8 +531,31 @@ if test $cross_compiling = no; then else AC_CHECK_PROGS(BUILD_CC, gcc cc) fi -AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/ioctl.h sys/mkdev.h sys/mount.h sys/sockio.h sys/sysmacros.h sys/time.h sys/stat.h sys/types.h net/if.h netinet/in.h) +AC_CHECK_HEADERS(stdlib.h unistd.h stdarg.h errno.h malloc.h mntent.h paths.h dirent.h getopt.h setjmp.h signal.h termios.h linux/fd.h linux/major.h sys/disklabel.h sys/ioctl.h sys/mkdev.h sys/mount.h sys/sockio.h sys/socket.h sys/sysmacros.h sys/time.h sys/stat.h sys/types.h sys/wait.h sys/resource.h net/if.h netinet/in.h) AC_FUNC_VPRINTF +dnl Check to see if dirent has member d_reclen. On cygwin those d_reclen +dnl is not decleared. +AC_MSG_CHECKING(whether d_reclen declared in dirent) +AC_CACHE_VAL(e2fsprogs_cv_have_d_reclen_dirent, + AC_TRY_COMPILE( +[#include <dirent.h>], [struct dirent de; de.d_reclen = 0; ], + [e2fsprogs_cv_have_d_reclen_dirent=yes], + [e2fsprogs_cv_have_d_reclen_dirent=no])) +AC_MSG_RESULT($e2fsprogs_cv_have_d_reclen_dirent) +if test "$e2fsprogs_cv_have_d_reclen_dirent" = yes; then + AC_DEFINE(HAVE_RECLEN_DIRENT) +fi +dnl Check to see if ssize_t was decleared +AC_MSG_CHECKING(whether ssize_t declared) +AC_CACHE_VAL(e2fsprogs_cv_have_ssize_t, + AC_TRY_COMPILE( +[#include <sys/types.h>], [ssize_t a = 0; ], + [e2fsprogs_cv_have_ssize_t=yes], + [e2fsprogs_cv_have_ssize_t=no])) +AC_MSG_RESULT($e2fsprogs_cv_have_ssize_t) +if test "$e2fsprogs_cv_have_ssize_t" = yes; then + AC_DEFINE(HAVE_TYPE_SSIZE_T) +fi dnl dnl Check to see if llseek() is declared in unistd.h. On some libc's dnl it is, and on others it isn't..... Thank you glibc developers.... @@ -654,15 +677,24 @@ linux*) ;; esac dnl -dnl Uncomment only if Linux +dnl OS-specific uncomment control dnl LINUX_CMT="#" +CYGWIN_CMT="#" +UNIX_CMT= case "$host_os" in linux*) LINUX_CMT= ;; +cygwin) + CYGWIN_CMT= + UNIX_CMT="#" + AC_DEFINE(CYGWIN) + ;; esac AC_SUBST(LINUX_CMT) +AC_SUBST(CYGWIN_CMT) +AC_SUBST(UNIX_CMT) dnl dnl Linux and Hurd places root files in the / by default dnl |