Commit e1cb5367 authored by sof's avatar sof

[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
parent 34942df6
......@@ -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
......
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 <stdio.h>
#include <stddef.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
#ifdef HAVE_SIGNAL_H
#include <signal.h>
# include <signal.h>
#endif
#ifdef HAVE_TIME_H
#include <time.h>
# include <time.h>
#endif
#ifdef HAVE_TERMIOS_H
# include <termios.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_CTYPE_H
# include <ctype.h>
#endif
#ifdef HAVE_GL_GL_H
#include <GL/gl.h>
# include <GL/gl.h>
#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)
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment