[Gc] Fix for gc.h and gc_pthread_redirects.h

Ivan Maidanski ivmai at mail.ru
Wed Feb 18 14:20:14 PST 2009


This fix was suggested by "Gregory Peele ARA/CFD" <gpeele at ara.com>.

Changes for gc_pthread_redirects.h:
- dlfcn.h is included for dlopen() proto before undefining "dlopen" (so, it's possible now to include dlfcn.h after gc.h from user code);
- GC_dlopen() proto is added (except for Darwin as it's missing there);
- "dlopen" is explicitly undefined (before its redefinition).

Similar changes for gc.h:
- "process.h" is included besides "windows.h" (for _beginthreadex/_endthreadex);
- GC_NO_THREAD_DECLS is moved to the right place (before closing "extern C").

1. Some changes (regarding this, like undefining _beginthreadex/_endthreadex explicitly) have already been committed to CVS (since v7.1);
2. In fact, in my code, I used to include process.h before gc.h (as a work-around) and it works fine for all Win32 compilers I've tested (VC++, BCC, DMC, WCC, MinGW). Now, it's also possible to include process.h after gc.h.
3. The attached patch is NOT against v7.1 (see note 1).

Again, for convenience, for interested parties, my tarball containing latest CVS plus pending patches is at:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff63
Type: application/octet-stream
Size: 1723 bytes
Desc: not available
Url : https://napali.hpl.hp.com/pipermail/gc/attachments/20090219/7976c2fa/diff63.obj

More information about the Gc mailing list