+2008-06-17 Bruno Haible <bruno@clisp.org>
+
+ * lib/tls.h (gl_tls_key_init): Evaluate the destructor argument also
+ when the macro ignores it.
+ Based on a patch by Eric Blake <ebb9@byu.net>.
+
2008-06-17 Bruno Haible <bruno@clisp.org>
* modules/tls (License): Change to LGPLv2+.
/* Thread-local storage in multithreaded situations.
- Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{ \
if (((NAME) = TlsAlloc ()) == (DWORD)-1) \
abort (); \
+ (void) (DESTRUCTOR); \
} \
while (0)
# define gl_tls_get(NAME) \
}
gl_tls_key_t;
# define gl_tls_key_init(NAME, DESTRUCTOR) \
- (NAME).singlethread_value = NULL
+ ((NAME).singlethread_value = NULL, \
+ (void) (DESTRUCTOR))
# define gl_tls_get(NAME) \
(NAME).singlethread_value
# define gl_tls_set(NAME, POINTER) \