Guard for when defs CR_YEAR and BLDDATE are not supplied

This commit is contained in:
Imbus 2026-02-05 00:16:06 +01:00
parent 1e82124264
commit 377bcb5642

View file

@ -16,6 +16,10 @@
#define VERSION "1.0.0" #define VERSION "1.0.0"
#endif #endif
#ifndef CR_YEAR
#define CR_YEAR "2026"
#endif
// clang-format off // clang-format off
const char help[] = const char help[] =
"Usage:\n" "Usage:\n"
@ -124,7 +128,9 @@ static const struct option longopts[] = {
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
printf("%s version %s\n", basename(argv[0]), VERSION); printf("%s version %s\n", basename(argv[0]), VERSION);
#ifdef BLDDATE
printf("Build date: %s\n", BLDDATE); printf("Build date: %s\n", BLDDATE);
#endif
fprintf(stdout, copyright, CR_YEAR); fprintf(stdout, copyright, CR_YEAR);
printf("\n"); printf("\n");