Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
08c5cc05
Commit
08c5cc05
authored
27 years ago
by
Alastair Reid
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1998-03-03 19:04:47 by reid]
Added alignment tests
parent
d43f6852
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
acconfig.h
+9
-0
9 additions, 0 deletions
acconfig.h
aclocal.m4
+43
-1
43 additions, 1 deletion
aclocal.m4
configure.in
+13
-2
13 additions, 2 deletions
configure.in
with
65 additions
and
3 deletions
acconfig.h
+
9
−
0
View file @
08c5cc05
...
...
@@ -59,6 +59,15 @@
/* Define to unsigned long long int if <sys/types.h> doesn't define */
#undef ullong
/* Define to alignment constraint on doubles or on unsigned int - whichever is the greater */
#undef ALIGNMENT_DOUBLE
/* Define to alignment constraint on floats or on unsigned int - whichever is the greater */
#undef ALIGNMENT_FLOAT
/* Define to alignment constraint on unsigned int - whichever is the greater */
#undef ALIGNMENT_UNSIGNED_INT
/* Leave that blank line there!! Autoheader needs it.
If you're adding to this file, keep in mind:
...
...
This diff is collapsed.
Click to expand it.
aclocal.m4
+
43
−
1
View file @
08c5cc05
# $Id: aclocal.m4,v 1.
19
1998/03/03 04:4
5:07
reid Exp $
# $Id: aclocal.m4,v 1.
20
1998/03/03
19:
04:4
8
reid Exp $
#
# Extra autoconf macros for the Glasgow fptools
#
...
...
@@ -340,3 +340,45 @@ else
fi
rm -fr conftest*
])
dnl ** figure out whether types can be word-aligned
dnl (test based on test in smalltalk-1.1.5 configuration)
dnl (required SIZEOF test but AC_CHECK_SIZEOF doesn't call PROVIDE
dnl so we can't call REQUIRE)
dnl GHC_CHECK_ALIGNMENT(TYPE)
AC_DEFUN(GHC_CHECK_ALIGNMENT,
[changequote(<<, >>)dnl
dnl The name to #define.
define(<<AC_TYPE_NAME>>, translit(alignment_$1, [a-z *], [A-Z_P]))dnl
dnl The cache variable name.
define(<<AC_CV_NAME>>, translit(ac_cv_alignment_$1, [ *], [_p]))dnl
dnl The name of the corresponding size.
define(<<AC_CV_SIZEOF_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
changequote([, ])dnl
AC_MSG_CHECKING(alignment of $1)
AC_CACHE_VAL(AC_CV_NAME,
[AC_TRY_RUN([
main()
{
unsigned int vec[3];
$1 test, *testptr;
test = *($1 *)&vec[1];
testptr = ($1 *)&vec[1];
*testptr = test;
exit(0);
}
],
AC_CV_NAME=$ac_cv_sizeof_unsigned_int,
AC_CV_NAME=$AC_CV_SIZEOF_NAME,
AC_CV_NAME=$AC_CV_SIZEOF_NAME)])
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
AC_PROVIDE($AC_TYPE_NAME)
undefine([AC_TYPE_NAME])dnl
undefine([AC_CV_NAME])dnl
undefine([AC_CV_SIZEOF_NAME])dnl
])
This diff is collapsed.
Click to expand it.
configure.in
+
13
−
2
View file @
08c5cc05
...
...
@@ -443,13 +443,24 @@ dnl ** how do we get a timezone name, and UTC offset ?
AC_STRUCT_TIMEZONE
#
dnl what's the type of timezone?
dnl
**
what's the type of timezone?
AC_TYPE_TIMEZONE
#
dnl do we have altzone?
dnl
**
do we have altzone?
AC_ALTZONE
dnl ** what are the sizes of various types
dnl (these must come before GHC_CHECK_ALIGNMENT)
AC_CHECK_SIZEOF(unsigned int,4)
AC_CHECK_SIZEOF(float,4)
AC_CHECK_SIZEOF(double,8)
dnl ** what are alignment constraints on various types
GHC_CHECK_ALIGNMENT(unsigned int) dnl redundant but harmless
GHC_CHECK_ALIGNMENT(float)
GHC_CHECK_ALIGNMENT(double)
#
dnl ** check for specific library functions that we are interested in
#
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment