Replace COSMO define with _COSMO_SOURCE

This change might cause ABI breakages for /opt/cosmos. It's needed to
help us better conform to header declaration practices.
This commit is contained in:
Justine Tunney 2023-08-13 20:31:27 -07:00
parent a033b65a33
commit c776a32f75
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
238 changed files with 858 additions and 1069 deletions

View file

@ -118,11 +118,11 @@ typedef __INTPTR_TYPE__ intptr_t;
typedef __UINTPTR_TYPE__ uintptr_t;
typedef __PTRDIFF_TYPE__ ptrdiff_t;
typedef __WINT_TYPE__ wint_t; /* uint32_t on linux but int32_t on xnu */
typedef __INT32_TYPE__ bool32;
typedef __INT8_TYPE__ int8_t;
typedef __UINT8_TYPE__ uint8_t;
typedef __INT16_TYPE__ int16_t;
typedef __UINT16_TYPE__ uint16_t;
typedef __INT32_TYPE__ bool32;
typedef __INT32_TYPE__ int32_t;
typedef __UINT32_TYPE__ uint32_t;
typedef __INT64_TYPE__ int64_t;
@ -136,7 +136,6 @@ typedef __UINTMAX_TYPE__ uintmax_t;
typedef signed __int128 int128_t;
typedef unsigned __int128 uint128_t;
#endif
typedef struct {
intptr_t ax, dx;
} axdx_t;
@ -743,7 +742,8 @@ void abort(void) wontreturn;
#pragma GCC diagnostic error "-Wtrampolines"
#if __GNUC__ >= 6
#pragma GCC diagnostic error "-Wnonnull-compare"
#if defined(COSMO) && !defined(MODE_DBG) && !defined(STACK_FRAME_UNLIMITED)
#if defined(_COSMO_SOURCE) && !defined(MODE_DBG) && \
!defined(STACK_FRAME_UNLIMITED)
#pragma GCC diagnostic error "-Wframe-larger-than=131072"
#if __GNUC__ >= 9
// #pragma GCC diagnostic error "-Walloca-larger-than=1024"

View file

@ -74,7 +74,7 @@
#define __BIGGEST_ALIGNMENT__ 16
#endif
#ifdef COSMO
#ifdef _COSMO_SOURCE
/* Programs should call GetStackSize() */
#define APE_STACKSIZE 262144 /* default 256kb stack */
#define FRAMESIZE 0x10000