-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build-related tweaks: separate git commit info (re: 148a8a3)
It was getting annoying that every file that includes <releaseflags.h> for the _AST_release macro needs to be recompiled every time the git commit changes, because the git commit information is in that same <releaseflags.h> file (even though only version,.h in ksh93 uses it). I anticipate checking _AST_release in more files, so this will be getting worse. src/lib/libast/Mamfile, src/cmd/ksh93/Mamfile, src/lib/libast/include/ast.h, src/cmd/ksh93/include/version.h: - To minimise dependencies on the git commit, move the git commit information to git.h in ksh93; make version.h include it. - Rename releaseflags.h to ast_release.h as it (currently) only defines or doesn't define _AST_release. - Include <ast_release.h> from ast.h so _AST_release can be checked for everywhere in future. - ast.h: remove a dead struct define conditional upon _SFIO_H (which is known to be defined as sfio.h is included earlier). src/cmd/ksh93/sh/array.c, src/lib/libsum/sum-sha2.c: - Now that we can easily use _AST_release everywhere, use it to include <assert.h> but disable assert() on _AST_release versions. - Add missing assert() call to nv_endsubscript(). (re: 3939103) src/lib/libast/comp/assert.c: - Do not enclose the assertion in single quotes in assert() failure messages; assertions may themselves contain single quotes (like the one just added to array.c). src/cmd/ksh93/tests/arrays.sh: - Work around a spurious failure under ASan, which actually points to another flaw in the regex code. See link in comment for info.
- Loading branch information
Showing
12 changed files
with
84 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,23 +11,29 @@ | |
* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * | ||
* * | ||
* David Korn <[email protected]> * | ||
* Martijn Dekker <[email protected]> * | ||
* * | ||
***********************************************************************/ | ||
|
||
#include <releaseflags.h> | ||
#include <ast_release.h> | ||
#include "git.h" | ||
|
||
#define SH_RELEASE_DATE "2024-11-30" /* must be in this format for $((.sh.version)) */ | ||
/* | ||
* This comment keeps SH_RELEASE_DATE a few lines away from SH_RELEASE_SVER to avoid | ||
* merge conflicts when cherry-picking dev branch commits onto a release branch. | ||
*/ | ||
#define SH_RELEASE_FORK "93u+m" /* only change if you develop a new ksh93 fork */ | ||
#define SH_RELEASE_SVER "1.0.11-beta" /* semantic version number: https://semver.org */ | ||
#define SH_RELEASE_DATE "2024-11-30" /* must be in this format for $((.sh.version)) */ | ||
#define SH_RELEASE_CPYR "(c) 2020-2024 Contributors to ksh " SH_RELEASE_FORK | ||
|
||
/* Scripts sometimes field-split ${.sh.version}, so don't change amount of whitespace. */ | ||
/* Arithmetic $((.sh.version)) uses the last 10 chars, so the date must be at the end. */ | ||
#if _AST_release | ||
# define SH_RELEASE SH_RELEASE_FORK "/" SH_RELEASE_SVER " " SH_RELEASE_DATE | ||
#else | ||
# ifdef _AST_git_commit | ||
# define SH_RELEASE SH_RELEASE_FORK "/" SH_RELEASE_SVER "+" _AST_git_commit " " SH_RELEASE_DATE | ||
# ifdef git_commit | ||
# define SH_RELEASE SH_RELEASE_FORK "/" SH_RELEASE_SVER "+" git_commit " " SH_RELEASE_DATE | ||
# else | ||
# define SH_RELEASE SH_RELEASE_FORK "/" SH_RELEASE_SVER "+dev " SH_RELEASE_DATE | ||
# endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters