History

macos: various fixes

* alloca needs to be _alloca * int64_t and uint64_t are also defined in <sys/_types/_int64_t.h> but as long long, not as long, so adjust out <stddef.h> to agree on Darwin * define __APPLE_CC__ so that <TargetConditionals.h> correctly defines various macros like TARGET_OS_MAC and TARGET_CPU_X86_64

Michael Matz committed 6 years ago

Commit 5d2f4cb1 parent b0b0e483 files · +7 −2Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/stddef.h+3−2
@@ -17,7 +17,7 @@ typedef union { long long __ll; long double __ld; } max_align_t; · 16 unmodified lines
17typedef signed char int8_t;17typedef signed char int8_t;
18typedef signed short int int16_t;18typedef signed short int int16_t;
19typedef signed int int32_t;19typedef signed int int32_t;
20#ifdef __LP64__20#if defined(__LP64__) && !defined(__APPLE__)
21typedef signed long int int64_t;21typedef signed long int int64_t;
22#else22#else
23typedef signed long long int int64_t;23typedef signed long long int int64_t;
@@ -25,7 +25,7 @@ typedef signed long long int int64_t; · 1 unmodified line
25typedef unsigned char uint8_t;25typedef unsigned char uint8_t;
26typedef unsigned short int uint16_t;26typedef unsigned short int uint16_t;
27typedef unsigned int uint32_t;27typedef unsigned int uint32_t;
28#ifdef __LP64__28#if defined(__LP64__) && !defined(__APPLE__)
29typedef unsigned long int uint64_t;29typedef unsigned long int uint64_t;
30#else30#else
31typedef unsigned long long int uint64_t;31typedef unsigned long long int uint64_t;
@@ -36,6 +36,7 @@ typedef unsigned long long int uint64_t; · 4 unmodified lines
36#define NULL ((void*)0)36#define NULL ((void*)0)
37#endif37#endif
38 38
39#undef offsetof
39#define offsetof(type, field) ((size_t)&((type *)0)->field)40#define offsetof(type, field) ((size_t)&((type *)0)->field)
40 41
41void *alloca(size_t size);42void *alloca(size_t size);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t