1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00
cde/src/lib/libast/features
Martijn Dekker 3567220898 New semantic versioning scheme; disable vmalloc in release builds
As of this commit, ksh 93u+m has a standard semantic version number
<https://semver.org/>, beginning with 1.0.0-alpha. This is added to
the version string in a way that should be compatible with scripts
parsing ${.sh.version} or $(ksh --version). This addition does not
replace the release date and does not affect $((.sh.version)).

For non-release builds, the version string will be:
	FORK/VERSION+HASH YYYY-MM-DD
e.g.:	93u+m/1.0.0-alpha+41ef7f76 2021-01-03

For release builds, it will be:
	FORK/VERSION YYYY-MM-DD
e.g.:	93u+m/1.0.0 2021-01-03

It is now automatically decided by bin/package whether to build a
release or development build. When building from a directory that
is not a git repository, or if the current git branch name starts
with a number (e.g. '1.0'), the release build is enabled; otherwise
a development build is the default. This is arranged by adding -D
flags to $CCFLAGS as described below. These flags are prepended to
$CCFLAGS, so they can be overridden by adding your own -D or -U
flags via the environment.

In addition, AST vmalloc is disabled for release builds as of this
commit, forcing the use of the OS's standard malloc(3). In 2021,
this is generally more reliable, faster, and more economical with
memory than AST vmalloc. Several memory leaks and crashing bugs are
avoided, e.g.: <https://github.com/ksh93/ksh/issues/95>.

For development builds, vmalloc stays enabled (along with its known
bugs) because this allows the use of the vmstat builtin, making it
much more efficient to test for memory leaks. For more info, see
the regression test script: src/cmd/ksh93/tests/leaks.sh

bin/package, src/cmd/INIT/package.sh:
- Add flags for build type. In $CCFLAGS, define _AST_ksh_release if
  we're not on any git branch or on a git branch whose name starts
  with a number. Otherwise, define _AST_git_commit as the first 8
  characters of the current git commit hash.

src/lib/libast/features/vmalloc:
- If _AST_ksh_release is defined, disable vmalloc and force use of
  the operating system's malloc. Discussion:
  https://github.com/ksh93/ksh/issues/95

src/cmd/ksh93/include/version.h:
- Define new format for version string, adding a semantic version
  number as well as (for non-release builds) the git commit hash.

src/cmd/ksh93/sh/init.c: e_version[]:
- Add a 'v' to the ${.sh.version} feature string if ksh was
  compiled with vmalloc enabled. This allows scripts, such as
  regression tests, to detect this.

src/cmd/ksh93/data/builtins.c: sh_optksh[]:
- Add a copyright line crediting the contributors to ksh 93u+m.

Resolves: https://github.com/ksh93/ksh/issues/95
2021-01-05 04:52:42 +00:00
..
align.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
api Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
aso Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
asometh Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
botch.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
ccode Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
common Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
dirent Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
eaccess Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
errno Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
fcntl.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
float Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
fs Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
hack Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
iconv Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
lib Fix a large number of typos and other problems (#110) 2020-08-07 00:50:11 +01:00
libpath.sh build system: modernise shell compatibility checks 2020-08-23 23:41:31 +01:00
limits.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
locale Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
map.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
mmap libast: update /usr/tmp fallback to /var/tmp 2020-09-12 19:14:27 +02:00
mode.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
ndbm Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
nl_types Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
omitted Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
options Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
param.sh build system: modernise shell compatibility checks 2020-08-23 23:41:31 +01:00
preroot.sh build system: modernise shell compatibility checks 2020-08-23 23:41:31 +01:00
prog Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
sfinit.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
sfio patches to build on freebsd 12 2020-02-24 12:58:22 -05:00
sig.sh build system: modernise shell compatibility checks 2020-08-23 23:41:31 +01:00
siglist Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
signal.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
sizeof Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
standards Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
stdio libast: update /usr/tmp fallback to /var/tmp 2020-09-12 19:14:27 +02:00
sys Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
syscall Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
time Fix the max precision of the 'time' keyword (#72) 2020-07-14 22:48:04 +01:00
tmlib Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmx Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tty Fix 80 typos in comments 2020-06-12 01:45:12 +02:00
tv Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tvlib Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
uwin Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
vfork Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
vmalloc New semantic versioning scheme; disable vmalloc in release builds 2021-01-05 04:52:42 +00:00
wait Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
wchar patches to build on freebsd 12 2020-02-24 12:58:22 -05:00
wctype Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00