Skip to content

Commit

Permalink
Merge pull request #484 from triplef/use-has-include
Browse files Browse the repository at this point in the history
Use __has_include instead of preprocessor defines.
  • Loading branch information
nmoinvaz committed Jun 7, 2020
2 parents 283c779 + aa7ed25 commit b6bbb9f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mz.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@
#include <string.h> /* memset, strncpy, strlen */
#include <limits.h>

#ifdef HAVE_STDINT_H
#if defined(HAVE_STDINT_H) || \
(defined(__has_include) && __has_include(<stdint.h>))
# include <stdint.h>
#endif

Expand Down Expand Up @@ -187,7 +188,8 @@ typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
#endif

#ifdef HAVE_INTTYPES_H
#if defined(HAVE_INTTYPES_H) || \
(defined(__has_include) && __has_include(<inttypes.h>))
# include <inttypes.h>
#endif

Expand Down

0 comments on commit b6bbb9f

Please sign in to comment.