summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 7f7d136..900006e 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -646,8 +646,17 @@ SRC
src = %{#{includes}
#include <stdio.h>
/*top*/
-int conftest_const = (int)(#{const});
-int main() {printf("%d\\n", conftest_const); return 0;}
+typedef
+#ifdef PRI_LL_PREFIX
+#define PRI_CONFTEST_PREFIX PRI_LL_PREFIX
+LONG_LONG
+#else
+#define PRI_CONFTEST_PREFIX "l"
+long
+#endif
+conftest_type;
+conftest_type conftest_const = (conftest_type)(#{const});
+int main() {printf("%"PRI_CONFTEST_PREFIX"d\\n", conftest_const); return 0;}
}
begin
if try_link0(src, opt, &b)