Skip to content

Commit 1214028

Browse files
committed
Merge pull request adafruit#354 from xbe/osx-fix
Fix OS X detection.
2 parents 506589a + 6068210 commit 1214028

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

py/nlrx64.S

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
.text
66

77
/* uint nlr_push(rdi=nlr_buf_t *nlr) */
8-
#ifndef __apple_build_version__
8+
#if !(defined(__APPLE__) && defined(__MACH__))
99
.globl nlr_push
1010
.type nlr_push, @function
1111
nlr_push:
@@ -27,12 +27,12 @@ _nlr_push:
2727
movq %rdi, nlr_top(%rip) # stor new nlr_buf (to make linked list)
2828
xorq %rax, %rax # return 0, normal return
2929
ret # return
30-
#ifndef __apple_build_version__
30+
#if !(defined(__APPLE__) && defined(__MACH__))
3131
.size nlr_push, .-nlr_push
3232
#endif
3333

3434
/* void nlr_pop() */
35-
#ifndef __apple_build_version__
35+
#if !(defined(__APPLE__) && defined(__MACH__))
3636
.globl nlr_pop
3737
.type nlr_pop, @function
3838
nlr_pop:
@@ -44,12 +44,12 @@ _nlr_pop:
4444
movq (%rax), %rax # load prev nlr_buf
4545
movq %rax, nlr_top(%rip) # store prev nlr_buf (to unlink list)
4646
ret # return
47-
#ifndef __apple_build_version__
47+
#if !(defined(__APPLE__) && defined(__MACH__))
4848
.size nlr_pop, .-nlr_pop
4949
#endif
5050

5151
/* void nlr_jump(rdi=uint val) */
52-
#ifndef __apple_build_version__
52+
#if !(defined(__APPLE__) && defined(__MACH__))
5353
.globl nlr_jump
5454
.type nlr_jump, @function
5555
nlr_jump:
@@ -74,11 +74,11 @@ nlr_jump:
7474
xorq %rax, %rax # clear return register
7575
inc %al # increase to make 1, non-local return
7676
ret # return
77-
#ifndef __apple_build_version__
77+
#if !(defined(__APPLE__) && defined(__MACH__))
7878
.size nlr_jump, .-nlr_jump
7979
#endif
8080

81-
#ifndef __apple_build_version__
81+
#if !(defined(__APPLE__) && defined(__MACH__))
8282
.local nlr_top
8383
#endif
8484
.comm nlr_top,8,8

0 commit comments

Comments
 (0)