From dce72aab7098af5ce0a918da132dba3445c7f500 Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Thu, 12 Apr 2007 16:34:01 +0000 Subject: [PATCH] Prior to Mac OS X 10.3, the length modifier "ll" wasn't supported, but "q" was for long long. This isn't ANSI C and causes a warning when using PRI?64 macros. We don't support versions prior to OS X 10.3, so we dont' need such backward compatibility. Instead, redefine the macros to be "ll", which is ANSI C and doesn't cause a compiler warning. Fixes trac:868 This commit was SVN r14358. The following Trac tickets were found above: Ticket 868 --> https://svn.open-mpi.org/trac/ompi/ticket/868 --- opal/include/opal_config_bottom.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/opal/include/opal_config_bottom.h b/opal/include/opal_config_bottom.h index aa4e1cae1c..aeb62e0592 100644 --- a/opal/include/opal_config_bottom.h +++ b/opal/include/opal_config_bottom.h @@ -477,4 +477,23 @@ static inline uint16_t ntohs(uint16_t netvar) { return netvar; } #define OPAL_WANT_IPV6 0 #endif +#if defined(__APPLE__) && defined(HAVE_INTTYPES_H) +/* Prior to Mac OS X 10.3, the length modifier "ll" wasn't + supported, but "q" was for long long. This isn't ANSI + C and causes a warning when using PRI?64 macros. We + don't support versions prior to OS X 10.3, so we dont' + need such backward compatibility. Instead, redefine + the macros to be "ll", which is ANSI C and doesn't + cause a compiler warning. */ +#include +#if defined(__PRI_64_LENGTH_MODIFIER__) +#undef __PRI_64_LENGTH_MODIFIER__ +#define __PRI_64_LENGTH_MODIFIER__ "ll" +#endif +#if defined(__SCN_64_LENGTH_MODIFIER__) +#undef __SCN_64_LENGTH_MODIFIER__ +#define __SCN_64_LENGTH_MODIFIER__ "ll" +#endif +#endif + #endif /* OMPI_BUILDING */