mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
For MinGW hide exported struct variables behind pointers
MinGW apparently can't export/import struct variables from/to a DLL, so wrap the ones needed by inline.h in exported/imported pointer variables. All of the following changes apply to a MinGW build only. * libguile/gc-freelist.c (scm_i_master_freelist_ptr, scm_i_master_freelist2_ptr): New API variables. * libguile/gc.h (scm_i_freelist_ptr, scm_i_freelist2_ptr, scm_i_master_freelist_ptr, scm_i_master_freelist2_ptr): New global variable declarations. * libguile/inline.h (scm_cell): Use scm_i_freelist_ptr and scm_i_master_freelist_ptr instead of scm_i_freelist and scm_i_master_freelist. (scm_double_cell): Use scm_i_freelist2_ptr and scm_i_master_freelist2_ptr instead of scm_i_freelist2 and scm_i_master_freelist2. * libguile/threads.c (scm_i_freelist_ptr, scm_i_freelist2_ptr): New global variables.
This commit is contained in:
parent
954d46413f
commit
9d9a58e184
4 changed files with 30 additions and 2 deletions
|
@ -1680,6 +1680,10 @@ scm_dynwind_critical_section (SCM mutex)
|
|||
/*** Initialization */
|
||||
|
||||
scm_i_pthread_key_t scm_i_freelist, scm_i_freelist2;
|
||||
#ifdef __MINGW32__
|
||||
scm_i_pthread_key_t *scm_i_freelist_ptr = &scm_i_freelist;
|
||||
scm_i_pthread_key_t *scm_i_freelist2_ptr = &scm_i_freelist2;
|
||||
#endif
|
||||
scm_i_pthread_mutex_t scm_i_misc_mutex;
|
||||
|
||||
#if SCM_USE_PTHREAD_THREADS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue