From: Matthew Fernandez Date: Sat, 8 Jan 2022 01:49:56 +0000 (-0800) Subject: API BREAK: remove unused 'MAXSHORT' definition X-Git-Tag: 3.0.0~83^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56654a894563f7887dea3ad3eadc8c34196290c7;p=graphviz API BREAK: remove unused 'MAXSHORT' definition The last use of this was removed in 580fa88477fa59aca01e405c986c686ceee21b5f. But its definition was retained in this header as removing it was considered an API break not worth causing. The upcoming release is projected to bump the major version number, so we can now remove it. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 28c3b02d7..105e76d3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Breaking**: Using Graphviz as a library on Windows now requires the `GVDLL` symbol to be set to ensure correct linking. +- **Breaking**: Graphviz headers no longer define the constant `MAXSHORT`. A + drop-in replacement is `SHRT_MAX` in the C standard library’s limits.h. - **Breaking**: Graphviz headers no longer (re-)define the C constants `INT_MIN` and `INT_MAX`. Replacements can be found in the C standard library’s limits.h. - The Ming plugin that produced Shockwave files has been removed. This format diff --git a/lib/common/arith.h b/lib/common/arith.h index aca9389c7..264da8e69 100644 --- a/lib/common/arith.h +++ b/lib/common/arith.h @@ -39,10 +39,6 @@ extern "C" { #define SGN(a) (((a)<0)? -1 : 1) #define CMP(a,b) (((a)<(b)) ? -1 : (((a)>(b)) ? 1 : 0)) -#ifndef MAXSHORT -#define MAXSHORT (0x7fff) -#endif - #ifndef MAXDOUBLE #define MAXDOUBLE 1.7976931348623157e+308 #endif