diff --git a/ChangeLog b/ChangeLog index c5cf3bde6..625ad737d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-12-19 13:53-EST Gregory John Casamento + + * Source/GNUmakefile: Add synchronization.m to GNU_MFILES + and correct some formatting. + * Source/synchronization.m: Fix @synchronize support on + Windows. The __weak__ attribute doesn't work on Windows. + 2009-12-11 01:44-EST Gregory John Casamento * Source/synchronization.m: Corrected header text. diff --git a/Source/GNUmakefile b/Source/GNUmakefile index 83e143e73..9a752e0b4 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -106,11 +106,6 @@ ifeq ($(GNUSTEP_TARGET_OS), mingw32) GNU_MFILES += libgnustep-base-entry.m endif -ifeq ($(HAVE_OBJC_SYNC_ENTER), no) - GNU_MFILES += synchronization.m -endif - - GNU_OTHER_SRCFILES = \ win32-entry.m \ win32-def.top \ @@ -275,6 +270,9 @@ NSZone.m \ externs.m \ objc-load.m +ifeq ($(HAVE_OBJC_SYNC_ENTER), no) + GNU_MFILES += synchronization.m +endif ifneq ($(GNUSTEP_TARGET_OS), mingw32) BASE_MFILES += \ @@ -283,7 +281,7 @@ NSMessagePort.m \ NSMessagePortNameServer.m ifeq ($(GNUSTEP_BASE_HAVE_MDNS), 1) -BASE_MFILES += NSNetServices.m + BASE_MFILES += NSNetServices.m endif endif diff --git a/Source/synchronization.m b/Source/synchronization.m index 00e1e880c..33955a111 100644 --- a/Source/synchronization.m +++ b/Source/synchronization.m @@ -152,8 +152,12 @@ sync_add_node(id obj) /** * Add a lock for the object. */ +#ifndef __MINGW32__ int __attribute__((weak)) +#else +int +#endif objc_sync_enter(id obj) { lock_node_t *node = NULL; @@ -194,8 +198,12 @@ objc_sync_enter(id obj) /** * Remove a lock for the object. */ +#ifndef __MINGW32__ int __attribute__((weak)) +#else +int +#endif objc_sync_exit(id obj) { lock_node_t *node = NULL;