Commit 9e2af376 by Aaron W. LaFramboise Committed by Aaron W. LaFramboise

gthr-win32.h (__gthread_setspecific): Use CONST_CAST2.

2008-08-31  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>

	* gcc/gthr-win32.h (__gthread_setspecific): Use CONST_CAST2.

From-SVN: r139839
parent 6528b88d
2008-08-31 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* gthr-win32.h (__gthread_setspecific): Use CONST_CAST2.
* config/i386/gthr-win32.c (__gthread_setspecific): Same.
2008-08-31 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
* mkmap-flat.awk: Add option pe_dll.
* config/i386/t-cygming (SHLIB_LINK): Support building libgcc_s.
* config/i386/t-cygwin (SHLIB_LC): Add.
......
......@@ -141,7 +141,10 @@ __gthr_win32_getspecific (__gthread_key_t key)
int
__gthr_win32_setspecific (__gthread_key_t key, const void *ptr)
{
return (TlsSetValue (key, (void*) ptr) != 0) ? 0 : (int) GetLastError ();
if (TlsSetValue (key, CONST_CAST2(void *, const void *, ptr)) != 0)
return 0;
else
return GetLastError ();
}
void
......
......@@ -455,7 +455,10 @@ __gthread_getspecific (__gthread_key_t key)
static inline int
__gthread_setspecific (__gthread_key_t key, const void *ptr)
{
return __gthr_win32_setspecific (key, ptr);
if (TlsSetValue (key, CONST_CAST2(void *, const void *, ptr)) != 0)
return 0;
else
return GetLastError ();
}
static inline void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment