Skip to content

Commit

Permalink
Fixes to feature test macros
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Dec 1, 2024
1 parent 3e8bf90 commit e2c5a2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/smax-messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

// We'll use gcc major version as a proxy for the glibc library to decide which feature macro to use.
// gcc 5.1 was released 2015-04-22...
#if __GNUC__ >= 5
#ifndef __GNUC__
# define _ISOC99_SOURCE ///< vsnprintf() feature macro starting glibc 2.20 (2014-09-08)
#elif __GNUC__ >= 5 || __clang__
# define _ISOC99_SOURCE ///< vsnprintf() feature macro starting glibc 2.20 (2014-09-08)
#else
# define _BSD_SOURCE ///< vsnprinf() feature macro for glibc <= 2.19
Expand Down
4 changes: 3 additions & 1 deletion src/smax-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@

// We'll use gcc major version as a proxy for the glibc library to decide which feature macro to use.
// gcc 5.1 was released 2015-04-22...
#if __GNUC__ >= 5
#ifndef __GNUC__
# define _ISOC99_SOURCE ///< strtoll() feature macro starting glibc 2.20 (2014-09-08)
#elif __GNUC__ >= 5 || __clang__
# define _ISOC99_SOURCE ///< strtoll() feature macro starting glibc 2.20 (2014-09-08)
#else
# define _BSD_SOURCE ///< strtoll() feature macro for glibc <= 2.19
Expand Down

0 comments on commit e2c5a2a

Please sign in to comment.