mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-09 19:00:27 +02:00
* version.c (scm_version): use sprintf instead of snprintf,
for portability. thanks to Bill Schottstaedt.
This commit is contained in:
parent
4f522b6f5c
commit
8186c4f536
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2001-10-14 Gary Houston <ghouston@arglist.com>
|
||||||
|
|
||||||
|
* version.c (scm_version): use sprintf instead of snprintf,
|
||||||
|
for portability. thanks to Bill Schottstaedt.
|
||||||
|
|
||||||
2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
|
2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
|
||||||
|
|
||||||
* read.c (scm_lreadr): When user-defined hash procedure returns
|
* read.c (scm_lreadr): When user-defined hash procedure returns
|
||||||
|
|
|
@ -106,9 +106,13 @@ SCM_DEFINE (scm_version, "version", 0, 0, 0,
|
||||||
#define FUNC_NAME s_scm_version
|
#define FUNC_NAME s_scm_version
|
||||||
{
|
{
|
||||||
|
|
||||||
char version_str[64];
|
char version_str[3 * 4 + 3];
|
||||||
|
|
||||||
snprintf(version_str, sizeof(version_str), "%d.%d.%d",
|
#if SCM_GUILE_MAJOR_VERSION > 9999 || SCM_GUILE_MINOR_VERSION > 9999 \
|
||||||
|
|| SCM_GUILE_MICRO_VERSION > 9999
|
||||||
|
# error version string may overflow buffer
|
||||||
|
#endif
|
||||||
|
sprintf (version_str, "%d.%d.%d",
|
||||||
SCM_GUILE_MAJOR_VERSION,
|
SCM_GUILE_MAJOR_VERSION,
|
||||||
SCM_GUILE_MINOR_VERSION,
|
SCM_GUILE_MINOR_VERSION,
|
||||||
SCM_GUILE_MICRO_VERSION);
|
SCM_GUILE_MICRO_VERSION);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue