summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/Win32API/Win32API.c2
-rw-r--r--ext/socket/getnameinfo.c5
-rw-r--r--ext/tk/tcltklib.c4
-rw-r--r--ext/win32ole/win32ole.c2
4 files changed, 5 insertions, 8 deletions
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c
index 9a2de01f2d0..766058d1aa8 100644
--- a/ext/Win32API/Win32API.c
+++ b/ext/Win32API/Win32API.c
@@ -108,7 +108,7 @@ Win32API_initialize(self, dllname, proc, import, export)
}
if (16 < RARRAY_LEN(a_import)) {
- rb_raise(rb_eRuntimeError, "too many parameters: %d\n", RARRAY_LEN(a_import));
+ rb_raise(rb_eRuntimeError, "too many parameters: %ld\n", RARRAY_LEN(a_import));
}
rb_iv_set(self, "__import__", a_import);
diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c
index dcfdc6b35a9..6214359cd29 100644
--- a/ext/socket/getnameinfo.c
+++ b/ext/socket/getnameinfo.c
@@ -35,6 +35,7 @@
*/
#include "ruby/config.h"
+#include <stdio.h>
#include <sys/types.h>
#ifndef _WIN32
#if defined(__BEOS__)
@@ -51,15 +52,11 @@
#endif
#include <netdb.h>
#if defined(HAVE_RESOLV_H)
-#ifdef _SX
-#include <stdio.h>
-#endif
#include <resolv.h>
#endif
#endif
#ifdef _WIN32
#include <winsock2.h>
-#include <stdio.h>
#define snprintf _snprintf
#endif
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index 4f779c731ee..d057abbda66 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -4408,13 +4408,13 @@ ip_finalize(ip)
}
if (Tcl_InterpDeleted(ip)) {
- DUMP2("ip(%lx) is already deleted", ip);
+ DUMP2("ip(%p) is already deleted", ip);
return;
}
#if TCL_NAMESPACE_DEBUG
if (ip_null_namespace(ip)) {
- DUMP2("ip(%lx) has null namespace", ip);
+ DUMP2("ip(%p) has null namespace", ip);
return;
}
#endif
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 5b31898318a..42336e70a0d 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -2641,7 +2641,7 @@ static BOOL
lcid_installed(LCID lcid)
{
g_lcid_installed = FALSE;
- snprintf(g_lcid_to_check, sizeof(g_lcid_to_check), "%08x", lcid);
+ snprintf(g_lcid_to_check, sizeof(g_lcid_to_check), "%08lx", lcid);
EnumSystemLocales(installed_lcid_proc, LCID_INSTALLED);
return g_lcid_installed;
}