remove CALC2_COMPAT symbol in source code

Removed CALC2_COMPAT in favor of ckecking if MAJOR_VER < 3.

The sign element in a ZVALUE is now of type SIGN, which is either
SB32 when MAJOR_VER < 3, or a bool otherwise.

The len element in a ZVALUE is of type LEN.  LEN type is SB32 when
MAJOR_VER < 3, or a uintptr_t otherwise.

Noted version.h symbols in README.RELEASE instead of CALC2_COMPAT.

Improve .gitignore.  Add excludes of hsrc temporary and test
programs.  Added note about how the list is sorted.
Moved the generic excludes to the top.
This commit is contained in:
Landon Curt Noll
2023-08-31 02:02:40 -07:00
parent faa93bf085
commit 5659ddbc4e
6 changed files with 73 additions and 59 deletions

View File

@@ -156,8 +156,12 @@ main(int argc, char **argv)
* We use "void *" as the size of a generic pointer.
*/
printf("#undef PTR_LEN\n");
#if MAJOR_VER < 3
printf("#define PTR_LEN %ld\t\t/%s/\n",
(long int)sizeof(void *), "* length of a pointer *");
#else /* MAJOR_VER < 3 */
printf("#define PTR_LEN UINTPTR_WIDTH\t\t/%s/\n", "* length of a pointer *");
#endif /* MAJOR_VER < 3 */
printf("#undef PTR_BITS\n");
printf("#define PTR_BITS %ld\t\t/%s/\n",
(long int)sizeof(void *)*CALC_CHARBIT, "* bit length of a pointer *");