Skip to content

Commit

Permalink
Merge pull request #392 from gemesa/compiler-version
Browse files Browse the repository at this point in the history
Extend compiler version detection with clang
  • Loading branch information
ZerBea authored Jan 3, 2024
2 parents f977403 + 18c2023 commit 44bd50b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hcxdumptool.c
Original file line number Diff line number Diff line change
Expand Up @@ -4547,10 +4547,12 @@ if(uname(&utsbuffer) == 0) fprintf(stdout, "running on Linux kernel %s\n", utsbu
#if defined (__GLIBC__)
fprintf(stdout, "running GNU libc version %s\n", gnu_get_libc_version());
#endif
#if defined (__GNUC__)
#if defined(__clang__)
fprintf(stdout, "compiled by clang %d.%d.%d\n", __clang_major__, __clang_minor__, __clang_patchlevel__);
#elif defined(__GNUC__)
fprintf(stdout, "compiled by gcc %d.%d.%d\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
#else
fprintf(stdout, "compiler (__GNUC__) is not defined\n");
fprintf(stdout, "compiler (__clang__ / __GNUC__) is not defined\n");
#endif
#if defined (LINUX_VERSION_MAJOR)
fprintf(stdout, "compiled with Linux API headers %d.%d.%d\n", LINUX_VERSION_MAJOR, LINUX_VERSION_PATCHLEVEL, LINUX_VERSION_SUBLEVEL);
Expand Down

0 comments on commit 44bd50b

Please sign in to comment.