summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-22 05:33:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-22 05:33:54 +0000
commitf1622c195da92aaaa0200d3afcf44f58c0cf29d9 (patch)
tree02f34d7e3a591186505dfe5d8ce2c89c878ce93a /ext
parent4b40f2c51607e5a918699952605bbcfc5bff9f99 (diff)
* file.c (rb_file_s_rename): deleted code to get rid of a bug of
old Cygwin. * file.c (rb_file_truncate): added prototype of GetLastError() on cygwin. [ruby-dev:31239] * include/ruby/intern.h (is_ruby_native_thread): prototype. * missing/strftime.c (strftime): fix printf format and actual arguments. * ext/Win32API/Win32API.c (Win32API_initialize): ditto. * ext/tk/tcltklib.c (ip_finalize): ditto. * ext/win32ole/win32ole.c (lcid_installed): ditto. * ext/socket/getnameinfo.c: include stdio.h always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 9a2de01f2d..766058d1aa 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 dcfdc6b35a..6214359cd2 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 4f779c731e..d057abbda6 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 5b31898318..42336e70a0 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;
}