diff --git a/src/frontend/display.c b/src/frontend/display.c index a286289f5..825c60ade 100644 --- a/src/frontend/display.c +++ b/src/frontend/display.c @@ -23,6 +23,7 @@ static int gen_Input(REQUEST *request, RESPONSE *response); static int nop(void); #define NOP ((void *)nop) static int nodev(void); +#undef NODEV /* the macOS SDK defines an unrelated NODEV */ #define NODEV ((void *)nodev) #ifndef X_DISPLAY_MISSING diff --git a/src/maths/sparse/spfactor.c b/src/maths/sparse/spfactor.c index de5de6177..ad5bd0c06 100644 --- a/src/maths/sparse/spfactor.c +++ b/src/maths/sparse/spfactor.c @@ -904,7 +904,7 @@ MarkowitzProducts(MatrixPtr Matrix, int Step) if ((*pMarkowitzRow > LARGEST_SHORT_INTEGER && *pMarkowitzCol != 0) || (*pMarkowitzCol > LARGEST_SHORT_INTEGER && *pMarkowitzRow != 0)) { fProduct = (double)(*pMarkowitzRow++) * (double)(*pMarkowitzCol++); - if (fProduct >= LARGEST_LONG_INTEGER) + if (fProduct >= (double)LARGEST_LONG_INTEGER) *pMarkowitzProduct++ = LARGEST_LONG_INTEGER; else *pMarkowitzProduct++ = (long)fProduct; @@ -2751,7 +2751,7 @@ UpdateMarkowitzNumbers( MatrixPtr Matrix, ElementPtr pPivot ) if ((MarkoRow[Row] > LARGEST_SHORT_INTEGER && MarkoCol[Row] != 0) || (MarkoCol[Row] > LARGEST_SHORT_INTEGER && MarkoRow[Row] != 0)) { Product = MarkoCol[Row] * MarkoRow[Row]; - if (Product >= LARGEST_LONG_INTEGER) + if (Product >= (double)LARGEST_LONG_INTEGER) Matrix->MarkowitzProd[Row] = LARGEST_LONG_INTEGER; else Matrix->MarkowitzProd[Row] = (long)Product; @@ -2770,7 +2770,7 @@ UpdateMarkowitzNumbers( MatrixPtr Matrix, ElementPtr pPivot ) if ((MarkoRow[Col] > LARGEST_SHORT_INTEGER && MarkoCol[Col] != 0) || (MarkoCol[Col] > LARGEST_SHORT_INTEGER && MarkoRow[Col] != 0)) { Product = MarkoCol[Col] * MarkoRow[Col]; - if (Product >= LARGEST_LONG_INTEGER) + if (Product >= (double)LARGEST_LONG_INTEGER) Matrix->MarkowitzProd[Col] = LARGEST_LONG_INTEGER; else Matrix->MarkowitzProd[Col] = (long)Product; diff --git a/src/osdi/osdidefs.h b/src/osdi/osdidefs.h index 3b9cbb010..f71efd781 100644 --- a/src/osdi/osdidefs.h +++ b/src/osdi/osdidefs.h @@ -52,10 +52,11 @@ typedef struct { #endif +/* named OSDI_ALIGN: plain ALIGN collides with the macOS SDK */ #ifndef _MSC_VER -#define ALIGN(pow) __attribute__((aligned(pow))) +#define OSDI_ALIGN(pow) __attribute__((aligned(pow))) #else -#define ALIGN(pow) __declspec(align(pow)) +#define OSDI_ALIGN(pow) __declspec(align(pow)) #endif typedef struct OsdiExtraInstData { @@ -65,7 +66,7 @@ typedef struct OsdiExtraInstData { bool dt_given; uint32_t eval_flags; -} ALIGN(MAX_ALIGN) OsdiExtraInstData; +} OSDI_ALIGN(MAX_ALIGN) OsdiExtraInstData; typedef struct OsdiModelData { GENmodel gen; diff --git a/src/xspice/icm/makedefs.in b/src/xspice/icm/makedefs.in index 10fbe3ad3..096984054 100644 --- a/src/xspice/icm/makedefs.in +++ b/src/xspice/icm/makedefs.in @@ -52,7 +52,9 @@ ifeq ($(ISMINGW), 1) LDFLAGS = -shared @LDFLAGS@ endif ifeq "$(strip $(uname))" "Darwin" - LDFLAGS = -bundle -flat_namespace -undefined suppress + # -flat_namespace/-undefined suppress are deprecated by the modern macOS + # linker; dynamic_lookup resolves the codemodels' ngspice symbols at load + LDFLAGS = -bundle -undefined dynamic_lookup endif ifeq "$(strip $(uname))" "SunOS" ifneq "$(CC)" "gcc"