Skip to content

Commit

Permalink
win32: for strict ANSI
Browse files Browse the repository at this point in the history
* thread_win32.c (w32_thread_start_func, thread_start_func_1),
  (timer_thread_func): use __stdcall instead of _stdcall which is
  unavailable in strict ANSI mode.  [ruby-core:55312] [Bug #8495]
* win32/win32.c (gettimeofday): use __cdecl instead of _cdecl.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jul 8, 2013
1 parent 1ffdd82 commit 444f08f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
Mon Jul 8 23:12:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>

* thread_win32.c (w32_thread_start_func, thread_start_func_1),
(timer_thread_func): use __stdcall instead of _stdcall which is
unavailable in strict ANSI mode. [ruby-core:55312] [Bug #8495]

* win32/win32.c (gettimeofday): use __cdecl instead of _cdecl.

Mon Jul 8 22:41:12 2013 Tanaka Akira <akr@fsij.org>

* bignum.c (bary_mul): Arguments for work memory added.
Expand Down
6 changes: 3 additions & 3 deletions thread_win32.c
Expand Up @@ -269,7 +269,7 @@ w32_resume_thread(HANDLE handle)
#ifdef HAVE__BEGINTHREADEX
#define start_thread (HANDLE)_beginthreadex
#define thread_errno errno
typedef unsigned long (_stdcall *w32_thread_start_func)(void*);
typedef unsigned long (__stdcall *w32_thread_start_func)(void*);
#else
#define start_thread CreateThread
#define thread_errno rb_w32_map_errno(GetLastError())
Expand Down Expand Up @@ -587,7 +587,7 @@ native_thread_destroy(rb_thread_t *th)
w32_close_handle(intr);
}

static unsigned long _stdcall
static unsigned long __stdcall
thread_start_func_1(void *th_ptr)
{
rb_thread_t *th = th_ptr;
Expand Down Expand Up @@ -695,7 +695,7 @@ ubf_handle(void *ptr)
static HANDLE timer_thread_id = 0;
static HANDLE timer_thread_lock;

static unsigned long _stdcall
static unsigned long __stdcall
timer_thread_func(void *dummy)
{
thread_debug("timer_thread\n");
Expand Down
2 changes: 1 addition & 1 deletion win32/win32.c
Expand Up @@ -4274,7 +4274,7 @@ filetime_to_timeval(const FILETIME* ft, struct timeval *tv)
}

/* License: Ruby's */
int _cdecl
int __cdecl
gettimeofday(struct timeval *tv, struct timezone *tz)
{
FILETIME ft;
Expand Down

0 comments on commit 444f08f

Please sign in to comment.