Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromocaml/ocaml

Commit6277644

Browse files
xavierleroyxclerc
authored andcommitted
Revised configuration test for int64 alignment (ocaml#1371)
MacOS High Sierra balks at the redefinition of `int64_t`.
1 parent1d32375 commit6277644

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

‎Changes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,11 @@ Working version
336336
Working 4.05.x branch
337337
---------------------
338338

339+
- MPR#7639, GPR#1371: fix configure script for correct detection of
340+
int64 alignment on Mac OS X 10.13 (High Sierra) and above; fix bug in
341+
configure script relating to such detection.
342+
(Mark Shinwell, report by John Whitington, review by Xavier Leroy)
343+
339344
- MPR#7591, GPR#1257: on x86-64, frame table is not 8-aligned
340345
(Xavier Leroy, report by Mantis user "voglerr", review by Gabriel Scherer)
341346

‎config/auto-aux/int64align.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
#include"m.h"
2020

2121
#if defined(ARCH_INT64_TYPE)
22-
typedefARCH_INT64_TYPEint64_t;
22+
typedefARCH_INT64_TYPEmyint64_t;
2323
#elifSIZEOF_LONG==8
24-
typedeflongint64_t;
24+
typedeflongmyint64_t;
2525
#elifSIZEOF_LONGLONG==8
26-
typedeflong longint64_t;
26+
typedeflong longmyint64_t;
2727
#else
2828
#error "No 64-bit integer type available"
2929
#endif
3030

31-
volatileint64_tfoo;
31+
volatilemyint64_tfoo;
3232

33-
voidaccess_int64(volatileint64_t*p)
33+
voidaccess_int64(volatilemyint64_t*p)
3434
{
3535
foo=*p;
3636
}
@@ -51,8 +51,8 @@ int main(void)
5151
signal(SIGBUS,sig_handler);
5252
#endif
5353
if(setjmp(failure)==0) {
54-
access_int64((volatileint64_t*)n);
55-
access_int64((volatileint64_t*) (n+1));
54+
access_int64((volatilemyint64_t*)n);
55+
access_int64((volatilemyint64_t*) (n+1));
5656
res=0;
5757
}else {
5858
res=1;

‎configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ case "$target" in
727727
"64-bit integers. I'm going to assume this architecture has\n" \
728728
"alignment constraints. That's a safe bet: OCaml will work\n" \
729729
"even if this architecture has actually no alignment\n" \
730-
"constraints." \
730+
"constraints."
731731
echo"#define ARCH_ALIGN_INT64">> m.h;;
732732
esac
733733
esac

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp