Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
e1cb5367
Commit
e1cb5367
authored
Jan 07, 2002
by
sof
Browse files
[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
Changes
3
Hide whitespace changes
Inline
Side-by-side
acconfig.h
View file @
e1cb5367
...
...
@@ -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
...
...
aclocal.m4
View file @
e1cb5367
dnl $Id: aclocal.m4,v 1.9
0
200
1/12/13 09
:2
3
:23 sof Exp $
dnl $Id: aclocal.m4,v 1.9
1
200
2/01/07 20
:2
4
: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("conftestval
2
", "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)
...
...
configure.in
View file @
e1cb5367
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment