From e1cb536778a88699ab396a1faaa1125351f28fb4 Mon Sep 17 00:00:00 2001 From: sof Date: Mon, 7 Jan 2002 20:24:23 +0000 Subject: [PATCH] [project @ 2002-01-07 20:24:22 by sof] added feature tests for a bunch of C types we need to know the Haskell equiv. of --- acconfig.h | 36 ++++++++++++++++++++++++++++++++++++ aclocal.m4 | 44 ++++++++++++++++++++++++++++++++++++++------ configure.in | 13 +++++++++++++ 3 files changed, 87 insertions(+), 6 deletions(-) diff --git a/acconfig.h b/acconfig.h index a60b1ed..386cb1d 100644 --- a/acconfig.h +++ b/acconfig.h @@ -399,18 +399,27 @@ /* Define if you have the WinExec function. */ #undef HAVE_WINEXEC +/* Define to Haskell type for cc_t */ +#undef HTYPE_CC_T + /* Define to Haskell type for char */ #undef HTYPE_CHAR /* Define to Haskell type for clock_t */ #undef HTYPE_CLOCK_T +/* Define to Haskell type for dev_t */ +#undef HTYPE_DEV_T + /* Define to Haskell type for signed double */ #undef HTYPE_DOUBLE /* Define to Haskell type for float */ #undef HTYPE_FLOAT +/* Define to Haskell type for gid_t */ +#undef HTYPE_GID_T + /* Define to Haskell type for GLbitfield */ #undef HTYPE_GLBITFIELD @@ -456,12 +465,27 @@ /* Define to Haskell type for int */ #undef HTYPE_INT +/* Define to Haskell type for ino_t */ +#undef HTYPE_INO_T + /* Define to Haskell type for long */ #undef HTYPE_LONG /* Define to Haskell type for long long */ #undef HTYPE_LONG_LONG +/* Define to Haskell type for mode_t */ +#undef HTYPE_MODE_T + +/* Define to Haskell type for nlink_t */ +#undef HTYPE_NLINK_T + +/* Define to Haskell type for off_t */ +#undef HTYPE_OFF_T + +/* Define to Haskell type for pid_t */ +#undef HTYPE_PID_T + /* Define to Haskell type for ptrdiff_t */ #undef HTYPE_PTRDIFF_T @@ -477,9 +501,21 @@ /* Define to Haskell type for size_t */ #undef HTYPE_SIZE_T +/* Define to Haskell type for speed_t */ +#undef HTYPE_SPEED_T + +/* Define to Haskell type for ssize_t */ +#undef HTYPE_SSIZE_T + /* Define to Haskell type for time_t */ #undef HTYPE_TIME_T +/* Define to Haskell type for tcflag_t */ +#undef HTYPE_TCFLAG_T + +/* Define to Haskell type for uid_t */ +#undef HTYPE_UID_T + /* Define to Haskell type for unsigned char */ #undef HTYPE_UNSIGNED_CHAR diff --git a/aclocal.m4 b/aclocal.m4 index b38227f..d468f77 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.90 2001/12/13 09:23:23 sof Exp $ +dnl $Id: aclocal.m4,v 1.91 2002/01/07 20:24:23 sof Exp $ dnl dnl Extra autoconf macros for the Glasgow fptools dnl @@ -592,20 +592,51 @@ AC_MSG_CHECKING(Haskell type for $1) AC_CACHE_VAL(AC_CV_NAME, [AC_TRY_RUN([#include #include + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifdef HAVE_SYS_STAT_H +# include +#endif + +#ifdef HAVE_FCNTL_H +# include +#endif + #ifdef HAVE_SIGNAL_H -#include +# include #endif + #ifdef HAVE_TIME_H -#include +# include +#endif + +#ifdef HAVE_TERMIOS_H +# include +#endif + +#ifdef HAVE_STRING_H +# include #endif + +#ifdef HAVE_CTYPE_H +# include +#endif + #ifdef HAVE_GL_GL_H -#include +# include #endif typedef $1 testing; main() { - FILE *f=fopen("conftestval", "w"); + FILE *f=fopen("conftestval2", "w"); if (!f) exit(1); if (((testing)((int)((testing)1.4))) == ((testing)1.4)) { fprintf(f, "%s%d\n", @@ -618,7 +649,8 @@ main() { } fclose(f); exit(0); -}], AC_CV_NAME=`cat conftestval`, +}], AC_CV_NAME=`cat conftestval2`, +echo $AC_CV_NAME ifelse([$2], , AC_CV_NAME=NotReallyAType, AC_CV_NAME=$2), ifelse([$3], , AC_CV_NAME=NotReallyATypeCross, AC_CV_NAME=$3))]) dnl AC_MSG_RESULT($AC_CV_NAME) diff --git a/configure.in b/configure.in index f995010..7bb7ab9 100644 --- a/configure.in +++ b/configure.in @@ -767,6 +767,19 @@ dnl Int32 is a HACK for non-ISO C compilers FPTOOLS_CHECK_HTYPE(sig_atomic_t, Int32) FPTOOLS_CHECK_HTYPE(clock_t) FPTOOLS_CHECK_HTYPE(time_t) +FPTOOLS_CHECK_HTYPE(dev_t, Word32) +FPTOOLS_CHECK_HTYPE(ino_t) +FPTOOLS_CHECK_HTYPE(mode_t) +FPTOOLS_CHECK_HTYPE(off_t) +FPTOOLS_CHECK_HTYPE(pid_t) +FPTOOLS_CHECK_HTYPE(size_t) +FPTOOLS_CHECK_HTYPE(gid_t) +FPTOOLS_CHECK_HTYPE(uid_t) +FPTOOLS_CHECK_HTYPE(cc_t) +FPTOOLS_CHECK_HTYPE(speed_t) +FPTOOLS_CHECK_HTYPE(tcflag_t) +FPTOOLS_CHECK_HTYPE(nlink_t) +FPTOOLS_CHECK_HTYPE(ssize_t) dnl ** Map OpenGL data types to Haskell types if test $GhcLibsWithHOpenGL = YES ; then -- 1.7.10.4